I have a large java application (deployed as an ear file). The application consists of a daemon class that creates an ejb timer. The timer does some processes every day. I am having a problem in that the timer occasionally stops. The only way to restart the timer, and hence the processing, is to restart the Sun app server.
To solve this problem, I am investigating the use of JMX. I am hoping to use JMX to call an existing method called startDaemon(). This methos restarts the ejb timer programmatically.
To add JMX to the application, I have turned the existing daemon bean into an MBean. I have then created a class called 'Main' that is used to register the daemon MBean to the MBean server. This class holds a 'main' method. I then hope to call the startDaemon() method via JConsole.
Does anyone know if I am going in the right direction? Does this solution sound feasible?
The problem I am having is that I cannot get the JMX property set, e.g.