-
Bug
-
Resolution: Done
-
Major
-
4.17.0.M1/5.0.0.M1
eFor a EJB service, the service method is invoked via the EJB stub. Notice the stack bellow:
http-localhost-127.0.0.1-8080-2@444 daemon, prio=5, in group 'main', status: 'runnable' java.lang.Thread.State: RUNNABLE at org.jboss.narayana.txframework.functional.services.ATService.invoke(ATService.java:69) at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-1) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:374) at org.jboss.as.weld.ejb.DelegatingInterceptorInvocationContext.proceed(DelegatingInterceptorInvocationContext.java:80) at org.jboss.narayana.txframework.impl.handlers.wsat.WSATHandler.proceed(WSATHandler.java:58) at org.jboss.narayana.txframework.impl.ServiceRequestInterceptor.intercept(ServiceRequestInterceptor.java:23)
However, when the lifecycle methods are invoked, they are invoked directly. Notice the missing org.jboss calls bellow the sun.reflect calls in the stacktrace bellow:
TaskWorker-4@504 daemon, prio=5, in group 'default-workqueue', status: 'runnable' java.lang.Thread.State: RUNNABLE at org.jboss.narayana.txframework.functional.services.ATService.commit(ATService.java:110) at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-1) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.narayana.txframework.impl.Participant.invoke(Participant.java:53) at org.jboss.narayana.txframework.impl.handlers.wsat.WSATDurable2PCParticipant.commit(WSATDurable2PCParticipant.java:18)
This is likely to cause a problem as the EJB instance may be destroyed, or re-used when the lifecycle method is invoked.