Is there a way for an MBean (SAR) to depend on a web application WAR being deployed/started first?
I have a notification service (MBean) I would like to start only after everything else has deployed and started (which includes the web application being up and running). I know a standard way is to start the service by looking up the MBean from JNDI from a ServletContextListener in the web tier (implying the web tier is the last component to be deployed). Therefore, when the context listener is executed after startup, you can assume everything else in the whole application has been deployed. Although this is OK, it would be a lot easier and quicker if I can just specify the following mbean definition: <mbean code="com.some.JmxMBeanImpl" | name="MyDomain:service=MyJmxImpl"> | <depends>jboss:service=Naming</depends> | <depends>jboss.jca:name=hibernateService,service=hibernateService</depends> | <depends>jboss.management.local:J2EEApplication=myapp.ear,J2EEServer=Local,j2eeType=WebModule,name=myapp.war</depends> | </mbean> (where myapp.war is inside myapp.ear). Having a legitimate depends tag is nicer than the servlet approach in some cases because sometimes we may not even want to start the service upon deployment. In this case, we'd have to change code to prevent the service from being started. The depends approach would allow us to just change a config file only. I thought the above code would work, but it doesn't. Am I specifying the war depends tag wrong? Any help at all is greatly appreciated. Regards, Phar View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3838689#3838689 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3838689 ------------------------------------------------------- This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user