Topic
  • No replies
ereynard
ereynard
1 Post

Pinned topic Statement Pooling in DB2 Express

‏2013-11-14T11:18:57Z |

Hey,

I'm trying to activate the statementPool with the db2 jdbc driver, and i m having trouble doing so.

I've tried different techniques mentionned here : http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=%2Fcom.ibm.db2z10.doc.java%2Fsrc%2Ftpc%2Fimjcc_c0052041.htm

Here is the java code :

csUrl += ":maxStatements=1000;";
System.err.println("Connecting to csUrl : " + csUrl);
 
DB2ConnectionPoolDataSource ds = new DB2ConnectionPoolDataSource();
//DB2SimpleDataSource ds = new DB2SimpleDataSource();
//ds = new DB2ConnectionPoolDataSource();
ds.setServerName("edited");
ds.setPortNumber(edited);
ds.setDatabaseName("edited");
ds.setCurrentSchema("edited");
ds.setMaxStatements(1000);
ds.setDriverType(4);
Connection connection = ds.getPooledConnection(csUser, csPassword).getConnection();
//Connection connection = ds.getConnection(csUser, csPassword);
//Connection connection = DriverManager.getConnection(csUrl);
//Connection connection = m_driver.connect(csUrl, propertiesUserPassword);
boolean pooling = connection.getMetaData().supportsStatementPooling();
if (pooling) {
System.err.println(">>> Pooling is ON!");
} else {
System.err.println(">>> Pooling is OFF! <<<");
}

All techniques fail according to :  connection.getMetaData().supportsStatementPooling() and statementPooling is always deactivated. 

I'm running DB2/Linux :

 Database server        = DB2/LINUXX8664 10.1.2

with the matching jdbc driver.

I could not find any information regarding the Express version having StatementPooling being disabled in Express version. So i guess i'm doing something wrong, but i cant seem to find what.

Thanks for the time and help :)