Tomcat Database Connection Pool (DBCP) aka Tomcat JDBC Connection Pool is a replacement or an alternative to the Apache Commons DBCP connection pool
Questions tagged [tomcat-dbcp]
23 questions
4
votes
1 answer
Database connections count greater than that set by DBCP maxTotal
I am running a java web application using Tomcat (version 8.0.43).
I moved the tomcat-dbcp.jar (which came with Tomcat8.0.43) to jdk/jre/lib/ext so that it's available to the jre.
I think that I am using the Tomcat DBCP (as opposed to Apache Commons…

theyuv
- 1,556
- 4
- 26
- 55
4
votes
0 answers
How to configure Tomcat JDBC Pool for a load balanced cluster (like PostgreSQL Master-Slave Replication)
Let's assume there is a PostgreSQL cluster consisting of a single master node and two read-only replicas via streaming replication.
How can I configure Tomcats DBCP to be aware that there are several different nodes within the db cluster, thus…

Mahatma_Fatal_Error
- 720
- 1
- 10
- 26
2
votes
1 answer
Why there are two options for database connection pooling with tomcat (tomcat-dbcp and tomcat-jdbc)?
I want to add database connection pooling to an existing application. I found two libraries based on tomcat tomcat-dbcp and tomcat-jdbc. I am just getting into trouble which one should I go for?

Sanjok
- 341
- 1
- 9
2
votes
1 answer
Is DriverManager.deregisterDriver(driver) closes all connections?
I need to close all tomcat connection pool's datasource connections while context destroyed. Is DriverManager.deregisterDriver(driver) closes all connections?
Enumeration enumDrivers = DriverManager.getDrivers();
while…

nikli
- 2,281
- 2
- 24
- 38
1
vote
1 answer
Tomcat 9.x DBCP basicdatasource methods returning java.time.* cannot be mapped to JMX OpenType
I am trying to upgrade tomcat web container used by our application from version 8.5 to 9.x. We have JDBC resources defined on the context xml file which have JMX enabled. When the application starts up, exceptions are thrown while registering beans…

kTest
- 367
- 1
- 11
1
vote
0 answers
How I can use FlexyPool with a custom DataSourceFactory?
I have a simple Tomcat application setup to use a MySQL data source with a custom DataSourceFactory. The context.xml is give below. The custom factory is used merely to the placeholders ({{driver}}) with actual values at runtime.

Manoj Govindan
- 72,339
- 21
- 134
- 141
1
vote
0 answers
how to reload password in dbcp basic datasource
dbcp2 basic datasource is being used for one of our java applications and database password is set by calling this setter
setPassword(final String password)
passwords are stored in AWS secrete manager, and now there is a password rotation logic…

scoder
- 2,451
- 4
- 30
- 70
1
vote
2 answers
Spring Boot with Tomcat DB Pool and Oracle, not retuning connections to pool in timely manner
I'm using Spring Boot with Oracle and the Tomcat DB Pool. I am running into issues where it is taking a very long time for connections to be returned to the pool. I have a max-active of 500, which is pretty large, just for testing purposes, and I'm…

cloudwalker
- 2,346
- 1
- 31
- 69
1
vote
0 answers
Hibernate warnings : WARN org.hibernate.engine.loading.internal.LoadContexts
I am getting below warning followed by exception which causing not loading records.
I don't think so, it is problem with the code because the same build working without issue in all the environments. It is failing only on the higher environment.
is…

Ramesh
- 340
- 1
- 7
- 21
1
vote
1 answer
Tomcat DBCP Running out of connections
I'm encountering a ORA-12519, TNS:no appropriate service handler found error when attempting to integrate Tomcat's JDBC Pool into my web application, using Oracle.
I typically see this error appear intermittently, after several minutes of running…

Mark
- 4,970
- 5
- 42
- 66
1
vote
1 answer
How to force DataSource termination and reload connection pool?
Is it possible to force termination of a tomcat-dbcp connection pool and any open connections? And then reinitialize the pool, reusing the pool configuration?
@Autowired
private org.apache.tomcat.jdbc.pool.DataSource…

membersound
- 81,582
- 193
- 585
- 1,120
0
votes
1 answer
Need To Use Dynamic Custom Connection Class for connection pooling in java
I am thinking of implementing connection pool for DB Connections using dbcp2.
But I am using different types of custom connection classes.
How can I override the Datasource class to use dynamic custom connection classes(Say MyConnectionClass1,…

Vishva N
- 1
0
votes
1 answer
Tomcat Connection pool : tomcat-jdbc vs tomcat-dbcp, which is better?
Tomcat is using tomcat-dbcp as a default connection pool strategy, however they are also providing tomcat-jdbc as an alternative.
Which connection pooling is better for concurrent load?
tomcat-jdbc is having few extra parameter like…

chirag nathwani
- 13
- 1
0
votes
1 answer
Tomcat 9 w/ Apache DBCP + Spring 5 + Oracle 12c + SqlArrayValue
We have existing SpringMVC J2EE application that runs on Orale WebLogic which we are attempting to migrate to Apache Tomcat. Everything seems to work except we are having issues binding array values through JDBC into the Database. Here is how that…

Kevin Seymour
- 766
- 9
- 25
0
votes
1 answer
JDBC connection pooling library which can handle connections that go idle often nicely?
Let’s say there is this code which lives in a server side backend:
class Foo {
void doSomething() {
try (Connection c = dataSource.getConnection()) {
executeSQL(c);
externalApiCall(); // this can be slow
…

Kohei Nozaki
- 1,154
- 1
- 13
- 36