In my Quarkus app I get Enlisted connection used without active transaction
errors around once a day (on a public API used quite a lot).
It seems to come from Agroal (here https://github.com/agroal/agroal/blob/master/agroal-pool/src/main/java/io/agroal/pool/ConnectionHandler.java#L393).
According to the stack trace it fails at various places in REST endpoints annotated with @Transactional
.
In PostgreSQL I only get the following:
ERROR: canceling statement due to user request
I worked around this issue by firing an event which is listened in a TransactionPhase.AFTER_SUCCESS method (and this method send the Kafka message).