[jboss-user] [EJB/JBoss] - Accessing serialized timer objects

Renen do-not-reply at jboss.com
Mon Aug 17 09:58:31 EDT 2009


I hope that this is the right forum and apologise if it isn't.

I would like to be able to produce a friendly list of timers. In other words, the list should reflect something along the following lines:

* 15 Dec 2009, 3:52PM: Launch space rocket 12 (za.co.acme.messages.TestMessage at 31491f7b)
* 23 Dec 2009, 11:00AM: Sell Mr Smiths shares and reap vast profits (za.co.acme.messages.TestMessage at e2df60d)

Displaying the time is trivial.

However, I am not clear how I can interrogate the objects that have been serialised into the database - the objects returned by getTimers() are reluctant to be de-serialized and horrible errors are thrown when you try (I suspect because they probably aren't read from the database until the events actually fire).

In our scenario, everything we are serializing into the timer system implements a consistent interface: "Description" which allows us to retrieve the details we require. 

Is there a way to retrieve the objects so that I can interrogate them? Or to store additional information with the timer? Obviously, I would prefer not to maintain an additional data store.

I currently retrieve the timers using getTimers(), and I then iterate over the collection calling getInfo() on each Timer.

I am running JBoss 5.1.0.GA.

Thank you in advance for your guidance.


View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4249942#4249942

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4249942

More information about the jboss-user mailing list