M
M
Minazuki2021-10-11 13:17:54
Spring
Minazuki, 2021-10-11 13:17:54

How to release connection which is used by hikari?

The method has a request for an external resource that can take a long time to complete. Before that, there is work with the database and hikari transfers the connection to the active state until the method ends. How can we release the connection before we send a request to an external resource?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
mystifier, 2021-10-11
@mystifier

I think the solution to the issue will be to use the hikari connection pool (HikariCP) with several connections.

E
EVGENY T., 2021-10-12
@Beshere

It is necessary to take out work with the database in a separate DAO layer. And now let all sorts of services use Tao-classes. Then the connection will open just enough to get data from the database.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question