This is a discussion on "J2EE Design Patterns (Database and Data)" still valid with EJB2.0 ? within the Software Patterns forums, part of the Testing category; Hi! I've just started my research in J2EE on the Business Objects side of things. So far I've ...
|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
"J2EE Design Patterns (Database and Data)" still valid with EJB2.0 ?
Hi!
I've just started my research in J2EE on the Business Objects side of things. So far I've only read Head First EJB and am currently reading "J2EE Design Patterns" (both O'Reilly) However, I've come across some conflicting advice with regard to data access patterns and would like some peoples opinions. In the Head First EJB Book which is based on EJB2.0. They state that in EJB1.1 and even in the pre-released version of EJB2.0 CMP was inefficient clunky etc. However they clearly say that due to fact that CMP2.0 is "light years ahead" (their words) that "there is little reason to ever use BMP". Now in the J2EE Design patterns Book they heavily cover Data Access Patterns and pretty much indicate that for various reasons you would use BMP. I didn't get the feel that they were saying that .... if things get out of hand use these patterns but more like things will get out of hand if you use CMP. So I check the dates to see if the patterns book was written after EJB2.0 and it was (from my understanding). So what do people here think ? I can see the issues about reducing the number of Entity beans. However I thought that if I kept to a limited set of EBs either the continer would merge multiple field request into one or database caching would solve a lot of the performance issues. If you were going to write a sizeable enterprise application and you are familiar EJB2.0 would you use these patterns or CMP2.0 ? Rgds, J |