This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
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.
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");