mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
fix connection leak in JTA managed transactions (#1077)
This commit is contained in:
committed by
Rob Bygrave
parent
bf5a8c2fad
commit
55e19618f8
@@ -18,6 +18,7 @@ import javax.transaction.Synchronization;
|
||||
import javax.transaction.SystemException;
|
||||
import javax.transaction.TransactionSynchronizationRegistry;
|
||||
import javax.transaction.UserTransaction;
|
||||
import io.ebeaninternal.util.JdbcClose;
|
||||
|
||||
/**
|
||||
* Hook into external JTA transaction manager.
|
||||
@@ -233,6 +234,8 @@ public class JtaTransactionManager implements ExternalTransactionManager {
|
||||
}
|
||||
}
|
||||
|
||||
// No matter the completion status of the transaction, we release the connection we got from the pool.
|
||||
JdbcClose.close(transaction.getInternalConnection());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user