[jboss-dev-forums] [EJB Development] - the timer service has beean disabled, please add a <timer-service> entry into the ejb section

Icey Thomas do-not-reply at jboss.com
Tue Oct 18 03:55:50 EDT 2011


Icey Thomas [http://community.jboss.org/people/icey.xiong] created the discussion

"the timer service has beean disabled,please add a <timer-service> entry into the ejb section"

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

--------------------------------------------------------------
Dear all,
      I want to create a timer-service on JBoss As 7.0.here is my work:

@Singleton
@Local(UserLocal.class)
@Startup
public class User implements UserLocal
{
          @Resource
          TimerService timer;
          
          @Timeout
          public void run(Timer timer)
          {
                   System.out.println("time out!");
          }
          @PostConstruct
          public void scheduleTimer()
          {
                   timer.createTimer(new Date(),1000*1*60,null);
           }
}
--------------------------------------------------------------

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

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20111018/79c26ba6/attachment.html 


More information about the jboss-dev-forums mailing list