0 Replies Latest reply on Feb 17, 2008 7:34 PM by tvbinh

    issues with JCA minimum connections

    tvbinh

      Hi,

      I am developing an in-house resource adapter for both inbound and outbound communications. I have specified <min-pool-size>2</min-pool-size> in the -ds.xml but it seems do not work properly. The fillToMin method of InternalManagedConnectionPool class in JBoss does attempt to create 2 connections but it does not pass the connection request information in so the 2 connections created are not much useful since it is connected to nowhere. I am not sure whether this is a bug, could someone please help ?

      Best regards,

      Binh

      - defaultCri is null at the time fillToMin is executed.
      public void fillToMin()
      {
      while (true)
      {
      // Get a permit - avoids a race when the pool is nearly full
      // Also avoids unnessary fill checking when all connections are checked out
      try
      {
      if (permits.attempt(poolParams.blockingTimeout))
      {
      try
      {
      if (shutdown.get())
      return;

      // We already have enough connections
      if (getMinSize() - connectionCounter.getGuaranteedCount() <= 0)
      return;

      // Create a connection to fill the pool
      try
      {
      ConnectionListener cl = createConnectionEventListener(defaultSubject, defaultCri);
      synchronized (cls)
      {
      if (trace)
      log.trace("Filling pool cl=" + cl);
      cls.add(cl);
      }
      }
      catch (ResourceException re)
      {
      log.warn("Unable to fill pool ", re);
      return;
      }
      }
      finally
      {
      permits.release();
      }
      }
      }
      catch (InterruptedException ignored)
      {
      log.trace("Interrupted while requesting permit in fillToMin");
      }
      }
      }