1 of 1 people found this helpful
create two static modules with different slot name (main being default)
and then add dependency(via jboss-deployment-structure.xml) one you need in the part of application that needs specific version.
This will work fine as long as part of your application that uses specific version of jar is separately packaged (like in one jar / war).
Otherwise i would recommend you to repackage/split application in such parts so this would be possible.
for example modules you would get are
org.my.component:3.2 which would be in folder org/my/component/3.2
org.my.component:1.2 which would be in folder org/my/component/1.2
for more on that read https://docs.jboss.org/author/display/WFLY8/Class+Loading+in+WildFly
I have 2 SLSBs whic uses different third party jar files. I have created 2 modules with 2 versions jar files but I have no clear idea about how to declare dependency in jboss-deployment-structure.xml as these 2 EJBs are packaged inside ejb.jar file of myApp.ear. Can you give an idea about how this can be done?