[Proxool-cvs] proxool/src/java/org/logicalcobwebs/proxool ConnectionPoolDefinition.java,1.32,1.33
UNMAINTAINED!
Brought to you by:
billhorsman
From: <bil...@us...> - 2005-05-04 16:25:10
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8593/src/java/org/logicalcobwebs/proxool Modified Files: ConnectionPoolDefinition.java Log Message: Now supports cloning. Index: ConnectionPoolDefinition.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ConnectionPoolDefinition.java,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** ConnectionPoolDefinition.java 2 Jun 2004 20:19:14 -0000 1.32 --- ConnectionPoolDefinition.java 4 May 2005 16:24:59 -0000 1.33 *************** *** 576,579 **** --- 576,624 ---- /** + * Deep clone of definition + * @return the new definition + * @throws CloneNotSupportedException + */ + protected Object clone() throws CloneNotSupportedException { + ConnectionPoolDefinition clone = new ConnectionPoolDefinition(); + + clone.setCompleteUrl(completeUrl); + clone.setDelegateProperties((Properties) delegateProperties.clone()); + clone.setCompleteInfo((Properties) completeInfo.clone()); + clone.clearChangedInfo(); + + clone.setAlias(alias); + clone.setUrl(url); + clone.setDriver(driver); + clone.setMaximumConnectionLifetime(maximumConnectionLifetime); + clone.setPrototypeCount(prototypeCount); + clone.setMinimumConnectionCount(minimumConnectionCount); + clone.setMaximumConnectionCount(maximumConnectionCount); + clone.setHouseKeepingSleepTime(houseKeepingSleepTime); + clone.setHouseKeepingTestSql(houseKeepingTestSql); + clone.setTestAfterUse(testAfterUse); + clone.setTestBeforeUse(testBeforeUse); + clone.setSimultaneousBuildThrottle(simultaneousBuildThrottle); + clone.setRecentlyStartedThreshold(recentlyStartedThreshold); + clone.setOverloadWithoutRefusalLifetime(overloadWithoutRefusalLifetime); + clone.setMaximumActiveTime(maximumActiveTime); + clone.setVerbose(verbose); + clone.setTrace(trace); + clone.setStatistics(statistics); + clone.setStatisticsLogLevel(statisticsLogLevel); + clone.setFatalSqlExceptionsAsString(fatalSqlExceptionsAsString); + try { + clone.setFatalSqlExceptionWrapper(fatalSqlExceptionWrapper); + } catch (ProxoolException e) { + throw new IllegalArgumentException("Problem cloning fatalSqlExceptionWrapper: " + fatalSqlExceptionWrapper); + } + return clone; + } + + private void clearChangedInfo() { + changedInfo.clear(); + } + + /** * Reset all properties to their default values */ *************** *** 615,618 **** --- 660,672 ---- /** + * Overwrite the complete info + * @param completeInfo the new properties + * @see #getCompleteInfo() + */ + public void setCompleteInfo(Properties completeInfo) { + this.completeInfo = completeInfo; + } + + /** * @see ConnectionPoolDefinitionIF#getUser */ *************** *** 823,826 **** --- 877,889 ---- /** + * Overwrite the delegate properties + * @param delegateProperties the new properties + * @see ConnectionPoolDefinitionIF#getProperties + */ + public void setDelegateProperties(Properties delegateProperties) { + this.delegateProperties = delegateProperties; + } + + /** * @see ConnectionPoolDefinitionIF#getUrl */ *************** *** 1298,1301 **** --- 1361,1367 ---- Revision history: $Log$ + Revision 1.33 2005/05/04 16:24:59 billhorsman + Now supports cloning. + Revision 1.32 2004/06/02 20:19:14 billhorsman Added injectable interface properties |