Hi!
"Kenneth D. Litwak" wrote:
> I have a basic question about session bean lifecycle. Here's how I understand
> what happens.
> 1. A client connects to the EJB server, using a reference to the home object
> from JNDI. Or does JNDI have a reerene to the factory that produces home
> objects and uses the appropriate interface to call for a home object? Or?
If I understand you correctly, then yes.
> 2. The caller uses the reference from the home object to call methods on the
> bean via the EJBObject. This EJBObject and the corresponding session bean
> instance are unique and speciic to a gien client.
Te session bean instances are not specific to each client *if* they are
stateless. If they are stateful, then they are.
The EJBObject may or may not be specific to each client, depending on
implementation. In general, any CORBA-based solution uses a
non-client-specific EJBObject which handles all method invocations from
all clients.
> 3. Even though the client has not called remove, it is perfectly possible for
> the container to discard a stateful session bean instance (and its corresponding
> EJBObject) after a client call. To deal with this the bean developer needs to
> put code in activate andpassivate methods to save and restore the session bean
> state. The new instance is found thorugh the handle the client already had to
> the EJBObject.
Correct, in the case of stateful session beans. Not correct, if
stateless, as they do not have any state that can be passivated.
/Rickard
--
Rickard �berg
@home: +46 13 177937
Email: [EMAIL PROTECTED]
Homepage: http://www-und.ida.liu.se/~ricob684
===========================================================================
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".