2 Replies Latest reply on Jun 25, 2003 12:36 PM by Adrian Brock

    start/end of deployment notifications

    ittay Newbie

      Hello,

      I need to be notified when jboss has ended the deployment of my ear, so I can setup my application (which, in a regular java application I would have done by calling some SetupManger.setup() method at the start of main() ).

      So, I wrote an MBean with start() / stop() methods, created a sar and put it in an ear (by adding a jboss-app.xml refering to it).

      Now I have two problems:
      1. The start() method is called before any other class is loaded, so on calling other classes I get NoClassDefException.
      2. The start() method is called before the deployment ends (obviously from 1). So I can't work with any beans.

      How can I tell JBoss to call start() at the end of deployment and stop() before the start of undelployment()? I thought I can add some 'depends' clause, but I don't know the syntax. The names 'start()' and 'stop()' can change if needed.

      Thank you,
      Ittay