2 Replies Latest reply on May 12, 2010 8:07 AM by slava_schmidt

    TimerService configuration with ejb-jar.xml

    slava_schmidt

      Hello,

       

      could anyone help me to figure out, how to configure the TimerService in EJB3 using ejb-jar.xml?

       

      Now i use following annotation:

       

      @Resource private TimerService timerService;

       

      and it works just fine. But i need to replace all annotations with an xml configuration. So i have tried this (in nearly all possible combinations):

       

      <resource-ref>
           <res-ref-name>EJBTimerService</res-ref-name>
           <res-type>javax.ejb.TimerService</res-type>
           <mapped-name>EJBTimerService</mapped-name>
           <injection-target>
                <injection-target-class>com.gkses.muc.master.beans.AbstractTimerControl</injection-target-class>
                <injection-target-name>timerService</injection-target-name>
            </injection-target>
      </resource-ref>

       

       

      Naturally, this is wrong. I would very appreciate any help to make it right!