-
1. Re: Classloading in WildFly 10
ctomc Jan 9, 2018 4:27 PM (in response to ehodges)what is the structure of your EAR?
probably best if you could just post output of jar tf <name-of-ear>
also can you paste your application.xml?
-
2. Re: Classloading in WildFly 10
ehodges Jan 9, 2018 4:36 PM (in response to ctomc)My EAR contains one WAR and one EJB module. There are a bunch of JARs at the root of the EAR. I can't share any of the details.
All I want to do is control the order of class loading, so the classloader will look in one JAR before another.
-
3. Re: Classloading in WildFly 10
walkerca Jan 10, 2018 11:56 AM (in response to ehodges)I'm not sure about what vendor-specific behavior you'll find with WildFly, but for portable code, the Java EE 7 spec states that you can't count on ordering of classes. See EE 8.3 "Class Loading Requirements".
The Java Community Process(SM) Program - communityprocess - final
-
4. Re: Classloading in WildFly 10
ehodges Jan 10, 2018 12:10 PM (in response to walkerca)Then I'm curious how anyone uses Xstream in J2EE.
For now I have deleted the duplicate interfaces from the XmlPull JAR. I'm not entirely happy with that solution.
-
5. Re: Classloading in WildFly 10
ctomc Jan 10, 2018 12:47 PM (in response to ehodges)best thing you can do is have initialize in order set in application.xml
<initialize-in-order>true</initialize-in-order>
this way modules will be initialized in order that is specifed in application.xml