users@glassfish.java.net

Manage a TimerBean using JMX - general question

From: Sebastian Hofmann <sebastian.hofmann_at_sourcepark.de>
Date: Wed, 05 Nov 2008 12:50:57 +0100

Hi,

I am to develop an application running an import job executed by an EJB
using the timer service. I need some properties for this job and want to
make the execution interval configurable by the administrator. Also I
figured out that in case of an exception occurring while execution the
timer will be suspended. So I need a way to restart the timer.

I think JMX might be the right solution. I found samples so I might be
able to realize an MBean storing my properties and read them from the
timer bean when executing the timed method. But I don't have an idea,
how to realize setting the timer interval and restart the timer bean if
it has been suspended because of an exception.

Did anybody something similar and could give me advice? Is there a
better way to set timer intervals and re-/start timer beans?

Thanks
Sebastian