Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to close connection iBATIS

 
Ritika Misra
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ,
we are using iBATIS for our application.Although iBATIS closes its connection on its own ,still we have certain open connection from our application which is causing issues while running the application.we are able to make connection using JDBC with Oracle thin driver in iBATIS but while establishing connection using JNDI and connection pooling it keeps connection open in database and connections are not getting closed properly.

SqlMapConfig.xml we are using for JNDI is :


<!DOCTYPE sqlMapConfig PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN" "../../dtd/sql-map-config-2.dtd">
<sqlMapConfig>
<settings cacheModelsEnabled="true" lazyLoadingEnabled="false" enhancementEnabled="true" maxSessions="64" maxTransactions="8" maxRequests="128" />
<transactionManager type="JDBC">
<dataSource type="JNDI">
<property name="DataSource" value="java:comp/env/jdbc/netappcrn" />
</dataSource>
</transactionManager>
<sqlMap resource="com/kotak/crnapp/config/NetApp_CRN_SQL.xml"/>
</sqlMapConfig>


Can any one suggest how to overcome this issue and how to close the connection in iBATIS explicitly while using JNDI and how to specify connection pool size(if any) .


Regards,

Java Dev User
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic