2 Replies Latest reply on Aug 5, 2003 3:31 AM by manavagiwal

    Invoking MBean Operation just before JBoss starts

    _naga_

      Hi,

      I have a MBean successfully registered / instantiated,
      by having an entry in user-service.xml.

      I need to invoke the MBean's operation just before JBoss starts.

      That is, just before JBoss gives out the startup message -- JBoss 2003-08-02 22:18:18,276 INFO [org.jboss.system.server.Server] JBoss (MX MicroKernel) [3.2.1 (build: CVSTag=JBoss_3_2_1 date=200305041533)] Started in 1m:28s:357ms

      Please let me know how I can invoke the MBen's operation just before JBoss startup.

      Thanks,
      Naga

        • 1. Re: Invoking MBean Operation just before JBoss starts

          The latest version (3.2.2RC2) allows you put deployments
          in a directory called deploy.last

          Regards,
          Adrian

          • 2. Re: Invoking MBean Operation just before JBoss starts
            manavagiwal

            Hi Naga

            With JBoss you can specify the sequence of deployment for MBeans.

            When you have deployed your MBan - call it aBean (on which you want to invoke an operation before the server displays the message 'started') you can write another MBean - bBean. In the default no argument constructor of bBean get an instance of the MBean server , query for aBean and then ask the server to invoke the operation. Just make sure that bBean is deployed after aBean is deployed.

            Cheers
            Manav