We use Jboss4.0.1 in our application. We have created a service mbean for our application which extends ServiceMBean and in turn 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 ::
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 ?
Earlier this worked perfectly in jboss 2.4.4. So have no idea why this is not working in the desired way with jboss4.0.1.
Thanks in advance for help.
subject: Configuring Service MBean for Application