Forums: Open Discussion (Thread #21894)

Oracleインスタンスが起動完了となるまで接続を試行し続けるような設定方法 (2009-03-03 18:22 by Anonymous #42285)

お世話になります。

jp.terasoluna.fw.batch.springsupport.init.AsyncBatchDaemon を Windowsサービスで起動しております。
DBはOracleを使用しておりますが、システム起動時のサービス起動では、接続先のOracleインスタンスが未起動であるため、
AsyncBatchDaemonが異常終了してしまいます。
AsyncBatchDaemonを異常終了させることなく、Oracleインスタンスが起動完了となるまで接続を試行し続けるような設定方法はありますでしょうか?。

Reply to #42285×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: Oracleインスタンスが起動完了となるまで接続を試行し続けるような設定方法 (2009-03-04 15:29 by kuramotoki #42308)

マシン構成をAPサーバ、DBサーバ2台構成にしており、APサーバにて
AsyncBatchDaemonを起動している前提で回答します。

バッチFWではDBに接続できるまで待ち続けるような設定はありません。
ですので、Windowsサービスの起動時に、別途DBが起動しているか確認してから
AsyncBatchDaemonを起動するような仕組みを考える必要があるかと思います。
サービスがWSHでしたら、javaプロセスを実行する前にSQLを一定時間おいて
投げ続け、正常に繋がったらjavaプロセスを実行するようにするのも良いかと思います。

また、AsyncBatchDaemonは処理途中にDB接続できないことでエラーになった場合は
異常終了するかと思いますので、AsyncBatchDaemonの運用ポリシーも
別途考える必要はあるかと思います。

以上です。
Reply to #42285

Reply to #42308×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: Oracleインスタンスが起動完了となるまで接続を試行し続けるような設定方法 (2009-03-04 22:17 by Anonymous #42320)

御回答ありがとうございました。
Reply to #42308

Reply to #42320×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login