Carl Ludewig wrote:
> 
> Christopher Elkins wrote:
> > I can't really comment on the merits of the patch; it's not a section of code
> > with which I'm familiar. However, in the future, submitting patches in diff form
> > makes them much easier to evaluate. For more details, see
> > (http://jakarta.apache.org/guidelines/source.html), specifically the section
> > titled 'Patches'.
> 
> Got it. Here's the patch:
> 
> retrieving revision 1.11
> diff -u -r1.11 ConnectionPool.java
> --- ConnectionPool.java 2000/10/21 20:42:33     1.11
> +++ ConnectionPool.java 2000/10/30 21:47:11
> @@ -319,7 +319,16 @@
>       * @return The <code>DB</code> associated with this pool.
>       */
>      public DB getDB()
> +       throws Exception
>      {
> +        // PoolBrokerService keeps a collection of ConnectionPools,
> +        // each one of which contains connections to a single database.
> +        // The initialization of a pool should only occur once.
> +        if (db == null)
> +        {
> +          db = DBFactory.create( driver );
> +          db.init( url, username, password );
> +        }
>          return db;
>      }
> 
> @@ -335,16 +344,8 @@
>      protected DBConnection getNewConnection()
>          throws Exception
>      {
> -        // PoolBrokerService keeps a collection of ConnectionPools,
> -        // each one of which contains connections to a single database.
> -        // The initialization of a pool should only occur once.
> -        if (db == null)
> -        {
> -            db = DBFactory.create( driver );
> -            db.init( url, username, password );
> -        }
>          totalConnections++;
> -        return new DBConnection( db.getConnection(), url );
> +        return new DBConnection( getDB().getConnection(), url );
>      }
> 
>      /**

Excellent, patch applied.
-- 
Daniel Rall <[EMAIL PROTECTED]>


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to