Announcement Announcement Module
Collapse
No announcement yet.
Connection is not getting closed Ibatis+Spring+JNDI(JBoss) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Connection is not getting closed Ibatis+Spring+JNDI(JBoss)

    Connection is not getting closed for MSSQL Server 2005 (Developer) for sa (admin) user. since admin user has only one dedicated connection database is throwing exception. I tried with other users too but getting the same exception.

    Is there any way to close the connection in Ibatis or spring config file which was created by Spring bean

    my Spring configuration
    <jee:jndi-lookup id="dataAccess.dataSource" jndi-name="jdbc/myJNDI"/>

    I am referring the above bean in IBATIS configuration to get the connection object

    This setup is working fine for inserting the single records but when i try to insert the multiple (20+) records then it fails with exception : http://forum.springframework.org/showthread.php?t=41634

    After looking into the database log it come to know that connection is not getting closed.

    Is there any way to close the connection explicitly either in configuration file or in IBATIS generated code.

    Thanks,
    Santosh Maskar

  • #2
    Have you got a connection leak somewhere, or are you not releasing the connections back to the pool?
    Last edited by karldmoore; Aug 27th, 2007, 04:19 PM.

    Comment


    • #3
      I am not creating a connection, Ibatis is creating a connection for me. I dont have control to close the connection because Ibatis is closing the connection.

      but in my case I feel connection is not getting closed somewhere.


      Ibatis is creating a new connection using the spring bean, somehow IBATIS is not closing the connection thats is the reason I am getting exception.

      how do i close the connection explicitly.

      Thanks,
      Santosh Maskar

      Comment


      • #4
        problem was resolved, It is because of not connection leak but it was related to admin user from sql server 2005.

        Admin user has only one dedicated connection and cant be used with pool. Created a new user and everything works fine

        Comment

        Working...
        X