By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,756 Members | 1,749 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,756 IT Pros & Developers. It's quick & easy.

slow connections with DB2DataSource

P: n/a
Its taking ages (600msec) to get connections.

I am running my application outside of a J2EE container environment
using DB2 UDB 7. It all works, its just slow. If I switch to JDBC
connections it still takes 600msec suggesting that my DB2DataSource
isnt actually using connection pooling. Do I need to configure it? Any
help would be appreciated.

Thanks John

Code I'm using:

dsource = new;
Context ctx = null;
Hashtable env = new Hashtable(5);
env.put ("java.naming.factory.initial",
ctx = new InitialContext(env);
ctx.bind(dataSourceName, dsource);
ds = (DataSource) ctx.lookup(dataSourceName);
conn = ds.getConnection(datasourceUser, datasourcePassword);
Nov 12 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.