But an ear is not a real service in JBoss sense so this might not work in all cases (we are using this way to make an ear depend on a cache loader and it works).
Alas I think that makes the service depend on the EAR (I think) and its the other way around I need it i.e. make the EAR not fully deploy until the CacheInstance is up and running....
e.g. Somewhere in the EAR
<depends> jboss.cache:service=MyCacheInstance </depends>
Any ideas ?
What component in the EAR is dependent on that service? Is some EJB dependent on that cache service?
A war file contained in the EAR has a dependency on a jboss cache instance which it retrieves through JMX.
You can add the depends in your jboss-web.xml (in the WEB-INF) of your WAR file:
<jboss-web> <depends>blah.blah</depends> </jboss-web>
Thanks for that. I've just checked our deployment and the the dependent artifact is a jar within an EAR. Is there any way to make the EAR dependent on the mbean.
Thanks for all your help,
Not really up to date but it is still open.
You can also depend on the jar, or?
Only thing I do not like about such dependencies is that you have to use the jar name. If the name changes our your MBean moves to a nicer gated jar you have to manually adopt.