| Author |
WebSphere - DB2 DataSource Connection Problem
|
Jaime Garcia
Ranch Hand
Joined: Jan 07, 2003
Posts: 38
|
|
I am using DB2 7.1 and WebSphere 4.0.3. (OS Solaris 5.8) I access DB2 Data Bases with Implementation class COM.ibm.db2.jdbc.DB2ConnectionPoolDataSource for Pool Connection (Data source). I need to access 6 diferent data bases. It works fine at the begining but sudenly It dose not get connections from pool. This is the error from WebSphere Pool: Source: com.ibm.ejs.cm.pool.ConnectionPool CONM6009E: Failed to get connection to the database from datasource (DB) I am sure that I close all connections. Any Idea ?. The same code (none change) works in Tomcat 4.0.6 (the data source that it use is from tyrex I guess) and DB2 for Windows 7.1. I have the license of DB2 for Windows but from Sun is a Trial version.
|
 |
Kyle Brown
author
Ranch Hand
Joined: Aug 10, 2001
Posts: 3879
|
|
The very fact you say you're using pool data source worries me. Can you post the code you're using? Kyle
|
Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
|
 |
Jaime Garcia
Ranch Hand
Joined: Jan 07, 2003
Posts: 38
|
|
This is the code that I use to obtain the connection: Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup("java:comp/env"); //db is the name of the DataBase DataSource ds = (DataSource) envCtx.lookup(db); conn = ds.getConnection(); I have already try this one: java.util.Properties parms = new java.util.Properties(); parms.setProperty(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory"); javax.naming.Context envCtx = new javax.naming.InitialContext(parms); DataSource ds = (DataSource) envCtx.lookup("java:comp/env/"+db); conn = ds.getConnection();
|
 |
 |
|
|
subject: WebSphere - DB2 DataSource Connection Problem
|
|
|