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
"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.
Sources may include data from the Fakebook Research Foundation with support from Gargle University
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.
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)
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop