Tom,

Assuming you are not using a clustered server and the database will not be
updated outside of the application server, you can get away with optimizing
ejbLoad. However, you most also be sure to clear any persistent data in
ejbPassivate and ejbRemove. Also, you shouldn't save any data retrieved during
an ejbFind. You might also consider using a lazy loading scheme where you delay
loading the address collection until it's needed.

--Victor

Tom Jordan wrote:

> Hi,
>
> We have taken the following path to using entity beans with dependant
> objects and would like to know from others if the approach is valid and if
> there are performance or scalability issues that might arise from the
> design.
>
> Thanks in Advance
> Tom.
>
> Example:
> User is an Entity bean, and it has a 1 to n releations with Address .
> Address is a normal java class. Persistence is handled by the Userbean. The
> user bean maintians a collection that contains address object. Here is where
> the confusion starts:
> When ever you call a business method, the ejb container calls ejbLoad().
> Originally on the call to ejbLoad() we were reloading the address collection
> each time, which I thought was very poor for peformance. I only want address
> to be reloaded when either a new user is created (in which the collection is
> emptied) or when we have a new user and the finder method is called. What is
> the best way to do this?
>

===========================================================================
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".

Reply via email to