Uploaded image for project: 'JBoss Transaction Manager'
  1. JBoss Transaction Manager
  2. JBTM-972

LifecycleHandlers implemented via an EJB are invoked directly and not via the EJB stub

    XMLWordPrintable

Details

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              paul.robinson@redhat.com Paul Robinson
              paul.robinson@redhat.com Paul Robinson
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 1 day Original Estimate - 1 day
                  1d
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 days
                  2d