Hello.
I have the following problem using Timers in my J2EE application. I have 3
Session Beans which implement TimedObject. At the deployment of the app, I
start the timers (which guard some external events, like "picking up a new
mail" etc. - not important here) and at undeployment of the app, I stop the
timers. They have moderate intervals, like 120 seconds.
However, sometimes (and I cannot see the logic of when this happens, but it is
sort of "once in 5 undeployments"), the corresponding entries in MySQL table
TIMERS do not get deleted; or, more precisely, some of the three entries does
not. Then, after redeployment of the app, the following exception appears:
Cannot create txtimer
java.lang.IllegalStateException: Unable to persist timer
at
org.jboss.ejb.txtimer.DatabasePersistencePolicy.insertTimer(DatabasePersistencePolicy.java:137)
...
Caused by: java.sql.SQLException: Duplicate key or integrity constraint
violation message from server: "Duplicate entry '3' for key 1"
and the corresponding timer does not run anymore. To repair this, I must
manually delete the whole contents of table TIMERS.
Similar problem happens when I kill jboss with -9 option, but that is
understandable. I do not understand, why TIMERS entries sometimes do not get
deleted at regular undeployment. Is it possible that it would be a bug in
JBoss? Or is it my bug that I use 3 TimedObjects while I should use one only,
which branching in timeoutEjb() method?
I do not like this, since I need all timers up and running, and I am afraid of
the possibility that JBoss gets restarted automatically sometimes at 2 AM and
will encounter this error, therefore running my app without one or more of the
timers.
Thank you for any reaction.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3868100#3868100
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3868100
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user