2 Replies Latest reply on Aug 4, 2003 3:00 PM by Adrian Brock

    Connection pool size is below 0

    alexanderliu Newbie

      Below is part of InternalManagedConnectionPool source code
      ******************
      if (mc != null)
      {
      //Yes, we retrieved a ManagedConnection from the pool. Does it match?
      try
      {
      matchedMc = mcf.matchManagedConnections(new SetOfOne(mc), subject, cri);
      } catch (ResourceException re)
      {
      doDestroy(mc);
      mc = null;
      }
      if (matchedMc != null)
      {
      if (log.isTraceEnabled())
      {
      log.trace("supplying ManagedConnection from pool: " + matchedMc);
      } // end of if ()
      return matchedMc;
      } // end of if ()
      //Match did not succeed but no exception was thrown.
      //Either we have the matching strategy wrong or the
      //connection died while being checked. We need to
      //distinguish these cases, but for now we always
      //destroy the connection.
      log.warn("Destroying connection that could not be successfully matched: " + mc);
      doDestroy(mc);
      } // end of if ()

      ************