[jboss-user] [Datasource Configuration] - issues with JCA minimum connections

tvbinh do-not-reply at jboss.com
Sun Feb 17 19:34:57 EST 2008


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");
         }
      }
   }


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4129996#4129996

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4129996



More information about the jboss-user mailing list