Files

Overview

This project helps prepares and assembles the EAR for deployment to Wildfly. It also prepares artifacts that should be copied over onto the Wildfly distribution once unpacked.

JBOSS Modules

Wildfly uses a modular class loading system through the use of JBOSS modules. Each module can define the libraries it provides, as well as dependencies on other modules in order to have the modules from that module added to its class path. In order to avoid classloader conflicts, it is essential to have commonly used libraries isolated in their own modules, and added as dependencies in other modules or deployments that require access to the classes.

In addition to the Wildfly application modules, EAR deployments are treated as modules, and are defined by the following rules:

  1. The lib/ directory of the EAR is a single module called the parent module.
  2. Each WAR deployment within the EAR is a single module.
  3. Each EJB JAR deployment within the EAR is a single module.

Managing the module dependencies for the Datawave EAR deployment is done through the jboss-deployment.xml. IMPORTANT: any dependencies that are provided to the EAR deployment through a module should be configured with a provided scope in the webservice-parent pom.xml to prevent them from being included in the EAR's /lib folder.

Custom Modules

We create several JBOSS modules that will be part of Wildfly upon startup. These modules can be found in the project modules directory. Most of these modules are self-explanatory and are, except for the module datawave.webservices.datawave-security-elytron-module, common dependencies between other modules and the Datawave deployment.

Overridden Modules

We also override the library versions of several modules that are part of the core Wildfly application modules in order to synchronize the versions used by Datawave and Wildfly. These modules may get automatically added to deployments by Wildfly and may be dependencies of other core modules. The versions are overridden by copying updated versions of the libraries and module.xml files to the modules/system/layers/base directory.