@Test public void nestedTransactionIsNotAllowed() throws Exception { exception.expectMessage(containsString("Nested transaction is not allowed")); exception.expect(IllegalStateException.class); factory.get().begin(() -> { return factory.get().begin(() -> { fail(); return null; }); }); }
@Override public <T> T begin(SupplierInTransaction<T, RuntimeException, RuntimeException, RuntimeException> func) { return begin(func, RuntimeException.class, RuntimeException.class, RuntimeException.class); }
ThreadLocalTransactionManager implements TransactionManager { @Override public <T> T begin(SupplierInTransaction<T, RuntimeException, RuntimeException, RuntimeException> func) { return begin(func, RuntimeException.class, RuntimeException.class, RuntimeException.class); } }
ThreadLocalTransactionManager implements TransactionManager { @Override public <T> T begin(SupplierInTransaction<T, RuntimeException, RuntimeException, RuntimeException> func) { return begin(func, RuntimeException.class, RuntimeException.class, RuntimeException.class); } @Inject  ThreadLocalTransactionManager(DataSource ds);   ThreadLocalTransactionManager(DataSource ds, boolean autoAutoCommit); }
ThreadLocalTransactionManager implements TransactionManager { @Override public <T> T begin(SupplierInTransaction<T, RuntimeException, RuntimeException, RuntimeException> func) { return begin(func, RuntimeException.class, RuntimeException.class, RuntimeException.class); } @Inject  ThreadLocalTransactionManager(DataSource ds);   ThreadLocalTransactionManager(DataSource ds, boolean autoAutoCommit); @Override Handle getHandle(ConfigMapper configMapper); @Override T begin(SupplierInTransaction<T, RuntimeException, RuntimeException, RuntimeException> func); @Override T begin(SupplierInTransaction<T, E1, RuntimeException, RuntimeException> func, Class<E1> e1); @Override T begin(SupplierInTransaction<T, E1, E2, RuntimeException> func, Class<E1> e1, Class<E2> e2); T begin(SupplierInTransaction<T, E1, E2, E3> func, Class<E1> e1, Class<E2> e2, Class<E3> e3); @Override T autoCommit(SupplierInTransaction<T, RuntimeException, RuntimeException, RuntimeException> func); @Override T autoCommit(SupplierInTransaction<T, E1, RuntimeException, RuntimeException> func, Class<E1> e1); @Override T autoCommit(SupplierInTransaction<T, E1, E2, RuntimeException> func, Class<E1> e1, Class<E2> e2); @Override T autoCommit(SupplierInTransaction<T, E1, E2, E3> func, Class<E1> e1, Class<E2> e2, Class<E3> e3); @Override void reset(); }
ThreadLocalTransactionManager implements TransactionManager { @Override public <T> T begin(SupplierInTransaction<T, RuntimeException, RuntimeException, RuntimeException> func) { return begin(func, RuntimeException.class, RuntimeException.class, RuntimeException.class); } @Inject  ThreadLocalTransactionManager(DataSource ds);   ThreadLocalTransactionManager(DataSource ds, boolean autoAutoCommit); @Override Handle getHandle(ConfigMapper configMapper); @Override T begin(SupplierInTransaction<T, RuntimeException, RuntimeException, RuntimeException> func); @Override T begin(SupplierInTransaction<T, E1, RuntimeException, RuntimeException> func, Class<E1> e1); @Override T begin(SupplierInTransaction<T, E1, E2, RuntimeException> func, Class<E1> e1, Class<E2> e2); T begin(SupplierInTransaction<T, E1, E2, E3> func, Class<E1> e1, Class<E2> e2, Class<E3> e3); @Override T autoCommit(SupplierInTransaction<T, RuntimeException, RuntimeException, RuntimeException> func); @Override T autoCommit(SupplierInTransaction<T, E1, RuntimeException, RuntimeException> func, Class<E1> e1); @Override T autoCommit(SupplierInTransaction<T, E1, E2, RuntimeException> func, Class<E1> e1, Class<E2> e2); @Override T autoCommit(SupplierInTransaction<T, E1, E2, E3> func, Class<E1> e1, Class<E2> e2, Class<E3> e3); @Override void reset();  }