Title: Enabling SQL Connection Pools

I'm back... well almost - hopefully next week I will be able to get back into the SQL extension library enhancements.

I was just looking at some code, in particular I was looking at the DefaultConnectionPool. How can this pool be enabled (for an external connection pool)? The function that I would assume would set it to enabled (active) looks like (from current CVS):

/**
   * The Pool can be Enabled and Disabled. Disabling the pool
   * closes all the outstanding Unused connections and any new
   * connections will be closed upon release.
   * @param flag Control the Connection Pool. If it is enabled then Connections will actuall be held
   * around. If disabled then all unused connections will be instantly closed and as
   * connections are released they are closed and removed from the pool.
   * @return
   */
  public void setPoolEnabled( final boolean flag )
  {

  }

Shouldn't this do something useful, like setting m_IsActive to the value of flag? It is declared as (private boolean m_IsActive = false;) and I do not see anything else that would change it.

It is a bit late, so maybe I am missing something...

...Like for example I just noticed that the flag parameter is final... what does a final parameter mean? Is this a subtle way of saying that if you want an external connection pool, you need to code your own (or at least extend from DefaultConnectionPool and replace setPoolEnabled()).

Art

Reply via email to