Show TOC Start of Content Area

Procedure documentation Accessing Application Properties  Locate the document in its SAP Library 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:

Syntax

// 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 Content Area