1 Reply Latest reply on Mar 15, 2005 9:43 AM by starksm64

    Configuring ServiceMBean for application

    staplecross

       

      "staplecross" wrote:
      We use Jboss4.0.1 in our application. We have created a service mbean for our application which extends ServiceMBeanSupport.
      According to the requirement of our application and also according to the general behaviour of service beans, it is necessary that the startService method of the service mbean, be invoked after all the EJBs ( especially entity beans )have been deployed.
      Similarly it is necessary that the stopService method of the service mbean be invoked before the undeployment of the application EJBs and entity beans in particular begins. This way it ensures that the required process is done for the application at the start and stop of the service.

      We have defined the service mbean in the jboss-service.xml in the server/all/conf folder. The service mbean is mentioned as follows in the end of the jboss-service.xml ::

      <mbean code="abc.xyz.initmbean.InitSession" name="jboss:service=InitSession"/>
      


      But we have seen that though the startService is invoked after the deployment of all the entitybeans of the application. But the stop service method is invoked only after all the entitybeans are undeployed.

      Is there some other configuration that is required to be done in any other xml file ? Or is any xml file required to be added to the bean? what exactly needs to be done ?