Refactor DefaultTransactionThreadLocal, convert ThreadLocal to field (from map) (#1716)

* Refactor DefaultTransactionThreadLocal, convert ThreadLocal to field (from map)

* Add test for multiple database thread locals
This commit is contained in:
Rob Bygrave
2019-05-18 15:16:17 +12:00
committed by GitHub
parent 201958f38c
commit c6ba4d8155
9 changed files with 120 additions and 141 deletions
@@ -1,6 +1,7 @@
package io.ebeaninternal.api;
import io.ebean.TxScope;
import io.ebeaninternal.server.transaction.TransactionScopeManager;
import javax.sql.DataSource;
@@ -9,6 +10,11 @@ import javax.sql.DataSource;
*/
public interface SpiTransactionManager {
/**
* Return the scope manager for this server.
*/
TransactionScopeManager scope();
/**
* Return the main DataSource.
*/