on 10-27-2008 9:45 AM
Hi,
We're developing a support application to using the MDM java libraries that is transported using NWDI.
The application will have to connect to different MDM backend systems in dev, QA and production.
Where is the best place the parameters for which backend system to connect to (servername, port, username, password) ?
web.xml of the application ?
portal systems?
create admin configuration page in the application and store in java system's database?
We need to be sure that the connection properties are not overwritten when a new version of the application is transported using NWDI.
Regards
Dagfinn
Think I might have found an official way, but it is only document in the CE help.sap.com documentation.
Can anyone confirm that it also works for 2004s ?
Adding Configuration Capabilities to an Application
http://help.sap.com/saphelp_nwce10/helpdata/en/45/c88053a0df570de10000000a114a6b/frameset.htm
Basically it consists:
1. adding a properties file with name sap.application.global.properties in the META-INF directory (unsure if it is EAR or WAR project. Would believe EAR)
2. Using the following code to read the properties
// 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
3. Modify the properties using config tool or visual admin once for each environment. On redeployment changed values are not
4. (optional if you want to listen for property change events) Add a reference to tcjeappconfiguration~api and use it's API
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hallo Dagfinn,
could you please tell me where to find this API? I don't find it anywhere on my machine, and there's nothing on SDN about it. I'm using PI 7.1. Uploading attribute values works fine, but I need the ApplicationPropertiesAccess class for loading them in my application.
Regards,
Jörg
Hi,
Best clue I can give you is that the DC dependency needed is tcjeappconfiguration~api
(from http://help.sap.com/saphelp_nwce10/helpdata/en/45/deff9d71146976e10000000a1553f6/frameset.htm)
Search for a similar jar file based on that name on the java App server
Regards
Dagfinn
Looks good, but I only find an EAR file with this name. However, it seems to be included in the application client library. Do you know whether there is any documentation on this library?
I found the package com.sap.engine.services.configuration.appconfiguration there, which sounds pretty much like what I need. But I don't know how to use it properly.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.