File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
main/java/org/seasar/doma/jdbc/tx
test/java/org/seasar/doma/jdbc/tx Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ protected <RESULT> RESULT notSupportedInternal(
200200 if (transaction .isActive ()) {
201201 LocalTransactionContext context = transaction .suspend ();
202202 try {
203- return executeInTransaction ( isolationLevel , supplier );
203+ return supplier . get ( );
204204 } finally {
205205 transaction .resume (context );
206206 }
Original file line number Diff line number Diff line change @@ -134,4 +134,20 @@ public void testNotSupported_supplier() throws Exception {
134134 assertEquals ("aaa" , result );
135135 }
136136
137+ public void testNotSupported_in_tx () throws Exception {
138+ LocalTransactionManager manager = new LocalTransactionManager (
139+ transaction );
140+ StringBuilder log = new StringBuilder ();
141+ log .append (LocalTransactionManagerTest .counter );
142+ manager .required (() -> {
143+ log .append (LocalTransactionManagerTest .counter );
144+ manager .notSupported (() -> {
145+ log .append (LocalTransactionManagerTest .counter );
146+ });
147+ log .append (LocalTransactionManagerTest .counter );
148+ });
149+ log .append (LocalTransactionManagerTest .counter );
150+ assertEquals ("01110" , log .toString ());
151+ }
152+
137153}
You can’t perform that action at this time.
0 commit comments