commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dgra...@apache.org
Subject cvs commit: jakarta-commons/dbcp/src/java/org/apache/commons/dbcp PoolableConnectionFactory.java AbandonedConfig.java DelegatingConnection.java AbandonedObjectPool.java AbandonedTrace.java PoolableConnection.java BasicDataSource.java
Date Wed, 09 Apr 2003 00:19:37 GMT
dgraham     2003/04/08 17:19:37

  Modified:    dbcp/src/java/org/apache/commons/dbcp
                        PoolableConnectionFactory.java AbandonedConfig.java
                        DelegatingConnection.java AbandonedObjectPool.java
                        AbandonedTrace.java PoolableConnection.java
                        BasicDataSource.java
  Log:
  Deprecated Abandoned* classes, no functionality changes.
  
  Revision  Changes    Path
  1.7       +19 -6     jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/PoolableConnectionFactory.java
  
  Index: PoolableConnectionFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/PoolableConnectionFactory.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- PoolableConnectionFactory.java	2 Apr 2003 00:48:49 -0000	1.6
  +++ PoolableConnectionFactory.java	9 Apr 2003 00:19:37 -0000	1.7
  @@ -7,7 +7,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -105,8 +105,17 @@
        * @param defaultReadOnly the default "read only" setting for borrowed {@link Connection}s
        * @param defaultAutoCommit the default "auto commit" setting for returned {@link Connection}s
        * @param config the AbandonedConfig if tracing SQL objects
  +     * @deprecated AbandonedConfig is now deprecated.
        */
  -    public PoolableConnectionFactory(ConnectionFactory connFactory, ObjectPool pool, KeyedObjectPoolFactory
stmtPoolFactory, String validationQuery, boolean defaultReadOnly, boolean defaultAutoCommit,
AbandonedConfig config) {
  +    public PoolableConnectionFactory(
  +        ConnectionFactory connFactory,
  +        ObjectPool pool,
  +        KeyedObjectPoolFactory stmtPoolFactory,
  +        String validationQuery,
  +        boolean defaultReadOnly,
  +        boolean defaultAutoCommit,
  +        AbandonedConfig config) {
  +            
           _connFactory = connFactory;
           _pool = pool;
           _config = config;
  @@ -270,5 +279,9 @@
       protected KeyedObjectPoolFactory _stmtPoolFactory = null;
       protected boolean _defaultReadOnly = false;
       protected boolean _defaultAutoCommit = true;
  +    
  +    /**
  +     * @deprecated AbandonedConfig is now deprecated.
  +     */
       protected AbandonedConfig _config = null;
   }
  
  
  
  1.2       +6 -5      jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/AbandonedConfig.java
  
  Index: AbandonedConfig.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/AbandonedConfig.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbandonedConfig.java	16 May 2002 21:25:37 -0000	1.1
  +++ AbandonedConfig.java	9 Apr 2003 00:19:37 -0000	1.2
  @@ -7,7 +7,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -65,6 +65,7 @@
    *                                                            
    * @author Glenn L. Nielsen           
    * @version $Revision$ $Date$
  + * @deprecated This will be removed in a future version of DBCP.
    */
   public class AbandonedConfig {
   
  
  
  
  1.12      +6 -5      jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/DelegatingConnection.java
  
  Index: DelegatingConnection.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/DelegatingConnection.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- DelegatingConnection.java	6 Mar 2003 19:25:34 -0000	1.11
  +++ DelegatingConnection.java	9 Apr 2003 00:19:37 -0000	1.12
  @@ -7,7 +7,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -116,6 +116,7 @@
        *
        * @param Connection the {@link Connection} to delegate all calls to.
        * @param AbandonedConfig the configuration for tracing abandoned objects
  +     * @deprecated AbandonedConfig is now deprecated.
        */
       public DelegatingConnection(Connection c, AbandonedConfig config) {
           super(config);
  
  
  
  1.5       +6 -5      jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/AbandonedObjectPool.java
  
  Index: AbandonedObjectPool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/AbandonedObjectPool.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AbandonedObjectPool.java	6 Mar 2003 19:25:34 -0000	1.4
  +++ AbandonedObjectPool.java	9 Apr 2003 00:19:37 -0000	1.5
  @@ -7,7 +7,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -78,6 +78,7 @@
    *                                                                        
    * @author Glenn L. Nielsen
    * @version $Revision$ $Date$
  + * @deprecated This will be removed in a future version of DBCP.
    */
   public class AbandonedObjectPool extends GenericObjectPool {
   
  
  
  
  1.5       +6 -5      jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/AbandonedTrace.java
  
  Index: AbandonedTrace.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/AbandonedTrace.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AbandonedTrace.java	30 Sep 2002 13:31:12 -0000	1.4
  +++ AbandonedTrace.java	9 Apr 2003 00:19:37 -0000	1.5
  @@ -7,7 +7,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -75,6 +75,7 @@
    * 
    * @author Glenn L. Nielsen
    * @version $Revision$ $Date$
  + * @deprecated This will be removed in a future version of DBCP.
    */
   public class AbandonedTrace {
   
  
  
  
  1.6       +6 -5      jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/PoolableConnection.java
  
  Index: PoolableConnection.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/PoolableConnection.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- PoolableConnection.java	1 Nov 2002 15:27:21 -0000	1.5
  +++ PoolableConnection.java	9 Apr 2003 00:19:37 -0000	1.6
  @@ -7,7 +7,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -94,6 +94,7 @@
        * @param conn my underlying connection
        * @param pool the pool to which I should return when closed
        * @param config the abandoned configuration settings
  +     * @deprecated AbandonedConfig is now deprecated.
        */
       public PoolableConnection(Connection conn, ObjectPool pool,
                                 AbandonedConfig config) {
  
  
  
  1.13      +27 -12    jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/BasicDataSource.java
  
  Index: BasicDataSource.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/BasicDataSource.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- BasicDataSource.java	6 Mar 2003 14:58:42 -0000	1.12
  +++ BasicDataSource.java	9 Apr 2003 00:19:37 -0000	1.13
  @@ -1,4 +1,4 @@
  -/** $Header$
  +/* $Header$
    * $Revision$
    * $Date$
    *
  @@ -6,7 +6,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -484,7 +484,8 @@
        * If set to true a connection is considered abandoned and eligible
        * for removal if it has been idle longer than the removeAbandonedTimeout.
        * Setting this to true can recover db connections from poorly written    
  -     * applications which fail to close a connection.                         
  +     * applications which fail to close a connection.      
  +     * @deprecated                   
        */                                                                   
       public boolean getRemoveAbandoned() {   
           if (abandonedConfig != null) {
  @@ -492,7 +493,11 @@
           }
           return false;
       }                                    
  -                                      
  +                                 
  +    /**
  +     * @deprecated
  +     * @param removeAbandoned
  +     */
       public void setRemoveAbandoned(boolean removeAbandoned) {
           if (abandonedConfig == null) {
               abandonedConfig = new AbandonedConfig();
  @@ -503,7 +508,8 @@
       /**
        * Timeout in seconds before an abandoned connection can be removed.
        *
  -     * Defaults to 300 seconds.                                         
  +     * Defaults to 300 seconds.         
  +     * @deprecated                                
        */                                                                 
       public int getRemoveAbandonedTimeout() { 
           if (abandonedConfig != null) {
  @@ -511,7 +517,11 @@
           }
           return 300;
       }                                        
  -                                             
  +
  +    /**
  +     * @deprecated
  +     * @param removeAbandonedTimeout
  +     */               
       public void setRemoveAbandonedTimeout(int removeAbandonedTimeout) {
           if (abandonedConfig == null) {
               abandonedConfig = new AbandonedConfig();
  @@ -527,7 +537,8 @@
        *                                                              
        * Logging of abandoned Statements and Connections adds overhead
        * for every Connection open or new Statement because a stack   
  -     * trace has to be generated.                                   
  +     * trace has to be generated.             
  +     * @deprecated                      
        */                                                          
       public boolean getLogAbandoned() {   
           if (abandonedConfig != null) {
  @@ -535,7 +546,11 @@
           }
           return false;
       }                                 
  -                                   
  +
  +    /**
  +     * @deprecated
  +     * @param logAbandoned
  +     */
       public void setLogAbandoned(boolean logAbandoned) {
           if (abandonedConfig == null) {
               abandonedConfig = new AbandonedConfig();
  @@ -633,7 +648,7 @@
           }
   
           // Create an object pool to contain our active connections
  -        connectionPool = new AbandonedObjectPool(null,abandonedConfig);
  +        connectionPool = new GenericObjectPool();
           connectionPool.setMaxActive(maxActive);
           connectionPool.setMaxIdle(maxIdle);
           connectionPool.setMaxWait(maxWait);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message