Hi:
I would appreciate some help with a problem I have been trying to
solve, but (obviously!) haven't been able to.
I have an instance of an entity EJB with CMP (Bean A). This bean holds
references (by references, I mean EJBObject instances) to two other
entity EJBs also with CMP(Beans B and C). Can I be sure that at any
point in time, my EJBObject instances (to beans B and C) will be valid?
I ask this because, I am not sure about the way a container handles the
private attributes of an entity bean with CMP. Is there a way in which I
can ensure that the references I hold are *good*? I normally obtain the
interfaces to beans B and C in my setEntityContext method of bean A as I
need these instances for the lifetime of bean A. And bean A's lifetime
coould be forever! If I do need to 'refresh' by bean EJBobject
instances, how can I achieve that and where should this be done.
My first shot at this was that I should obtain the Handle object from
the EJBObject (I am not sure if I can, coz I could not quite make it out
from the spec) and store this handle as a container managed attribute.
Whenever the container calls the ejbLoad method, I should perform the
reverse. The only hitch to this is that I feel it is very expensive to
have this functionality in the ejbLoad method (which could be called a
number of times???). The next logical place I coudl have this piece of
code is the ejbActivate I guess. But then....
S.O.S! Mayday! Help! ...
Thanks and appreciate your help!
Purush
===========================================================================
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".