Re: CMR
Hemant Khandelwal <[email protected]>
| Newsgroups | gmane.comp.java.sun.ejb.general |
|---|---|
| Message-ID | <[email protected]> |
It really depends on the strategy that you want to choose based on the "closeness" of your relationships. Typically app servers provide options for 1. Immediate loading (where you can load both the beans together) 2. Lazy loading (where bean will be loaded whenever the getter on CMR is accessed) Coupled with this, there can be option to load only pk or the entire target bean. So in your case, various options can be : 1a. When driver is loaded, only carPk is loaded 1b. When driver is loaded, entire car record is loaded 2a. When getCar is called only carPk is loaded 2b. When getCar is called, entire car record is loaded When only carPK is loaded, entire car record can be loaded on the first business method call to the car entity bean. You need to consult your vendor's document for the kind of support they provide. Regards, Hemant www.pramati.com ----- Original Message ----- From: glenn To: [email protected] Sent: Monday, August 18, 2003 7:03 AM Subject: CMR When using CMR and there is a simple senario like such : driver --- ownes -->> car e.g. public class driver extends EjbBean { ... ... abstract public void setCar(Car someCar); abstract public Car getCar(); .... .... } When retrieving driver, will car be loaded automatically? How is lazy loading used with CMR (esp for tall object graphs)? Thanks =========================================================================== To unsubscribe, send email to [email protected] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [email protected] and include in the body of the message "help". =========================================================================== To unsubscribe, send email to [email protected] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [email protected] and include in the body of the message "help".