java - Setting queryTimeout Value of Datasource created via JNDI -


i have following definition datasource object via jndi created @ weblogic 12c application server.

<jee:jndi-lookup id="test.db" jndi-name="db_jndi"/>  <bean name="testimpl" class="com.test.db.testimpl">     <property name="datasource" ref="test.db" /> </bean> 

i know how can set querytimeout value of datasource , how can pass value while initializing it

using weblogic 12c, spring 3.5

i have created init() method changed bean definition follow. working fine.

<jee:jndi-lookup id="test.db" jndi-name="db_jndi"/>  <bean name="testimpl" class="com.test.db.testimpl" init-method="init">     <property name="datasource" ref="test.db" />     <property name="querytimeout" value="${prop.querytimeout}" /> </bean> 

testimpl.java

   public void init() {         getjdbctemplate().setquerytimeout(querytimeout);    } 

Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -