In weblogic 10.3.6 server, I have defined the as400 datasource and now I am using myEclipse with java spring framework to develop program to access as400 db by using namedParameterjdbctemplate. I have the sql for as400 select statement. I have below xml code defined in applicationContext.xml in my project. Is there a way to use jdbcParameterNamedTemplate to function as I know jdbcTemplate need to have datasource which will have connection string or password and I not want to enter these values in code but still use weblogic datasource? Is there any example??
<beans>
<bean id="AS400UATJdbcTemplate" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="AS400UAT"/>
<property name="lookupOnStartup" value="false"/>
<property name="cache" value="true"/>
<property name="proxyInterface" value="javax.sql.DataSource"/>
</bean>
<bean id="getCreditCardByAccountsNumeStoredProcedure" class="com.as400function.GetAccountsByTypeStoredProcedure" singleton="false">
<constructor-arg>
<ref bean="AS400UATJdbcTemplate"/>
</constructor-arg>
</bean>
<bean id="AddSingleWithCreditCard" class="com.as400function.AddSingleWithCreditCard" singleton="false">
<constructor-arg>
<ref bean="AS400UATJdbcTemplate"/>
</constructor-arg>
</bean>
</beans>