Entering content frame

Procedure documentation Opening the Application Configuration Root Locate the document in its SAP Library structure

Use

The application configuration API provides a method that opens the application configuration root. You may need to use this function, for example, if you want to create a sub-configuration for the root configuration. In this case you need the root configuration opened in write mode.

Prerequisites

You must have connected to the Configuration Manager.

Procedure

To open the application configuration root, use the ApplicationConfigurationHandler, which you obtain when connecting to the Configuration Manager. You must invoke its openRootConfiguration() method:

Example

while (!rootObtained) {

   try {

      //open root in write-mode

      root = cfgHandler.openRootConfiguration(ConfigurationHandler.WRITE_ACCESS);

      rootObtained = true;

 

...

 

   } catch (ConfigurationLockedException e) {

      //if locked, send your thread to sleep and retry

      try {

         Thread.sleep(1000);

      } catch (InterruptedException f) {

      }

   }

}

 

If the root is already open in write mode, the ConfigurationLockedException is thrown and you must retry opening the configuration.

See also:

Opening a Configuration in Read or Write Mode

 

 

 

Leaving content frame