0 Replies Latest reply: Jun 4, 2009 1:50 PM by 690340 RSS

    @Resource problem in HTTP Servlets

    690340
      Hi I am trying to use SipFactory and TimerService in a HTTP Servlet with @Resource, but the objects are null. For SIP Servlets, the annotations works fine.

      Can someone help me?

      This is the HTTP Servlet code:

      @Resource(name="sip/myAppName/SipFactory")
      private SipFactory sf;
           
      @Resource(name="sip/myAppName/TimerService")
      private TimerService timerService;

      This is my sip.xml, where I define the application name:

      <sip-app xmlns="http://www.jcp.org/xml/ns/sipservlet"
           xmlns:javaee="http://java.sun.com/xml/ns/javaee">

           <distributable />
           <app-name>myAppName</app-name>
      (...)