-
1. Re: How to use common libraries used by different modules in Wildfly?
wdfink Jun 11, 2014 5:18 AM (in response to giofyxle)You need to create a module for the common libraries and add a module dependency to your application.
See Class Loading in WildFly , a module is simple to create, see this example Data Source Configuration in AS 7 that should help.
-
2. Re: How to use common libraries used by different modules in Wildfly?
lafr Jun 11, 2014 6:31 AM (in response to giofyxle)Or put the files in only the resource adapter for instance and create a dependency from ear to rar:
<ear earfile="${BIN}/${pre-stage.ear.name}" appxml="${etc.dir}/application.xml"> <fileset dir="${build.deploy.dir}" includes="ejb-entity.jar"/> <fileset dir="${build.deploy.dir}" includes="ejb-session-*.jar"/> <fileset dir="${build.deploy.dir}" includes="ws-*.war"/> <manifest> <attribute name="Dependencies" value="deployment.controller.rar, deployment.XADisk.rar"/> </manifest> </ear> -
3. Re: How to use common libraries used by different modules in Wildfly?
giofyxle Jun 11, 2014 7:20 AM (in response to lafr)Hallo Frank, hallo Wolf-Dieter
Thank You for your answers!
Frank's suggestion seams to be less complicated than Wolf-Dieter's. For this reason I want to check this first.
But: Where do you configure this dependency? You give an example part of an xml-File. To which xml-files does it belong?
Thank You,
Gio
-
4. Re: How to use common libraries used by different modules in Wildfly?
lafr Jun 11, 2014 4:35 PM (in response to giofyxle)I'm using ant for build, packaging and deploy. The xml above is part of my build,xml.
At the and you have to have something like this in your ear's META-INF/MANIFEST.MF: Dependencies: deployment.controller.rar, deployment.XADisk.rar
-
5. Re: How to use common libraries used by different modules in Wildfly?
zamrokk Jun 3, 2015 11:42 AM (in response to lafr)Another solution is what i did if you have a EAR and a RAR of Xadisk that you want to deploy
Using maven :
- declare xadisk.jar as provided on ejb, war etc ...
- use a project connector including only ra.xml (ironjacamar.xml if u need it) and xadisk.jar as provided
- in the ear file, import the shared xadisk.jar that is used both with rar and ejb/war projects
As it you have only 1 version of the xadisk classes and all is deployed at same time
i passed 3 days on this set up to understand -__-'