when we need access to database tables in our business logic, we use a dao in the stateless session bean containing the business logic instead of creating an entity bean and having the stateless session bean access the entity bean. when would an entity bean be the prefered solution? what are the advantages of using them instead of a dao in a slsb?
I think with EJB 2.0, entity beans are becoming more popular because many of the performance problems have been solved. As Prashanth noted, they are more inline with using declarative services such as persistence and transactions.
Hi all, I originally wrote most of my DAOs using Stateless session beans. However, even with the release of the EJB 2.0 spec, for most of the work I do I find a lot of the OS OR mapping tools like Torque or OJB are just too darn easy to use? What are your opinions? :,>
John Carnell<br />Principal Architect<br /> <br />Netchange, LLC<br />1161 HillCrest Heights<br />Green Bay, WI 54313<br /> <br />email@example.com<br /> <br /> <br />Author of <a href="http://www.amazon.com/exec/obidos/ASIN/159059228X/ref=jranch-20" target="_blank" rel="nofollow">Pro Jakarta Struts, Second Edition</a>
i too prefer slsb --> dao instead of slsb --> entity bean --> dao what are the effects on performance and scaleability? would the entity bean solution have better performance and scaleability? are there any articles or whitepapers discussing the tradeoffs?
Joined: Jan 05, 2001
I think the entity bean camp argues now to slsb --> entity bean (CMP) instead of slsb --> dao or slsb --> entity bean (BMP) --> dao The CMP entity beans will be clustered by most containers so the scalability might be higher with them (although since it is recommended to use a session facade with local references I'm not really sure how this pans out). I don't see any general performance rationale, the benchmark would probably depend upon how well the container vendor implements the CMP. [ October 06, 2002: Message edited by: Jim Baiter ]
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com