Re: EJB Passivation with Weblogic
Madhav Inamti <[email protected]> Tue, 25 Mar 2003 06:45:29 -0800
| Newsgroups | gmane.comp.java.sun.connector |
|---|---|
| Message-ID | <75C025AE395F374B81F6416B1D4BDEFB0108D02D@mtv-corpmail.microfocus.com> |
Can anyone from BEA comment on this ? Thanks, Madhav -----Original Message----- From: Allwin Immanuel [mailto:[email protected]] Sent: Monday, March 24, 2003 7:35 PM To: [email protected] Subject: Re: EJB Passivation with Weblogic Madhav, Yea, weblogic.connector.common.internal.ConnectionWrapper is not serializable. That could be the problem. Allwin. -----Original Message----- From: Madhav Inamti [mailto:[email protected]] Sent: Tuesday, March 25, 2003 8:28 AM To: [email protected] Subject: Re: EJB Passivation with Weblogic Allwin, My impl of javax.resource.cci.Connection is Serializable. I have verified this with writeObject. I have a feeling it is Weblogic's Proxy Wrapper that is causing this. Any thoughts ? May be I should set the connection to be transient. In that case at Activation I need to associate to connection, the proper ManagedConnection myself. Madhav -----Original Message----- From: Allwin Immanuel [mailto:[email protected]] Sent: Monday, March 24, 2003 6:52 PM To: [email protected] Subject: Re: EJB Passivation with Weblogic Madhav, The reason for the error is: javax.resource.cci.Connection is not serializable (Serializability of a class is enabled by the class implementing the java.io.Serializable interface. Classes that do not implement this interface will not have any of their state serialized or deserialized.). Solution: Assign the instance's fields storing the connections to null. Below text is taken from the ejb spec : 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 . A null. An enterprise bean's remote interface reference, even if the stub class is not serializable. An enterprise bean's remote home interface reference, even if the stub class is not serializable. ........ This means, for example, that the Bean Provider must close all JDBC connections in ejbPassi-vate and assign the instance's fields storing the connections to null. Thanks, Allwin -----Original Message----- From: Madhav Inamti [mailto:[email protected]] Sent: Monday, March 24, 2003 11:20 PM To: [email protected] Subject: EJB Passivation with Weblogic When I have a stateful bean being passivated with Weblogic, I get an error <Error> <EJB> <010024> <Error during passivation: java.io.NotSerializableException: weblogic.connector.common.internal.ConnectionWrapper I have the javax.resource.cci.Connection as an EJB instance variable. Would appreciate some comments on this from folks who have been able to passivate and activate stateful EJB using Weblogic. Thanks in advance, Madhav