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

Why my Tomcat 9 does not keep the jdbc connections open as it is specified in minIdle?

I have configured my Tomcat 9 to keep a database pool using the server.xml in order to have a minimum of 50 connections to my mysql database. When the tomcat starts I can see all the connections there with the command SHOW PROCESSLIST. I can't…
serxio
  • 348
  • 2
  • 8
0
votes
1 answer

Postgres connection pooling using java

I'm using multithreading concept in java and thread's responsibility is to connect to postgres and upload my csv's to tables. So far,I'm creating connection for each thread and closing upon finsihing thread's task.I was come across their is…
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…
0
votes
1 answer

Apache felix cannot load dbcp2 as bundle

I have created an OSGi bundle, that is using apache commons dbcp2 to create a database connection pool. I am using apache felix gogo as runtime to start my bundles. I have loaded multiple other external libraries without any problems into the apache…
Dakado
  • 11
  • 2
  • 6
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 …
0
votes
0 answers

Connection leak with Tomcat 8 using dbcp2 & ojdbc6 Oracle driver

I have some troubles to fix connection leaks in our developement enviroment. Im using: Apache Tomcat 8.5 server with: commons-dbcp2-2.1.1.jar commons-pool2.2.4.2.jar ojdbc6.jar Oracle driver Oracle client 12.1.0.2.0 64-bit I have some resources…
0
votes
1 answer

How to link c3p0 pool identityTokens and JDBC pool names

First of all, please keep in mind that I'm a monitoring admin and not a Java developer. I want to monitor some attribute values of c3p0 pools and I found that such pools have a unique identity Token which is made of an alphanumeric string and a…
Jdamian
  • 3,015
  • 2
  • 17
  • 22
0
votes
1 answer

H2 - Tomcat jdbc connection pool not reclaiming connections once it hits the max limit

Problem Statement We have been using H2 in embedded mode for a while now. It has a connection pool configured above it. Following is the current pool…
Simrandeep Singh
  • 547
  • 4
  • 12
0
votes
1 answer

Multiple connection pools on the same database

In my application, I need to configure 2 databases during start up. They are created as Tomcat JDBC pools - org.apache.tomcat.jdbc.pool with seperate pool properties. If I configure such that both the database URLs, user name and password are same…
Saran
  • 213
  • 2
  • 5
  • 13
0
votes
1 answer

Configure multiple connection pools in playframework 2.6

I was going over the documentation here: https://www.playframework.com/documentation/2.6.x/ScalaDatabase#How-to-configure-several-data-sources. You can define multiple database connections: # Orders…
boggy
  • 3,674
  • 3
  • 33
  • 56
0
votes
0 answers

best way to keep a datasource static in tomcat servlet app

I have a web APP in tomcat 8 with servlets tecnology. For DB connection I have a servlet listener that keep a static datasource and a static method that do a getConnection. All run fine in the serlvet I can call to servletListener.getConnection();…
mls_dev
  • 511
  • 2
  • 6
  • 21
0
votes
0 answers

DBCP connection pool issue

I have an application where I am using DBCP Connection mechanism and tomcat8.
Vawani
  • 399
  • 10
  • 25
0
votes
1 answer

karaf + pax-jdbc the connection pool had reached the limit

I have a problem with the pool connections of pax-jdbc in karaf, I'm trying to inject a Mysql DataSource (DS) through blueprint.xml into my project, for test it, I have built a karaf command where injects the DS into karaf command class and…
christmo
  • 351
  • 2
  • 18
0
votes
1 answer

Naming error while using multiple connection pools in a Tomcat 8 application

I have an application that uses the built-in Tomcat connection pool, and for the most part it works. A problem arises when I'm trying to use another pool to get a different set of connection from the same database, but from a different…
svarog
  • 9,477
  • 4
  • 61
  • 77
0
votes
2 answers

Close DBCP connection on application exit

In out app we use Apache DBCP connector for Oracle DB. But every 30 or 40 minutes we get connection size leak error. Is there any way to close all connections from pool before app is exit? e.g. write a method, which can get close event and in that…
Jack Daniel
  • 2,397
  • 8
  • 33
  • 58