Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Weblogic datasource problem

 
Skip Jack
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can i create weblogic datasource with user/password field empty?, and make connection with the database dyanamically using getConnection() method.
If yes, what all changes have to be made in Datasource setup as well as the java code?

Please help me in this issue.
 
Deepak Pant
Ranch Hand
Posts: 446
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At the time of DataSource (and Connection Pool) creation, one is required to enter the database userid/password in WebLogic console. This requires you to enter a generic database user/password with fixed assigned database role.

What are you trying to achieve ? Are you trying to use the application user for setting up the database connection ? If yes then there are several options available. You can use Client Identifier to pass the client identity. If the database is Oracle then you can use the Oracle Proxy Authentication mechanism.

The app servers allow you to get to the native connection object but generally they donot accept the connection back into the pool after application code is done with it.
 
Skip Jack
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Im working on an application which is used to change the Teradata passwords. If a person want to change the password in the Teradata DB, He should provide the Old password as well as new password to the application. With the help of the userID and the old password, it will connect to the Teradata DB and updates the password. So actually, I dont want to use the userID/ password in the Datasource setup to connect to teradata.

In short, the connection is to be made only with the help of the username/password provided during running the application, not with the datasource username/password.

Any idea???
 
Deepak Pant
Ranch Hand
Posts: 446
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From the description it looks like you don't need the data source at all. You can keep all the data source connection options (url, ip etc) in a properties file.

Just create a data source or connection object directly and use it for password mgmt.
 
Skip Jack
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks deepak for the idea

I am a newbie to the weblogic server. When I searched in google about the properties file, I got a lot of results. Now I am confused about which code I've to use. Can you please help me ??
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic