Understanding the Configuration class

The Configuration class provides applications with read-only access to the Configuration and Management database. The Configuration class is a singleton whose sole instance can be obtained through the getConfiguration() method.

Attention: In Java EE applications, a singleton does not span multiple JVM instances. Therefore, the semantics of the Configuration singleton are only maintained while in the same JVM instance as the calling code.

You can browse the Configuration and Management database with the Configuration object using one of two modes:

In addition to providing access to the Configuration and Management database, the Configuration class provides information about the application's name and version. These are retrieved from the manifest file in the application's archive (JAR, WAR, or EAR). The class that triggers the Configuration class to load must itself be loaded from an archive. This archive must contain a manifest file (META-INF/MANIFEST.MF) that, within its main attributes, contains two attributes: Application-Name and Application-Version.



Last updated: 9 Dec 2016