  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Struts - A MVC web framework | | Tomcat - JSP/Servlet container | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | | JSP - A mailing list about Java Server Pages specification and reference | |
Struts & Hibernate
|
|
|
  | | | Pattern Composite Entity is still good for EJB 2.0 | Pattern Composite Entity is still good for EJB 2.0 2003-08-29 - By Deepak Alur
Back Pradeep, The Composite Entity pattern is still relevant to Entity bean design. It would be a misconception that this pattern is unnecessary now with EJB 2.x. We introduced a pattern called Business Object in the 2nd edition. Business Object talks about implementing your conceptual domain model and can be implemented as POJOs (Plain old Java Objects) or entity beans. When you choose to go with entity beans, you still need to consider a many things and that is where the Composite Entity pattern comes in. Here are the reasons why you should this pattern still applies regardless of whether you are using EJB 1.x or 2.x: 1. It address is how to design entity beans that implement your business objects in the domain model regardless of EJB 1.x or 2.x. 2. It is applicable whether you choose to implement the dependent objects as local entity beans or as POJOs regardless of EJB 1.x or 2.x. 3. Some strategies (Lazy Loading, Store Optimization) outlined in this pattern are still applicable if you choose to use BMP (which is still widely in use with entity beans) regardless of EJB 1.x or 2.x. 4. If you are using EJB 1.1 containers or if you wish to continue using EJB 1.1 style entity beans, this pattern is still applicable. 5. (Reiterating what Sean said in his reply) hope this helps, -deepak
Pradeep Kumar wrote:
>This pattern was introduced only to address the drawbacks of EJB 1.1 >Now with EJB 2.0, this pattern must be outdated. I can't believe why this is >still discussed in the 2nd edition of core patterns book. > > -- --Original Message-- -- >From: Sean Brydon [mailto:Sean.Brydon@(protected)] >Sent: Friday, August 29, 2003 4:30 AM >To: J2EEPATTERNS-INTEREST@(protected) >Subject: Re: Pattern Composite Entity is still good for EJB 2.0 > >Hi, >Yes it is valid, especially for EJB2.0 and higher. Local EJBs make this >a valuable design. This pattern is discussed and updated in the second >edition of the patterns book, now available. An example of this strategy >is at >http://java.sun.com/blueprints/patterns/CompositeEntity.html >and this is done in the petstore application. > >hope that helps, >Sean >Le Quang Tu wrote: > > > >>Hi all, >>In "The Core J2EE pattern" book, the Composite Entity Pattern is >>recommended for the Coarse-Grained Entity bean. But in another book - >>"the EJB Pattern" which is available in theserverside.com, the author >>recommends that "Don't Use the Composite Entity Bean Pattern", because >>it is built for the 1.x specification. The problem with dependent >>objects is that they are impossible to create, using your application >>server's CMP engine and extremely difficult to implement using BMP. >>Managing the life cycle of a set of dependent objects in BMP >>is equivalent to writing your own persistence engine. >> >>EJB 2.0 can support the CMP EJB relationship among entity beans. With >>this enhancement, including Local interface, entity bean can now be >>used to domain objects in your design model as finely as you like. >> >>So is Composite Entity Pattern still good for EJB 2.0 now? >> >>Le Quang Tu >>==================================================================== >>Companion Site: http://www.corej2eepatterns.com J2EE BluePrints: >>http://java.sun.com/blueprints/corej2eepatterns List Archive: >>http://archives.java.sun.com/archives/j2eepatterns-interest.html >>Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to >>listserv@(protected) >> >> > >==================================================================== >Companion Site: http://www.corej2eepatterns.com >J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns >List Archive: >http://archives.java.sun.com/archives/j2eepatterns-interest.html >Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected) > > > > >DISCLAIMER: >This message (including attachment if any) is confidential and may be privileged. Before opening attachments please check them for viruses and defects. MindTree Consulting Private Limited (MindTree) will not be responsible for any viruses or defects or any forwarded attachments emanating either from within MindTree or outside. If you have received this message by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission. > >==================================================================== >Companion Site: http://www.corej2eepatterns.com >J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns >List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html >Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected) > >
==================================================================== Companion Site: http://www.corej2eepatterns.com J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859 (See http://ISO-8859.ora-code.com)-1"> <title></title> </head> <body> Pradeep,<br> The Composite Entity pattern is still relevant to Entity bean design. It would be a <br> misconception that this pattern is unnecessary now with EJB 2.x. We introduced <br> a pattern called Business Object in the 2nd edition. Business Object talks about <br> implementing your conceptual domain model and can be implemented as <br> POJOs (Plain old Java Objects) or entity beans. When you choose to go <br> with entity beans, you still need to consider a many things and that<br> is where the Composite Entity pattern comes in. Here are the<br> reasons why you should this pattern still applies regardless of whether<br> you are using EJB 1.x or 2.x:<br> 1. It address is how to design entity beans that implement your business objects <br> in the domain model regardless of EJB 1.x or 2.x. <br> 2. It is applicable whether you choose to implement the dependent objects as <br> local entity beans or as POJOs regardless of EJB 1.x or 2.x. <br> 3. Some strategies (Lazy Loading, Store Optimization) outlined in this pattern <br> are still applicable if you choose to use BMP (which is still widely in use <br> with entity beans) regardless of EJB 1.x or 2.x. <br> 4. If you are using EJB 1.1 containers or if you wish to continue using<br> EJB 1.1 style entity beans, this pattern is still applicable.<br> 5. (Reiterating what Sean said in his reply)<br> hope this helps,<br> -deepak<br> <br> Pradeep Kumar wrote:<br> <blockquote type="cite" cite="mid8A9E18385C536F40AFD9DFA8ED7BBEA90225C5B3@(protected)"> <pre wrap="">This pattern was introduced only to address the drawbacks of EJB 1.1 Now with EJB 2.0, this pattern must be outdated. I can't believe why this is still discussed in the 2nd edition of core patterns book.
-- --Original Message-- -- From: Sean Brydon [<a class="moz-txt-link-freetext" href="mailto:Sean.Brydon @(protected)">mailto:Sean.Brydon@(protected)</a>] Sent: Friday, August 29, 2003 4:30 AM To: <a class="moz-txt-link-abbreviated" href="mailto:J2EEPATTERNS-INTEREST @(protected)">J2EEPATTERNS-INTEREST@(protected)</a> Subject: Re: Pattern Composite Entity is still good for EJB 2.0
Hi, Yes it is valid, especially for EJB2.0 and higher. Local EJBs make this a valuable design. This pattern is discussed and updated in the second edition of the patterns book, now available. An example of this strategy is at <a class="moz-txt-link-freetext" href="http://java.sun.com/blueprints/patterns /CompositeEntity.html">http://java.sun.com/blueprints/patterns/CompositeEntity .html</a> and this is done in the petstore application.
hope that helps, Sean Le Quang Tu wrote:
</pre> <blockquote type="cite"> <pre wrap="">Hi all, In "The Core J2EE pattern" book, the Composite Entity Pattern is recommended for the Coarse-Grained Entity bean. But in another book - "the EJB Pattern" which is available in theserverside.com, the author recommends that "Don't Use the Composite Entity Bean Pattern", because it is built for the 1.x specification. The problem with dependent objects is that they are impossible to create, using your application server's CMP engine and extremely difficult to implement using BMP. Managing the life cycle of a set of dependent objects in BMP is equivalent to writing your own persistence engine.
EJB 2.0 can support the CMP EJB relationship among entity beans. With this enhancement, including Local interface, entity bean can now be used to domain objects in your design model as finely as you like.
So is Composite Entity Pattern still good for EJB 2.0 now?
Le Quang Tu ==================================================================== Companion Site: <a class="moz-txt-link-freetext" href="http://www .corej2eepatterns.com">http://www.corej2eepatterns.com</a> J2EE BluePrints: <a class="moz-txt-link-freetext" href="http://java.sun.com/blueprints /corej2eepatterns">http://java.sun.com/blueprints/corej2eepatterns</a> List Archive: <a class="moz-txt-link-freetext" href="http://archives.java.sun.com/archives /j2eepatterns-interest.html">http://archives.java.sun.com/archives/j2eepatterns -interest.html</a> Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to <a class="moz-txt-link-abbreviated" href="mailto:listserv@(protected)" >listserv@(protected)</a> </pre> </blockquote> <pre wrap=""><!----> ==================================================================== Companion Site: <a class="moz-txt-link-freetext" href="http://www .corej2eepatterns.com">http://www.corej2eepatterns.com</a> J2EE BluePrints: <a class="moz-txt-link-freetext" href="http://java.sun.com /blueprints/corej2eepatterns">http://java.sun.com/blueprints/corej2eepatterns</a > List Archive: <a class="moz-txt-link-freetext" href="http://archives.java.sun.com/archives /j2eepatterns-interest.html">http://archives.java.sun.com/archives/j2eepatterns -interest.html</a> Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to <a class="moz-txt-link -abbreviated" href="mailto:listserv@(protected)">listserv@(protected)</a>
DISCLAIMER: This message (including attachment if any) is confidential and may be privileged. Before opening attachments please check them for viruses and defects. MindTree Consulting Private Limited (MindTree) will not be responsible for any viruses or defects or any forwarded attachments emanating either from within MindTree or outside. If you have received this message by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission.
==================================================================== Companion Site: <a class="moz-txt-link-freetext" href="http://www .corej2eepatterns.com">http://www.corej2eepatterns.com</a> J2EE BluePrints: <a class="moz-txt-link-freetext" href="http://java.sun.com /blueprints/corej2eepatterns">http://java.sun.com/blueprints/corej2eepatterns</a > List Archive: <a class="moz-txt-link-freetext" href="http://archives.java.sun .com/archives/j2eepatterns-interest.html">http://archives.java.sun.com/archives /j2eepatterns-interest.html</a> Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to <a class="moz-txt-link -abbreviated" href="mailto:listserv@(protected)">listserv@(protected)</a> </pre> </blockquote> <br> </body> </html> ==================================================================== Companion Site: http://www.corej2eepatterns.com J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)
|
|
 |