Show TOC

Accessing Application PropertiesLocate this document in the navigation structure

Use

If the application is deployed with its properties, the properties can be accessed from the database during runtime.

Procedure

Obtain the properties from the class ApplicationPropertiesAccess :

            // Obtain the JNDI context
InitialContext ctx = new InitialContext();

// access the Application-Configuration-Façade service
ApplicationPropertiesAccess appCfgProps = 
      ApplicationPropertiesAccess)ctx.lookup("ApplicationConfiguration");

java.util.Properties appProps = 
      appCfgProps.getApplicationProperties();

if (appProps==null) {
// some reaction if no application properties are available
   } else {
// extract properties
}