• Post Reply Bookmark Topic Watch Topic
  • New Topic

BMP and CMP a Arch. mistake?  RSS feed

 
Siegfried Heintze
Ranch Hand
Posts: 417
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've heard two public speakers (Roger Sessions and David Chappell at the recent softpro presentation) explain that Bean Managed Persistance and Container Managed Persistance as well as statefull session beans are an architectual mistake.
Both these speakers say Microsoft did it correctly with COM+ where the only option is (in EJB terminology) a stateless session bean.
David explained the reason CMP and BMP are mistakes are that EJB has to continually look for inconsistancies between what is stored in the database and the state of the EJB.
Is this true? Does anyone have any references? Who is using stateful session beans, CMP or BMP? Is this problem of maintaining state a problem as they say?
Siegfried
 
Tim Holloway
Bartender
Posts: 18662
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"We don't have it, so it must not be any good", eh?
There is an expense to statefull session beans and to Entity beans, but if what you're doing is worth the cost, the expense is more than made up by having a debugged standardized framework to work in.
In the case of Entity beans, one of the benefits is having the data cached within the scope of the server where it can be rapidly retrieved, assuming that your access needs are a good fit for caching. Yes, it is dangerous if there are other updaters to a table outside the EJB system, BUT THE SAME IS TRUE OF COM+. OS/2 taught me well that one should have ONE and ONLY ONE authoritative place for keeping and changing data. And just as with COM+, non-web applications can choose to use an EJB for their data access mechanism to make that be the case.
 
Rick Hightower
Author
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
People are using EJB CMP/CMR.
I don't feel it is an architectural mistake.
CMP/CMR and EJB QL makes EJB more useful.
Check out this posting...
EJB is useful and getting even more so!

CMP/CMR and EJB QL are very productive.
Check out this 4 part tutorial that is on developerWorks. Here is a site that explains the 4 part series....
4 part series on EJB 2.0 CMP/CMR and EJB QL
I've used EJB CMP/CMR in many production systems. It saved us a lot of time, and energy.
 
Siegfried Heintze
Ranch Hand
Posts: 417
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let me see if can summarize:
Don't use CMP if there are other folks updating your tables because it (EJB) will cache your data. Does this hold for all entity beans too?

Regarding the tutorial: Can I do the tutorial with JBOSS? if so what databases can I use?
 
Mon Mayor
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think what is meant here is that Sun has left the door open for complexities over data cache. This causes problems over transactions and locking. All these should be hidden away from developers. That seems to be Microsoft's take.
As far as Session beans go there could be some uses like non web clients or multiple web applications sharing sessions and for transactional session state. Tyler's article on SFSB are beasts of burden discusses all these.
Thanks
MM(SCEA)
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!