1 Reply Latest reply on Feb 27, 2009 4:15 PM by Felix Mayer

    SessionContext Not Injected in Scoped Class Loader

    Dip sd Newbie

      Hi,

      1. I am using scopped class loader for my EAR file. jboss-app.xml configuration is as follows,

      <jboss-app>
      <loader-repository>package:loader=My.ear</loader-repository>
      </jboss-app>

      2. I have one ejb.jar file in this My.ear file. This jar contains stateless session bean & uses timer services.

      3. For using timer services, I have injected SessionContext using @Resource annotation like,

      @Resource
      protected SessionContext context;

      4. Injection works well if I dont use jboss-app.xml. But if use jboss-app.xml, SessionContext is not injected and I get NullPointerException.

      Is there any entry that I have to make in application.xml for injecting resources? Or Is there any other way of getting this SessionContext referevce.

      Thanks in advace for help