I disagree with Tom's assessment of the EJB references and passivation in
stateful session beans.  According to the specification, EJB references are
supposed to be maintained while the stateful session bean is passivated.
When the bean is activated the reference is supposed to be alive and ready
to go ( the exception being session beans that have timed-out or entities
that have been removed).

Quote from the EJB Specification, Section 6.4.1
"An instance may hold EJB object references to other EJB objects (sessions
or entities). When the container passivates the instance after ejbPassivate,
it must store the EJB object references with the passivated instance, and
reconstruct these object references when it loads the instance's state
before ejbActivate."

Unfortunately, at least one EJB vendor, who shale remain nameless, didn't
implement this correctly and as a result EJB references are lost when the
stateful session bean is passivated. This is an incorrect implementation of
the specification.

Richard


-----Original Message-----
From: Tom Valesky
To: [EMAIL PROTECTED]
Sent: 2/25/99 2:32 PM
Subject: Re: statefull session beans & passivation

[snip]

In general, you shouldn't serialize references to resources (files,
sockets, EJBs) when a bean is passivated. Close them out and reobtain
them
later.

I'm sure Rickard Oberg will be happy to tell you about his Smart
Proxies,
and how they address this particular difficulty. :-)

========================================================================
===
                Tom Valesky   -- [EMAIL PROTECTED]
                     http://www.patriot.net/users/tvalesky

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

Reply via email to