-
1. Re: Explanation of modules "export" and "import" elements
wdfink Nov 1, 2015 3:36 PM (in response to juan_a_velez)You can have different settings for every subdeployment within the jboss-deployment-structure.
So you can use it for the war and exclude the module explicit.
-
2. Re: Explanation of modules "export" and "import" elements
juan_a_velez Nov 2, 2015 11:53 AM (in response to wdfink)Thanks for your reply. But what I would like is an explanation/samples of how the export/import XML elements are used and how they work. Having said this, I had to dig into the JBoss modules code and was able to see how they are used but at the end I didn't understand the following:
When using a jboss-deployment-structure.xml, it seems all declared dependencies (plus the jars in the ear's lib folder) end up being treated as a single module, to which the sub-deployments have access. But if the dependencies inside this jboss-deployment-structure.xml don't have "export=true", then they won't be seen by the "sub-deployments". This is the part I don't understand and goes (at least in my understanding) against what the explanation in (Class Loading in AS7 - JBoss AS 7.1 - Project Documentation Editor) says.
I would greatly appreciate if the above "contradiction" can be explained.
-
3. Re: Explanation of modules "export" and "import" elements
jaysensharma Nov 2, 2015 12:38 PM (in response to juan_a_velez)Hello Juan,
As an example Consider a scenario where an EAR has the following modules. "EJBOne.jar", "EJBTwo.jar", "WebOne.war" and "WebTwo.war" all those submodules need access to the same module "my.test.module"
OPTION-1). Defining dependencies to each individual sub-deployment will make it available to all the individual sub-deployments .
<jboss-deployment-structure> <sub-deployment name="EJBOne.jar"> <dependencies> <module name="my.test.module"/> </dependencies> </sub-deployment> <sub-deployment name="EJBTwo.jar"> <dependencies> <module name="my.test.module"/> </dependencies> </sub-deployment> <sub-deployment name="WebOne.war"> <dependencies> <module name="my.test.module"/> </dependencies> </sub-deployment> <sub-deployment name="WebTwo.war"> <dependencies> <module name="my.test.module"/> </dependencies> </sub-deployment> </jboss-deployment-structure>
OPTION-2). Or Else using [export="true"] can simplify this thing as following
<jboss-deployment-structure> <deployment> <dependencies> <module name="my.test.module" export="true" /> </dependencies> </deployment> </jboss-deployment-structure>