Hi,
i'm using JBoss 4.0.4GA with EJB 3 RC9.
I created a MBean that creates an timer in the start method:
| @Service
| @Management(CleanerServiceManagement.class)
| public class CleanerService implements CleanerServiceManagement {
| @Resource
| private TimerService timerService;
|
| private static final String CALL_CLEANER = "callCleaner";
| private Log log = LogFactory.getLog(this.getClass());
|
| public void create() throws Exception {
| //
| }
|
| public void destroy() {
| //
| }
|
| public void start() throws Exception {
| timerService.createTimer(System.currentTimeMillis()+16000, 8000,
CALL_CLEANER);
| }
|
| public void stop() {
|
| }
|
| @Timeout
| public void timeout(Timer timer) {
| if (!(CALL_CLEANER.equals(timer.getInfo()))) {
| log.info("wrong timer");
| return;
| }
|
| log.info("***********************************");
| log.info("Timer called");
| log.info("***********************************");
| }
| }
|
Now the timeout method is called every 8 seconds twice. What is wrong? Or what
do i need to configure??
Thanks for help!
Michael
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3979409#3979409
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3979409
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user