Posted on

Configuring the JBoss EAP module path

jboss eap tutorial jboss eap

JBoss EAP features a full modular architecture where you can easily plug-in and remove libraries in order to create a customized server distribution. By default, the application server modules are searched in the location specified by the environment variable JBOSS_MODULEPATH. This variable defaults to the JBOSS_HOME/modules folder; you can however specify a new or an additional path for your modules by setting this variable in your OS environment.

Example: (Linux users):

JBOSS_MODULESPATH=/usr/libs/custom-modules;$JBOSS_HOME/modules

 

You can alternatively boot the server using the -mp switch which by default uses the path specified by JBOSS_MODULESPATH variable.

Since there can be multiple paths available in the JBOSS_MODULESPATH subsystem, the following loading precedence applies:

/usr/libs/custom-modules

/modules

/modules/system/layers

/modules/system/add-ons/

The above behavior makes it relatively straightforward to define a common repository for your EAP installations: in the following example, there’s a shared module repository in /var/lib/modules and a corresponding symbolic link in each distribution pointing to the common repository:

jboss eap tutorial jboss eap