Wednesday 22 April 2020

Strping jdbcTemplate DB connection not closing or not getting new connections issue solution


Add below TransactionManger framework to resolve the DB connections issue.

<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
<constructor-arg>
<ref bean="dataSource" />
</constructor-arg>
</bean>

<bean id="txManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>

No comments:

Post a Comment