1 Reply Latest reply on Apr 4, 2003 1:28 PM by adrian.brock

    JBoss JMX Mbean question

    kranthi12

      Hi,

      I have created a Jboss JMX Mbean that has a method called getTransactions(). I have added the following entry in my 'scheduler-service.xml' file



      <!--jboss.j2ee:service=EJB,jndiName=ejb/rateServer-->






      true
      :name=testUpdater
      getTransactions()
      <!--3/13/03 8:05 AM-->
      NOW
      10000
      -1


      I have two questions here

      1. When jboss creates an instance and runs the mbean would it create a brand new instance if the first one is still executing? The reason I am asking is that the method getTransactions() in my mbean performs a time consuming task which might take more than 10000 seconds. In a real world scenario I would set the 'SchedulePeriod' to 3600*1000 (1 Hour). The tasks in the getTransactions() method can take more than 1 hour in a worst case scenario. I dont want a second instance created by jboss if the first one is already running otherwise there will be synchronization problems. Please advice

      2. This mbean depends on and EJB, so in my xml file I have the following line

      jboss.j2ee:service=EJB,jndiName=ejb/rateServer-->

      which doesn't seem to work. Jboss is creating the mbean before the EJB. How do I prevent it from happening.

      Please help

        • 1. Re: JBoss JMX Mbean question

          The next tick of the timer won't happen
          until the first tick finishes processing.

          If you overrun you the second tick will happen
          when the first tick finished processing.

          If you do this everytime, it will just loop.
          Not much point using a timer.

          <!--jboss.j2ee:service=EJB,jndiName=ejb/rateServer-->

          is an XML comment

          Regards,
          Adrian