How to change a Datasource's username/password at runtime in a J2EE app?

Posted by Toto on Stack Overflow See other posts from Stack Overflow or by Toto
Published on 2010-05-03T20:52:02Z Indexed on 2010/05/03 21:18 UTC
Read the original article Hit count: 278

Filed under:
|
|
|

I've deployed a web-module which connects to the database via a datasource configured in the J2EE application server.

Currently, the user/password for the database connection is set in the proper J2EE application server's datasources configuration file.

I want to change during runtime the datasource's user/password. (e.g.: implement a new web form in which the user is asked to enter de user/password to be used in the database connection).

Is there a standard way to do that in J2EE applications or it depends on the J2EE application server? In this case I'm using Orion application server.

© Stack Overflow or respective owner

Related posts about j2ee

Related posts about datasource