how to use Websphere datasource in Spring batch -
i need utilize websphere info source in spring batch,
i tried utilize
<bean id="wasdatasource" class="org.springframework.jndi.jndiobjectfactorybean"> <property name="jndiname" value="jdbc/testdb" /> <property name="lookuponstartup" value="false" /> <property name="cache" value="true" /> <property name="proxyinterface" value="javax.sql.datasource" /> </bean>
sql state [null]; error code [0]; dsra9110e: resultset closed.; nested exception com.ibm.websphere.ce.cm.objectclosedexception: dsra9110e: resultset closed.
also
<bean id="wasdatasource" class="org.springframework.jdbc.datasource.webspheredatasourceadapter"> <property name="targetdatasource"> <bean class="org.springframework.jndi.jndiobjectfactorybean"> <property name="jndiname" value="jdbc/testdb"/> </bean> </property> <property name="lookuponstartup" value="true" /> <property name="proxyinterface" value="javax.sql.datasource"/> </bean>
specified 'targetdatasource' not websphere wsdatasource: com.ibm.ws.rsadapter.jdbc.wsjdbcdatasource@4f68bc63
sorry, reply not straight related websphere, using datasources under jboss. since got no specific answers, thought help jboss experience...
we define datasource follow:
<jee:jndi-lookup id="sampleds" jndi-name="java:jboss/datasources/sampleds" expected-type="javax.sql.datasource" lookup-on-startup="false" cache="true" />
and works nicely...
in order utilize jee
tag, must include xmlns:jee="http://www.springframework.org/schema/jee"
<beans>
declaration , http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.1.xsd
xsi:schemalocation
.
hope helps.
regards,
bob
spring-batch
No comments:
Post a Comment