How to call Oracle using passed credentials?

Posted by Admin on 15-May-2008 02:47

Hi!

I need to implement an ESB process like this:

1. Call some service to get user name and password. For instance, it could be web-service.

2. Connect to Oracle database using user name and password from the 1st step and call its stored procedure.

Actually, user name and password are changed rarely, but they do, so I cannot just hardcode them in my database service parameters.

Please give guidline how to implement it.

A lot of thanks in advance.

All Replies

Posted by dmillman on 15-May-2008 16:42

This is going to depend on the service implementation. The database service by default does not allow this to happen as the connection to the database is performed during the init() using the initialization parameters NOT during the service method. As such if you used new credentials on every invocation you would essentially be initializing the connection on every request, this could be very expensive practice.

An alternative approach would be to configure the database service and use as is, then if a request is rejected based on the connection being terminated because the username/password has changed the message would be sent to the RME. On receipt at the RME you could determine the error and use the new ESB admin commands to potentially update the parameters of the service and restart before submitting the request back to the database service. This approach would ensure that the connection would only need to be updated when out of date.

David

Posted by dbenton99 on 20-May-2008 15:24

Does the 7.6 release of the Database service give you the ability to use a properties file to store user ID and password information?

If it does, then I would use that method since you credential do not change very often. Store the information in SonicFS and have the service look it up at runtime.

This thread is closed