Bugs item #531524, was opened at 2002-03-18 20:28
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=531524&group_id=22866

Category: JBossMQ
Group: v3.0 Rabbit Hole
Status: Open
Resolution: None
Priority: 5
Submitted By: Marius Kotsbak (mkotsbak)
Assigned to: Nobody/Anonymous (nobody)
Summary: Error in passivation of bean with JMS

Initial Comment:
I get this exception when using JMS as managed resource:

java.rmi.ServerException: Could not passivate; nested
exception is: 
        java.io.NotSerializableException:
org.jboss.resource.adapter.jms.JmsManagedConnectionFactory
java.io.NotSerializableException:
org.jboss.resource.adapter.jms.JmsManagedConnectionFactory
        at
java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1161)
        at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java(Compiled
Code))
        at
java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java(Compiled
Code))
        at
java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:486)
        at
java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1227)
        at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java(Compiled
Code))
        at
java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java(Compiled
Code))
        at
java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:486)
        at
java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1227)
        at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java(Compiled
Code))
        at
org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:287)
        at
org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(StatefulSessionInstanceCache.java:65)
        at
org.jboss.ejb.plugins.AbstractInstanceCache$1.execute(AbstractInstanceCache.java:737)
        at
org.jboss.util.WorkerQueue$QueueLoop.run(WorkerQueue.java:206)
        at java.lang.Thread.run(Thread.java:498)

Is this a bug (the class should be serializable for
example), or have I done something wrong (then it is a
bg too, because the errormessage should be better!)

Marius K

----------------------------------------------------------------------

Comment By: Chris Harris (charris)
Date: 2002-03-19 08:17

Message:
Logged In: YES 
user_id=8915

This is most likely because whatever JMS resources you are 
keeping in your bean (probably as instance variables) are 
not serializable. You can either a) mark them as transient 
in your bean b) explicitly shut them down / set them to 
null in your ejbPassivate() method.

I prefer method b) simply because it's more explicit and 
makes you think about closing these objects.


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=531524&group_id=22866

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to