I meanwhile fixed this problem using an other service from the deploy directory as dependency.
I have a similar issue. I also have hasingleton mbeans that are now dependent on a jar that is deployed in the deploy folder (not the deploy-ha-singleton). This works, however, the hasingleton mbeans in the deploy-ha-singleton directory do not use the classes deployed on the deploy folder. I get ClassNotFoundExceptions, when deploying the mbeans, so I had to duplicate some of the jars in the deploy-ha-singleton directory as well. How can I have the singleton mbeans use the classes that are deployed in the deploy directory inside ears and jars?
I would appreciate any help on this. Thanks
I think You should common used classes put into a separate jar and copy it to the lib directory. It will be in the classpath before deployment. This will not work for hot deployment.
thanks for the reply. We dont copy any jars to the lib folder, but either package them inside of the ears themselves or include them into the deploy folder. Meanwhile, I figured out that I can turn on the prefix deployment order in the jboss-service.xml (in the conf dir) and rename the deploy-ha-singleton-service.xml (in the deploy directory) to like 90deploy-ha-singleton-service.xml so that it gets deployed after all the other artifacts in the deploy folder. This way, I only need the hasingleton mbean sars in the deploy-hasingleton directory. When the mbeans are loaded/started they can reference the classes that were already deployed via the deploy folder.
Another way to do this (withouth the deployment sorter) is to make a directory:
and drop in the the singleton service