[
http://jira.jboss.com/jira/browse/EJBTHREE-827?page=comments#action_12349805 ]
David Owens commented on EJBTHREE-827:
--------------------------------------
After walking through the debugger a bit, it appears the first timer is created by my call
shown with this stack trace:
Thread [ScannerThread] (Suspended (breakpoint at line 247 in TimerServiceImpl))
TimerServiceImpl.createTimer(Date, long, Serializable) line: 247
TimerServiceImpl.createTimer(long, long, Serializable) line: 202
TimerServiceFacade.createTimer(long, long, Serializable) line: 66
<MY CLASS AND METHOD HERE>
The second timer appears to be created when EJBTimerServiceImpl.restoreTimers() is
called:
Thread [ScannerThread] (Suspended (breakpoint at line 247 in TimerServiceImpl))
TimerServiceImpl.createTimer(Date, long, Serializable) line: 247
TimerServiceFacade.createTimer(Date, long, Serializable) line: 56
EJBTimerServiceImpl.restoreTimers(ObjectName, ClassLoader) line: 430
GeneratedMethodAccessor110.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
...
NO REFERENCE TO MY CLASSES OR METHODS
Hope this helps track it down in some way.
creating timers inside start() creates duplicate timers.
--------------------------------------------------------
Key: EJBTHREE-827
URL:
http://jira.jboss.com/jira/browse/EJBTHREE-827
Project: EJB 3.0
Issue Type: Bug
Affects Versions: EJB 3.0 RC9 - FD
Environment: Windows 2000, JBoss 4.0.5 (jems installer), Java 1.5
Reporter: David Owens
Attachments: SimpleTimer.zip
Calling ctx.getTimerService().createTimer(...) within the start() method of a managed
service bean creates duplicate timers. In other words, I have a bean which is both
@Management and @Service which has a method which is @Timeout. In the start method of the
bean (when the bean is deployed) I create a new timer. But then the method marked
@Timeout is called twice. When I investigate the timers in by calling
ctx.getTimerService().getTimers(), I find there are actually 2 timers with different ids,
but with the exact same info.
I have attached an example. You will see the start() method getting called once when the
bean is deployed, but then the timeout method getting called twice.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira