Menu

close connection not called

vinoth
2004-12-17
2013-06-03
  • vinoth

    vinoth - 2004-12-17

    hi

    I believe connection is not being closed in dbforms taglib i.e getCurrent(String position, int count) method of org\dbforms\event\datalist\dao\Datasource.java.

    This method is called when doStartTag is called for every dbForms tag.

    Have anyone come across this? Please help, db connections are not closing for us.

    regards
    vinoth

     
    • Henner Kollmann

      Henner Kollmann - 2004-12-17

      Connection is held open until all data rows are fetched are a new query is done or session time out happens.
      This is by design to enable datalist navigation.

      Holding a connection open is not a real problem if you do not use connection pooling. With connection pooling you must close the connection before you can reuse it. This is a problem with dbforms and datalist navigation.

      To overcome this problem you can use the SinglePerThreadConnectionProvider wich will open a connection for each tomcat thread and held this open. Because one connection can handle more then one statement this should work.

      Hope that helps
      Henner

       

Log in to post a comment.