commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1547339 - in /commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src: changes/changes.xml java/org/apache/commons/dbcp/BasicDataSource.java
Date Tue, 03 Dec 2013 10:37:05 GMT
Author: markt
Date: Tue Dec  3 10:37:04 2013
New Revision: 1547339

URL: http://svn.apache.org/r1547339
Log:
Fix DBCP-396
Expose all of the AbandonedConfig properties through a BasicDataSource.

Modified:
    commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/changes/changes.xml
    commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/java/org/apache/commons/dbcp/BasicDataSource.java

Modified: commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/changes/changes.xml?rev=1547339&r1=1547338&r2=1547339&view=diff
==============================================================================
--- commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/changes/changes.xml (original)
+++ commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/changes/changes.xml Tue Dec  3 10:37:04
2013
@@ -48,6 +48,9 @@ The <action> type attribute can be add,u
         Use one line per statement for methods with multiple statements rather
         than using a single line.
       </action>
+      <action dev="markt" issue="DBCP-396" type="fix">
+        Expose all of the AbandonedConfig properties through a BasicDataSource.
+      </action>
     </release>
     <release version="1.4.1" date="TBD" description="TBD">
       <action dev="psteitz" issue="DBCP-367" type="fix" due-to="Ken Tatsushita">

Modified: commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/java/org/apache/commons/dbcp/BasicDataSource.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/java/org/apache/commons/dbcp/BasicDataSource.java?rev=1547339&r1=1547338&r2=1547339&view=diff
==============================================================================
--- commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/java/org/apache/commons/dbcp/BasicDataSource.java
(original)
+++ commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/java/org/apache/commons/dbcp/BasicDataSource.java
Tue Dec  3 10:37:04 2013
@@ -1351,6 +1351,31 @@ public class BasicDataSource implements 
         this.restartNeeded = true;
     }
 
+    /**
+     * Gets the log writer to be used by this configuration to log
+     * information on abandoned objects.
+     */
+    public PrintWriter getAbandonedLogWriter() {
+        if (abandonedConfig != null) {
+            return abandonedConfig.getLogWriter();
+        }
+        return null;
+    }
+
+    /**
+     * Sets the log writer to be used by this configuration to log
+     * information on abandoned objects.
+     *
+     * @param logWriter The new log writer
+     */
+    public void setAbandonedLogWriter(PrintWriter logWriter) {
+        if (abandonedConfig == null) {
+            abandonedConfig = new AbandonedConfig();
+        }
+        abandonedConfig.setLogWriter(logWriter);
+    }
+
+
     // --------------------------------------------------------- Public Methods
 
     /**



Mime
View raw message