Skip to end of metadata
Go to start of metadata

A module name is a dot-separated string which is used along with a version slot identifier to uniquely identify a module within a module loader.  Names are typically organized along the same lines as package names, however there is no specific relationship between a module name and the packages it contains.  These are all examples of typical module names:

  • org.apache.commons.logging
  • org.jboss.remoting
  • cglib
  • javax.ejb.api
  • ch.qos.cal10n

Most module loaders support loading a special module called "system".  This module refers to the class loader which loaded the jboss-modules.jar itself.  Due to the fact that this class loader may include just about anything, rather than using this module directly, one should make use of [import and export filtering] to present a "reduced" version of this module.

Version slot identifiers are used when you wish to have more than one instance of a module in a module loader under the same name.  This may occur when introducing a new major version of a module which is not API-compatible with the old version but is used by newer applications.  A version slot identifier is an arbitrary string; thus one can use just about any system they wish for organization.  If not otherwise specified, the version slot identifier defaults to "main".

When identifying a module in a string, the version slot identifier can be appended to the module name, separated by a colon ":".  For example, the following two module identifier strings refer to the same module:

  • org.jboss.remoting:main
  • org.jboss.remoting

The following three module identifier strings refer to different modules:

  • org.jboss.remoting:2
  • org.jboss.remoting:3
  • org.jboss.remoting

Within the Modules API, a module identifier is represented by the org.jboss.modules.ModuleIdentifier class, which has the ability to parse identifier strings as well as assemble a name or a name plus a version slot identifier into a module identifier.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.