2 Replies Latest reply on Aug 9, 2004 5:30 AM by bayuehua

    autostart a timer when JBoss start?

    bayuehua

      Hello all
      I have a timerEJB, and it is deployed correctly, but every time I started JBoss, I have to call a TimerManager.start to start the timer.
      Any method can make it autostart when JBoss started?
      I have tried a MBean, and using a timer-service.xml.
      But it is impossible to call a EJB?in?it,?as?all?.jar?are?deployed?after?the?*-service.xml?are deployed.
      How can I do about this?


      thnks

      bayue

        • 1. Re: autostart a timer when JBoss start?
          slaboure

          you can put a tag on your timer mbean that waits on the name of the EJB container MBean. As you cannot guess the name of the ejb container mbean, you need to go on the jmx-console first, find the name, and use it in your depends tag.

          • 2. Re: autostart a timer when JBoss start?
            bayuehua

            Thanks Sacha
            it works!
            I added
            depends: jboss.j2ee:service=EJB, jndiName=TimerManagerBean

            Now quite a familiar question. The timer also need to call a webservice, which is deployed via the AXIS.
            Maybe you know the AXIS is a .war file, and then the same question, how should I write the 'depends' tag?

            thanks again
            chens