I have a foo.wsr file that needs to be deployed either last or at least after a .ear file. The reason is because in the web-service.xml I specify a bean mapping for a bean that exists in a jar in a war in the ear file. How can force the WSR to wait to try to deploy until after the ear file is totally deployed? Or at least the dependant class.

I think I may be having a similar issue and wonder if you have worked out your problem. I have an application that I've previously run as a WAR and would now like to deploy it as a WSR with JBoss.NET. As a WAR, the application contained an applicationConteext.xml that loaded some beans into memory on deploy (this is based on the Spring framework if that helps). org.jboss.deployment.MainDeployer kicks off org.springframework.web.context.ContextLoader and the beans in applicationContext are initialized, etc.Now I'd like to deploy that same application as a web service to JBoss.net (axis integration) as a WSR. Unfortunately, when deployed as a WSR (The class I bind to the WS via the web-service.xml file is contained in a JAR in the WSR) I get an error, because that class relies on one of the beans that was supposed to load during deployment but didn't.

So I guess in a nut-shell the question is: how do I ensure that beans I've indicated should load at deploy-time and do so in the WAR environment do so in the WSR deploment as well?

No guarentees on this solution. But it appears to work for my environment. It may work for you.

Deploy your ear and create a jboss-app.xml next to your application.xml:

<jboss-app>

test.wsr

</jboss-app>

make sure to include test.wsr in the ear. I don't know why it is deploying after everything else in my environment. From my memory, application.xml is thrown into a hashset and then deployed via hashset.iterator ordering(ie... psuedorandom). If that is the case for me, then all my ejbs and test.wsr are being deploying in the hashset random order. I might just be lucky...