I would like to manage servlets in my war contained in an ear with a service. I have added a .sar directory and declared the service in jboss-app.xml.
The problem is that the service uses classes of the contained in the war. And apparently, the service is started before the web app : an exception is thown because a class is not found (in fact classes deployed in the war).
How can I tell the service it depends on the war and must start after the war has been deployed?