A long running transaction with Feign Retryer holds the connection

Viewed 36

I am using Feign Retryer with a long-running transaction. It's holding a JDBC connection which I want to release.

I tried to close the connection, but it also commit a transaction, and Retryer is not invoked anymore.

Is there a way to release the connection for the time of Thread.sleep()?

public void continueOrPropagate(RetryableException exception) {
    doSomething();
    if (attempts()) {
        throw exception;
    }
    Thread.sleep(500000);
}
0 Answers
Related