Questions tagged [jdbc-pool]

JDBC pool is a pool of JDBC connections to a common data source. Pooling JDBC connection is a common practice to avoid expensive JDBC connection creation.

JDBC pool is a pool of JDBC connections to a common data source. Pooling JDBC connection is a common practice to avoid expensive JDBC connection creation.

External libraries implementing the JDBC pooling can be used to further boost the performance. Examples of such libraries are Apache Database Connection Pool., , Tomcat JDBC Pool, , .

Relevant Q/A:

73 questions
2
votes
0 answers

Using DBCP validationQuery="SELECT 1" effects to overall performance and causes BasicDataSource.getConnection() timeout

I have been using DBCP connection pooling with following details (https://stackoverflow.com/questions/37613362/slowest-component-org-apache-tomcat-dbcp-dbcp-basicdatasource-getconnection-du) but did not find any proper solution yet. Anyway, With…
princeexpedition
  • 143
  • 1
  • 4
  • 15
2
votes
1 answer

tomcat.dbcp... Cannot create JDBC driver of class '' for connect URL 'null'

Lots of answers to this question already but none of them are working for me. I feel like I've tried everything. Anyone else have any ideas? code: private DataSource ds1; private Connection dc1 = null; Context initContext = new…
wintermute
  • 121
  • 3
  • 9
2
votes
1 answer

tomcat 7 jdbc connection pool and jdbc4 validation

I would like to validate a jdbc connection using tomcat 7 jdbc pool using JDBC4 Connection.isValid instead of a validation Query. I am wondering if implementing a Validator like bellow would be enough. Also I am wondering which would be a nice…
Federico Alvariz
  • 81
  • 1
  • 2
  • 4
2
votes
1 answer

JDBC Connection Pooling error

I am trying to pool a jdbc mysql connection using Tomcat,in order to do this I am following this blog post I have added the following code to server.xml in Tomcat(remoteURL and remoteDatabase represent the actual URL and database name I am passing…
vamsiampolu
  • 6,328
  • 19
  • 82
  • 183
2
votes
1 answer

grails 2.3.7 connect to remote postgresql server

In my BuildConfig.groovy I have : dependencies { runtime 'org.postgresql:postgresql:9.3-1100-jdbc41' } In my DataSource.groovy I have : dataSource { pooled = true driverClassName =…
user3511317
  • 23
  • 1
  • 3
2
votes
0 answers

GAE: java.sql.SQLException: Transient error, please try again

db.DbTransaction getConnection: null java.sql.SQLException: Transient error, please try again. at com.google.appengine.api.rdbms.RdbmsApiProxyClient$ApiProxyBlockingInterface.makeSyncCall(RdbmsApiProxyClient.java:108) at…
2
votes
1 answer

How Can I Tell If a Transaction Is In Progress with JDBC?

I'm using a JDBC Connection with autocommit turned off. In my cleanup method I want to check to ensure that there is not a transaction currently in progress but I can't see any way of obtaining this information. How can I find out if a transaction…
user1596371
2
votes
1 answer

PreparedStatement Pool with Connection Pool

Possible Duplicate: Prepared statement pooling in dbcp I am building a web application that uses Tomcat's Database connection pooling mechanism for its internal use. I am trying to pool the prepared statements as well so that the application is…
BegaluruBoy
  • 95
  • 2
  • 7
1
vote
1 answer

Tomcat JDBC Connection Pool removeAbandoned not working

We have an application that's using the Tomcat JDBC Connection Pool, configured along with Spring Boot and Hibernate. The connection pool itself is working well (I've been able to verify that through the JMX MBean the pool provides), but a specific…
1
vote
1 answer

How are Datomic's long lived database Connections implemented for sql Connections?

According to Datomic's Connection documentation: Datomic connections do not adhere to an acquire/use/release pattern. They are thread-safe, cached, and long lived. Many processes (e.g. application servers) will never call release. I'm interested…
Matthew Gretton
  • 333
  • 2
  • 11
1
vote
1 answer

tomcat - ratio between HTTP Connector maxThreads / acceptCount and JDBC pool maxActive

Is there something as a common sense accepted ratio between the HTTP Connector maxThreads (max HTTP threads handling the users requests), HTTP Connector acceptCount (max queue length for incoming connection requests when all possible request…
Simeon Angelov
  • 470
  • 4
  • 18
1
vote
0 answers

org.postgresql.util.PSQLException: This connection has been closed. error for long running transactions

We are getting "org.postgresql.util.PSQLException: This connection has been closed." on one of our deployments for only long running transactions (more than a few minutes): Caused by: org.hibernate.TransactionException: rollback failed at…
nilgun
  • 10,460
  • 4
  • 46
  • 57
1
vote
1 answer

Spring Boot and Spring Cloud AWS Data source pool configuration

I have an application on EC2 instance that connect to RDS (MySQL), after 8 hours the DB connection gets closed from MySQL and when the application tries to read/write data I get the below Exception Servlet.service() for servlet [dispatcherServlet]…
Youssef Al Muhaidib
  • 363
  • 1
  • 5
  • 17
1
vote
1 answer

Getting error with DBCP Pool: "java.sql.SQLException: Configuration file not found"

I am getting the error: java.sql.SQLException: Configuration file not found at org.apache.commons.dbcp.PoolingDriver.getConnectionPool(PoolingDriver.java:137) at org.apache.commons.dbcp.PoolingDriver.connect(PoolingDriver.java:175) …
Don Rhummy
  • 24,730
  • 42
  • 175
  • 330
1
vote
1 answer

java.lang.ClassCastException: org.apache.commons.dbcp.BasicDataSource cannot be cast to org.apache.commons.dbcp.BasicDataSource

I'm getting this weird Exception while trying to retrieve a DataSource configured under Tomcat Global resources. java.lang.ClassCastException: org.apache.commons.dbcp.BasicDataSource cannot be cast to org.apache.commons.dbcp.BasicDataSource …