But doesnt the spec say that bean provider should not store
in a transient field a reference to any of the following
objects SessionContext object, environment JNDI naming
context, home and remote interfaces and UserTransaction
Interfaces

Im looking at the section titled 6.4 "Conversational state"
in EJB 1.1 spec.

My understanding was container could replace the
SessionContext as part of activation, but the bean needs to
retain an reference to SessionContext, hence cant declare
reference to SessionContext as Transient.


himagiri

Manisha Umbarje wrote:
>
> According to my knowledge, when container calls the ejbPassivate() method, it
> just passivates the state of the bean and not the SessionContext.  The next
> time it activates the bean, it assigns new SessionContext to this bean.
> SessionContext doesn't extend the Serializable interface
>
> Peter Delaney wrote:
>
> > Hi;
> >
> > I am told that I have to declare my SessionContext objects in my
> > SessionBean as such.
> >
> >     private transient SessionContext ctx;  and NOT    public
> > SessionContext ctx
> >
> > If I don't do this, I get a Serialization exception during the
> > passivation of my bean
> > via ejbPassivate().
> > The exception goes away if I change it to private transient, but the EJB
> >
> > specification state diagram for SessionBeans going from an Active to
> > Passive and then
> > back to Active state, is the calling of the ejbPassivate() and then
> > ejbActivate()
> > methods and NO calls to setSessionContext() method.
> >
> > With out this call to setSessionContext() or the ability to serialize
> > SessionContext
> > object, how is the EnterpriseBean going to get a reference to a good
> > SessionContext
> > object?
> >
> > Help with this would greatly appreciated.
> >
> > Thanks
> > Peter
> >
> > --
> >
> > ==============================================================
> > Peter M. Delaney                Phone: (978)794-3366 ext. 341
> > Object Technologist             Voice mail: (978)794-3366 ext. 341
> > Semaphore                       Fax: (978)794-3427
> > 800 Turnpike St.                Email: [EMAIL PROTECTED]
> > North Andover, MA 01845         Web Site: http://www.sema4usa.com
> > ==============================================================
> >
> > ===========================================================================
> > 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".

--
Himagiri Mukkamala - EA Server Engineering,
Sybase Inc.,     510.922.5477

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