1 Reply Latest reply on Nov 21, 2006 8:30 AM by weston.price

    Connection handle has been closed and is unusable

    jasmineseed

      we have an application deployed on Jboss 4.0.2. Using PostgreSql 8 and DAO pattern.
      I have taken all care to close the resultSets, Prepared Statement and Connection object.

      Also we r using Jboss Connection pooling as :

      <min-pool-size>5</min-pool-size>
      <max-pool-size>150</max-pool-size>
      <idle-timeout-minutes>10</idle-timeout-minutes>
      <check-valid-connection-sql>select 1</check-valid-connection-sql>

      Still during Stress testing (10 simultaneous users) getting following errors for 3 executions out of 10:


      1)
      sepa.aff.AFFException: Connection handle has been closed and is unusable
      at com.ail.sepa.aff.businesslogic.dao.CategoryImpl.findByCategoryId(CategoryImpl.java:801)
      at com.ail.sepa.aff.businesslogic.command.GetSiteDetails.executeInternal(GetSiteDetails.java:116)
      at com.ail.sepa.aff.businesslogic.command.AffCommand.execute(AffCommand.java:42)
      at com.ail.sepa.aff.businesslogic.AffManagerBean.getSiteDetails(AffManagerBean.java:342)
      at sun.reflect.GeneratedMethodAccessor215.invoke(Unknown Source)

      2)
      org.postgresql.util.PSQLException: This statement has been closed.
      at org.postgresql.jdbc2.AbstractJdbc2Statement.checkClosed(AbstractJdbc2Statement.java:2390)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.getMaxRows(AbstractJdbc2Statement.java:521)
      at org.postgresql.jdbc3.Jdbc3Statement.createResultSet(Jdbc3Statement.java:36)
      at org.postgresql.jdbc2.AbstractJdbc2Statement$StatementResultHandler.handleResultRows(AbstractJdbc2Statement.java:188)
      at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1270)
      at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:188)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:430)

      Thanks in advance
      arjoomand123@yahoo.com