• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JMX to start and EJB Timer

 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

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.

Exception in thread "main" java.lang.NoClassDefFoundError: myApp.ear

Any suggestions are welcome. I am new to JMX.

Thanks,
David
reply
    Bookmark Topic Watch Topic
  • New Topic