I need to hvae my SAR dependent on my EAR file which is deployed as a separate deploy unit in my deploy directory. When i get to the jndi view on the jmx-console, the jmx name for the ear is specified as
But when i use this as my "depends" value in the jboss-service.xml of my SAR, the deployment fails. I did some debug on this and the state of the "test.ear" is not yet INSTALLED(servicecontext.state = 7) . I was able to trace the call that said "create this mbean" which was where the above ObjectName was created.
Now, my real question is how do i make this ear name a installed service. Do i have to wrap this ear as a SAR. If i do this, where do i specify the name for the SAR?
Hmm.. Try doing this:
Bundle the sar into the ear and reference it by creating a jboss-app.xml in your ear/META-INF directory. Should look like this
I think jboss-app.xml is processed AFTER application.xml, so the rest of the ear will be deployed before the sar.