<div dir="ltr">$B:4F#$H?=$7$^$9!#(B<br>$B$$$D$b$*@$OC$K$J$C$F$*$j$^$9!#(B<br><br>$B"#(BDICON<br> <component <br> class="com.valuecardservice.termsrv.services.impl.AlwaysExceptionServiceImpl" <br> instance="prototype"><br>
<aspect pointcut="execute">j2ee.requiredTx</aspect><br> </component><br> <component <br> class="com.valuecardservice.termsrv.services.impl.RequiresNewServiceImpl" <br>
instance="prototype"><br> <aspect pointcut="execute">j2ee.requiresNewTx</aspect><br> </component><br><br>$B"#%F%9%H%1!<%9(B<br> public void testTransaction() throws Exception {<br>
<br> log.debug("$B%H%i%s%6%/%7%g%s$r3+;O$7$^$9!#(B");<br> userTransaction.begin();<br> log.debug("$B%H%i%s%6%/%7%g%s$r3+;O$7$^$7$?!#(B");<br> <br> // RequiresTx<br> try {<br> alwaysExceptionService.execute();<br>
} catch(Exception e) {<br> log.debug("$B%(%i!<H/@8(B", e);<br> }<br> <br> // RequiresNewTx<br> requiresNewService.execute();<br> <br> if (userTransaction.getStatus() == Status.STATUS_ACTIVE) {<br>
userTransaction.commit();<br> <a href="http://log.info">log.info</a>("UserTransaction$B$r%3%_%C%H$7$^$7$?!#(B");<br> }<br> <br> }<br><br>$B>e5-$N%F%9%H%1!<%9$r<B9T$9$k$H!"(BrequiresNewTx $B$N3+;O$G0J2<$N%(%i!<$,H/@8$7$^$9!#(B<br>
<br>org.seasar.framework.exception.SIllegalStateException: [ESSR0308]$B4{$K%m!<%k%P%C%/$H$7$F%^!<%/$5$l$F$$$^$9(B<br> at org.seasar.extension.jta.TransactionImpl.throwIllegalStateException(TransactionImpl.java:138)<br> at org.seasar.extension.jta.TransactionImpl.assertActive(TransactionImpl.java:123)<br>
at org.seasar.extension.jta.TransactionImpl.suspend(TransactionImpl.java:100)<br> at org.seasar.extension.jta.AbstractTransactionManagerImpl.suspend(AbstractTransactionManagerImpl.java:79)<br> at org.seasar.extension.tx.adapter.JTATransactionManagerAdapter.suspend(JTATransactionManagerAdapter.java:191)<br>
at org.seasar.extension.tx.adapter.JTATransactionManagerAdapter.requiresNew(JTATransactionManagerAdapter.java:75)<br> at org.seasar.extension.tx.RequiresNewInterceptor.invoke(RequiresNewInterceptor.java:41)<br> at com.valuecardservice.termsrv.services.impl.RequiresNewServiceImpl$$EnhancedByS2AOP$$d5eb7$$MethodInvocation$$execute0.proceed(MethodInvocationClassGenerator.java)<br>
at com.valuecardservice.termsrv.services.impl.RequiresNewServiceImpl$$EnhancedByS2AOP$$d5eb7.execute(RequiresNewServiceImpl$$EnhancedByS2AOP$$d5eb7.java)<br> at com.valuecardservice.termsrv.services.TransactionTest.testTransaction(TransactionTest.java:50)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br> at java.lang.reflect.Method.invoke(Unknown Source)<br>
at junit.framework.TestCase.runTest(TestCase.java:154)<br> at org.seasar.framework.unit.S2FrameworkTestCase.doRunTest(S2FrameworkTestCase.java:519)<br> at org.seasar.extension.unit.S2TestCase.doRunTest(S2TestCase.java:103)<br>
at org.seasar.framework.unit.S2FrameworkTestCase.runBare(S2FrameworkTestCase.java:308)<br> at junit.framework.TestResult$1.protect(TestResult.java:106)<br> at junit.framework.TestResult.runProtected(TestResult.java:124)<br>
at junit.framework.TestResult.run(TestResult.java:109)<br> at junit.framework.TestCase.run(TestCase.java:118)<br> at junit.framework.TestSuite.runTest(TestSuite.java:208)<br> at junit.framework.TestSuite.run(TestSuite.java:203)<br>
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)<br> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)<br> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)<br>
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)<br> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)<br> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)<br>
<br>$B%(%i!<$,H/@8$7$?>l9g$G$b%m%0$@$1$O(BDB$B$K5-O?$7$?$$$H$$$&$3$H$G$3$N$h$&$J7A$r$H$C$F$$$k$N$G$9$,!"(B<br>$B%H%i%s%6%/%7%g%s$N;H$$J}$,$*$+$7$$$G$7$g$&$+!#(B<br>$B%(%i!<860x$rL@3N$K$9$k$?$a$K=hM}$r4V0z$$$F$"$k$N$G>e5-$NNc$O4VH4$1$J46$8$G$9$,(B<br>$B<B:]$K$OA08e$K$$$m$$$m=hM}$,$"$C$?$j$9$k$N$G$3$N$h$&$J7A$r$H$C$F$$$^$9!#(B<br><br>$B$A$J$_$K(Bs2-2.4.17$B$^$G$O%(%i!<$OH/@8$;$:!"(B s2-2.4.18 $B$+$i>e5-%(%i!<$OH/@8$7$^$9!#(B<br>
$B!J:#2s;n$7$?$N$O(B s2-2.4.30) <br><br>$B0J>e$h$m$7$/$*4j$$$7$^$9!#(B<br><br></div>