on 11-11-2005 10:19 AM
Hi All,
I'm using this piece of code to connect to the back-end via a defined system (with alias='CN')
try {
con = cgservice.getConnection("CN", cp);
}
catch (Exception e)
{
e.printStackTrace();
}
Is there a way I can hard code the username and password in this code instead of doing user-mapping on the portal?
Please help..urgent!
Thanks
Hi D.V.,
If you want all the users to connect using the same credentials, the 'correct' way would be to create one user mapping to the group 'everyone', and not hardcode the username and password.
You can also use a specific user instead of the logged on one when creating the ConnectionProperties.
To get an authenticated user see:
/thread/62774 [original link is broken]
and:
These are your options using JCA.
There are also ways to connect to the system using explicit credentials, which depends on the system type (SAP - use JCO, JDBC - use java.sql.DriverManager).
Hope that helps,
Yoav.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
79 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
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.