5 Replies Latest reply on May 18, 2003 9:09 PM by Alwyn Schoeman

    NoTxManager do 2 cleanup's on a close

    Alwyn Schoeman Newbie

      Hi,

      I am using 3.0.7. Whenever I do a close, including firing of the event, I can see 2 cleanup's being performed on the ManagedConnection.

      Is this a bug or a feature?

        • 1. Re: NoTxManager do 2 cleanup's on a close
          David Jencks Master

          Well, the spec specifically requires the adapter to not throw an exception if this happens (section 6.5.4), but its still (probably) a bug. Can you easily get a stack trace from each of the calls so I can see more easily why this is happening?

          • 2. Re: NoTxManager do 2 cleanup's on a close
            Alwyn Schoeman Newbie

            Hi David,

            Sorry for only replying now. How would I be able to print a stacktrace without an exception object?

            • 3. Re: NoTxManager do 2 cleanup's on a close
              David Jencks Master

              How about

              log.info("cleanup called", new Exception("stackTrace"));

              or new Exception("stack trace, don't panic").printStackTrace();

              assuming you have the adapter source code.

              • 4. Re: NoTxManager do 2 cleanup's on a close
                Alwyn Schoeman Newbie

                Hi,

                I must be suffering from "missing the obvious" syndrome.

                The adaptor is one I wrote for accessing crypto hardware, will see if I get the same without the hardware present...

                • 5. Re: NoTxManager do 2 cleanup's on a close
                  Alwyn Schoeman Newbie

                  Hi David,

                  The following is the stack trace. The second call is in the middle somewhere.

                  Let me know if you need more...

                  14:04:32,816 INFO [CryptoManagedConnection] close
                  14:04:32,862 INFO [CryptoManagedConnection] Cleanup Called
                  java.lang.Exception: Cleanup Stack Trace for Debugging
                  at com.smi.jca.crypto.CryptoManagedConnection.cleanup(CryptoManagedConnection.java:135)
                  at org.jboss.resource.connectionmanager.BaseConnectionManager2.unregisterAssociation(BaseConnectionManager2.java:666)
                  at org.jboss.resource.connectionmanager.NoTxConnectionManager$NoTxConnectionEventListener.connectionClosed(NoTxConnectionManager.java:109)
                  at com.smi.jca.crypto.CryptoManagedConnection.fireConnectionEvent(CryptoManagedConnection.java:115)
                  at com.smi.jca.crypto.CryptoManagedConnection.close(CryptoManagedConnection.java:179)
                  at com.smi.jca.crypto.CryptoConnectionImpl.close(CryptoConnectionImpl.java:28)
                  at com.smi.jca.example.CryptoEx1Bean.test(CryptoEx1Bean.java:120)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:660)
                  at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
                  at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
                  at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
                  at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:237)
                  at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:98)
                  at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
                  at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:208)
                  at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
                  at org.jboss.ejb.Container.invoke(Container.java:738)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
                  at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:383)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                  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:534)
                  14:04:32,876 INFO [CryptoManagedConnection] Cleanup Called
                  java.lang.Exception: Cleanup Stack Trace for Debugging
                  at com.smi.jca.crypto.CryptoManagedConnection.cleanup(CryptoManagedConnection.java:135)
                  at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.returnConnection(InternalManagedConnectionPool.java:214)
                  at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.returnConnection(JBossManagedConnectionPool.java:347)
                  at org.jboss.resource.connectionmanager.BaseConnectionManager2.returnManagedConnection(BaseConnectionManager2.java:494)
                  at org.jboss.resource.connectionmanager.NoTxConnectionManager$NoTxConnectionEventListener.connectionClosed(NoTxConnectionManager.java:112)
                  at com.smi.jca.crypto.CryptoManagedConnection.fireConnectionEvent(CryptoManagedConnection.java:115)
                  at com.smi.jca.crypto.CryptoManagedConnection.close(CryptoManagedConnection.java:179)
                  at com.smi.jca.crypto.CryptoConnectionImpl.close(CryptoConnectionImpl.java:28)
                  at com.smi.jca.example.CryptoEx1Bean.test(CryptoEx1Bean.java:120)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:660)
                  at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
                  at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
                  at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
                  at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:237)
                  at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:98)
                  at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
                  at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:208)
                  at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
                  at org.jboss.ejb.Container.invoke(Container.java:738)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
                  at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:383)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                  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:534)