Tedy,
A particular bean instance is associated with a particular
primary key from an ejbActivate/ejbCreate to an ejbPassivate/
ejbRemove. As such, the first sequence below is not valid.
The second and third sequences appear to be correct. Note
that in all sequences, the ejbLoad after ejbCreate is atypical,
although strictly speaking not incorrect.
As such, caching based on the primary key is allowed between
the various boundary calls.
-jkw
Daniel Caune wrote:
>
> Dear all,
>
> Does the instance of an entity bean, managed by the container, can be shared
> belong its life from the ejbCreate/ejbActivate until the
> ejbPassivate/ejbRemove between two primary keys ?
>
> Is this sequence possible ?
>
> ejbCreate (primaryKey1) => instance1 is used
> ejbLoad (primaryKey1) => instance1 is used
> myBeanMethod (primaryKey1) => instance1 is used
> ejbStore (primaryKey1) => instance1 is used
> ejbCreate (primaryKey2) => instance1 is used
> ejbLoad (primaryKey2) => instance1 is used
> myBeanMethod (primaryKey2) => instance1 is used
> ejbStore (primaryKey2) => instance1 is used
>
> Or must these sequences always be used by the container ?
>
> ejbCreate (primaryKey1) => instance1 is used
> ejbLoad (primaryKey1) => instance1 is used
> myBeanMethod (primaryKey1) => instance1 is used
> ejbStore (primaryKey1) => instance1 is used
> ejbCreate (primaryKey2) => instance2 is used
> ejbLoad (primaryKey2) => instance2 is used
> myBeanMethod (primaryKey2) => instance2 is used
> ejbStore (primaryKey2) => instance2 is used
>
> ejbCreate (primaryKey1) => instance1 is used
> ejbLoad (primaryKey1) => instance1 is used
> myBeanMethod (primaryKey1) => instance1 is used
> ejbStore (primaryKey1) => instance1 is used
> ejbPassivate (primaryKey1) => instance1 is used
> ejbCreate (primaryKey2) => instance1 is used
> ejbLoad (primaryKey2) => instance1 is used
> myBeanMethod (primaryKey2) => instance1 is used
> ejbStore (primaryKey2) => instance1 is used
> ejbActivate (primaryKey1) => instance2 is used
> ejbLoad (primaryKey1) => instance2 is used
> myBeanMethod (primaryKey1) => instance2 is used
> ejbStore (primaryKey1) => instance2 is used
>
> The main question is : can I cache some internal data, corresponding to a
> primary key, into member of the current instance of my entity bean between
> ejbCreate/ejbActivate and the ejbPassivate/ejbRemove or not ?
>
> Regards,
>
> Tedy
>
> ===========================================================================
> 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".