>There's a major difference between stateful and stateless. Stateless
>don't have to exist in order for you to reference them and invoke them,
>they are created on demand. The EJB server can dispose of stateless
>instance beans when no method calls are made on them, whether or not a
>remote reference is held by the client.
>
>Stateful beans exist as long as they are referenced, and as long as at
>least one client keeps a reference to the bean instance it must exist.
>Garbage collection doesn't work here, since we're talking distributed,
>so the instance will be released if one of the following happens:
>
>* The client remembers to call remove
>* Enough time has passed for the bean to be disposed of
>
>With stateful beans you will want to dispose of them fairly early, e.g.
>after 20 minutes of inactivity. With stateless beans you will not want
>to dispose of them, but don't expect to hold a reference that is valid
>for days or weeks.
>

At least this is the spirit of the spec.  As it is shown on figure 6 (page 57)
and on figure 12 (page 69) of the 1.1 spec. It is important to note that
the bean can be disposed of no matter if it is passivated or not.

The spec also says that reference or Handle to session do not survive to
the server. This means that if the server dies, reference or Handle may
not be valid anymore (see p40, p43).


Benoit Tremblay (Clea informatique)
at Ericsson Research Canada

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