Hi!
We want to use scheduled beans (TomEE 1.6.0 snapshot - about two weeks old)
and add an own Serializable object (TimerData) while timer creation, e.g.
timerService.createTimer(Date, TimerData).
We observed a different behaviour if persistence for timers is used or not.
-----
No timer persistence (as configured for an out of the box TomEE):
The scheduled bean is triggered, the TimerData object is available
(timer.getInfo())
-----
Timer persistence is activated and an external database is used:
The scheduled bean is not triggered, the following exception occurs:
SCHWERWIEGEND: An error occurred while scanning for the next triggers to
fire.
org.quartz.JobPersistenceException: Couldn't acquire next trigger: Couldn't
retrieve trigger: java.lang.ClassNotFoundException:
timerPersisted.server.TimerData [See nested exception:
org.quartz.JobPersistenceException: Couldn't retrieve trigger:
java.lang.ClassNotFoundException: timerPersisted.server.TimerData [See
nested exception: java.io.IOException: java.lang.ClassNotFoundException:
timerPersisted.server.TimerData]]
at
org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2840)
[...]
Caused by: org.quartz.JobPersistenceException: Couldn't retrieve trigger:
java.lang.ClassNotFoundException: timerPersisted.server.TimerData [See
nested exception: java.io.IOException: java.lang.ClassNotFoundException:
timerPersisted.server.TimerData]
at
org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveTrigger(JobStoreSupport.java:1524)
[...]
Caused by: java.io.IOException: java.lang.ClassNotFoundException:
timerPersisted.server.TimerData
at
org.apache.openejb.core.timer.TimerData.readObject(TimerData.java:134)
[...]
Caused by: java.lang.ClassNotFoundException: timerPersisted.server.TimerData
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
[...]
If the TimerData object is added to a jar file and the jar file is inserted
to the TomEE\lib directory:
The scheduled bean is triggered as expected.
-----
Why must the TimerData object be available in the global TomEE classpath in
case of timer persistence?
Is there a way to get it running without putting "application-specific"
classes to the global TomEE lib folder?
Best regards,
Thomas
--
View this message in context:
http://openejb.979440.n4.nabble.com/Timer-service-different-behaviour-if-external-quartz-tables-are-used-or-not-tp4663101.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.