beforeCompletion, SecurityProxy and NotSupported bug
mirza_mohsin_beg Oct 10, 2002 11:30 PMHi,
I am seeing behaviour such that if you call a stateful session bean's remote method that has 'NotSupported' tx behaviour in the ejb-jar.xml, from the SecurityProxy invokeHome() method (JBoss3.0 ex1 in chap8), the container calls afterCompletion() method. This is incorrect and actually does not happen if the same remote method is called from everywhere else, ie not a SecurityProxy. I think this is a bug and is causing me a major heartache. Can anyone help ?
-Mohsin
19:12:41,173 ERROR [StatefulSessionInstanceInterceptor] failed to invoke beforeCompletion
java.lang.reflect.InvocationTargetException
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.plugins.StatefulSessionInstanceInterceptor$InstanceSynchronization.beforeCompletion(StatefulSessionInstanceInterceptor.java:421)
at org.jboss.tm.TxCapsule.doBeforeCompletion(TxCapsule.java:1394)
at org.jboss.tm.TxCapsule.commit(TxCapsule.java:364)
at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:73)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:201)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:60)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:203)
at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
at org.jboss.ejb.Container.invoke(Container.java:712)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:381)
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:536)
Caused by: javax.ejb.EJBException: Connection handle is not currently associated with a ManagedConnection
at com.security.MyStatefulBean.beforeCompletion(MyStatefulBean.java:245)
... 27 more