how do you specify a dependency of an MBean (defined in a SAR) on an EAR file without hardcoding the ear file absolute path in the *-service.xml? I've been looking on the forums for an answer with little luck. I know I need to define a in the *-service.xml file but don't know how to specify the ear? I tried depending on both:
but still get ClassNotFoundException since the MBean startService() gets called before the EAR is deployed.
any help much appreciated..
The short answer is that you cannot.
You can on an EJB in the ear
The deployers are obviously started well before any
deployments, so this won't help you.