How can I give user id and password for a datasource in WebSphere 5.0
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anesul_Mandal
Posted On:   Wednesday, June 9, 2004 06:50 AM

I have created a datasource through Administrative Console of WebSphere 5.0. The document says that we can give default database user Id and password in Resource --> JDBC Provider --> DataSource --> Custom Properties. But there is no Default User Id and Default Passowrd fields. Now if we cannot give user id and password during creation of the datasource, we have to give it in getConnection(userId,password). But the problem is from ejb (stateless session bean) we cannot read these userId and password from a config or .properties file. So how can I get userId and password in session bean. Actually I have to put database userId and password in a config or .properties file so that I can change it after deployment also and ejb should r   More>>

I have created a datasource through Administrative Console of WebSphere 5.0.

The document says that we can give default database user Id and password in Resource --> JDBC Provider --> DataSource --> Custom Properties. But there is no Default User Id and Default Passowrd fields.

Now if we cannot give user id and password during creation of the datasource, we have to give it in getConnection(userId,password). But the problem is from ejb (stateless session bean) we cannot read these userId and password from a config or .properties file. So how can I get userId and password in session bean. Actually I have to put database userId and password in a config or .properties file so that I can change it after deployment also and ejb should read it from that file.

Can you please help me out from this situation.

   <<Less
About | Sitemap | Contact