Jboss Module.xml Slot
Jboss-deployment-structure.xml; module.xml; Overview. A WildFly module (or JBoss module) is a packaged collection of classes and other resources, along with the specification of what is imported and exported by this module from/to other modules. Each API or service provided by WildFly is implemented as a module, which is loaded or unloaded on. The only mandatory attribute is the module name, the slot attribute defaults to main, and both define the JBoss Module ID to reference. The optional annotations attribute, which defaults to false, indicates if a pre-computed annotation index should be imported from META-INF/jandex.idx.
- 4Naming Conventions
- 5Process
- How to create custom Modules in JBoss EAP 6 https://access.redhat.com/solutions/195403
The contents of the main directory should be the itext jar and a module.xml file. You copy any of the existing module.xml and modify it to suite your needs. For option two, you create a jar with the iText library and add a META-INF/jboss-deployment-structure.xml file which defines the module. Is migth look something like this. On the other hand, the module slot in JBoss Modules is essentially an extension of the name, and is used mainly as a helper to name parsing for things like the filesystem module loader to allow easy multi-version or parallel installation support.
- https://github.com/NovaOrdis/playground/tree/master/jboss/wildfly/custom-module
Module Name
The module name is a dot-separated, fully qualified, unique, package name-like string. Conventionally, the name of the module coincides with the embedded top package, though nothing bad seems to happen it does not. Example: com.novaordis.playground.wildfly.custommodule.
JBoss AS 7 / EAP 6 modules and class loading 1. JBoss AS 7 / EAP 6modules and class loading Takayoshi Kimura Senior Software Maintenance Engineer Global Support Services, Red Hat.
Module JAR Name
Conventionally, it should be the condensed form of the module name, including the version string. Example custom-wildfly-module-1.0.jar.
Module Location
Write Code and Package It According the Naming Conventions
See Naming Conventions above.
Copy the JAR under WildFly's module Directory
See Module Location above.
Create a module.xml in the Same Module Directory
The content of the module.xml should be similar to:
Jboss Module.xml Sloth
Module's Dependencies
The module may have its own dependencies, which can be other JBoss modules, third party packages or JDK classes. Those must be declared as shown here:
- Expressing Module Dependencies in module.xml
Make the Module Dependents Aware
In case of a web application, place a jboss-deployment-structure.xml similar to the example shown below under WEB-INF:
Jboss Module.xml Sloths
Create the EAP module as artifact of a dedicated 'eap-module' Maven module:
- Deploying a Module with CLI