users@glassfish.java.net

Re: COnnection Pool Datasource from Glassfish

From: <glassfish_at_javadesktop.org>
Date: Sun, 09 Mar 2008 22:17:10 PST

> OracleConnectionPoolDataSource connPoolDatasource = new
> OracleConnectionPoolDataSource();

> connPoolDatasource.setURL("jdbc:oracle:thin:@xxx.xx.xx.org:1521:TEST");
> connPoolDatasource.setUser("username");
> connPoolDatasource.setPassword("password");
> PooledConnection pconn = connPoolDataSource.getPooledConnection();
> Connection conn = pconn.getConnection();

Above code will get you a connection but will not be part of application server's transaction /pool. This is not the recommended way of using a datasource in enterprise environment.

1) Could you post the exception messages that you get when using DataSource and the pool configuration for both DataSource and ConnectionPoolDataSource ?

2) When you see max pool size reached exception with DataSource type pool, try enabling Connection-leak-tracing to see the caller that is leaking the connection.
[Message sent by forum member 'jr158900' (jr158900)]

http://forums.java.net/jive/thread.jspa?messageID=263122