1 Reply Latest reply on Feb 9, 2006 3:52 PM by colin lewis

    CMT Session Closing and No Managed Connection Error

    Andrew Davey Newbie

      I'm wondering if someone can help me understand why I'm getting a No Managed Connections available error. I've done a lot of searching and I am struggling to understand why this happens. Everyone says to make sure that you close the sessions in a finally block.

      The thing is I'm using JBoss 4.0.2 with Hibernate 3.0.5 with a session bean accessing a postgres and ingres database. I NEVER call openSession only getCurrentSession but after a while (two days in the last instance) I get the above mentioned error.

      I've used the JMX console to inspect the pools and it says that there are 0 connections available out of the maximum 20 (defaults). It is my understanding that JBoss handles the closing of all connection for you when using getCurrentSession.

      So why am I running out of connections?

      Thanks for any input!