cancel
Showing results for 
Search instead for 
Did you mean: 

Configuration in Java EE application for connection to MDM backend system

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

Used workaround (configuration file) as it did not work for NW2004s.

Closing thread

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hello Dagfinn

I am also using NW04S. Can you please tell me, how you were able to create configurations.

Thanks & Best Regards

Tejo