<p>$B2CF#(B(j5ik2o)$B$5$s(B</p><p>$B$*@$OC$K$J$j$^$9!#$($S$J$G$9!#(B</p><p>$B%5%s%W%k%=!<%9$r:n@.$7$^$7$?$N$G!"$43NG'$N$[$I59$7$/$*4j$$CW$7$^$9!#(B</p><p></p><p>---$B%=!<%9%3!<%I(B---------------</p><p>@Task<br>@CronTrigger(expression = "*/10 * * * * ?")<br>public class SampleTask {<br> private int count = 0;<br>
public Exception exception = null;<br><br> public void start() {<br> ++count;<br> exception = null;<br><br> log("------------");<br> log(" start(): COUNT=" + count + ", EXCEPTION=" + exception);<br>
}<br><br> public void doExecute() {<br> log("doExecute(): COUNT=" + count + ", EXCEPTION=" + exception);<br><br> if (count % 2 == 0) {<br> RuntimeException e = new RuntimeException("COUNT=" + count);<br>
<br> log("doExecute(): throw " + e);<br> throw e;<br> }<br> }<br><br> public void end() {<br> log(" end(): COUNT=" + count + ", EXCEPTION=" + exception);<br>
}<br><br> private void log(String s) {<br> // $B%m%0=PNO(B<br> }<br>}<br></p><p>---$B%m%0(B---------------<br>**I* <2009/12/03 18:30:21.203>         ------------<br>**I* <2009/12/03 18:30:21.203>          start(): COUNT=1, EXCEPTION=null<br>
**I* <2009/12/03 18:30:21.234>         doExecute(): COUNT=1, EXCEPTION=null<br>**I* <2009/12/03 18:30:21.234>          end(): COUNT=1, EXCEPTION=null<br>**I* <2009/12/03 18:30:31.156>         ------------<br>**I* <2009/12/03 18:30:31.156>          start(): COUNT=2, EXCEPTION=null<br>
**I* <2009/12/03 18:30:31.156>         doExecute(): COUNT=2, EXCEPTION=null<br>**I* <2009/12/03 18:30:31.156>         doExecute(): throw java.lang.RuntimeException: COUNT=2<br>**I* <2009/12/03 18:30:31.187>          end(): COUNT=2, EXCEPTION=org.seasar.chronos.core.exception.ExecutionRuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: COUNT=2<br>
**I* <2009/12/03 18:30:41.156>         ------------<br>**I* <2009/12/03 18:30:41.156>          start(): COUNT=3, EXCEPTION=null<br>**I* <2009/12/03 18:30:41.187>         doExecute(): COUNT=3, EXCEPTION=null<br>**I* <2009/12/03 18:30:41.187>          end(): COUNT=3, EXCEPTION=org.seasar.chronos.core.exception.ExecutionRuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: COUNT=2<br>
**I* <2009/12/03 18:30:51.156>         ------------<br>**I* <2009/12/03 18:30:51.156>          start(): COUNT=4, EXCEPTION=null<br>**I* <2009/12/03 18:30:51.171>         doExecute(): COUNT=4, EXCEPTION=null<br>**I* <2009/12/03 18:30:51.187>         doExecute(): throw java.lang.RuntimeException: COUNT=4<br>
**I* <2009/12/03 18:30:51.187>          end(): COUNT=4, EXCEPTION=org.seasar.chronos.core.exception.ExecutionRuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: COUNT=4<br>**I* <2009/12/03 18:31:01.156>         ------------<br>
**I* <2009/12/03 18:31:01.156>          start(): COUNT=5, EXCEPTION=null<br>**I* <2009/12/03 18:31:01.156>         doExecute(): COUNT=5, EXCEPTION=null<br>**I* <2009/12/03 18:31:01.187>          end(): COUNT=5, EXCEPTION=org.seasar.chronos.core.exception.ExecutionRuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: COUNT=2<br>
**I* <2009/12/03 18:31:11.171>         ------------<br>**I* <2009/12/03 18:31:11.171>          start(): COUNT=6, EXCEPTION=null<br>**I* <2009/12/03 18:31:11.187>         doExecute(): COUNT=6, EXCEPTION=null<br>**I* <2009/12/03 18:31:11.203>         doExecute(): throw java.lang.RuntimeException: COUNT=6<br>
**I* <2009/12/03 18:31:11.203>          end(): COUNT=6, EXCEPTION=org.seasar.chronos.core.exception.ExecutionRuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: COUNT=6<br>**I* <2009/12/03 18:31:21.171>         ------------<br>
**I* <2009/12/03 18:31:21.171>          start(): COUNT=7, EXCEPTION=null<br>**I* <2009/12/03 18:31:21.187>         doExecute(): COUNT=7, EXCEPTION=null<br>**I* <2009/12/03 18:31:21.203>          end(): COUNT=7, EXCEPTION=org.seasar.chronos.core.exception.ExecutionRuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: COUNT=2<br>
**I* <2009/12/03 18:31:31.171>         ------------<br>**I* <2009/12/03 18:31:31.171>          start(): COUNT=8, EXCEPTION=null<br>**I* <2009/12/03 18:31:31.187>         doExecute(): COUNT=8, EXCEPTION=null<br>**I* <2009/12/03 18:31:31.203>         doExecute(): throw java.lang.RuntimeException: COUNT=8<br>
**I* <2009/12/03 18:31:31.203>          end(): COUNT=8, EXCEPTION=org.seasar.chronos.core.exception.ExecutionRuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: COUNT=8<br>**I* <2009/12/03 18:31:41.171>         ------------<br>
**I* <2009/12/03 18:31:41.171>          start(): COUNT=9, EXCEPTION=null<br>**I* <2009/12/03 18:31:41.203>         doExecute(): COUNT=9, EXCEPTION=null<br>**I* <2009/12/03 18:31:41.203>          end(): COUNT=9, EXCEPTION=org.seasar.chronos.core.exception.ExecutionRuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: COUNT=2<br>
**I* <2009/12/03 18:31:51.171>         ------------<br>**I* <2009/12/03 18:31:51.171>          start(): COUNT=10, EXCEPTION=null<br>**I* <2009/12/03 18:31:51.203>         doExecute(): COUNT=10, EXCEPTION=null<br>**I* <2009/12/03 18:31:51.203>         doExecute(): throw java.lang.RuntimeException: COUNT=10<br>
**I* <2009/12/03 18:31:51.203>          end(): COUNT=10, EXCEPTION=org.seasar.chronos.core.exception.ExecutionRuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: COUNT=10<br><br>-----<br>
</p><p><br></p><br><div><span class="gmail_quote">09/12/03 <b class="gmail_sendername">Junichi Kato</b> <<a href="mailto:j5ik2o@gmail.com">j5ik2o@gmail.com</a>>:</span><blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">
$B$($S$JMM(B<br> $B2CF#(B(j5ik2o)$B$G$9!#(B<br> <br> $BIT6q9gJs9p$"$j$,$H$&$4$6$$$^$9!#(B<br> $B$*<j?t$G$9$,!"IT6q9g$,:F8=$9$k%5%s%W%k%=!<%9$r$$$?$@$$$F$b$h$m$7$$$G$7$g$&$+!)(B<br> <br> <br> 2009$BG/(B12$B7n(B2$BF|(B12:52 Yasutaka Ebina <<a href="mailto:uncanny.chaplin@gmail.com">uncanny.chaplin@gmail.com</a>>:<br>
<br>> $B$($S$J$H?=$7$^$9!#(B<br> > s2chronos$B$G2<5-$N$h$&$J=hM}$r9T$*$&$H9M$($F$*$j$^$9$,!"(B<br> > 1$BEY(BException$B$,H/@8$9$k$H!"$=$l0J8e(BException$B$,(BDI$B$5$lB3$1$F$7$^$$$^$9!#(B<br> ><br> > $B%?%9%/$r0lDj<~4|(B($BNc$($P(B1$BJ,Kh(B)$B$G5/F0$7!"(B<br> > $B!&(BException$B$,5/$-$F$$$J$1$l$P!"@5>o=*N;%a!<%k$rAw?.$9$k(B<br> > $B!&(BException$B$,5/$-$F$$$l$P!"0[>o=*N;%a!<%k$rAw?.$9$k(B<br>
> $B$H$$$&=hM}$r9T$$$?$$$N$G$9$,!"(B<br> > 1$BEY(BException$B$,H/@8$9$k$H!"<!2s0J9_$N%?%9%/<B9T;~$K(B<br> > $B0JA0H/@8$7$?(BException$B$,(BDI$B$5$l$F$7$^$7$^$9!#(B<br> ><br> > $B6qBNE*$K$O!"(B<br> > 1$B2sL\<B9T;~!'(B Exception$B$J$7!J@5>o%a!<%k!K(B<br> > 2$B2sL\<B9T;~!'(B Exception$B$"$j!J0[>o%a!<%k!K(B<br> > 3$B2sL\<B9T;~!'(B Exception$B$J$7!J0[>o%a!<%k!K(B<br>
> $B$H$J$C$F$7$^$$$^$9!#(B<br> ><br> ><br> > start$B%a%=%C%I$G=i4|2=$r9T$&=hM}(B(exception = null)$B$r=q$$$F$_$^$7$?$,!"(B<br> > end$B%a%=%C%I$N%?%$%_%s%0$G:F$S(BException$B$,(BDI$B$5$l$F$7$^$$$^$9!#(B<br> > $B"(%a!<%kAw?.=hM}$O(Bend$B%a%=%C%I$G=hM}$7$F$$$^$9!#(B<br> > $B"(%a!<%kAw?.=hM}$N$H$-$K!"(BException$B$NM-L5$rH=Dj$7$F$$$^$9!#(B<br> ><br>
><br> > $B2?$+NI$$BP1~J}K!$,$"$l$P!"65$($F$$$?$@$1$^$9$G$7$g$&$+!#(B<br> > $B59$7$/$*4j$$CW$7$^$9!#(B<br> ><br> ><br> ><br> <br>> _______________________________________________<br> > Seasar-user mailing list<br> > <a href="mailto:Seasar-user@ml.seasar.org">Seasar-user@ml.seasar.org</a><br>
> <a href="https://ml.seasar.org/mailman/listinfo/seasar-user">https://ml.seasar.org/mailman/listinfo/seasar-user</a><br> ><br> ><br> <br> <br> <br> --<br> /**<br> * name : Junichi Kato<br> * email : <a href="mailto:j5ik2o@gmail.com">j5ik2o@gmail.com</a><br>
*<br> * blog : <a href="http://d.hatena.ne.jp/j5ik2o/">http://d.hatena.ne.jp/j5ik2o/</a><br> *<br> * commiting projects :<br> * <a href="http://jiemamy.org/">http://jiemamy.org/</a><br> * <a href="http://s2chronos.sandbox.seasar.org/">http://s2chronos.sandbox.seasar.org/</a><br>
* <a href="http://s2config.sandbox.seasar.org/">http://s2config.sandbox.seasar.org/</a><br> */<br> _______________________________________________<br> Seasar-user mailing list<br> <a href="mailto:Seasar-user@ml.seasar.org">Seasar-user@ml.seasar.org</a><br>
<a href="https://ml.seasar.org/mailman/listinfo/seasar-user">https://ml.seasar.org/mailman/listinfo/seasar-user</a><br> </blockquote></div><br>