How To Safely Execute Custom Statements Within Jooq's `executelistener`?
I have a custom ExecuteListener that executes additional statements before the statement JOOQ is currently looking at: @Override public void executeStart(ExecuteContext ctx) {
Solution 1:
As per @LukasEder's suggestion, I ended up solving this problem with a wrapper around the JDBC Connection instead of with an ExecuteListener.
The main complication in this approach is that JDBC does not provide anything to track the transaction status, and therefore the connection wrapper needs to re-set the context information every time the transaction was committed or rollbacked.
I documented my full solution in this gist, since it's too long to fit in an SO answer.
Post a Comment for "How To Safely Execute Custom Statements Within Jooq's `executelistener`?"