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

Share JDBC datasource connection among all servlets

I am new to java. I have recently learned JDBC connection pool in tomcat. To make code reuse I want to share the connection among all servlets without any conflict. Here My code snippet: public class GetConnection{ private DataSource ds; …
Manohar Gunturu
  • 676
  • 1
  • 10
  • 23
0
votes
1 answer

How kill sql query which run more than 1 seconds with help TomCat jdbc pool?

Which of the settings of jdbc pool may help me with killing sql query which runs more than 1 seconds? When I say tomcat jdbc pool I mean Resource in context.xml in /tomcat/conf/ directory.
user3569530
  • 193
  • 2
  • 4
  • 13
0
votes
1 answer

why I have refused the connection of db

I have web application. And I have jdbc database pooling system. If my minIdle and initialSize value are 50, I have the following error: [ WARN] [http-nio-8080-exec-25 03:11:33] (SqlExceptionHelper.java:logExceptions:144) SQL Error: 12519, SQLState:…
grep
  • 5,465
  • 12
  • 60
  • 112
0
votes
0 answers

JPA connection time out

Why does this time-out and become non-responsive? log: thufir@dur:~$ thufir@dur:~$ cat NetBeansProjects/Legacy/output.log [EL Config]: metadata: 2014-09-16 02:03:51.562--ServerSession(18132245)--Thread(Thread[AWT-EventQueue-0,6,main])--The access…
Thufir
  • 8,216
  • 28
  • 125
  • 273
0
votes
0 answers

how to re-use an existing JDBC connection with Apache Commons BasicDataSource

While I'm aware of Apache DbUtils, how can I use BasicDataSource.isValid() to recycle, or re-use, existing connections? package net.bounceme.dur.jdbc; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import…
Thufir
  • 8,216
  • 28
  • 125
  • 273
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
0 answers

How does tomcat jdbc pool cache the query results?

I have encountered an issue, that is, tomcat jdbc pool cooperating with hibernate caches query results, but I have banned hibernate's cache. But when I switch jdbc pool to DBCP, the issue get disappeared. So I ensure that there's a query result…
Mr rain
  • 983
  • 5
  • 13
  • 27
0
votes
1 answer

tomcat webapp with dbcp pooling - pool threads are free, but http-bio threads cannot acquaore it

dear all! I have a bit strange situation when sometimes (it's not repeat easily) my Tomcat web application fails in strange situation (if i correctly interpred thread dumps). I have 100 pool threads in tomcat context pooling configuration, and all…
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

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
0 answers

Java web service MYSQL Connection management

I'm stuck with MySQL connection in web service.. public class DBAccessLayer { private Connection connection = null; private Statement statement = null; private String DBFormatter = "'"; private String key; private static…
Naresh
  • 785
  • 1
  • 11
  • 23
0
votes
1 answer

Why do we create a PoolableConnectionFactoryObject

So, I realize there are probably better options for database pooling than JDBC, but still something is driving me crazy. In all the example code they suggest pooling like this. GenericObjectPool connectionPool = new…
jW.
  • 9,280
  • 12
  • 46
  • 50
-2
votes
1 answer

Best choice of connection pooling for an spring application deployed on tomcat connecting to mariadb

After reading multiple documents based on jdbc connection pooling i couldnt come up to some conclusion. What connection pooling method is best for an spring application which is deployed on tomcat and connect to mariadb. mariadb provides it own…
pvjhs
  • 549
  • 1
  • 9
  • 24
1 2 3 4
5