Hi all, i am quite perplexed by this situation. My config is JBOSS 3.2.1 with Java and connecting to a postgres database. all my connections work just fine and our system is in good shape except one glitch.
We are retrieving data from some external datasource. This process takes a good 20-30 minutes to come back. In all these activities we are using simple stateless session beans. one bean calls another and so on. Since it takes such a long time to come back, i believe JBOSS will obviously destroy some of the stateless session beans or ejbRemove them. So i have code to close the connection to a db in the remove method.. however midway through those 20 minutes, i get a could not passivate exception. Here's the stack trace: javax.ejb.EJBException: Could not passivate; failed to save state; CausedByException is: org.jboss.resource.adapter.jdbc.WrappedConnection at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:378) at org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(StatefulSessionInstanceCache.java:85) at org.jboss.ejb.plugins.AbstractInstanceCache.tryToPassivate(AbstractInstanceCache.java:156) at org.jboss.ejb.plugins.AbstractInstanceCache.release(AbstractInstanceCache.java:192) at org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy.ageOut(LRUEnterpriseContextCachePolicy.java:274) at org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy$OveragerTask.kickOut(LRUEnterpriseContextCachePolicy.java:446) at org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy$OveragerTask.run(LRUEnterpriseContextCachePolicy.java:405) at java.util.TimerThread.mainLoop(Timer.java:432) at java.util.TimerThread.run(Timer.java:382) java.io.NotSerializableException: org.jboss.resource.adapter.jdbc.WrappedConnection at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278) at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:370) at org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(StatefulSessionInstanceCache.java:85) at org.jboss.ejb.plugins.AbstractInstanceCache.tryToPassivate(AbstractInstanceCache.java:156) at org.jboss.ejb.plugins.AbstractInstanceCache.release(AbstractInstanceCache.java:192) at org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy.ageOut(LRUEnterpriseContextCachePolicy.java:274) at org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy$OveragerTask.kickOut(LRUEnterpriseContextCachePolicy.java:446) at org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy$OveragerTask.run(LRUEnterpriseContextCachePolicy.java:405) at java.util.TimerThread.mainLoop(Timer.java:432) at java.util.TimerThread.run(Timer.java:382) now here's a list of my questions, firstly I don't know which passivate method of which class does this call. I can put print statements and figure that out hopefully but that's a minor issue. here's the ejb methods of the class that contains the control when this exception is thrown... public void ejbCreate() throws CreateException { /** @todo Complete this method */ Context ctx; try { ctx = new InitialContext(); mCCEDataSource = (DataSource) ctx.lookup("java:/CCEDS"); mNCBIProxy = new SeqHound( "C:\\jboss-3.2.1\\server\\default\\deploy\\.shoundremrc"); mNCBIProxy.SHoundInit(true, "CCE"); System.out.println("ejbCreate looked up CCEDS successfully"); } catch (Exception e) { e.printStackTrace(); throw new CreateException(); } } public void ejbRemove() throws EJBException, RemoteException { try { if (mCCEDataSourceConnection != null) { mCCEDataSourceConnection.close(); } mNCBIProxy.SHoundFini(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (SQLException e) { e.printStackTrace(); } } Mind you this is a stateless session bean, (saw it in the ejb jar file). I don't know what else to post. I need some help debugging this and finding out what the exact problem is. Any pointers are appreciated. Thanks Anuj View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3912714#3912714 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3912714 ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user