Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

FBN SCEA Part II BMP VS CMP

 
Raj Nerurkar
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Thomas Taeger
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Raj,
Originally posted by Raj Nerurkar:
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.

Pretty sure you have much more experience in EJB design, deployment, porting and maintenance than I have.

I wunder where container dependency could come in for CMP except for
- the way of deployment, i.e. the vendor specific deployment tool - ok
- using proprietary container extensions - necessarily?

Does for CMP any container dependency also come in for
- the deployment descriptors being vendor specific, and in what degree? (not just including an [additional] vendor specific jar)
- any vendor specific code changes needed?
- what else ...?

Thomas
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic