0 Replies Latest reply on Nov 30, 2006 3:07 PM by kearns7153

    ConnectionManager issue in Stateless bean and injected Entit

    kearns7153

      I am getting the following INFO message from the ConnectionManager when accessed from a Stateless bean:


      14:36:01,687 INFO [ConnectionManager] forcing batcher resource cleanup on transaction completion; forgot to close ScrollableResults/Iterator?


      The application looks like it is working so what does this mean?

      I am using JBoss 4.0.5 GA, but same issues exists with 4.0.4 GA.
      I am using Postgresql 8.1 for a database.
      I am using Seam, but this error occurs without invoking my UI client.


      @Stateless
      public class MyTrialBean implements MyTrailRemote
      {
      @PersistenceContext
      private EntityManager em;

      ...

      public String update(Biu biuAttributes)
      {
      try {
      String serialNumber = biuAttributes.getSerialNumber();

      List bius = em.createNamedQuery("Biu.findBySerialNumber")
      .setParameter("serialNumber", serialNumber)
      .getResultList();
      if ((bius == null) || (bius.size() == 0)) {
      return ProXmlResponse.getError(ProError.BIU_NOT_FOUND);
      }

      Biu biu = bius.get (0);
      biu.setLastContact(new Date());
      em.merge(biu);
      } catch (Exception e) {
      return ProXmlResponse.getError(ProError.BIU_UPDATE_FAILED);
      }
      }

      ...



      Other posts/replies state that I should close the connection in a finally block.
      I have tried various calls to the EntityManager but those usually result in
      an error.

      I based most of what I am doing here on the EJB3 TrailBlazer demos.

      I am looking for more information on this problem to see if it is related to the following more serious ConnectionManager problem.


      14:52:08,817 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null
      14:52:08,817 ERROR [JDBCExceptionReporter] No ManagedConnections available within configured blocking timeout ( 30000 [ms] ); - nested throwable: (javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 30000 [ms] ))
      14:52:08,817 ERROR [STDERR] Nov 30, 2006 2:52:08 PM checkStats
      INFO: PurgeStatsBean.checkStats()...Failed