EJB relationship 2004-03-26 - By Kancharlapalli,Sridhar
Back Why don't you add a new Entity Bean C to your design.
C is an association bean and maps the relationship between A and B.
so A and B beans functionlity is not inter-mingled and code is clear.
Regards, -Sridhar Kancharlapalli.
-- --Original Message-- -- From: Ricardo de Souza Moura [mailto:ricsouzamoura@(protected)] Sent: Thursday, March 25, 2004 11:53 PM To: J2EEPATTERNS-INTEREST@(protected) Subject: EJB relationship
Imagine that I have two Entity Beans A and B. The relashionship between them is mxn.
A have a getBs() method that return a Collection of B and B have a getAs() method that return a Collection of A.
if I want to put a B into the A, I need call the getBs() method from A and call add() from Collection, isn't it ?
But when I call the getBs() method, the container load all Bs to A. Imagine if I had 1000000 Bs in the A.
What is the solution to this challenge ?
Thanks
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ __ MSN Hotmail, o maior webmail do Brasil. http://www.hotmail.com
===================================================================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)
|
|