Show TOC

Procedure documentationAccessing Application Properties Locate this document in the navigation structure

 

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:

Syntax Syntax

  1. // 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
    
End of the code.