I am using Spring Boot application which has API controller to generate reports . The actual service function is wrapped around @Async annotation and function makes DB calls and generates the csv reports . I am also using Hikari CP for connection pool management and JPA + QueryDSL for forming select queries . I am seeing strange issue in that
Tag: hikaricp
Try-with-resources – Does it automatically close the connection? Java
I’ve been working on a SQL utility and I am trying to set the parameters inside a prepared statement in multiple functions. To lessen the code, I have a function that returns a prepared statement where all the params are set. My question is: Does the connection reference in the configureStatement() get closed using the try with resources in the
Failed to get driver instance for jdbcUrl=jdbc:postgresql:/// error for CloudSQL
I am trying to connect to my GCP projects PostgreSQL CloudSQL instance from my local machine. The PostgreSQL doesn’t have a public IP, only private. I get the below error Failed to get driver instance for jdbcUrl=jdbc:postgresql:///mdm java.sql.SQLException: No suitable driver I have verified that my username, instancename, IAM connectivity is all working fine. The IAM service account I am
Programmatically restart HikariPool in Spring Boot application?
I have a Spring Boot application which uses Hibernate, and HikariDataSource / HikariPool to talk to the database. A special feature in the app triggers database restart. Currently this breaks the connections in HikariPool: Old version of the app does call programmatically org.hibernate.SessionFactory.close(); which causes restart of HikariDataSource / HikariCP: I would like to do the same, but how can
Default HikariCP connection pool starting Spring Boot application
I’m using version: 2.1.6.RELEASE form Spring Boot in my pom.xml-dependencies. To connect to my database I put following in application.properties: When checking the amount of connections in postgresql with: I see each time I start the application exactly 10 connections are made. They almost all have the same query: Is there a way to prevent the application of making that