2 Replies Latest reply on Dec 18, 2006 1:51 PM by Lili Li

    No ManagedConnections available

    Lili Li Newbie

      Hi,

      I use the following code in an ejb to database query:

      try {
      InitialContext ctx = new InitialContext();
      SessionFactory sessionFactory = (SessionFactory) ctx.lookup(sessionFactoryName);
      Session s = sessionFactory.getCurrentSession();
      // using s to do some queries
      ...
      // s.connection.close(); I even use this to explicitly close the connection
      s.close();
      }
      ...

      I do call session's close() method to release the connection. But I got "No ManagedConnections available" error when my jsp page queries reach the max connection pool size.
      I'v seached the forums but could not found an answer really resolve the problem.

      Could anyone please help this problem? Thx!!!