on 06-22-2009 3:09 PM
Hi developers,
I know that WDJ allow .properties files to be accessed both by API and by Visual Admin.
I would like to do the same with properties file placed in a J2EE server component accessed by plain java object (pojo).
I know how to read files in a jar, but how should I make them visibile to Visual Admin?
I don't want to put my configs in WDJ because these are backend config files.
Can anyone help?
Thanks, regards
Vincenzo
You need to put your properties into special file with name sap.application.global.properties in folder META-INF of your J2EE application or service. After this they'll be visible in Visual Admin and available for configuring your application/service.
BR, Sergei
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In the case you have to use SAP AS Java Configuration Adapter API:
InitialContext ctx = new InitialContext();
ConfigurationRuntimeInterface configRuntimeInterface = (ConfigurationRuntimeInterface) ctx.lookup("configuration");
ConfigurationContext configContext = configRuntimeInterface.getConfigurationContext();
ConfigurationHandler configHandler = configContext.getConfigurationHandler();
Configuration serviceConfig = configHandler.openConfiguration("cluster_data/server/cfg/...<your app name>", ConfigurationHandler.READ_ACCESS);
PropertySheet propSheet = serviceConfig.getPropertySheetInterface();
...
serviceConfig.close();
BR, Sergei
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.