Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to close connection iBATIS  RSS feed

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 "-// SQL Map Config 2.0//EN" "../../dtd/sql-map-config-2.dtd">
<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" />
<sqlMap resource="com/kotak/crnapp/config/NetApp_CRN_SQL.xml"/>

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) .


Java Dev User
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!