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
1 answer

Why are partitioned steps waiting for database connection?

I have a Spring Batch (v2.2.1) job that uses a partitioned step. This partitioned step accesses the database using a JpaPagingItemReader to page through results returned. The partitions are executed within the local JVM using Spring's…
FGreg
  • 14,110
  • 10
  • 68
  • 110
0
votes
1 answer

Impact of setting BasicDataSource.maxActive to -1

As the description of the property maxAcive of org.apache.commons.dbcp.BasicDataSource says that it sets the maximum number of active connections that can be allocated from this pool at the same time, or negative for no limit. Will there be any…
IMJS
  • 863
  • 2
  • 13
  • 25
0
votes
1 answer

DB connections not closing in OSGi

I have an OSGi bundle which needs to persist data in a database. As described in a previous stackoverflow question I have found that in order for transactions to work as expected I need to use an XADataSource to connect to the database. When I do so…
Christina
  • 3,562
  • 3
  • 22
  • 32
0
votes
2 answers

Hibernate, C3P0, Mysql Connection Pooling

I recently switched from Apache DBCP connection pooling to C3P0 and have gone through my logs to see that there are connection timeout issues. I haven't had this in the past with DBCP and Tomcat, so I'm wondering if it is a configuration issue or…
Walter White
0
votes
0 answers

Not able to connect to Database with oci8

I have below configuration to connect to DB through spring-hibernate. I have commons-dbcp-1.4.jar,commons-pool-1.6.jar,classes12.jar,ojdbc14.jar
SCoder
  • 919
  • 2
  • 11
  • 26
0
votes
1 answer

Problems with jdbc loadbalance

We are using jdbc load balancing like "jdbc:mysql:loadbalance://..." and apache DBCP with maxidle 300 connections.. And when after some actions I look at processes in Mysql via "SHOW PROCESSLIST" is show me very many connection. In normal behaviour…
Dedyshka
  • 421
  • 3
  • 10
  • 20
0
votes
1 answer

Tomcat/DBCP Idle Timeout: What if server hangs up?

I was reading up on tuning JDBC connection pool configurations and under the Timeout Settings >> Idle Timeout section, it reads: For best performance, set Idle Timeout to zero (0) seconds, so that idle connections will not be removed. This ensures…
IAmYourFaja
  • 55,468
  • 181
  • 466
  • 756
0
votes
1 answer

Connection Pooling using Apache common DBCP And DBUtils and concurrency

I'm investigating concurrency when doing multiple queries in different threads. I am using Apache DBCP and DBUtils not because I want to complicate my life but because they should guarantee that the queries are handled correctly and so the…
0
votes
1 answer

Data is not properly stored to hsqldb when using pooled data source by dbcp

I'm using hsqldb to create cached tables and indexed tables. The data being stored has pretty high frequency so I need to use a connection pool. Also because there is a lot of data I do not call checkpoint on every commit, but rather expect the data…
Sophie
  • 1,580
  • 3
  • 16
  • 20
0
votes
1 answer

Failing to connect to database some times spring-jdbc, commons-dbcp,tomcat

I am using spring3 and org.apache.commons.dbcp.BasicDataSource and apache tomcat 6.x. Once the application is started it works fine but after some time it fails to connect to database... on restart it connects again. below is configuration used in…
dsr301
  • 759
  • 3
  • 7
  • 21
0
votes
1 answer

Configure Spring JNDI datasource with DBCP and connection parameters

I am using Spring 3 and attempting to use a JNDI (named) data source with DBCP connection pooling. I would like to be able to set pool parameters, but my doesn't…
TomL
  • 759
  • 8
  • 20
0
votes
1 answer

Spring MVC + Hibernate web application. Web server hangs on load of CRUD operations

I am working on the following project and have came across a runtime issue. http://github.com/dmcquillan314/YouthMinistryHibernate The instructions to run this project are located in the README.md file although it looks a little messy at the moment.…
dmcqu314
  • 875
  • 11
  • 29
0
votes
1 answer

Error preloading the connection pool

I am using below env: jdk1.6.0_21 apache-tomcat-7.0.16 commons-dbcp.jar (version: 1.2.2) commons-pool.jar (version: 1.3) MySql Server 5.1 Facing below exception all the time when trying to connect with DB: Could not get JDBC Connection; nested…
Atul Kumar
  • 719
  • 3
  • 8
  • 29
0
votes
2 answers

Same old story: Tomcat DBCP + MySQL, MySQLNonTransientConnectionException: No operations allowed after connection closed

I examined related questions here on this topic, and also googled for some time. Still seems I don't understand something crytical in Tomcat's DBCP configuration or mechanics. I got Tomcat 6, DBCP resource configured in server.xml:
dmitry
  • 4,989
  • 5
  • 48
  • 72
0
votes
1 answer

DBCP connection pool connection spawning

Please help me understand hot the DBCP will work when multiple threads will try to use same connection? A new connection will be spawned for every thread? And in this case there will be no advantage to use connection pool.
yuris
  • 1,109
  • 4
  • 19
  • 33