Skip to content

Defined type jboss::module

Krzysztof Suszyński edited this page Oct 19, 2015 · 1 revision

The jboss::module defined type

This defined type can add and remove JBoss static modules. Static modules are predefined in the JBOSS_HOME/modules/ directory of the application server. Each sub-directory represents one module and contains one or more JAR files and a configuration file - module.xml.

More info on modules here: https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6/html/Development_Guide/chap-Class_Loading_and_Modules.html

jboss::module { 'postgresql-jdbc':
  layer        => 'jdbc',
  artifacts    => [
    'https://jdbc.postgresql.org/download/postgresql-9.4-1204.jdbc41.jar',
  ],
  dependencies => [
    'javax.transaction.api',
    'javax.api',
  ],
}

After processing of this module JBoss server will be automatically restarted, but only when changes occur.

Parameters for jboss::module:

modulename parameter

This is the namevar. The name of the static module

layer parameter

Required parameter. Name of the layer to assemble in and to activate in layers.conf file

artifacts parameter

A set of artifacts to be added to the module. They can be remote urls (http and ftp) or local files. They will be fetched or copied to module location.

dependencies parameter

A set of JBoss (most likely Java EE) dependencies for a module. The packages listed here will be added to module.xml making them avialable for code withing a module