Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-2205

setSessionContext(SessionContext ctx) doesn't get called for EJB2.x beans

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • depchain-1.0.0-alpha-43
    • depchain-1.0.0-alpha-43
    • core
    • None
    • jboss-ejb3-core:1.7.5

      After SwitchBoard integration, where we removed the ResourceHandler, org.jboss.ejb3.test.ejbthree959.unit.EJB21TestCase has been failing with:

      java.lang.RuntimeException: ctx is not set
      at org.jboss.ejb3.test.ejbthree959.MyStatefulBean.assertTrue(MyStatefulBean.java:107)
      at org.jboss.ejb3.test.ejbthree959.MyStatefulBean.checkCtx(MyStatefulBean.java:112)
      at org.jboss.ejb3.test.ejbthree959.MyStatefulBean.ejbCreate(MyStatefulBean.java:86)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
      at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:81)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:182)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)

      Apparently, the Ejb3DescriptorHandler used to "add" a @Resource annotation on setSessionContext method via AOP for EJB2.x beans so that the ResourceHandler would then pick it up during ENC setup and injection. http://fisheye.jboss.org/changelog/JBossAS/?cs=63298

      Now with SwitchBoard integration, we'll need to think of a way of getting past this.

              jaikiran Jaikiran Pai (Inactive)
              jaikiran Jaikiran Pai (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: