-
1. Re: Custom directory for the modules deployed through CLI
vbchin2 May 29, 2014 12:50 PM (in response to madhu.garimilla)As far as I know ... NO, as the server needs to know where the modules can be found at the bootup time. You might recall that it didn't create a reference to your JAR or folder, it actually copied the JAR to the modules folder.
-
2. Re: Custom directory for the modules deployed through CLI
wdfink May 29, 2014 1:03 PM (in response to madhu.garimilla)Modules are copied to the module folder. later versions, not sure whether EAP6.1.Alpha do so, use a different folder structure system/... for provided modules.
All other modules are copied to directories related to the module name.
-
3. Re: Custom directory for the modules deployed through CLI
madhu.garimilla May 30, 2014 9:26 AM (in response to vbchin2)We can set multiple directories for Modules so that Jboss would refer to those during boot up. In standalone.bat, we can
set JBOSS_MODULEPATH=%JBOSS_HOME%/modules;/path/to/my/modules
How can i tell jboss that the module i am adding through CLI(after jboss is up), should go to a specific directory even though i configured that directory in my standalone.bat?
-
4. Re: Custom directory for the modules deployed through CLI
vbchin2 May 30, 2014 12:18 PM (in response to madhu.garimilla)Agreed! And it goes back to my comment that server needs to know where to find modules at boot time. You are enforcing this knowledge to server with the $JBOSS_MODULEPATH.
However, assuming such an option does exist to let you add a module to a folder or path of your choice, who would in that case update the $JBOSS_MODULEPATH in the .sh or .conf files ? The CLI won't definitely touch the standalone.conf or .sh file for sure. So it becomes a two step process:
- Adding a module to custom folder/path
- Manual update of the configuration file to include that path for loading modules.
The above could be allowed by EAP folks but probably is deemed not a clean approach or not a popular usecase in demand. Having said all that, I usually have found manually putting the folder together in the modules root directory lot more easier and quicker way to do it unless that path is restricted to you (your login)
-
5. Re: Custom directory for the modules deployed through CLI
madhu.garimilla Jun 2, 2014 3:52 AM (in response to vbchin2)However, assuming such an option does exist to let you add a module to a folder or path of your choice, who would in that case update the $JBOSS_MODULEPATH in the .sh or .conf files ?
Every time we add a new module using CLI, we are not going to update $JBOSS_MODULEPATH. Instead, we choose one of the directories which are available(in $JBOSS_MODULEPATH) to Jboss at the boot time and try to add to the new module to that directory. so, step2 is not required here .
- Adding a module to custom folder/path
- Manual update of the configuration file to include that path for loading modules.
The use case i am trying out is adding and removing some jboss modules dynamicaly with out restarting my Jboss server so i cannot tell my server in advance about those modules.