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".
begin:vcard
n:Umbarje;Manisha
tel;cell:(206)-898-9926
tel;work:(206)-674-0070
x-mozilla-html:FALSE
org:EpicEdge
version:2.1
email;internet:[EMAIL PROTECTED]
title:Sr. Java Developer
adr;quoted-printable:;;5701 6thAve South,=0D=0ASuite No - 503=0D=0ASeattle WA 98108;;;;
fn:Manisha Umbarje
end:vcard

Reply via email to