About

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.

1. General information

1.1. Artifact

<dependencies>
    <dependency>
        <groupId>com.foreach.across.modules</groupId>
        <artifactId>application-info-module</artifactId>
        <version>1.0.0.RELEASE</version>
    </dependency>
</dependencies>

1.2. Module dependencies

Module Type Description

DebugWebModule

extension

Registers an application info overview as dashboard page for debug web.

AdminWebModule

extension

Will use the configured application name and id as default settings for admin web.

1.3. Module settings

Property Type Description Default

applicationInfo.applicationId

String

Internal id of the application.

unknown

applicationInfo.applicationName

String

Descriptive name of the application.

null

applicationInfo.environmentId

String

Internal id of the environment the application is running in.

unknown

applicationInfo.environmentName

String

Descriptive name of the environment the application is running in.

null

applicationInfo.hostName

String

Name for the infrastructure hosting the application.

Auto-detected.

applicationInfo.buildId

String

Id of the running build of the application.

unknown

applicationInfo.buildDate

Date

Timestamp when this build was created.

null

applicationInfo.startupDate

Date

Timestamp when the application should be considered started.

Across context bootstrap time.

Note
Timestamps in property files should be provided in yyyy-MM-dd HH:mm:ss format.

2. What’s new in this version?

1.0.0.RELEASE

Initial public release available on Maven central.

3. 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 );

4. 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.

5. Integration with other modules

5.1. DebugWebModule

ApplicationInfoModule provides a debug web controller that displays the AcrossApplicationInfo settings. This controller is available on the /applicationInfo path relative to the debug web root.

If no explicit debug web dashboard has been configured, the ApplicationInfoModule will also configure the application info controller as dashboard.

5.2. AdminWebModule

If AdminWebModule is present the ApplicationInfoModule will automatically set the properties adminWebModule.title and adminWebModule.login.rememberMe.cookie based on the application info. This will only happen if those properties have not yet been defined through some other means.