[jboss-user] [EJB 3.0] - how to deploy a service pojo depending on ejb timer

Maria Luisa Della Vedova do-not-reply at jboss.com
Wed Jun 30 07:00:24 EDT 2010


Maria Luisa Della Vedova [http://community.jboss.org/people/mldv] replied to the discussion

"how to deploy a service pojo depending on ejb timer"

To view the discussion, visit: http://community.jboss.org/message/550363#550363

--------------------------------------------------------------
Here is the code of my stateless EJB
My EJB is a multiple Timer Object using the TimerService object.

@Stateless
@Local(ITimer.*class*)
*public* *class* TheTimerBean *implements* ITimer {


      @Resource
*private* SessionContext ctx;

      @Override
*public* *void* attiva() {
            ctx.getTimerService().createTimer(1 * 1000, 1 * 1000, null);

      }

      @Timeout
*public* *void* timeOutMethod(Timer timer) {
            …
      }

}
Thanks

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/550363#550363]

Start a new discussion in EJB 3.0 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100630/4ae98d20/attachment.html 


More information about the jboss-user mailing list