Here is a short eaxample:
| @Service | @Management(MyServiceManagement.class) | @Depends("jboss.ws:service=DeployerInterceptorEJB3") | public class MyService implements MyServiceManagement { | | private Timer timer = null; | | @Resource | private EJBContext ejbContext; | | public void start() throws Exception { | timer = ejbContext.getTimerService().createTimer(1000, "Say Hello!!"); | } | | @Timeout | public void timeout(Timer timer) { | System.out.println(timer.getInfo()); | timer = ejbContext.getTimerService().createTimer(1000, "Say Hello again!!"); | } | | public void stop() { | timer.cancel(); | } | } | | | public interface MyServiceManagement { | | public void start() throws Exception; | | public void stop() throws Exception; | } | | | /Oskar View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4140503#4140503 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4140503 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user