Hi,
I am using Spring Batch 2.0.0 and try to use the late binding feture to load the data source through execution context. Here is the bean defination -
<beans:bean id="testSRC" class="org.springframework.orm.ibatis.SqlMapClient FactoryBean">
<beans
roperty name="dataSource" value="#{jobExecutionContext[${batchConfig.resources.sourceDatabase}]}" />
<beans
roperty name="configLocation" value="ibatis-config.xml" />
</beans:bean>
The data source is fetched from JNDI resource and loaded in execution context with Job listener in beforeStart().
When I run this batch I get following error -
HTML Code:
org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String]
to required type [javax.sql.DataSource] for property 'dataSource';
.......
So is it means that through late binding only String can be passed?