2 Replies Latest reply on Jan 9, 2006 10:54 AM by Schacher

    Schedulable MBeans

    Martin Gilday Newbie

      I have written a schedulable mbean based on the documention in the JBoss AS guide.
      It is a basic mailbox checker and pgp decrypter. I have the mbean up and running.
      My question is about my constructor. In it I am reading an xml properties file and exceptions are thrown if it is malformed. On my original standalone version it would simply log the error and exit. What is the correct way to handle this occurance on JBoss? If these exceptions are caught will the schedule continue to run? I guess I need a way of invoking the stopSchedule function like from the JMX console.


      Cheers for any help.

        • 1. Re: Schedulable MBeans
          Martin Gilday Newbie

          Another problem that I am having is if I try to have the scheduler startup on server startup. The constructor of my MBean is getting a database connection from a JNDI pool, but it is starting before the JNDI database pools have been set up. Can I change the startup order so schedules start after the datasources are started?

          • 2. Re: Schedulable MBeans
            Schacher Newbie

            im not sure if is a way to synchronize the deployment. i solved this problem straight forward:
            - mbean-configuration:
            StartAtStartup: false
            - then i wrote a mbean which adds a notificationlistener / the handlenotification-method of this mbean will be called, when the server is started (JBoss (MX MicroKernel) [4.0.3SP1 (build: CVSTag=JBoss_4_0_3_SP1 date=200510231751)] Started in 50s:109ms)
            - in this method, i start "all" the mbeans programmatically