The spec does not say that. It says that references to the java:comp/env JNDI context
or any of its subcontexts are valid.

<ejb 1.1 spec>
6.4.1 Instance passivation and conversational state
The Bean Provider is required to ensure that the ejbPassivate method leaves the 
instance fields
ready to be serialized by the Container. The objects that are assigned to the 
instance's non-transient
fields after the ejbPassivate method completes must be one of the following:
. A serializable object[2].
. A null.
. An enterprise bean's remote interface reference, even if the stub class is not 
serializable.
. An enterprise bean's home interface reference, even if the stub class is not 
serializable.
. A reference to the SessionContext object, even if it is not serializable.
. A reference to the environment naming context (that is, the java:comp/env JNDI 
context)
or any of its subcontexts.
. A reference to the UserTransaction interface.
. An object that is not directly serializable, but becomes serializable by replacing 
the references
to an enterprise bean's remote and home interfaces, the references to the 
SessionContext
object, the references to the java:comp/env JNDI context and its subcontexts, and the 
references
to the UserTransaction interface by serializable objects during the object's 
serialization.
</ejb 1.1 spec>

----- Original Message ----- 
From: "Francesco Calderini" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 20, 2001 2:58 AM
Subject: [JBoss-user] Stateful bean passivation problem


> Hello,
> 
> I get the following exception when the container attempts to passivate
> my stateful session bean :
> 
> [Container factory] java.rmi.ServerException: Could not passivate; nested
> exception is:
> [Container factory]     java.io.NotSerializableException:
> javax.naming.InitialContext
> ...
> 
> The problem seems to be related to the reference to the JNDI Context I would
> like to maintain as part of the bean's conversational state.
> Accordingly to the EJB 1.1 specs a bean's conversational state may also consist
> of references to javax.naming.Context.
> 
> Thanks for any help.
> 
> Francesco.
> 
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
> 


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to