• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Configuring Service MBean for Application

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

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 ::

<mbean code="com.application.messagebeans.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 ?

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.

-Anuja
 
I don't get it. A whale wearing overalls? How does that even work? It's like a tiny ad wearing overalls.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic