DBCP « Connection « Java Database Q&A





1. Is DBCP (Apache Commons Database Connection Pooling) still relevant?    stackoverflow.com

The JDBC 3.0 spec talks about Connection (and Prepared Statement) pooling. We have several standalone Java programs (i.e. we are not using an application server) that have been using DBCP to provide ...

2. How commons dbcp (and other connection pools) manage open statements and resultsets?    stackoverflow.com

Specifically, when I return a connection to the pool, does dbcp (and other connection pools) close the statements and resultsets for me? Or should I be closing these myself?

3. Blocking on DBCP connection pool (open and close connnection). Is database connection pooling in OpenEJB pluggable?    stackoverflow.com

We use OpenEJB on Tomcat (used to run on JBoss, Weblogic, etc.). While running load tests we experience significant performance problems with handling JMS messages (queues). Problem was localized to blocking ...

4. DBCP returns closed connections    stackoverflow.com

We are seeing situations where our database connection from org.apache.commons.dbcp.BasicDataSource is dying with socket write errors:

com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset by peer: socket write error
All subsequent attempts to write to the connection fail, ...

5. Connection pooling with DBCP    coderanch.com

6. dbcp connection lock    coderanch.com

7. DBCP could not obtain an idle db connection    coderanch.com

Hello Tomcat 4.1 gives me this exception "DBCP could not obtain an idle db connection" when i try to get connection from jndi datasource with Oracle 10g. I succesfully did dbcp connections many times before with mysql, so this is not my first experience. I tried to play with resource params but didnt work out. Any ideas? my server.xml file:

9. Connection Pooling with Commons DBCP - spot the problem?    coderanch.com

Hello, I am using Commons DBCP to pool my database connections. Sometimes there is just an hourglass cursor when trying to access my application - looks like there are no free connections available. Am I doing anything wrong in my code? Should I be closing the datasource, for example? Please see below. Class for retrieving datasource: package mypackage.name.here import javax.sql.*; import ...





10. Firewall timing out connections in Pool - Commons DBCP    coderanch.com

I am using the Commons DBCP connection pool to manage my connections. Everything works fine but recently i found out that every morning i try to make a request, the application takes at least 9 minutes to process the request. Subsequent requests take just seconds. I have tried to trace this and found out that since i set the connection pool ...

11. Back To Basics: Connection Pooling and DBCP    coderanch.com

While working on a very small project, it has given me an opportunity to get back to some very basic JDBC programming since using any type of framework is really just overkill. I am trying to implement connection pooling using jakarta commons-DBCP. There aren't really any good tutorials for doing such a thing and I wanted to do something that wasn't ...

12. connection pool with dbcp    coderanch.com

13. how to set connection size (dbcp)    coderanch.com

Hello, I am trying to control the number of initial connection when creating a connection pool (Apache-Postgres). I require 1-2 connections but i am initially receiving 4. I see that in BasicDataSource i can set the initialSize of the pool, however i do not understand how to set initialSize using PoolingDataSource. Thanks,

14. Apache Commons DBCP connection object problem    coderanch.com

Hi I am using Apache Commons DBCP (commons-dbcp-1.2.2.jar) Connection pool. Once i obtain a connection from the pool it is wrapped in the class org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper. My requirement is to pass an array of Strings to pl/sql stored procedure in Oracle. Here is what i am doing in the following code snippet: Connection conn = ConnectionManager.ds.getConnection(); //The above statement returns me an ...

15. Standalone Connection pooling with DBCP    coderanch.com

Hi ranchers, I'm trying to create a db connection pooling for standalone application using DBCP but I'm not sure if it is possible for DBCP to have different connection pool. I have successfully created a single pool (i.e. 1 datasource for 1 pool) but I need to create different pool since I will be connecting to different database. I need to ...

16. unable to update CLOB data using Commons DBCP connection.    coderanch.com

Am trying to do update a clob column using a connection object that is retrieved using Apache DBCP connection pooling. Earlier, I've implemented connection pooling using this and it was working fine i.e am able to update CLOB. I switched to DBCP because I was getting java.sql.SQLException: ORA-01000: maximum open cursors exceeded. I've checked connection, resultSet, preparedStatement objects in all the ...





18. database connection pooling (dbcp) - help required    coderanch.com

Hi, In our application we are getting db connection pooling (dbcp) exceptions. These are as follows: Cause: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:124) at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:322) at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:212) at org.springframework.orm.ibatis.SqlMapClientTemplate.executeWithListResult(SqlMapClientTemplate.java:249) at org.springframework.orm.ibatis.SqlMapClientTemplate.queryForList(SqlMapClientTemplate.java:296) We are using ibatis,mysql and tomcat server. The server.xml has the following dbcp settings