$B:4F#$G$9!#(B<br>$B$?$S$?$S$9$_$^$;$s!#(B<br><br>$B$"$k%H%i%s%6%/%7%g%s(BA$B$NESCf$K(B requiresNewTx $B$GJL$N%H%i%s%6%/%7%g%s(BB$B$r<hF@$7$F(B<br>$B=hM}$r9T$J$&%m%8%C%/$,$"$k$H$-!"(BA$B$G(BsetRollbackOnly()$B$r$7$?8e$K!"(BB$B$,<B9T$5$l$k$H(B<br>$B0J2<$N(BException$B$,H/@8$7$^$9!#(B<br><br>==============================<br>Caused by: org.seasar.framework.exception.SIllegalStateException
: [ESSR0308]$B4{$K%m!<%k%P%C%/$H$7$F%^!<%/$5$l$F$$$^$9(B<br>&nbsp;&nbsp;&nbsp; at org.seasar.extension.jta.TransactionImpl.throwIllegalStateException(TransactionImpl.java:132)<br>&nbsp;&nbsp;&nbsp; at org.seasar.extension.jta.TransactionImpl.assertActive(TransactionImpl.java
:117)<br>&nbsp;&nbsp;&nbsp; at org.seasar.extension.jta.TransactionImpl.suspend(TransactionImpl.java:98)<br>&nbsp;&nbsp;&nbsp; at org.seasar.extension.jta.TransactionManagerImpl.suspend(TransactionManagerImpl.java:78)<br>&nbsp;&nbsp;&nbsp; at org.seasar.extension.tx.AbstractTxInterceptor.suspend
(AbstractTxInterceptor.java:194)<br>&nbsp;&nbsp;&nbsp; at org.seasar.extension.tx.RequiresNewInterceptor.invoke(RequiresNewInterceptor.java:46)<br>==============================<br><br>A$B$r(Bsuspend$B$7$h$&$H$9$k$H$-$KH/@8$9$k$h$&$G$9$,!"$3$l$O;EJ}$NL5$$$3$H$G$7$g$&$+!)(B<br><br>
$B$3$NNc$N%5%s%W%k%3!<%I$O0J2<$N$h$&$J7A$G$9!#(B<br><br>Class HogeService {<br><br>&nbsp;private FugaService fugaService;<br>&nbsp;private OtherTxService otherTxService;<br>&nbsp;private UserTransaction userTransaction;<br><div class="Ih2E3d"><br> &nbsp;public void execute() {
<br>&nbsp;&nbsp; doSomething();<br> &nbsp; &nbsp;try {<br> &nbsp; &nbsp; &nbsp;fugaService.execute();<br> &nbsp; &nbsp;} catch (Exception e) {<br></div> &nbsp; &nbsp; &nbsp;userTransaction.setRollbackOnl<div id="1fxb" class="ArwC7c ckChnd">y();<br> &nbsp; &nbsp; &nbsp;log.info(e);<br> &nbsp; &nbsp;}<br>&nbsp;&nbsp; doSomething2();
<br>&nbsp;&nbsp; otherTxService.execute();&nbsp;&nbsp;&nbsp;&nbsp; &lt;== S2Tx $B$G(B requresNewTx $B$r(BAspect$B$7$F$k%a%=%C%I(B<br>&nbsp;&nbsp; doSomething3();<br> &nbsp;}<br><br>}<br></div><br><br><div class="gmail_quote">On Dec 11, 2007 10:39 PM, Mitsutaka Sato &lt;<a href="mailto:miztaka@gmail.com">
miztaka@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">$B>.NSMM!"(B<br>$B$465<x$"$j$,$H$&$4$6$$$^$7$?!#(B<br><br>$B=iJbE*$J(BTransaction$B$N;H$$J}$,$h$/$o$+$C$F$$$^$;$s$G$7$?!&!&!&(B
<br><br>$B$$$:$l$K$7$m!"(B<br>UserTransaciton$B$r(BDI$B$7$F;HMQ$9$l$P$h$$$h$&$G$9$M!#(B<br>$B$"$j$,$H$&$4$6$$$^$7$?!#(B<br><br><br><div class="gmail_quote"><div class="Ih2E3d">On Dec 8, 2007 9:00 PM, Koichi Kobayashi &lt;<a href="mailto:koichik@improvement.jp" target="_blank">

koichik@improvement.jp</a>&gt; wrote:<br></div><div><div></div><div class="Wj3C7c"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">$B>.NS(B (koichik) $B$G$9!%(B
<br><br>Date: &nbsp; &nbsp;Sat, 8 Dec 2007 12:55:20 +0900
<br><div>From: &nbsp; &nbsp;&quot;Mitsutaka Sato&quot; &lt;<a href="mailto:miztaka@gmail.com" target="_blank">miztaka@gmail.com</a>&gt;<br>To: &nbsp; &nbsp; &nbsp;<a href="mailto:seasar-user@ml.seasar.org" target="_blank">seasar-user@ml.seasar.org
</a><br></div>Subject: [Seasar-user:12000] Re: Transaction$B6-3&$r@_Dj$7$?%3%s%]!<%M%s%H$,3,AXE*$K8F$S=P$5$l$?>l9g(B
<br><div><br>&gt; &nbsp; &nbsp; // $B%H%i%s%6%/%7%g%s%3%_%C%H(B<br>&gt; &nbsp; &nbsp; // $B"((B hogeService$BFb$G(BfooSerivce$B$NNc30$r%-%c%C%A$7$F(BsetRollbackOnly$B$7$F$k(B<br>&gt; &nbsp; &nbsp; // $B$+$b$7$l$J$$$,!"(Bcommit()$B$G(BOK$B!)(B<br>&gt; &nbsp; &nbsp; userTransaction.commit();<br></div>($BN,(B)<br>&gt; $B$3$N$h$&$K=q$/$N$,@5$7$$(B*$B%9%?%$%k(B*$B$G$7$g$&$+!)(B
<br><br>$B$$$$$(!%(B<br>setRoolbackOnly() $B$7$?8e$K(B commit() $B$r(B<br>$B8F$S=P$9$HNc30$,?a$CHt$s$G$-$^$9!%(B<br><br>if (userTransacstion.isRollbackOnly) {<br> &nbsp;userTransaction.rollback();<br>} else {<br> &nbsp;userTransaction.commit();<br>}<br><br>$B$N$h$&$K$7$F$/$@$5$$!%(B<br>
<font color="#888888">
<br><br>--<br></font><div><div></div><div>&lt;component name=&quot;koichik&quot;&gt;<br> &nbsp; &nbsp;&lt;property name=&quot;fullName&quot;&gt;&quot;Koichi Kobayashi&quot;&lt;/property&gt;<br> &nbsp; &nbsp;&lt;property name=&quot;email&quot;&gt;&quot;
<a href="mailto:koichik@improvement.jp" target="_blank">koichik@improvement.jp</a>&quot;&lt;/property&gt;<br> &nbsp; &nbsp;&lt;property name=&quot;blog&quot;&gt;&quot;<a href="http://d.hatena.ne.jp/koichik" target="_blank">http://d.hatena.ne.jp/koichik
</a>&quot;&lt;/property&gt;<br>&lt;/component&gt;<br><br>_______________________________________________<br>Seasar-user mailing list<br><a href="mailto:Seasar-user@ml.seasar.org" target="_blank">Seasar-user@ml.seasar.org
</a><br><a href="https://ml.seasar.org/mailman/listinfo/seasar-user" target="_blank">
https://ml.seasar.org/mailman/listinfo/seasar-user</a><br></div></div></blockquote></div></div></div><br>
</blockquote></div><br>