3 Replies Latest reply on Jul 11, 2006 4:25 PM by Weston M. Price


    Justin Bertram Newbie

      The http://docs.jboss.org/jbossas/jboss4guide/r5/html/ch7.chapt.html says:

      BlockingTimeoutMillis: This attribute indicates the maximum time to block while waiting for a connection before throwing an exception. Note that this blocks only while waiting for a permit for a connection, and will never throw an exception if creating a new connection takes an inordinately long time.

      What does "a permit for a connection" mean? Is that something that comes from the database are something that comes from the container?

        • 1. Re: BlockingTimeoutMillis
          Weston M. Price Master

          The 'permit to get a connection' is a Semaphore that manages the ability of a thread to get a ConnectionListener. It is an application server construct and has nothing to do with the underlying database. The blocking timeout milliseconds tells the container 'how long' a thread expects to wait to get a permit. If the blocking time is too low and they number of connections is inadequate to handle load you will see'NoManagedConnections Available' in the logs.

          On the alternate side if the blocking time is too high, and the pool is under heavy load, you will generally see this in JBoss appearing to 'hang' or 'lock' under certain conditions.

          • 2. Re: BlockingTimeoutMillis
            Carl Schmidt Newbie

            Of course, there are very, very few cases where you want threads hanging around for resources that are unlikely to become available...

            • 3. Re: BlockingTimeoutMillis
              Weston M. Price Master

              If your application is properly profiled, you your resource generally be available within the blocking time. If you are seeing a lot of "NoManagedConnectionsAvailable" messages, it's probably time to tune the pool.