you cannot keep references that are not serializable, if you do then disable
the "passivation".

If you want to keep the passivation use the "activate' method to retrieve
your reference

marc


|-----Original Message-----
|From: [EMAIL PROTECTED]
|[mailto:[EMAIL PROTECTED]]On Behalf Of
|[EMAIL PROTECTED]
|Sent: Tuesday, November 21, 2000 3:16 PM
|To: [EMAIL PROTECTED]
|Subject: [jBoss-User] NotSerializableException
|
|
|Hi,
|
|while making my first steps with EJB I wanted to find out how much time
|it will take to make RMI-calls and additionally B2B-calls. My testprogram
|starts ten threads which create ten sessions including some entity beans.
|
|Running the program with one thread and one call is ok, but with the
|example above i get the following exception after some time:
|
|[Container factory] java.rmi.ServerException: Could not passivate; nested
|exception is:
|[Container factory]     java.io.NotSerializableException:
|javax.naming.InitialContext
|[Container factory] java.io.NotSerializableException:
|javax.naming.InitialContext
|[Container factory]     at java.io.ObjectOutputStream.outputObject(Unknown
|Source)
|[Container factory]     at java.io.ObjectOutputStream.writeObject(Unknown
|Source)
|[Container factory]     at
|java.io.ObjectOutputStream.outputClassFields(Unknown Source)
|[Container factory]     at
|java.io.ObjectOutputStream.defaultWriteObject(Unknown Source)
|[Container factory]     at java.io.ObjectOutputStream.outputObject(Unknown
|Source)
|[Container factory]     at java.io.ObjectOutputStream.writeObject(Unknown
|Source)
|[Container factory]     at
|org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passiva
|teSession(StatefulSessionFilePersist
|enceManager.java:271)
|[Container factory]     at
|org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(Statef
|ulSessionInstanceCache.java:54)
|[Container factory]     at
|org.jboss.ejb.plugins.EnterpriseInstanceCache$1.execute(EnterpriseI
|nstanceCache.java:341)
|[Container factory]     at
|org.jboss.util.WorkerQueue$QueueLoop.run(WorkerQueue.java:199)
|[Container factory]     at java.lang.Thread.run(Unknown Source)
|
|The stateful sessions beans i create have an attribute which is of type
|'javax.naming.Context' and is assigned an object of type 'InitialContext'
|during the call to the methode setSessionContext(). I assume the
|attribute and
|the object it is refering to are passivated.
|
|Have I to declare these attributes transient in an statefull session bean?
|And if, where to I set up the context again?
|
|Regards,
|Christian
|
|--
|Sent through GMX FreeMail - http://www.gmx.net
|
|
|
|--
|--------------------------------------------------------------
|To subscribe:        [EMAIL PROTECTED]
|To unsubscribe:      [EMAIL PROTECTED]
|Problems?:           [EMAIL PROTECTED]
|
|



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to