Hello,
I am in a delimma whether to model the BOM using Coarse grained
Entity Beans using BMP and DAO
pattern or to model using CMP and
justify performance using the good features available of
EJB containers that comply to EJB 2.0 specification. Some of the
features I would list as a justification to going for CMP are
1. FINDERS_LOAD_BEAN
2. RELATIONSHIP_CACHING
3. INHERENT LAZY LOADING
4. OPTIMISTIC CONCURRENCY coupled with CACHE_BETWEEN_TRANSACTIONS
etc.
However I am concerned that this appraoch will make my solution
container dependent and will need considerable amount of
effort while porting to another container.
If Coarse-grained BMP solution is used then I would like to justify
that solution by listing the following design mechanisms I would
employ.
1. Lazy Loading, i.e do not load all dependent
Java Objects that are
hanging out of the Coarse grained entity in ejbLoad() but load it
only when a get<<Dependent>>() method is called.
2. Dirty Marker- Moreover, make a
JDBC call to load the dependent
POJOs only if they are marked as Dirty.
What do you guys think? Which approach is more justifiable for the
FBN application?
Regards
Raj