1 Reply Latest reply on Oct 30, 2003 12:00 PM by wshaib

    Passivation behavior after a ctx lock error

    Ghinwa K Newbie

      Hi

      I have a stateful session bean that is processing a call which takes a while to complete. I have set the max bean life to a short interval to expedite testing. Now when the container tries to passivate the bean while the bean is still processing the call, passivation fails because of ctx lock. That's understandable. But what I have noticed is that this bean is no longer considered for passivation later on after that call has completed. Any ideas? thanks.

        • 1. Re: Passivation behavior after a ctx lock error
          wshaib Newbie

          I have reproduced the same behavior. The following server.log snippet illustrates. (ver. 3.2.2RC3)

          Any help on this would be greatly appreciated. Thanks.

          ---------------------------------------------------------------
          2003-10-30 13:30:44,793 INFO [STDOUT] *** In SamplePullSupplier.MyMethod: blocking on resource...
          2003-10-30 13:31:22,598 WARN [org.jboss.ejb.plugins.AbstractInstanceCache] Unable to passivate due to ctx lock, id=dmf4y0ha-8
          2003-10-30 13:36:08,501 INFO [STDOUT] *** In SamplePullSupplier.MyMethod: resource available
          2003-10-30 13:36:08,501 INFO [STDOUT] *** In SamplePullSupplier.MyMethod returning.
          2003-10-30 13:46:07,542 DEBUG [org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager] Attempting to activate; ctx=org.jboss.ejb.StatefulSessionEnterpriseContext@7e9bed
          2003-10-30 13:46:07,542 DEBUG [org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager] Reading session state from: D:\jboss-3.2.2RC3\server\default\tmp\sessions\SamplePullSupplier-dmf4ufyb-6\dmf4y0ha-8.ser
          2003-10-30 13:46:07,682 DEBUG [org.jboss.ejb.plugins.AbstractInstanceCache] Activation failure
          javax.ejb.EJBException: Could not activate; failed to restore state; CausedByException is:
          D:\jboss-3.2.2RC3\server\default\tmp\sessions\SamplePullSupplier-dmf4ufyb-6\dmf4y0ha-8.ser (The system cannot find the file specified)
          at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.activateSession(StatefulSessionFilePersistenceManager.java:324)
          at org.jboss.ejb.plugins.StatefulSessionInstanceCache.activate(StatefulSessionInstanceCache.java:90)
          at org.jboss.ejb.plugins.AbstractInstanceCache.get(AbstractInstanceCache.java:113)
          at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:210)
          at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
          at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:361)
          at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128)
          at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
          at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
          at org.jboss.ejb.StatefulSessionContainer.internalInvoke(StatefulSessionContainer.java:416)
          at org.jboss.ejb.Container.invoke(Container.java:700)
          at sun.reflect.GeneratedMethodAccessor85.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:324)
          at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
          at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:362)
          at sun.reflect.GeneratedMethodAccessor78.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:324)
          at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
          at sun.rmi.transport.Transport$1.run(Transport.java:148)
          at java.security.AccessController.doPrivileged(Native Method)
          at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
          at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
          at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
          at java.lang.Thread.run(Thread.java:536)
          java.io.FileNotFoundException: D:\jboss-3.2.2RC3\server\default\tmp\sessions\SamplePullSupplier-dmf4ufyb-6\dmf4y0ha-8.ser (The system cannot find the file specified)
          at java.io.FileInputStream.open(Native Method)
          at java.io.FileInputStream.(FileInputStream.java:103)
          at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.activateSession(StatefulSessionFilePersistenceManager.java:308)
          at org.jboss.ejb.plugins.StatefulSessionInstanceCache.activate(StatefulSessionInstanceCache.java:90)
          at org.jboss.ejb.plugins.AbstractInstanceCache.get(AbstractInstanceCache.java:113)
          at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:210)
          at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
          at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:361)
          at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128)
          at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
          at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
          at org.jboss.ejb.StatefulSessionContainer.internalInvoke(StatefulSessionContainer.java:416)
          at org.jboss.ejb.Container.invoke(Container.java:700)
          at sun.reflect.GeneratedMethodAccessor85.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:324)
          at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
          at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:362)
          at sun.reflect.GeneratedMethodAccessor78.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:324)
          at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
          at sun.rmi.transport.Transport$1.run(Transport.java:148)
          at java.security.AccessController.doPrivileged(Native Method)
          at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
          at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
          at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
          at java.lang.Thread.run(Thread.java:536)