Questions tagged [apache-commons-dbcp]

Apache-commons-dbcp provides an efficient implementation of the Database Connection Pool under the Apache license.

Many projects support interaction with a relational database. Creating a new connection for each user can be time consuming (often requiring multiple seconds of clock time), in order to perform a database transaction that might take milliseconds. Opening a connection per user can be unfeasible in a publicly-hosted Internet application where the number of simultaneous users can be very large. Accordingly, developers often wish to share a "pool" of open connections between all of the application's current users. The number of users actually performing a request at any given time is usually a very small percentage of the total number of active users, and during request processing is the only time that a database connection is required. The application itself logs into the DBMS, and handles any user account issues internally.

Apache-commons-dbcp coordinates the efforts required to create and maintain an efficient, feature-rich Database Connection Pool package under the ASF.

394 questions
0
votes
2 answers

Alternate of setAccessToUnderlyingConnectionAllowed method in c3p0

I am using org.apache.commons.dbcp.BasicDataSource in my hibernate for connection pooling. and i also used the below method : basicDataSource.setAccessToUnderlyingConnectionAllowed(true); Now i want to use the c3p0 connection pooling. and i am…
Keval Trivedi
  • 45
  • 1
  • 1
  • 11
0
votes
1 answer

MySQL Error: Lock wait timeout exceeded; try restarting transaction Query

I found many people got the same error message from MySQL with the same error state=41000 amd same error code=1205. However most of them involved 2 transactions and a deadlock. Based on SHOW ENGINE INNODB STATUS output, there is only 1…
Hei
  • 1,844
  • 3
  • 21
  • 35
0
votes
3 answers

Tomcat 5.5 DBCP Connection Pool DataSource is closed

I'm developing a Spring web app with Spring Data JPA and Hibernate, running on Tomcat 5.5. The Tomcat uses DBCP for connection pooling. The pool is defined like this:
user3734130
  • 86
  • 1
  • 1
  • 6
0
votes
1 answer

org.apache.commons.dbcp.BasicDataSource - release connections on connection closing?

How to configure BasicDataSource so after ds.getConnection().close() connection really closed? According to: http://commons.apache.org/proper/commons-dbcp/api-1.4/org/apache/commons/dbcp/BasicDataSource.html#maxIdle I need:…
gavenkoa
  • 45,285
  • 19
  • 251
  • 303
0
votes
0 answers

database connection issue after moving from tomcat-dbcp to tomcat-jdbc connection pooling

In my spring+hibernate based web application, I recently moved from tomcat-dbcp to tomcat-jdbc connection pooling. After that I am facing a connection issue. here are the settings I have: JNDI.xml:
user811433
  • 3,999
  • 13
  • 53
  • 76
0
votes
2 answers

Getting the following error "Cannot get a connection, pool error Timeout waiting for idle object"

Iam getting the below error when iam logging into my application. Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a…
Dileep
  • 73
  • 3
  • 10
0
votes
1 answer

GWT eclispe embedded jetty and DBCP connection pooling

I am trying to setup the embedded Jetty that comes with the GWT (2.0.3) Eclipse plugin to use a JNDI connection pool that works perfectly under Tomcat, without success. Now since i have read some things regarding the issue, i have managed to do the…
nvrs
  • 720
  • 2
  • 17
  • 25
0
votes
1 answer

Override BasicDataSource in scala

I am trying to override the dbcp BasicDataSource class in scala but I am confused by the compiler output. If I try to do the following: class MyBasicDataSource extends BasicDataSource { } I get the following compiler error: class MyBasicDataSource…
user79074
  • 4,937
  • 5
  • 29
  • 57
0
votes
0 answers

Am I setting the DBCP pool size incorrectly?

I am using DBCP connection pooling with postgres and executor framework. I have a machine with 2 cores. Hence, I am setting the number of threads to 2. I am I am setting initial size of the datasource to 2 and max active to 2 as well. However, the…
0
votes
1 answer

Java: Face Cannot create PoolableConnectionFactory (Access denied for user 'root '@'localhost' (using password: YES)) Exception

I am trying to use Apache DBCP connection pooling technique with Spring and my DB is MySQL. My Apache DBCP configuration code is: @Bean(destroyMethod = "close") // destroyMethod attribute is used to close the bean public DataSource dataSource() { …
Harmeet Singh Taara
  • 6,483
  • 20
  • 73
  • 126
0
votes
0 answers

Database connection error MySQL,Tomcat

I am using following setting of dbcp for connection pooling maxActive = 50 maxIdle = 10 minIdle = 2 initialSize = 2 maxWait = 30000 validationQuery="select 1" testOnBorrow=true testWhileIdle=true timeBetweenEvictionRunsMillis=60000 Also, I have set…
Naresh
  • 632
  • 4
  • 19
0
votes
0 answers

Commons-dpcp jar & javax.servlet-api issue

I am new to spring and learning spring MVC by doing some samples. I am getting jar issues in commons-dpcp and javax.servlet-api jar issues which is not loaded properly.I tried downloading from different sites but still am getting errors. Please some…
0
votes
1 answer

how to get static connection object in case of pooling?

Iam unable to understand how to get connection in other classes (iam using connection pooling using DBCP) MyServlet //NOT A COmplete Code class MyServlet extends HttpServlet { public Datasource getDatasource(){ …
0
votes
1 answer

Spring Batch using Sybase IQ data source

How do we properly configure Sybase datasource in a Spring Batch? Currently I am using a JdbcPagingItemReader for reading DB and creating the data source using Tomcat DBCP. However the following error occurs on the batch run. Caused by:…
ram
  • 747
  • 2
  • 11
  • 34
0
votes
1 answer

Oracle goes out of connection although it has enough process/session

I have a rather high traffic Tomcat application server on a Win 2008 machine, connecting to an Oracle Database 11.2.0.1.0 (Windows Server 64x 2k8 R2; ~500-1000 unique users visit my web application in a minute). It works fine with a single Tomcat,…