[Seasar-user:19031] Re: s2chronosでExcepitonがDIされ続ける

Yasutaka Ebina [E-MAIL ADDRESS DELETED]
2009年 12月 14日 (月) 22:06:26 JST


加藤さん
お世話になります。えびなです。
確認が遅くなり、申し訳ありませんでした。
下記の作業を行い、問題なく動作していることを確認いたしました。
1.利用するJARを変更
s2chronos-core-1.0.0.jar
⇒ s2chronos-core-1.0.1-20091209.163037-5.jar

2.org.seasar.chronos.core.modelへ移ったクラスのimportを変更
org.seasar.chronos.core.trigger.CCronTrigger
⇒ org.seasar.chronos.core.model.trigger.CCronTrigger

org.seasar.chronos.core.SchedulerConfiguration
⇒ org.seasar.chronos.core.model.SchedulerConfiguration

org.seasar.chronos.core.ThreadPoolType
⇒ org.seasar.chronos.core.model.ThreadPoolType

3.稼動確認
⇒ OK
ご対応ありがとうございました。

2009年12月11日17:30 Yasutaka Ebina <[E-MAIL ADDRESS DELETED]>:

> 加藤さん
> えびなです。
>
> ご対応いただき、ありがとうございます。
> 確認に手間取っておりますので、申し訳ありませんがいましばらくお待ちください。
> #見慣れぬエラーがでてきたような…
>
> 宜しくお願いいたします。
>
>
> 2009年12月10日1:34 Junichi Kato <[E-MAIL ADDRESS DELETED]>:
>
> えびなさん
>> 加藤です。
>>
>> 遅くなりましたが、SNAPSHOTを発行しました。
>> ご確認ください。
>>
>>
>> http://maven.seasar.org/maven2-snapshot/org/seasar/chronos/s2chronos-core/1.0.1-SNAPSHOT/s2chronos-core-1.0.1-20091209.163037-5.jar
>>
>> 2009年12月8日11:26 Junichi Kato <[E-MAIL ADDRESS DELETED]>:
>> > えびなさん
>> > 加藤(j5ik2o)です。
>> >
>> > サンプルソースありがとうございました。
>> > 再現を確認しました。
>> >
>> > concurrentパッケージのTaskを.NET <http://xn--vbk.NET>
>> のデリゲートのようなAPIでラップしているクラス(MethodInvoker)があるのですが、
>> > そこで例外発生時に非同期オブジェクトをリストからを削除する処理が呼ばれないようになっていました。すみません。。
>> > コードの修正はできたので、本日夜にSNAPSHOTを発行します。
>> > しばらくお待ちください。
>> >
>> > よろしくお願いいたします。
>> >
>> > 2009年12月4日10:12 Yasutaka Ebina <[E-MAIL ADDRESS DELETED]>:
>> >> 加藤(j5ik2o)さん
>> >>
>> >> お世話になります。えびなです。
>> >>
>> >> サンプルソースを作成しましたので、ご確認のほど宜しくお願い致します。
>> >>
>> >> ---ソースコード---------------
>> >>
>> >> @Task
>> >> @CronTrigger(expression = "*/10 * * * * ?")
>> >> public class SampleTask {
>> >>   private int count = 0;
>> >>   public Exception exception = null;
>> >>
>> >>   public void start() {
>> >>   ++count;
>> >>   exception = null;
>> >>
>> >>   log("------------");
>> >>   log(" start(): COUNT=" + count + ", EXCEPTION=" + exception);
>> >>   }
>> >>
>> >>   public void doExecute() {
>> >>   log("doExecute(): COUNT=" + count + ", EXCEPTION=" + exception);
>> >>
>> >>   if (count % 2 == 0) {
>> >>   RuntimeException e = new RuntimeException("COUNT=" + count);
>> >>
>> >>   log("doExecute(): throw " + e);
>> >>   throw e;
>> >>   }
>> >>   }
>> >>
>> >>   public void end() {
>> >>   log(" end(): COUNT=" + count + ", EXCEPTION=" + exception);
>> >>   }
>> >>
>> >>   private void log(String s) {
>> >>   // ログ出力
>> >>   }
>> >> }
>> >>
>> >> ---ログ---------------
>> >> **I* <2009/12/03 18:30:21.203> ------------
>> >> **I* <2009/12/03 18:30:21.203> start(): COUNT=1, EXCEPTION=null
>> >> **I* <2009/12/03 18:30:21.234> doExecute(): COUNT=1, EXCEPTION=null
>> >> **I* <2009/12/03 18:30:21.234> end(): COUNT=1, EXCEPTION=null
>> >> **I* <2009/12/03 18:30:31.156> ------------
>> >> **I* <2009/12/03 18:30:31.156> start(): COUNT=2, EXCEPTION=null
>> >> **I* <2009/12/03 18:30:31.156> doExecute(): COUNT=2, EXCEPTION=null
>> >> **I* <2009/12/03 18:30:31.156> doExecute(): throw
>> >> java.lang.RuntimeException: COUNT=2
>> >> **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
>> >> **I* <2009/12/03 18:30:41.156> ------------
>> >> **I* <2009/12/03 18:30:41.156> start(): COUNT=3, EXCEPTION=null
>> >> **I* <2009/12/03 18:30:41.187> doExecute(): COUNT=3, EXCEPTION=null
>> >> **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
>> >> **I* <2009/12/03 18:30:51.156> ------------
>> >> **I* <2009/12/03 18:30:51.156> start(): COUNT=4, EXCEPTION=null
>> >> **I* <2009/12/03 18:30:51.171> doExecute(): COUNT=4, EXCEPTION=null
>> >> **I* <2009/12/03 18:30:51.187> doExecute(): throw
>> >> java.lang.RuntimeException: COUNT=4
>> >> **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
>> >> **I* <2009/12/03 18:31:01.156> ------------
>> >> **I* <2009/12/03 18:31:01.156> start(): COUNT=5, EXCEPTION=null
>> >> **I* <2009/12/03 18:31:01.156> doExecute(): COUNT=5, EXCEPTION=null
>> >> **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
>> >> **I* <2009/12/03 18:31:11.171> ------------
>> >> **I* <2009/12/03 18:31:11.171> start(): COUNT=6, EXCEPTION=null
>> >> **I* <2009/12/03 18:31:11.187> doExecute(): COUNT=6, EXCEPTION=null
>> >> **I* <2009/12/03 18:31:11.203> doExecute(): throw
>> >> java.lang.RuntimeException: COUNT=6
>> >> **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
>> >> **I* <2009/12/03 18:31:21.171> ------------
>> >> **I* <2009/12/03 18:31:21.171> start(): COUNT=7, EXCEPTION=null
>> >> **I* <2009/12/03 18:31:21.187> doExecute(): COUNT=7, EXCEPTION=null
>> >> **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
>> >> **I* <2009/12/03 18:31:31.171> ------------
>> >> **I* <2009/12/03 18:31:31.171> start(): COUNT=8, EXCEPTION=null
>> >> **I* <2009/12/03 18:31:31.187> doExecute(): COUNT=8, EXCEPTION=null
>> >> **I* <2009/12/03 18:31:31.203> doExecute(): throw
>> >> java.lang.RuntimeException: COUNT=8
>> >> **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
>> >> **I* <2009/12/03 18:31:41.171> ------------
>> >> **I* <2009/12/03 18:31:41.171> start(): COUNT=9, EXCEPTION=null
>> >> **I* <2009/12/03 18:31:41.203> doExecute(): COUNT=9, EXCEPTION=null
>> >> **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
>> >> **I* <2009/12/03 18:31:51.171> ------------
>> >> **I* <2009/12/03 18:31:51.171> start(): COUNT=10, EXCEPTION=null
>> >> **I* <2009/12/03 18:31:51.203> doExecute(): COUNT=10, EXCEPTION=null
>> >> **I* <2009/12/03 18:31:51.203> doExecute(): throw
>> >> java.lang.RuntimeException: COUNT=10
>> >> **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
>> >>
>> >> -----
>> >>
>> >>
>> >> 09/12/03 Junichi Kato <[E-MAIL ADDRESS DELETED]>:
>> >>>
>> >>> えびな様
>> >>> 加藤(j5ik2o)です。
>> >>>
>> >>> 不具合報告ありがとうございます。
>> >>> お手数ですが、不具合が再現するサンプルソースをいただいてもよろしいでしょうか?
>> >>>
>> >>>
>> >>> 2009年12月2日12:52 Yasutaka Ebina <[E-MAIL ADDRESS DELETED]>:
>> >>>
>> >>> > えびなと申します。
>> >>> > s2chronosで下記のような処理を行おうと考えておりますが、
>> >>> > 1度Exceptionが発生すると、それ以後ExceptionがDIされ続けてしまいます。
>> >>> >
>> >>> > タスクを一定周期(例えば1分毎)で起動し、
>> >>> > ・Exceptionが起きていなければ、正常終了メールを送信する
>> >>> > ・Exceptionが起きていれば、異常終了メールを送信する
>> >>> > という処理を行いたいのですが、
>> >>> > 1度Exceptionが発生すると、次回以降のタスク実行時に
>> >>> > 以前発生したExceptionがDIされてしまします。
>> >>> >
>> >>> > 具体的には、
>> >>> > 1回目実行時: Exceptionなし(正常メール)
>> >>> > 2回目実行時: Exceptionあり(異常メール)
>> >>> > 3回目実行時: Exceptionなし(異常メール)
>> >>> > となってしまいます。
>> >>> >
>> >>> >
>> >>> > startメソッドで初期化を行う処理(exception = null)を書いてみましたが、
>> >>> > endメソッドのタイミングで再びExceptionがDIされてしまいます。
>> >>> > ※メール送信処理はendメソッドで処理しています。
>> >>> > ※メール送信処理のときに、Exceptionの有無を判定しています。
>> >>> >
>> >>> >
>> >>> > 何か良い対応方法があれば、教えていただけますでしょうか。
>> >>> > 宜しくお願い致します。
>> >>> >
>> >>> >
>> >>> >
>> >>>
>> >>> > _______________________________________________
>> >>> > Seasar-user mailing list
>> >>> > [E-MAIL ADDRESS DELETED]
>> >>> > https://ml.seasar.org/mailman/listinfo/seasar-user
>> >>> >
>> >>> >
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> /**
>> >>>   * name  : Junichi Kato
>> >>>   * email : [E-MAIL ADDRESS DELETED]
>> >>>   *
>> >>>   * blog  : http://d.hatena.ne.jp/j5ik2o/
>> >>>   *
>> >>>   * commiting projects :
>> >>>   * http://jiemamy.org/
>> >>>   * http://s2chronos.sandbox.seasar.org/
>> >>>   * http://s2config.sandbox.seasar.org/
>> >>>   */
>> >>> _______________________________________________
>> >>> Seasar-user mailing list
>> >>> [E-MAIL ADDRESS DELETED]
>> >>> https://ml.seasar.org/mailman/listinfo/seasar-user
>> >>
>> >>
>> >> _______________________________________________
>> >> Seasar-user mailing list
>> >> [E-MAIL ADDRESS DELETED]
>> >> https://ml.seasar.org/mailman/listinfo/seasar-user
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > /**
>> >  * name  : Junichi Kato
>> >  * email : [E-MAIL ADDRESS DELETED]
>> >  *
>> >  * blog  : http://d.hatena.ne.jp/j5ik2o/
>> >  *
>> >  * commiting projects :
>> >  * http://jiemamy.org/
>> >  * http://s2chronos.sandbox.seasar.org/
>> >  * http://s2config.sandbox.seasar.org/
>> >  */
>> >
>>
>>
>>
>> --
>> /**
>>  * name  : Junichi Kato
>>  * email : [E-MAIL ADDRESS DELETED]
>>  *
>>  * blog  : http://d.hatena.ne.jp/j5ik2o/
>>  *
>>  * commiting projects :
>>  * http://jiemamy.org/
>>  * http://s2chronos.sandbox.seasar.org/
>>  * http://s2config.sandbox.seasar.org/
>>  */
>> _______________________________________________
>> Seasar-user mailing list
>> [E-MAIL ADDRESS DELETED]
>> https://ml.seasar.org/mailman/listinfo/seasar-user
>>
>
>
-------------- next part --------------
HTMLの添付ファイルを保管しました...
URL: <http://ml.seasar.org/archives/seasar-user/attachments/20091214/bf981335/attachment.html>


Seasar-user メーリングリストの案内