ApplicationInfoModule
The ApplicationInfo module configures an AcrossApplicationInfo
bean that provides basic information of the running application.
It also provides a debug web controller to view the running application information.
Configuration
The purpose of the ApplicationInfoModule is to be able to uniquely identify a running application instance. This is usually done through the combination of 3 parameters:
-
name of the application (eg. My Application)
-
name of the environment (eg. Test)
-
name of the infrastructure hosting the application - usually a hostname (eg. my-server.lan)
Every parameter can be configured manually using the module settings.
ApplicationInfoModule applicationInfoModule = new ApplicationInfoModule();
applicationInfoModule.setProperty( ApplicationInfoModuleSettings.APPLICATION_ID, "demo-webapp");
applicationInfoModule.setProperty( ApplicationInfoModuleSettings.APPLICATION_NAME, "Across Demo Webapplication");
applicationInfoModule.setProperty( ApplicationInfoModuleSettings.ENVIRONMENT_ID, "demo");
applicationInfoModule.setProperty( ApplicationInfoModuleSettings.ENVIRONMENT_NAME, "Demo environment");
applicationInfoModule.setProperty( ApplicationInfoModuleSettings.BUILD_ID, "demo-webapp");
applicationInfoModule.setProperty( ApplicationInfoModuleSettings.BUILD_DATE, new Date());
context.addModule( applicationInfoModule );
AcrossApplicationInfo
Once bootstrapped, the ApplicationInfoModule exposes an AcrossApplicationInfo
bean that contains the runtime settings.
This bean has a property instanceId that combines application, environment and hostname into a single String
that uniquely identifies the application instance.