!--a11y-->
Connecting to the Configuration
Manager 
To be able to open a configuration and modify it, you must first connect to the Configuration Manager, which is the module that manages the configuration tree.
To connect to the Configuration Manager, you must have added a reference to the Configuration Service in the SAP-specific deployment descriptor of your application – that is, application-j2ee-engine.xml. The reference must have the following parameters:
These entries are stored in the application-j2ee-engine.xml as follows:
<reference reference-type="hard"> <reference-target provider-name="sap.com" target-type="service">configuration</reference-target> </reference> <provider-name>sap.com</provider-name> |
For more information about setting references, see Editing Application References.
1. Obtain an instance of com.sap.engine.services.configuration.appconfiguration.ApplicationConfigHandlerFactory from the JNDI registry. To look it up, use the name ApplicationConfiguration.

//obtain JNDI context Context ctx = new InitialContext();
//get ApplicationConfigHandlerFactory instance from JNDI ApplicationConfigHandlerFactory appCfgHdlFctry = (ApplicationConfigHandlerFactory)ctx.lookup("ApplicationConfiguration"); |
2. Use the ApplicationConfigHandlerFactory to obtain an instance of com.sap.engine.services.configuration.appconfiguration.ApplicationConfigurationHandler.

//request ApplicationConfigurationHandler instance from the factory ApplicationConfigurationHandler cfgHandler = appCfgHdlFctry.getApplicationConfigurationHandler(); |
You can now open and modify the configuration subtree of the application.
