The fact that JOnAS doesn't *use* passivation does not excuse the server
from calling ejbActivate() to move an entity bean instance from the
'pooled' and into the 'ready' state when that instance is going to
service an existing existing entity object (section 9.1.4, including
Figure 23, see second bullet n page 103).  The only way to get to
'ready' without going through ejbActivate() is when calling
ejbCreate()/ejbPostCreate() pair - that is, when you're adding new data
to the system. Bringing data from the data store into an EJB body always
sends the instance through ejbActivate().

Wayne Stidolph

Sean Johnson wrote:

> > as i see, the ejbActivate() is never called, did i'm right?
>
> Yes, the current version of JOnAS never calls ejbActivate() or
> ejbPassivate().
>
> > in my code i'm using ejbActivate() to set the private fields
> > with the values got from "context.getPrimaryKey()".
> > then, in my loadRow-method, i can bind the values from
> > the private fields (_not_ using the PK).
> > (i copied this technic from j2sdkee, inprise, weblogic)
>
> It's a bad technique if it relies on ejbActivate(). The
> purpose of the ejbPassivate() ejbActivate() pair is to
> give your bean a place to prepare for being serialized
> out to disk and to recover from being serialized in
> from disk.
>
> Typical things you would do would on ejbPassivate() would
> be to free resources such as locked files and socket
> connections. On ejbActivate() you would typically reestablish
> resources such as files and socket connections and reinitialize
> any transient attributes.
>
> > is this a feature or bug or did i'm missing something?
>
> More of a lack of a feature. JOnAS does not yet passivate beans.
>
> Later,
> Sean
>
> ----
> To unsubscribe, send email to [EMAIL PROTECTED] and
> include in the body of the message "unsubscribe jonas-users".
> 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 "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".

Reply via email to