Forums: Open Discussion (Thread #19507)

<<Batch>> OutPutファイルのリリースタイミングについて (2008-08-03 17:56 by Anonymous #38037)

いつもお世話になっております。
Terasoluna Batch Framework 2.0.0.2を利用させていただき、開発を進めております。

要件にBLogicで作成したファイルをそのJob内のPostLogicでファイル移動させたいのですが、PostLogicがすべて終了するまでファイルを放してくれません。

一応代替案としてJob終了後にShellで移動という案はありますが、もしJob内でできるなら方法を教えていただけないでしょうか?

因みにSingleTransactionを利用しております。

Reply to #38037×

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: <<Batch>> OutPutファイルのリリースタイミングについて (2008-08-04 14:38 by kuramotoki #38049)

ご提示いただいた状況はBLogic内でファイルにデータを出力する際に、
ファイル出力用ライタを直接BLogicにDIしていることが原因と考えられます。
(機能説明書のP15の設定方法を利用していると思います。)
その場合、ジョブが終了するまでファイルがクローズされないため
ファイルを移動すると例外が発生してしまいます。

回避する方法としては、機能説明書のP14にあるように
DAOを利用してファイル出力用ライタを取得し、
ビジネスロジック内でファイルをクローズするようにすれば、
後処理でファイルを移動することが可能になります。

その場合、1回ビジネスロジックが実行されるごとに
ファイルのオープン・クローズが実行されるので
ファイル出力用ライタを直接BLogicにDIする場合に比べて
性能が劣化することが予想されますのでご注意ください。
Reply to #38037

Reply to #38049×

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: <<Batch>> OutPutファイルのリリースタイミングについて (2008-08-04 17:32 by Anonymous #38060)

ありがとうございます。
ご提示いただいた方法とレスポンスを加味して
再度検討したいと思います。
Reply to #38049

Reply to #38060×

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