Forums: Open Discussion (Thread #20974)

【バッチFW】 チャンク前後処理の呼び出し (2008-12-11 16:59 by Anonymous #40588)

以下のジョブBean定義ファイルを定義したのですが、先頭チャンク前処理および最終チャンク後処理が呼ばれません。

ジョブBean定義ファイルの内容にミスがないか見ていただけないでしょうか。

なお、-verbose:classで確認したところ、test.t650.TestFirstChunkPreLogicおよびtest.t650.TestLastChunkPostLogicのクラスはロードされていました。

<?xml version="1.0" encoding="UTF-8" ?>

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation=
"http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd">

<import resource="classpath:/template/SingleTransactionBean.xml"/>

<bean id="sqlMapConfigFileName" class="java.lang.String">
<constructor-arg value="test/sqlMapConfig.xml" />
</bean>

<bean id="jobContext" class="test.CommonJobContext" />

<bean id="collector" parent="IBatisDbChunkCollector">
<property name="sql" value="commodityInput.getAll" />
</bean>

<bean id="blogic" class="test.t650.TestBLogic002">
</bean>

<util:list id="jobPreLogicList">
<bean class="test.t650.TestPreLogic" />
</util:list>

<util:list id="jobPostLogicList">
<bean class="test.t650.TestPostLogic" />
</util:list>

<bean id="firstChunkPreLogicList" class="org.springframework.beans.factory.config.ListFactoryBean">
<property name="sourceList">
<list>
<bean class="test.t650.TestFirstChunkPreLogic" />
</list>
</property>
</bean>

<bean id="lastChunkPostLogicList" class="org.springframework.beans.factory.config.ListFactoryBean">
<property name="sourceList">
<list>
<bean class="test.t650.TestLastChunkPostLogic"/>
</list>
</property>
</bean>

<util:map id="exceptionHandlerMap">
<entry>
<key><bean class="jp.terasoluna.fw.batch.core.BLogicException" /></key>
<bean class="test.t650.TestBLogicExceptionHandler"/>
</entry>
<entry>
<key><bean class="jp.terasoluna.fw.batch.core.CollectorException" /></key>
<bean class="test.t650.TestCollectorExceptionHandler"/>
</entry>
<entry>
<key><bean class="jp.terasoluna.fw.batch.core.SupportLogicException" /></key>
<bean class="test.t650.TestSupportLogicExceptionHandler"/>
</entry>
<entry>
<key><bean class="jp.terasoluna.fw.batch.core.BatchUpdateException" /></key>
<bean class="test.t650.TestBatchUpdateExceptionHandler"/>
</entry>
</util:map>

</beans>

Reply to #40588×

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: 【バッチFW】 チャンク前後処理の呼び出し (2008-12-11 18:13 by kuramotoki #40593)

先頭チャンク前処理および最終チャンク後処理のBean定義のIDが誤っています。
firstChunkPreLogicList、lastChunkPostLogicListを
それぞれfirstchunkPreLogicList、lastchunkPostLogicListと修正してください。
# Chunkとchunkの大文字小文字の差で起動されていません。

機能説明書のBD-01の記述を確認したところ、"Chunk"の方で記述されていたので修正いたします。申し訳ありませんでした。

以上です。
Reply to #40588

Reply to #40593×

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