#2393·HikariCP

Is there a configuration in HikariCP to bypass automatic rollback of connection transaction state on close?

Author: svatadaCreated Mar 13, 2026Updated Apr 2, 2026

Hi,

I am using HikariCP as the connection pool in a Java application and I am trying to understand how it handles transaction state when a connection is returned to the pool.

From what I understand, connection pools typically reset the connection state (including performing a rollback if a transaction is still open) before making the connection available again. I would like to confirm whether HikariCP has any configuration option that allows bypassing or disabling this rollback behavior.

My use case involves managing transaction boundaries at the application level, and I want to ensure that the pool does not automatically roll back the connection when it is returned.

Questions:

  1. Does HikariCP automatically perform a rollback when a connection with an active transaction is returned to the pool?

  2. If so, is there any configuration to disable or bypass this behavior?

  3. If not configurable, what is the recommended approach for handling such cases?

Thanks in advance for your guidance.

Source: brettwooldridge/HikariCP