Showing results for 
Search instead for 
Did you mean: 

Connection Parameters

0 Kudos

Hi All,

I am developing an EJB wherein i make a connection to SAP system. My requirement is where should i save these connections parameters.

1. i dont want to hardcode them.

2. If the user wants to change the connection parameters in future he/she should be able to do that without any problems.

Is there some way i can store the values in the Configuartion Adapter service in VA and access them from EJB.

Please give your suggestions.



Accepted Solutions (0)

Answers (1)

Answers (1)

Active Contributor
0 Kudos

HI Sid,

There are two ways in which you can achieve your requirement.In both the cases , you have to store all your Conn params in a properties file.So later on, you can change the param values at later point of time.

1)<b>properties file inside your project </b>.

-- create the properties file (say <b></b>) file inside the project package like,<b>com.yourclient.SAPmodule.util</b>

-- Access the values in the follwoing way

ResourceBundle rsBd = ResourceBundle.getBundle("com.yourclient.SAPmodule.util.SAPConn",


String name = rsBd.getString("KeyName");

The demerit in this case is, when ever you want to change the SAP Connection parameters, you have to open up your project & then do the changes in the properties file.Then rebuild project & re deploy it on the server.

2)<b>properties file on the SERVER </b>.

-- create the properties file (say <b></b>) on the server, & put it inside the <b>SERVER0</b> folder of your WAS server.

-- Access the values in the follwoing way

ResourceBundle rsBd = ResourceBundle.getBundle("SAPConn",


String name = rsBd.getString("KeyName");

In this case, you do not have to open up your project each time you do some changes in the SAP Conn params.Just change the param values in the properties file.Rest will be taken care by the Applicaion.

Hope this will help you.Do remember to give points in that case.


Sandip Agarwal