EJB 3.0
  1. EJB 3.0
  2. EJBTHREE-2205

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

    Details

    • Component Fix Version(s):
      jboss-ejb3-core:1.7.5
    • Similar Issues:
      Show 10 results 

      Description

      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.

        Issue Links

          Activity

          Hide
          jaikiran pai
          added a comment -

          Fixed in r109488.

          Show
          jaikiran pai
          added a comment - Fixed in r109488.

            People

            • Assignee:
              jaikiran pai
              Reporter:
              jaikiran pai
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: