-
1. Re: WAR file is not deployed as a Jboss module in EAP6.1
ctomc Nov 13, 2014 6:11 AM (in response to madhu.garimilla)From where are you trying to access this?
-
2. Re: WAR file is not deployed as a Jboss module in EAP6.1
madhu.garimilla Nov 13, 2014 6:33 AM (in response to ctomc)I am trying to access this from another jboss module which i have added. Here is the complete scenario,
first i have deployed a jboss module which has the above code and started the jboss. once the jboss is up, i have deployed the demo-common-module.war from the command line (CLI). logs show my war is deployed successfully and i see an entry got added in standalone. once, the war is deployed, my jboss module tries to access the war as a module and tries to load one of the classes present inside my war(from one of its libraries).
-
3. Re: WAR file is not deployed as a Jboss module in EAP6.1
brian.stansberry Nov 14, 2014 6:51 PM (in response to madhu.garimilla)I believe this isn't meant to work. I think it doesn't work because the ModuleLoader for deployment.demo-common-module.war is not the module loader used to load from the modules dir, and the loader used for the modules dir does not have visibility to the dynamic modules created for deployments.
One deployment can specify a dependency on the module for another deployment, but that works because the deployment processors wire things together as part of deploying.
-
4. Re: WAR file is not deployed as a Jboss module in EAP6.1
madhu.garimilla Nov 25, 2014 1:49 AM (in response to brian.stansberry)Hi Brian, Thanks for the reply.
I see that the these dynamic modules also cannot specified as dependencies in module.xml. like
<module xmlns="urn:jboss:module:1.1"
name="demo-module" slot="main">
<resources>
<resource-root path="." />
</resources>
<dependencies>
<module name="deployment.dynamicmodule.jar"/>
</dependencies>
</module>
In this case, my demo-module gets deployed properly. However, when i try to load the demo-module using the below code
final ModuleIdentifier modId = ModuleIdentifier.fromString("demo-module");
final Module module = Module.getModuleFromCallerModuleLoader(modId);
It again fails with the exception as ModuleNotFound for "deployment.dynamicmodule.jar". Are the dynamic modules only meant for adding dependencies only inside Manifest or are there any other way we can use? In general, would expect a module to behave in the same way whether it is a static or dynamic.
-
5. Re: WAR file is not deployed as a Jboss module in EAP6.1
madhu.garimilla Dec 1, 2014 5:32 AM (in response to madhu.garimilla)Shall i report a JIRA issue for this as i am unable to use dynamic modules as dependencies in module.xml?
-
6. Re: WAR file is not deployed as a Jboss module in EAP6.1
ctomc Dec 1, 2014 9:15 AM (in response to madhu.garimilla)Madhu Garimilla wrote:
Shall i report a JIRA issue for this as i am unable to use dynamic modules as dependencies in module.xml?
No,
as it is behaving as expected, you can have dependencies to static modules from deployments (dynamic modules) but not vice versa.
-
7. Re: WAR file is not deployed as a Jboss module in EAP6.1
madhu.garimilla Dec 2, 2014 9:40 PM (in response to ctomc)Hi Tomaz,
So in what way these "dynamic modules" behave as modules. Can these be used as dependencies in Manifest file or in jboss deployment structure?
I see the below documentation from the site for dynamic modules. i would like to know can these be used as dependencies , if so how?
- Dynamic Modules
Dynamic Modules are created and loaded by the application server for each JAR or WAR deployment (or subdeployment in an EAR). The name of a dynamic module is derived from the name of the deployed archive. Because deployments are loaded as modules, they can configure dependencies and be used as dependencies by other deployments.