[jboss-user] [Beginners Corner] - How JAR files are loaded from EAR file

isthisusernameavailable do-not-reply at jboss.com
Thu Dec 27 11:32:33 EST 2007


Hello,

I have a question about how JAR files are deployed from within a single EAR file.  This is using the clustered JBoss 4.2.2 AS.

My app is deployed as an EAR file that contains B.jar and C.jar.  B.jar contains a @Stateless B class that @Depends upon class C in C.jar, which is marked as a JBoss @Service.   So the C service should start first, and then that can be injected into class B via the @EJB annotation.

When I deploy this EAR file, C fails to start before B is created despite the @Depends annotation, so B fail to start properly.  If I move classes B and C inside the same JAR, or if I rename C.jar to A.jar, it works fine, so it seems that JBoss is loading the JAR files from within the EAR in alphabetical order.

Is there a way to specify the order in which the JARs from my EAR are loaded?  Possibly in the application.xml file?

Thanks in advance,
John

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4115739#4115739

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4115739



More information about the jboss-user mailing list