Questions tagged [tomcat-jdbc]

This tag is about tomcat and jdbc working together.

is a Java-based data access technology (Java Standard Edition platform) from Oracle Corporation. This technology is an API for the Java programming language that defines how a client may access a database.

is an open source web server and servlet container developed by the Apache Software Foundation (ASF). Tomcat implements the Java Servlet and the JavaServer Pages (JSP) specifications from Sun Microsystems, and provides a pure Java HTTP web server environment for Java code to run in. In the simplest config Tomcat runs in a single operating system process.

This tag is about tomcat and jdbc working together.

63 questions
2
votes
1 answer

Understanding tomcat-jdbc pool behavior when password changed

In following code ( changed based on example code given in tomcat-jdbc site ), I first create the connection pool using correct username and password. After sometime I change the username and password to wrong one but still connection success. I…
Viraj
  • 5,083
  • 6
  • 35
  • 76
2
votes
0 answers

Spring Tomcat JDBC Connection Pooling - How to recover when database goes offline

I am building an app using Spring Boot with MSSQL. For connection pooling I am using Tomcat JDBC. My question what happens to the connection pool when a database is taken offline for a few minutes and what is the best way to recover from this…
Charlie
  • 3,113
  • 3
  • 38
  • 60
2
votes
0 answers

Exposing JPA transaction takes too much time

I worked with SpringBoot 1.5.10.RELEASE, Postgre Server 9.6, Driver version is 9.4.1212.jre7, tomcat-jdbc (version of spring bom). Here is configuration JPA…
2
votes
1 answer

tomcat jdbc pool has some different behaviour about connection reuse

I have configured Tomcat JDBC pool in my web application and added maven dependency with version 8.0.38 which is my tomcat version also. Now I get connection from that pool and check value of autoCommit property and it is "true" then I set that…
Dhaval Bhoot
  • 241
  • 1
  • 5
  • 18
2
votes
1 answer

spring boot with spring-data-jpa and full tomcat-jdbc config throws java.lang.ClassNotFoundException for ResetAbandonedTimer

I'm using spring boot 1.3.0.RELEASE with the following pom dependencies org.springframework.boot spring-boot-starter-data-jpa
n99
  • 417
  • 1
  • 7
  • 14
2
votes
0 answers

Can we use DBCP 2 or Tomcat connection pool for distributed transactions in Spring? Can these connection pool be used along with JOTM or Atomikos?

Initially i was using different transaction manager for multiple data sources. But i had problem with managing rollback on all data sources if one of the data sources has transaction failure.I want to manage multiple datasources with single…
1
vote
0 answers

Tomcat Jdbc v 8.5 failing with InterruptedException when testOnBorrow is true during Chaos Testing

I am creating a lag of 1.5 sec with chaos monkey to simulate a network delay. The test has 100 parallel users continuously calling an end-point which requires Database access. During the testing I see a lot of InterruptedException from Tomcat Jdbc…
1
vote
0 answers

How to recover from abandoned connections?

I had long running queries in production because of which connections getting closed/abandoned. As a result I updated removeAbandonedTimeout to 1800 sec. After this, 95% of the issue is gone. But very randomly, once or twice a month I am still…
projectile
  • 61
  • 7
1
vote
1 answer

Dynamic resizing connection pool size - Apache Tomcat JDBC Connection Pool

Is there any way to increase maxpoolsize dynamically based on the application load.
Avyaan
  • 1,285
  • 6
  • 20
  • 47
1
vote
1 answer

Spring Boot - Tomcat jdbc connection pool does not recover after database server is restarted

I have a Spring Boot (1.5.17) web application with Tomcat JDBC connection pool (8.5.34) configured as follows: primary.datasource.tomcat.testOnBorrow=true primary.datasource.validationQuery=SELECT…
Charlie
  • 3,113
  • 3
  • 38
  • 60
1
vote
1 answer

Limit jdbc connection pool fixed amount

Hi i use micronaut data together with various jdbc connection pools. I first had hikari and also tried the tomcat one. What i was assuming that setting the datasource to maximum-pool-size: 10 results in max 10 open connections. But it seems that…
IEE1394
  • 1,181
  • 13
  • 33
1
vote
0 answers

how to bind "spring.datasource.tomcat" properties to javax.sql.DataSource class in spring boot 2

I have some code that works properly on spring boot prior to version 2 and I find it hard to convert it to work with spring boot 2. Can somebody assist? yml file: spring: datasource: type: org.apache.tomcat.jdbc.pool.DataSource …
neha
  • 31
  • 4
1
vote
3 answers

Tracing SQL Queries with X-Ray and Spring Boot 2

The current X-Ray SQL tracing interceptor uses Tomcat JDBC Pool but Spring Boot 2 uses HikariCP as default pool, is it possible to configure the jdbc tracing in HikariCP instead? Here (https://forums.aws.amazon.com/thread.jspa?threadID=254847) they…
demetrio812
  • 290
  • 3
  • 15
1
vote
1 answer

How to prevent validationQueryTimeout affects other SQL statements in H2

I'm using Dropwizard 1.3.12 backed with a H2 1.4.199 database. In the database config I have database: ... validationQuery: "/* MyService Health Check */ SELECT 1" validationQueryTimeout: 3s ... The problem I am running into is that the…
Joel Jonsson
  • 800
  • 4
  • 17
1
vote
1 answer

Understanding Connection pool with JMX related properties

I am analyzing JMX mbean (org.apache.tomcat.jdbc.pool.jmx.ConnectionPool) properties for my jdbc datasource related properties and I needed some reference on what these properties means. I couldn't find any documentation on what these methods give.…
Chamila Adhikarinayake
  • 3,588
  • 5
  • 25
  • 32