proxool-cvs Mailing List for Proxool: Proxy JDBC Connection Pool
UNMAINTAINED!
Brought to you by:
billhorsman
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
(9) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(12) |
Feb
(17) |
Mar
(20) |
Apr
(22) |
May
(4) |
Jun
(3) |
Jul
(11) |
Aug
(23) |
Sep
(60) |
Oct
(41) |
Nov
(15) |
Dec
(29) |
2004 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(5) |
Jun
(29) |
Jul
(6) |
Aug
(1) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(8) |
Jun
|
Jul
(1) |
Aug
|
Sep
(8) |
Oct
(19) |
Nov
|
Dec
|
2006 |
Jan
(17) |
Feb
|
Mar
(5) |
Apr
(1) |
May
(2) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
2007 |
Jan
(9) |
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
(4) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
|
Oct
|
Nov
|
Dec
|
From: <bil...@us...> - 2008-08-23 10:08:00
|
Update of /cvsroot/proxool/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2572 Modified Files: build.xml CHANGES.txt Log Message: Version 0.9.1 - packaging of Cglib Index: build.xml =================================================================== RCS file: /cvsroot/proxool/proxool/build.xml,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -d -r1.79 -r1.80 *** build.xml 19 Aug 2008 19:17:11 -0000 1.79 --- build.xml 23 Aug 2008 10:08:08 -0000 1.80 *************** *** 27,31 **** <!-- Currect release, e.g. 0.6 --> ! <property name="release" value="0.9.0"/> <!-- Currect release, e.g. 0.6 --> --- 27,31 ---- <!-- Currect release, e.g. 0.6 --> ! <property name="release" value="0.9.1"/> <!-- Currect release, e.g. 0.6 --> Index: CHANGES.txt =================================================================== RCS file: /cvsroot/proxool/proxool/CHANGES.txt,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** CHANGES.txt 19 Aug 2008 19:17:11 -0000 1.49 --- CHANGES.txt 23 Aug 2008 10:08:08 -0000 1.50 *************** *** 6,9 **** --- 6,13 ---- $Author$ + 0.9.1 + + - Fixed bundling of Cglib in binary release. Cglib is "repackaged" using JarJar. + 0.9.0 |
From: <bil...@us...> - 2008-08-23 10:08:00
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2572/src/java/org/logicalcobwebs/proxool Modified Files: Version.java Log Message: Version 0.9.1 - packaging of Cglib Index: Version.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/Version.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Version.java 19 Aug 2008 19:17:11 -0000 1.22 --- Version.java 23 Aug 2008 10:08:08 -0000 1.23 *************** *** 40,44 **** private static final String BUILD_DATE = null; ! private static final String CVS = "0.9.0"; public static String getVersion() { --- 40,44 ---- private static final String BUILD_DATE = null; ! private static final String CVS = "0.9.1+"; public static String getVersion() { *************** *** 77,80 **** --- 77,83 ---- Revision history: $Log$ + Revision 1.23 2008/08/23 10:08:08 billhorsman + Version 0.9.1 - packaging of Cglib + Revision 1.22 2008/08/19 19:17:11 billhorsman Version 0.9.0 |
From: <bil...@us...> - 2008-08-19 19:17:03
|
Update of /cvsroot/proxool/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4752 Modified Files: build.xml CHANGES.txt Log Message: Version 0.9.0 Index: build.xml =================================================================== RCS file: /cvsroot/proxool/proxool/build.xml,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** build.xml 15 May 2007 23:17:21 -0000 1.78 --- build.xml 19 Aug 2008 19:17:11 -0000 1.79 *************** *** 27,31 **** <!-- Currect release, e.g. 0.6 --> ! <property name="release" value="0.9.0RC3+"/> <!-- Currect release, e.g. 0.6 --> --- 27,31 ---- <!-- Currect release, e.g. 0.6 --> ! <property name="release" value="0.9.0"/> <!-- Currect release, e.g. 0.6 --> Index: CHANGES.txt =================================================================== RCS file: /cvsroot/proxool/proxool/CHANGES.txt,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** CHANGES.txt 25 Jan 2007 23:44:15 -0000 1.48 --- CHANGES.txt 19 Aug 2008 19:17:11 -0000 1.49 *************** *** 6,9 **** --- 6,11 ---- $Author$ + 0.9.0 + - Changed the warning message when a statement is closed which isn't known to be open. This can happen if you close a statement twice and the message now suggests |
From: <bil...@us...> - 2008-08-19 19:17:03
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4752/src/java/org/logicalcobwebs/proxool Modified Files: Version.java Log Message: Version 0.9.0 Index: Version.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/Version.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** Version.java 10 Jan 2007 09:24:35 -0000 1.21 --- Version.java 19 Aug 2008 19:17:11 -0000 1.22 *************** *** 40,44 **** private static final String BUILD_DATE = null; ! private static final String CVS = "0.9.0RC3+"; public static String getVersion() { --- 40,44 ---- private static final String BUILD_DATE = null; ! private static final String CVS = "0.9.0"; public static String getVersion() { *************** *** 77,80 **** --- 77,83 ---- Revision history: $Log$ + Revision 1.22 2008/08/19 19:17:11 billhorsman + Version 0.9.0 + Revision 1.21 2007/01/10 09:24:35 billhorsman 0.9.0RC3 |
From: <bil...@us...> - 2007-12-14 23:20:39
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/admin/servlet In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4688/src/java/org/logicalcobwebs/proxool/admin/servlet Modified Files: AdminServlet.java Log Message: Change date format to yyyy-MM-dd to avoid CharConversionException in some locales. Index: AdminServlet.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/admin/servlet/AdminServlet.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** AdminServlet.java 19 Jun 2007 11:33:35 -0000 1.15 --- AdminServlet.java 14 Dec 2007 23:20:41 -0000 1.16 *************** *** 166,170 **** * dd-MMM-yyyy HH:mm:ss */ ! private static final DateFormat DATE_FORMAT = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss"); private static final DecimalFormat DECIMAL_FORMAT = new DecimalFormat("0.00"); --- 166,170 ---- * dd-MMM-yyyy HH:mm:ss */ ! private static final DateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); private static final DecimalFormat DECIMAL_FORMAT = new DecimalFormat("0.00"); *************** *** 844,847 **** --- 844,850 ---- Revision history: $Log$ + Revision 1.16 2007/12/14 23:20:41 billhorsman + Change date format to yyyy-MM-dd to avoid CharConversionException in some locales. + Revision 1.15 2007/06/19 11:33:35 billhorsman Changed time (millisecond) properties from int to long: maximumConnectionLifetime, houseKeepingSleepTime, recentlyStartedThreshold, overloadWithoutRefusalLifetime, maximumActiveTime |
From: <bil...@us...> - 2007-12-14 23:03:24
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30791/src/java/org/logicalcobwebs/proxool Modified Files: ProxoolDataSource.java Log Message: Use long consistently for maximum_active_time, not int. Index: ProxoolDataSource.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ProxoolDataSource.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ProxoolDataSource.java 14 Dec 2007 13:49:39 -0000 1.10 --- ProxoolDataSource.java 14 Dec 2007 23:03:28 -0000 1.11 *************** *** 326,330 **** * @see ConnectionPoolDefinitionIF#getMaximumActiveTime */ ! public void setMaximumActiveTime(int maximumActiveTime) { this.maximumActiveTime = maximumActiveTime; } --- 326,330 ---- * @see ConnectionPoolDefinitionIF#getMaximumActiveTime */ ! public void setMaximumActiveTime(long maximumActiveTime) { this.maximumActiveTime = maximumActiveTime; } *************** *** 564,568 **** property = reference.get(ProxoolConstants.MAXIMUM_ACTIVE_TIME_PROPERTY); if (property != null) { ! setMaximumActiveTime(Integer.valueOf(property.getContent().toString()).intValue()); } property = reference.get(ProxoolConstants.MINIMUM_CONNECTION_COUNT_PROPERTY); --- 564,568 ---- property = reference.get(ProxoolConstants.MAXIMUM_ACTIVE_TIME_PROPERTY); if (property != null) { ! setMaximumActiveTime(Long.valueOf(property.getContent().toString()).intValue()); } property = reference.get(ProxoolConstants.MINIMUM_CONNECTION_COUNT_PROPERTY); *************** *** 690,693 **** --- 690,696 ---- Revision history: $Log$ + Revision 1.11 2007/12/14 23:03:28 billhorsman + Use long consistently for maximum_active_time, not int. + Revision 1.10 2007/12/14 13:49:39 billhorsman Allow a blank string to be a valid value for a delegate property |
From: <bil...@us...> - 2007-12-14 13:49:36
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24017/src/java/org/logicalcobwebs/proxool Modified Files: ProxoolDataSource.java Log Message: Allow a blank string to be a valid value for a delegate property Index: ProxoolDataSource.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ProxoolDataSource.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ProxoolDataSource.java 19 Jun 2007 11:33:35 -0000 1.9 --- ProxoolDataSource.java 14 Dec 2007 13:49:39 -0000 1.10 *************** *** 522,529 **** while (stOuter.hasMoreTokens()) { StringTokenizer stInner = new StringTokenizer(stOuter.nextToken(), "="); ! if (stInner.countTokens() != 2) { throw new IllegalArgumentException("Unexpected delegateProperties value: '" + properties + "'. Expected 'name=value'"); } - delegateProperties.put(stInner.nextToken().trim(), stInner.nextToken().trim()); } } --- 522,533 ---- while (stOuter.hasMoreTokens()) { StringTokenizer stInner = new StringTokenizer(stOuter.nextToken(), "="); ! if (stInner.countTokens() == 1) { ! // Allow blank string to be a valid value ! delegateProperties.put(stInner.nextToken().trim(), ""); ! } else if (stInner.countTokens() == 2) { ! delegateProperties.put(stInner.nextToken().trim(), stInner.nextToken().trim()); ! } else { throw new IllegalArgumentException("Unexpected delegateProperties value: '" + properties + "'. Expected 'name=value'"); } } } *************** *** 686,689 **** --- 690,696 ---- Revision history: $Log$ + Revision 1.10 2007/12/14 13:49:39 billhorsman + Allow a blank string to be a valid value for a delegate property + Revision 1.9 2007/06/19 11:33:35 billhorsman Changed time (millisecond) properties from int to long: maximumConnectionLifetime, houseKeepingSleepTime, recentlyStartedThreshold, overloadWithoutRefusalLifetime, maximumActiveTime |
From: <bil...@us...> - 2007-07-28 10:39:49
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32426/src/java/org/logicalcobwebs/proxool Modified Files: ConnectionPoolDefinition.java Log Message: Use enumeration of property names rather than iteration of keyset so that we make use of any default properties that might be set. Index: ConnectionPoolDefinition.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ConnectionPoolDefinition.java,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** ConnectionPoolDefinition.java 19 Jun 2007 11:33:35 -0000 1.35 --- ConnectionPoolDefinition.java 28 Jul 2007 10:39:12 -0000 1.36 *************** *** 12,20 **** import java.sql.DriverManager; import java.sql.SQLException; ! import java.util.HashSet; ! import java.util.Iterator; ! import java.util.Properties; ! import java.util.Set; ! import java.util.StringTokenizer; import java.lang.reflect.Modifier; --- 12,16 ---- import java.sql.DriverManager; import java.sql.SQLException; ! import java.util.*; import java.lang.reflect.Modifier; *************** *** 232,238 **** if (info != null) { ! Iterator i = info.keySet().iterator(); ! while (i.hasNext()) { ! String key = (String) i.next(); String value = info.getProperty(key); changed = changed | setAnyProperty(key, value, pretend); --- 228,234 ---- if (info != null) { ! Enumeration e = info.propertyNames(); ! while (e.hasMoreElements()) { ! String key = (String) e.nextElement(); String value = info.getProperty(key); changed = changed | setAnyProperty(key, value, pretend); *************** *** 1369,1372 **** --- 1365,1371 ---- Revision history: $Log$ + Revision 1.36 2007/07/28 10:39:12 billhorsman + Use enumeration of property names rather than iteration of keyset so that we make use of any default properties that might be set. + Revision 1.35 2007/06/19 11:33:35 billhorsman Changed time (millisecond) properties from int to long: maximumConnectionLifetime, houseKeepingSleepTime, recentlyStartedThreshold, overloadWithoutRefusalLifetime, maximumActiveTime |
From: <bil...@us...> - 2007-06-19 11:33:37
|
Update of /cvsroot/proxool/proxool/src/java-test/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20194/src/java-test/org/logicalcobwebs/proxool Modified Files: TestHelper.java Log Message: Changed time (millisecond) properties from int to long: maximumConnectionLifetime, houseKeepingSleepTime, recentlyStartedThreshold, overloadWithoutRefusalLifetime, maximumActiveTime Index: TestHelper.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java-test/org/logicalcobwebs/proxool/TestHelper.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** TestHelper.java 18 Jan 2006 14:40:06 -0000 1.22 --- TestHelper.java 19 Jun 2007 11:33:35 -0000 1.23 *************** *** 96,99 **** --- 96,103 ---- } + private static void checkProperty(String name, long correctValue, long candidateValue) throws ProxoolException { + checkProperty(name, String.valueOf(correctValue), String.valueOf(candidateValue)); + } + /** * Build a valid Proxool URL *************** *** 141,144 **** --- 145,151 ---- Revision history: $Log$ + Revision 1.23 2007/06/19 11:33:35 billhorsman + Changed time (millisecond) properties from int to long: maximumConnectionLifetime, houseKeepingSleepTime, recentlyStartedThreshold, overloadWithoutRefusalLifetime, maximumActiveTime + Revision 1.22 2006/01/18 14:40:06 billhorsman Unbundled Jakarta's Commons Logging. |
From: <bil...@us...> - 2007-06-19 11:33:37
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/admin/servlet In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20194/src/java/org/logicalcobwebs/proxool/admin/servlet Modified Files: AdminServlet.java Log Message: Changed time (millisecond) properties from int to long: maximumConnectionLifetime, houseKeepingSleepTime, recentlyStartedThreshold, overloadWithoutRefusalLifetime, maximumActiveTime Index: AdminServlet.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/admin/servlet/AdminServlet.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** AdminServlet.java 9 Jun 2006 17:32:54 -0000 1.14 --- AdminServlet.java 19 Jun 2007 11:33:35 -0000 1.15 *************** *** 829,837 **** * @see #TIME_FORMAT */ ! private String formatMilliseconds(int time) { ! Calendar c = Calendar.getInstance(); ! c.clear(); ! c.add(Calendar.MILLISECOND, time); ! return TIME_FORMAT.format(c.getTime()); } } --- 829,841 ---- * @see #TIME_FORMAT */ ! private String formatMilliseconds(long time) { ! if (time > Integer.MAX_VALUE) { ! return time + "ms"; ! } else { ! Calendar c = Calendar.getInstance(); ! c.clear(); ! c.add(Calendar.MILLISECOND, (int) time); ! return TIME_FORMAT.format(c.getTime()); ! } } } *************** *** 840,843 **** --- 844,850 ---- Revision history: $Log$ + Revision 1.15 2007/06/19 11:33:35 billhorsman + Changed time (millisecond) properties from int to long: maximumConnectionLifetime, houseKeepingSleepTime, recentlyStartedThreshold, overloadWithoutRefusalLifetime, maximumActiveTime + Revision 1.14 2006/06/09 17:32:54 billhorsman Fix closing tag for select. Credit to Paolo Di Tommaso. |
From: <bil...@us...> - 2007-06-19 11:33:37
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/admin/jmx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20194/src/java/org/logicalcobwebs/proxool/admin/jmx Modified Files: ConnectionPoolMBean.java Log Message: Changed time (millisecond) properties from int to long: maximumConnectionLifetime, houseKeepingSleepTime, recentlyStartedThreshold, overloadWithoutRefusalLifetime, maximumActiveTime Index: ConnectionPoolMBean.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/admin/jmx/ConnectionPoolMBean.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** ConnectionPoolMBean.java 18 Jan 2006 14:39:55 -0000 1.15 --- ConnectionPoolMBean.java 19 Jun 2007 11:33:36 -0000 1.16 *************** *** 197,201 **** } else if (equalsProperty(attributeNames[i], ProxoolConstants.HOUSE_KEEPING_SLEEP_TIME)) { resultList.add(new Attribute(attributeNames[i], ! new Integer(this.poolDefinition.getHouseKeepingSleepTime()))); } else if (equalsProperty(attributeNames[i], ProxoolConstants.HOUSE_KEEPING_TEST_SQL)) { resultList.add(new Attribute(attributeNames[i], --- 197,201 ---- } else if (equalsProperty(attributeNames[i], ProxoolConstants.HOUSE_KEEPING_SLEEP_TIME)) { resultList.add(new Attribute(attributeNames[i], ! new Long(this.poolDefinition.getHouseKeepingSleepTime()))); } else if (equalsProperty(attributeNames[i], ProxoolConstants.HOUSE_KEEPING_TEST_SQL)) { resultList.add(new Attribute(attributeNames[i], *************** *** 209,213 **** } else if (equalsProperty(attributeNames[i], ProxoolConstants.MAXIMUM_ACTIVE_TIME)) { resultList.add(new Attribute(attributeNames[i], ! new Integer(this.poolDefinition.getMaximumActiveTime()))); } else if (equalsProperty(attributeNames[i], ProxoolConstants.MAXIMUM_CONNECTION_COUNT)) { resultList.add(new Attribute(attributeNames[i], --- 209,213 ---- } else if (equalsProperty(attributeNames[i], ProxoolConstants.MAXIMUM_ACTIVE_TIME)) { resultList.add(new Attribute(attributeNames[i], ! new Long(this.poolDefinition.getMaximumActiveTime()))); } else if (equalsProperty(attributeNames[i], ProxoolConstants.MAXIMUM_CONNECTION_COUNT)) { resultList.add(new Attribute(attributeNames[i], *************** *** 215,219 **** } else if (equalsProperty(attributeNames[i], ProxoolConstants.MAXIMUM_CONNECTION_LIFETIME)) { resultList.add(new Attribute(attributeNames[i], ! new Integer(this.poolDefinition.getMaximumConnectionLifetime()))); } else if (equalsProperty(attributeNames[i], ProxoolConstants.MAXIMUM_NEW_CONNECTIONS)) { resultList.add(new Attribute(attributeNames[i], --- 215,219 ---- } else if (equalsProperty(attributeNames[i], ProxoolConstants.MAXIMUM_CONNECTION_LIFETIME)) { resultList.add(new Attribute(attributeNames[i], ! new Long(this.poolDefinition.getMaximumConnectionLifetime()))); } else if (equalsProperty(attributeNames[i], ProxoolConstants.MAXIMUM_NEW_CONNECTIONS)) { resultList.add(new Attribute(attributeNames[i], *************** *** 227,231 **** } else if (equalsProperty(attributeNames[i], ProxoolConstants.OVERLOAD_WITHOUT_REFUSAL_LIFETIME)) { resultList.add(new Attribute(attributeNames[i], ! new Integer(this.poolDefinition.getOverloadWithoutRefusalLifetime()))); } else if (equalsProperty(attributeNames[i], ProxoolConstants.PROTOTYPE_COUNT)) { resultList.add(new Attribute(attributeNames[i], --- 227,231 ---- } else if (equalsProperty(attributeNames[i], ProxoolConstants.OVERLOAD_WITHOUT_REFUSAL_LIFETIME)) { resultList.add(new Attribute(attributeNames[i], ! new Long(this.poolDefinition.getOverloadWithoutRefusalLifetime()))); } else if (equalsProperty(attributeNames[i], ProxoolConstants.PROTOTYPE_COUNT)) { resultList.add(new Attribute(attributeNames[i], *************** *** 233,237 **** } else if (equalsProperty(attributeNames[i], ProxoolConstants.RECENTLY_STARTED_THRESHOLD)) { resultList.add(new Attribute(attributeNames[i], ! new Integer(this.poolDefinition.getRecentlyStartedThreshold()))); } else if (equalsProperty(attributeNames[i], ProxoolConstants.STATISTICS)) { resultList.add(new Attribute(attributeNames[i], --- 233,237 ---- } else if (equalsProperty(attributeNames[i], ProxoolConstants.RECENTLY_STARTED_THRESHOLD)) { resultList.add(new Attribute(attributeNames[i], ! new Long(this.poolDefinition.getRecentlyStartedThreshold()))); } else if (equalsProperty(attributeNames[i], ProxoolConstants.STATISTICS)) { resultList.add(new Attribute(attributeNames[i], *************** *** 722,725 **** --- 722,728 ---- Revision history: $Log$ + Revision 1.16 2007/06/19 11:33:36 billhorsman + Changed time (millisecond) properties from int to long: maximumConnectionLifetime, houseKeepingSleepTime, recentlyStartedThreshold, overloadWithoutRefusalLifetime, maximumActiveTime + Revision 1.15 2006/01/18 14:39:55 billhorsman Unbundled Jakarta's Commons Logging. |
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20194/src/java/org/logicalcobwebs/proxool Modified Files: ConnectionPoolDefinitionIF.java ProxoolDataSource.java ConnectionPoolDefinition.java Log Message: Changed time (millisecond) properties from int to long: maximumConnectionLifetime, houseKeepingSleepTime, recentlyStartedThreshold, overloadWithoutRefusalLifetime, maximumActiveTime Index: ConnectionPoolDefinitionIF.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ConnectionPoolDefinitionIF.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** ConnectionPoolDefinitionIF.java 2 Jun 2004 20:19:14 -0000 1.22 --- ConnectionPoolDefinitionIF.java 19 Jun 2007 11:33:35 -0000 1.23 *************** *** 75,79 **** /** This is the time the house keeping thread sleeps for between checks. (milliseconds) */ ! int getHouseKeepingSleepTime(); /** The maximum number of connections to the database */ --- 75,79 ---- /** This is the time the house keeping thread sleeps for between checks. (milliseconds) */ ! long getHouseKeepingSleepTime(); /** The maximum number of connections to the database */ *************** *** 81,85 **** /** The maximum amount of time that a connection exists for before it is killed (recycled). (milliseconds) */ ! int getMaximumConnectionLifetime(); /** --- 81,85 ---- /** The maximum amount of time that a connection exists for before it is killed (recycled). (milliseconds) */ ! long getMaximumConnectionLifetime(); /** *************** *** 140,144 **** differentiate between having all the connections frozen and just being really busy. */ ! int getRecentlyStartedThreshold(); /** This is the time in milliseconds after the last time that we refused a --- 140,144 ---- differentiate between having all the connections frozen and just being really busy. */ ! long getRecentlyStartedThreshold(); /** This is the time in milliseconds after the last time that we refused a *************** *** 148,157 **** Recognising an overload is easy (we refuse a connection) - it's recognising when we stop being overloaded that is hard. Hence this fudge :) */ ! int getOverloadWithoutRefusalLifetime(); /** If the housekeeper comes across a thread that has been active for longer than this then it will kill it. So make sure you set this to a number bigger than your slowest expected response! */ ! int getMaximumActiveTime(); /** --- 148,157 ---- Recognising an overload is easy (we refuse a connection) - it's recognising when we stop being overloaded that is hard. Hence this fudge :) */ ! long getOverloadWithoutRefusalLifetime(); /** If the housekeeper comes across a thread that has been active for longer than this then it will kill it. So make sure you set this to a number bigger than your slowest expected response! */ ! long getMaximumActiveTime(); /** *************** *** 349,352 **** --- 349,355 ---- Revision history: $Log$ + Revision 1.23 2007/06/19 11:33:35 billhorsman + Changed time (millisecond) properties from int to long: maximumConnectionLifetime, houseKeepingSleepTime, recentlyStartedThreshold, overloadWithoutRefusalLifetime, maximumActiveTime + Revision 1.22 2004/06/02 20:19:14 billhorsman Added injectable interface properties Index: ProxoolDataSource.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ProxoolDataSource.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ProxoolDataSource.java 15 May 2007 23:10:15 -0000 1.8 --- ProxoolDataSource.java 19 Jun 2007 11:33:35 -0000 1.9 *************** *** 47,60 **** private String driver; private String fatalSqlExceptionWrapperClass; ! private int houseKeepingSleepTime; private String houseKeepingTestSql; ! private int maximumActiveTime; private int maximumConnectionCount; ! private int maximumConnectionLifetime;; private int minimumConnectionCount; ! private int overloadWithoutRefusalLifetime; private String password; private int prototypeCount; ! private int recentlyStartedThreshold; private int simultaneousBuildThrottle; private String statistics; --- 47,60 ---- private String driver; private String fatalSqlExceptionWrapperClass; ! private long houseKeepingSleepTime; private String houseKeepingTestSql; ! private long maximumActiveTime; private int maximumConnectionCount; ! private long maximumConnectionLifetime;; private int minimumConnectionCount; ! private long overloadWithoutRefusalLifetime; private String password; private int prototypeCount; ! private long recentlyStartedThreshold; private int simultaneousBuildThrottle; private String statistics; *************** *** 207,211 **** * @see ConnectionPoolDefinitionIF#getMaximumConnectionLifetime */ ! public int getMaximumConnectionLifetime() { return maximumConnectionLifetime; } --- 207,211 ---- * @see ConnectionPoolDefinitionIF#getMaximumConnectionLifetime */ ! public long getMaximumConnectionLifetime() { return maximumConnectionLifetime; } *************** *** 263,267 **** * @see ConnectionPoolDefinitionIF#getHouseKeepingSleepTime */ ! public int getHouseKeepingSleepTime() { return houseKeepingSleepTime; } --- 263,267 ---- * @see ConnectionPoolDefinitionIF#getHouseKeepingSleepTime */ ! public long getHouseKeepingSleepTime() { return houseKeepingSleepTime; } *************** *** 291,295 **** * @see ConnectionPoolDefinitionIF#getRecentlyStartedThreshold */ ! public int getRecentlyStartedThreshold() { return recentlyStartedThreshold; } --- 291,295 ---- * @see ConnectionPoolDefinitionIF#getRecentlyStartedThreshold */ ! public long getRecentlyStartedThreshold() { return recentlyStartedThreshold; } *************** *** 305,309 **** * @see ConnectionPoolDefinitionIF#getOverloadWithoutRefusalLifetime */ ! public int getOverloadWithoutRefusalLifetime() { return overloadWithoutRefusalLifetime; } --- 305,309 ---- * @see ConnectionPoolDefinitionIF#getOverloadWithoutRefusalLifetime */ ! public long getOverloadWithoutRefusalLifetime() { return overloadWithoutRefusalLifetime; } *************** *** 319,323 **** * @see ConnectionPoolDefinitionIF#getMaximumActiveTime */ ! public int getMaximumActiveTime() { return maximumActiveTime; } --- 319,323 ---- * @see ConnectionPoolDefinitionIF#getMaximumActiveTime */ ! public long getMaximumActiveTime() { return maximumActiveTime; } *************** *** 686,689 **** --- 686,692 ---- Revision history: $Log$ + Revision 1.9 2007/06/19 11:33:35 billhorsman + Changed time (millisecond) properties from int to long: maximumConnectionLifetime, houseKeepingSleepTime, recentlyStartedThreshold, overloadWithoutRefusalLifetime, maximumActiveTime + Revision 1.8 2007/05/15 23:10:15 billhorsman We must setUser and setPassword *after* setDelegateProperties otherwise the values will be overwritten. Credit Bulent Erdemir (bug 1716955) Index: ConnectionPoolDefinition.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ConnectionPoolDefinition.java,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** ConnectionPoolDefinition.java 18 Jan 2006 14:40:01 -0000 1.34 --- ConnectionPoolDefinition.java 19 Jun 2007 11:33:35 -0000 1.35 *************** *** 72,76 **** private String driver; ! private int maximumConnectionLifetime;; private int prototypeCount; --- 72,76 ---- private String driver; ! private long maximumConnectionLifetime;; private int prototypeCount; *************** *** 80,92 **** private int maximumConnectionCount; ! private int houseKeepingSleepTime; private int simultaneousBuildThrottle; ! private int recentlyStartedThreshold; ! private int overloadWithoutRefusalLifetime; ! private int maximumActiveTime; private boolean verbose; --- 80,92 ---- private int maximumConnectionCount; ! private long houseKeepingSleepTime; private int simultaneousBuildThrottle; ! private long recentlyStartedThreshold; ! private long overloadWithoutRefusalLifetime; ! private long maximumActiveTime; private boolean verbose; *************** *** 312,319 **** } } else if (key.equals(ProxoolConstants.MAXIMUM_CONNECTION_LIFETIME_PROPERTY)) { ! if (getMaximumConnectionLifetime() != getInt(key, value)) { changed = true; if (!pretend) { ! setMaximumConnectionLifetime(getInt(key, value)); } } --- 312,319 ---- } } else if (key.equals(ProxoolConstants.MAXIMUM_CONNECTION_LIFETIME_PROPERTY)) { ! if (getMaximumConnectionLifetime() != getLong(key, value)) { changed = true; if (!pretend) { ! setMaximumConnectionLifetime(getLong(key, value)); } } *************** *** 346,367 **** } } else if (key.equals(ProxoolConstants.RECENTLY_STARTED_THRESHOLD_PROPERTY)) { ! if (getRecentlyStartedThreshold() != getInt(key, value)) { changed = true; if (!pretend) { ! setRecentlyStartedThreshold(getInt(key, value)); } } } else if (key.equals(ProxoolConstants.OVERLOAD_WITHOUT_REFUSAL_LIFETIME_PROPERTY)) { ! if (getOverloadWithoutRefusalLifetime() != getInt(key, value)) { changed = true; if (!pretend) { ! setOverloadWithoutRefusalLifetime(getInt(key, value)); } } } else if (key.equals(ProxoolConstants.MAXIMUM_ACTIVE_TIME_PROPERTY)) { ! if (getMaximumActiveTime() != getInt(key, value)) { changed = true; if (!pretend) { ! setMaximumActiveTime(getInt(key, value)); } } --- 346,367 ---- } } else if (key.equals(ProxoolConstants.RECENTLY_STARTED_THRESHOLD_PROPERTY)) { ! if (getRecentlyStartedThreshold() != getLong(key, value)) { changed = true; if (!pretend) { ! setRecentlyStartedThreshold(getLong(key, value)); } } } else if (key.equals(ProxoolConstants.OVERLOAD_WITHOUT_REFUSAL_LIFETIME_PROPERTY)) { ! if (getOverloadWithoutRefusalLifetime() != getLong(key, value)) { changed = true; if (!pretend) { ! setOverloadWithoutRefusalLifetime(getLong(key, value)); } } } else if (key.equals(ProxoolConstants.MAXIMUM_ACTIVE_TIME_PROPERTY)) { ! if (getMaximumActiveTime() != getLong(key, value)) { changed = true; if (!pretend) { ! setMaximumActiveTime(getLong(key, value)); } } *************** *** 502,509 **** boolean changed = false; if (key.equals(ProxoolConstants.HOUSE_KEEPING_SLEEP_TIME_PROPERTY)) { ! if (getHouseKeepingSleepTime() != getInt(key, value)) { changed = true; if (!pretend) { ! setHouseKeepingSleepTime(getInt(key, value)); } } --- 502,509 ---- boolean changed = false; if (key.equals(ProxoolConstants.HOUSE_KEEPING_SLEEP_TIME_PROPERTY)) { ! if (getHouseKeepingSleepTime() != getLong(key, value)) { changed = true; if (!pretend) { ! setHouseKeepingSleepTime(getLong(key, value)); } } *************** *** 561,564 **** --- 561,572 ---- } + private long getLong(String key, String value) throws ProxoolException { + try { + return Long.parseLong(value); + } catch (NumberFormatException e) { + throw new ProxoolException("'" + key + "' property must be a long. Found '" + value + "' instead."); + } + } + private static boolean isChanged(String oldValue, String newValue) { boolean changed = false; *************** *** 744,748 **** * @see ConnectionPoolDefinitionIF#getMaximumConnectionLifetime */ ! public int getMaximumConnectionLifetime() { return maximumConnectionLifetime; } --- 752,756 ---- * @see ConnectionPoolDefinitionIF#getMaximumConnectionLifetime */ ! public long getMaximumConnectionLifetime() { return maximumConnectionLifetime; } *************** *** 751,755 **** * @see ConnectionPoolDefinitionIF#getMaximumConnectionLifetime */ ! public void setMaximumConnectionLifetime(int maximumConnectionLifetime) { this.maximumConnectionLifetime = maximumConnectionLifetime; } --- 759,763 ---- * @see ConnectionPoolDefinitionIF#getMaximumConnectionLifetime */ ! public void setMaximumConnectionLifetime(long maximumConnectionLifetime) { this.maximumConnectionLifetime = maximumConnectionLifetime; } *************** *** 800,804 **** * @see ConnectionPoolDefinitionIF#getHouseKeepingSleepTime */ ! public int getHouseKeepingSleepTime() { return houseKeepingSleepTime; } --- 808,812 ---- * @see ConnectionPoolDefinitionIF#getHouseKeepingSleepTime */ ! public long getHouseKeepingSleepTime() { return houseKeepingSleepTime; } *************** *** 807,811 **** * @see ConnectionPoolDefinitionIF#getHouseKeepingSleepTime */ ! public void setHouseKeepingSleepTime(int houseKeepingSleepTime) { this.houseKeepingSleepTime = houseKeepingSleepTime; } --- 815,819 ---- * @see ConnectionPoolDefinitionIF#getHouseKeepingSleepTime */ ! public void setHouseKeepingSleepTime(long houseKeepingSleepTime) { this.houseKeepingSleepTime = houseKeepingSleepTime; } *************** *** 918,922 **** * @see ConnectionPoolDefinitionIF#getRecentlyStartedThreshold */ ! public int getRecentlyStartedThreshold() { return recentlyStartedThreshold; } --- 926,930 ---- * @see ConnectionPoolDefinitionIF#getRecentlyStartedThreshold */ ! public long getRecentlyStartedThreshold() { return recentlyStartedThreshold; } *************** *** 925,929 **** * @see ConnectionPoolDefinitionIF#getRecentlyStartedThreshold */ ! public void setRecentlyStartedThreshold(int recentlyStartedThreshold) { this.recentlyStartedThreshold = recentlyStartedThreshold; } --- 933,937 ---- * @see ConnectionPoolDefinitionIF#getRecentlyStartedThreshold */ ! public void setRecentlyStartedThreshold(long recentlyStartedThreshold) { this.recentlyStartedThreshold = recentlyStartedThreshold; } *************** *** 932,936 **** * @see ConnectionPoolDefinitionIF#getOverloadWithoutRefusalLifetime */ ! public int getOverloadWithoutRefusalLifetime() { return overloadWithoutRefusalLifetime; } --- 940,944 ---- * @see ConnectionPoolDefinitionIF#getOverloadWithoutRefusalLifetime */ ! public long getOverloadWithoutRefusalLifetime() { return overloadWithoutRefusalLifetime; } *************** *** 939,943 **** * @see ConnectionPoolDefinitionIF#getOverloadWithoutRefusalLifetime */ ! public void setOverloadWithoutRefusalLifetime(int overloadWithoutRefusalLifetime) { this.overloadWithoutRefusalLifetime = overloadWithoutRefusalLifetime; } --- 947,951 ---- * @see ConnectionPoolDefinitionIF#getOverloadWithoutRefusalLifetime */ ! public void setOverloadWithoutRefusalLifetime(long overloadWithoutRefusalLifetime) { this.overloadWithoutRefusalLifetime = overloadWithoutRefusalLifetime; } *************** *** 946,950 **** * @see ConnectionPoolDefinitionIF#getMaximumActiveTime */ ! public int getMaximumActiveTime() { return maximumActiveTime; } --- 954,958 ---- * @see ConnectionPoolDefinitionIF#getMaximumActiveTime */ ! public long getMaximumActiveTime() { return maximumActiveTime; } *************** *** 953,957 **** * @see ConnectionPoolDefinitionIF#getMaximumActiveTime */ ! public void setMaximumActiveTime(int maximumActiveTime) { this.maximumActiveTime = maximumActiveTime; } --- 961,965 ---- * @see ConnectionPoolDefinitionIF#getMaximumActiveTime */ ! public void setMaximumActiveTime(long maximumActiveTime) { this.maximumActiveTime = maximumActiveTime; } *************** *** 1361,1364 **** --- 1369,1375 ---- Revision history: $Log$ + Revision 1.35 2007/06/19 11:33:35 billhorsman + Changed time (millisecond) properties from int to long: maximumConnectionLifetime, houseKeepingSleepTime, recentlyStartedThreshold, overloadWithoutRefusalLifetime, maximumActiveTime + Revision 1.34 2006/01/18 14:40:01 billhorsman Unbundled Jakarta's Commons Logging. |
From: <bil...@us...> - 2007-05-15 23:17:24
|
Update of /cvsroot/proxool/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3424 Modified Files: build.xml Log Message: Better log message when closing a statement automatically. Index: build.xml =================================================================== RCS file: /cvsroot/proxool/proxool/build.xml,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** build.xml 10 Jan 2007 09:24:35 -0000 1.77 --- build.xml 15 May 2007 23:17:21 -0000 1.78 *************** *** 301,307 **** <zipfileset src="jarjar/cglib-nodep-2.1_3.jar"/> <rule pattern="net.sf.cglib.**" result="org.logicalcobwebs.cglib.@1"/> - <zap pattern="net.sf.cglib.transform.**"/> - <zap pattern="net.sf.cglib.beans.**"/> - <zap pattern="net.sf.cglib.util.**"/> </jarjar> </target> --- 301,304 ---- |
From: <bil...@us...> - 2007-05-15 23:17:24
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3424/src/java/org/logicalcobwebs/proxool Modified Files: ProxyConnection.java Log Message: Better log message when closing a statement automatically. Index: ProxyConnection.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ProxyConnection.java,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** ProxyConnection.java 25 Jan 2007 23:38:24 -0000 1.39 --- ProxyConnection.java 15 May 2007 23:17:21 -0000 1.40 *************** *** 225,229 **** statement.close(); if (connectionPool.getLog().isDebugEnabled()) { ! connectionPool.getLog().debug("Closing statement " + Integer.toHexString(statement.hashCode()) + " automatically"); } } --- 225,229 ---- statement.close(); if (connectionPool.getLog().isDebugEnabled()) { ! connectionPool.getLog().debug("Closing statement " + Integer.toHexString(statement.hashCode()) + " (belonging to connection " + getId() + ") automatically"); } } |
From: <bil...@us...> - 2007-05-15 23:10:19
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv631/src/java/org/logicalcobwebs/proxool Modified Files: ProxoolDataSource.java Log Message: We must setUser and setPassword *after* setDelegateProperties otherwise the values will be overwritten. Credit Bulent Erdemir (bug 1716955) Index: ProxoolDataSource.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ProxoolDataSource.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ProxoolDataSource.java 23 May 2006 21:17:55 -0000 1.7 --- ProxoolDataSource.java 15 May 2007 23:10:15 -0000 1.8 *************** *** 121,125 **** cpd.setMinimumConnectionCount(getMinimumConnectionCount()); cpd.setOverloadWithoutRefusalLifetime(getOverloadWithoutRefusalLifetime()); - cpd.setPassword(getPassword()); cpd.setPrototypeCount(getPrototypeCount()); cpd.setRecentlyStartedThreshold(getRecentlyStartedThreshold()); --- 121,124 ---- *************** *** 129,133 **** cpd.setTrace(isTrace()); cpd.setUrl(getDriverUrl()); - cpd.setUser(getUser()); cpd.setVerbose(isVerbose()); cpd.setJmx(isJmx()); --- 128,131 ---- *************** *** 136,139 **** --- 134,141 ---- cpd.setTestBeforeUse(isTestBeforeUse()); cpd.setDelegateProperties(delegateProperties); + // We must setUser and setPassword *after* setDelegateProperties + // otherwise the values will be overwritten. Credit Bulent Erdemir. + cpd.setUser(getUser()); + cpd.setPassword(getPassword()); ProxoolFacade.registerConnectionPool(cpd); } *************** *** 684,687 **** --- 686,692 ---- Revision history: $Log$ + Revision 1.8 2007/05/15 23:10:15 billhorsman + We must setUser and setPassword *after* setDelegateProperties otherwise the values will be overwritten. Credit Bulent Erdemir (bug 1716955) + Revision 1.7 2006/05/23 21:17:55 billhorsman Add in maximum-active-time. Credit to Paolo Di Tommaso. |
From: <bil...@us...> - 2007-05-15 23:00:24
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28930/src/java/org/logicalcobwebs/proxool Modified Files: ProxoolFacade.java Log Message: Made removeStateListener() static like the other removeFooListener() methods. Credit to gaz...@ho... (bug 1716868). Index: ProxoolFacade.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ProxoolFacade.java,v retrieving revision 1.86 retrieving revision 1.87 diff -C2 -d -r1.86 -r1.87 *** ProxoolFacade.java 25 Jan 2007 23:38:24 -0000 1.86 --- ProxoolFacade.java 15 May 2007 23:00:22 -0000 1.87 *************** *** 449,453 **** * @return wether the listnener was found and removed or not. */ ! public boolean removeStateListener(String alias, StateListenerIF stateListener) throws ProxoolException { ConnectionPool cp = ConnectionPoolManager.getInstance().getConnectionPool(alias); return cp.removeStateListener(stateListener); --- 449,453 ---- * @return wether the listnener was found and removed or not. */ ! public static boolean removeStateListener(String alias, StateListenerIF stateListener) throws ProxoolException { ConnectionPool cp = ConnectionPoolManager.getInstance().getConnectionPool(alias); return cp.removeStateListener(stateListener); *************** *** 855,858 **** --- 855,861 ---- Revision history: $Log$ + Revision 1.87 2007/05/15 23:00:22 billhorsman + Made removeStateListener() static like the other removeFooListener() methods. Credit to gaz...@ho... (bug 1716868). + Revision 1.86 2007/01/25 23:38:24 billhorsman Scrapped onAboutToDie and altered onDeath signature instead. Now includes reasonCode (see ConnectionListenerIF) |
From: <bil...@us...> - 2007-01-25 23:44:18
|
Update of /cvsroot/proxool/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv962 Modified Files: CHANGES.txt Log Message: Draft change log Index: CHANGES.txt =================================================================== RCS file: /cvsroot/proxool/proxool/CHANGES.txt,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** CHANGES.txt 11 Jan 2007 09:51:20 -0000 1.47 --- CHANGES.txt 25 Jan 2007 23:44:15 -0000 1.48 *************** *** 10,13 **** --- 10,18 ---- that as a cause. + - Changed the signature of the ConnectionListenerIF.onDeath() method to include a + reasonCode defining exactly why the connection is about to die. This gives you the + chance to decide whether to commit or rollback. See the onDeath() method for a list + of possible codes. + 0.9.0RC3 |
From: <bil...@us...> - 2007-01-25 23:38:27
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31111/src/java/org/logicalcobwebs/proxool Modified Files: ConnectionListenerIF.java AbstractProxyStatement.java CompositeConnectionListener.java HouseKeeper.java ConnectionPool.java ProxyConnection.java ProxoolFacade.java ProxyConnectionIF.java Log Message: Scrapped onAboutToDie and altered onDeath signature instead. Now includes reasonCode (see ConnectionListenerIF) Index: ConnectionListenerIF.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ConnectionListenerIF.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ConnectionListenerIF.java 25 Jan 2007 00:10:24 -0000 1.8 --- ConnectionListenerIF.java 25 Jan 2007 23:38:24 -0000 1.9 *************** *** 31,39 **** /** * We are killing a connection because the ! * {@link ConnectionPoolDefinitionIF#getMaximumActiveTime() maximum-active-time} * has been exceeded. ! * @see #onAboutToDie(java.sql.Connection, int) */ ! static final int LIFETIME_EXPIRED = 0; /** --- 31,86 ---- /** * We are killing a connection because the ! * {@link org.logicalcobwebs.proxool.ProxoolConstants#MAXIMUM_ACTIVE_TIME MAXIMUM_ACTIVE_TIME} * has been exceeded. ! * @see #onDeath(java.sql.Connection, int) */ ! static final int MAXIMUM_ACTIVE_TIME_EXPIRED = 1; ! ! /** ! * We are killing a connection because it's manually been expired (by something external to ! * Proxool) ! * @see #onDeath(java.sql.Connection, int) ! */ ! static final int MANUAL_EXPIRY = 2; ! ! /** ! * We are killing a connection because it has not been ! * {@link org.logicalcobwebs.proxool.ConnectionValidatorIF#validate(ConnectionPoolDefinitionIF, java.sql.Connection) validated}. ! * @see #onDeath(java.sql.Connection, int) ! */ ! static final int VALIDATION_FAIL = 3; ! ! /** ! * We are killing a connection because Proxool is shutting down ! * @see #onDeath(java.sql.Connection, int) ! */ ! static final int SHUTDOWN = 4; ! ! /** ! * We are killing a connection because it couldn't be {@link org.logicalcobwebs.proxool.ConnectionResetter#reset(java.sql.Connection, String) reset} ! * after it was returned to the pool and we don't want to give it out again in an unknown state. ! * @see #onDeath(java.sql.Connection, int) ! */ ! static final int RESET_FAIL = 5; ! ! /** ! * We are killing a connection because the routine house keeper test failed ! * @see #onDeath(java.sql.Connection, int) ! */ ! static final int HOUSE_KEEPER_TEST_FAIL = 6; ! ! /** ! * We are killing a connection because it's {@link org.logicalcobwebs.proxool.ProxoolConstants#MAXIMUM_CONNECTION_LIFETIME MAXIMUM_CONNECTION_LIFETIME} ! * has been exceeded. ! * @see #onDeath(java.sql.Connection, int) ! */ ! static final int MAXIMUM_CONNECTION_LIFETIME_EXCEEDED = 7; ! ! /** ! * We are killing a connection because a {@link org.logicalcobwebs.proxool.ProxoolConstants#FATAL_SQL_EXCEPTION FATAL_SQL_EXCEPTION} ! * has been detected. ! * @see #onDeath(java.sql.Connection, int) ! */ ! static final int FATAL_SQL_EXCEPTION_DETECTED = 8; /** *************** *** 52,58 **** * * @param connection the connection that is about to expire * @throws SQLException if anything goes wrong (which will then be logged but ignored) */ ! void onDeath(Connection connection) throws SQLException; /** --- 99,113 ---- * * @param connection the connection that is about to expire + * @param reasonCode {@link #MAXIMUM_ACTIVE_TIME_EXPIRED}, + * {@link #HOUSE_KEEPER_TEST_FAIL}, + * {@link #FATAL_SQL_EXCEPTION_DETECTED}, + * {@link #MANUAL_EXPIRY}, + * {@link #MAXIMUM_CONNECTION_LIFETIME_EXCEEDED}, + * {@link #RESET_FAIL}, + * {@link #SHUTDOWN}, or + * {@link #VALIDATION_FAIL} * @throws SQLException if anything goes wrong (which will then be logged but ignored) */ ! void onDeath(Connection connection, int reasonCode) throws SQLException; /** *************** *** 77,88 **** void onFail(String command, Exception exception); - /** - * Happens if we are deliberately killing a connection. It gets called - * just before the call to {@link #onDeath(java.sql.Connection)} - * @param connection the connection that is about to expire - * @param reason why it is being killed: {@link - * @throws SQLException if anything goes wrong (which will then be logged but ignored) - */ - void onAboutToDie(Connection connection, int reason) throws SQLException; } --- 132,135 ---- *************** *** 90,93 **** --- 137,143 ---- Revision history: $Log$ + Revision 1.9 2007/01/25 23:38:24 billhorsman + Scrapped onAboutToDie and altered onDeath signature instead. Now includes reasonCode (see ConnectionListenerIF) + Revision 1.8 2007/01/25 00:10:24 billhorsman New onAboutToDie event for ConnectionListenerIF that gets called if the maximum-active-time is exceeded. Index: AbstractProxyStatement.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/AbstractProxyStatement.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** AbstractProxyStatement.java 3 Mar 2006 09:58:26 -0000 1.22 --- AbstractProxyStatement.java 25 Jan 2007 23:38:24 -0000 1.23 *************** *** 68,72 **** try { statement.close(); ! connectionPool.throwConnection(proxyConnection, "Fatal SQL Exception has been detected"); // We should check all the existing connections as soon as possible --- 68,72 ---- try { statement.close(); ! connectionPool.throwConnection(proxyConnection, ConnectionListenerIF.FATAL_SQL_EXCEPTION_DETECTED, "Fatal SQL Exception has been detected"); // We should check all the existing connections as soon as possible *************** *** 277,280 **** --- 277,283 ---- Revision history: $Log$ + Revision 1.23 2007/01/25 23:38:24 billhorsman + Scrapped onAboutToDie and altered onDeath signature instead. Now includes reasonCode (see ConnectionListenerIF) + Revision 1.22 2006/03/03 09:58:26 billhorsman Fix for statement.getConnection(). See bug 1149834. Index: CompositeConnectionListener.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/CompositeConnectionListener.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** CompositeConnectionListener.java 25 Jan 2007 00:10:24 -0000 1.7 --- CompositeConnectionListener.java 25 Jan 2007 23:38:24 -0000 1.8 *************** *** 52,58 **** /** ! * @see ConnectionListenerIF#onDeath(Connection) */ ! public void onDeath(Connection connection) throws SQLException { Object[] listeners = getListeners(); --- 52,58 ---- /** ! * @see ConnectionListenerIF#onDeath(java.sql.Connection, int) */ ! public void onDeath(Connection connection, int reasonCode) throws SQLException { Object[] listeners = getListeners(); *************** *** 61,65 **** try { ConnectionListenerIF connectionListener = (ConnectionListenerIF) listeners[i]; ! connectionListener.onDeath(connection); } catch (RuntimeException re) { --- 61,65 ---- try { ConnectionListenerIF connectionListener = (ConnectionListenerIF) listeners[i]; ! connectionListener.onDeath(connection, reasonCode); } catch (RuntimeException re) { *************** *** 74,99 **** /** - * @see ConnectionListenerIF#onAboutToDie(java.sql.Connection, int) - */ - public void onAboutToDie(Connection connection, int reason) throws SQLException - { - Object[] listeners = getListeners(); - - for(int i=0; i<listeners.length; i++) { - try { - ConnectionListenerIF connectionListener = (ConnectionListenerIF) listeners[i]; - connectionListener.onAboutToDie(connection, reason); - } - catch (RuntimeException re) { - LOG.warn("RuntimeException received from listener "+listeners[i]+" when dispatching onAboutToDie event", re); - } - catch(SQLException se) { - LOG.warn("SQLException received from listener "+listeners[i]+" when dispatching onAboutToDie event - event dispatching cancelled"); - throw se; - } - } - } - - /** * @see ConnectionListenerIF#onExecute(String, long) */ --- 74,77 ---- *************** *** 135,138 **** --- 113,119 ---- Revision history: $Log$ + Revision 1.8 2007/01/25 23:38:24 billhorsman + Scrapped onAboutToDie and altered onDeath signature instead. Now includes reasonCode (see ConnectionListenerIF) + Revision 1.7 2007/01/25 00:10:24 billhorsman New onAboutToDie event for ConnectionListenerIF that gets called if the maximum-active-time is exceeded. Index: HouseKeeper.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/HouseKeeper.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** HouseKeeper.java 25 Jan 2007 00:10:25 -0000 1.6 --- HouseKeeper.java 25 Jan 2007 23:38:24 -0000 1.7 *************** *** 11,15 **** import java.sql.Connection; import java.sql.Statement; - import java.sql.SQLException; /** --- 11,14 ---- *************** *** 69,73 **** if (proxyConnection.isReallyClosed()) { proxyConnection.setStatus(ProxyConnectionIF.STATUS_OFFLINE, ProxyConnectionIF.STATUS_NULL); ! connectionPool.removeProxyConnection(proxyConnection, "it appears to be closed", ConnectionPool.FORCE_EXPIRY, true); } --- 68,72 ---- if (proxyConnection.isReallyClosed()) { proxyConnection.setStatus(ProxyConnectionIF.STATUS_OFFLINE, ProxyConnectionIF.STATUS_NULL); ! connectionPool.removeProxyConnection(proxyConnection, ConnectionListenerIF.HOUSE_KEEPER_TEST_FAIL, "it appears to be closed", ConnectionPool.FORCE_EXPIRY, true); } *************** *** 89,93 **** // There is a problem with this connection. Let's remove it! proxyConnection.setStatus(ProxyConnectionIF.STATUS_OFFLINE, ProxyConnectionIF.STATUS_NULL); ! connectionPool.removeProxyConnection(proxyConnection, "it has problems: " + e, ConnectionPool.REQUEST_EXPIRY, true); } finally { try { --- 88,92 ---- // There is a problem with this connection. Let's remove it! proxyConnection.setStatus(ProxyConnectionIF.STATUS_OFFLINE, ProxyConnectionIF.STATUS_NULL); ! connectionPool.removeProxyConnection(proxyConnection, ConnectionListenerIF.HOUSE_KEEPER_TEST_FAIL, "it has problems: " + e, ConnectionPool.REQUEST_EXPIRY, true); } finally { try { *************** *** 105,109 **** if (proxyConnection.setStatus(ProxyConnectionIF.STATUS_OFFLINE, ProxyConnectionIF.STATUS_NULL)) { // It is. Expire it now . ! connectionPool.expireProxyConnection(proxyConnection, reason, ConnectionPool.REQUEST_EXPIRY); } } else { --- 104,108 ---- if (proxyConnection.setStatus(ProxyConnectionIF.STATUS_OFFLINE, ProxyConnectionIF.STATUS_NULL)) { // It is. Expire it now . ! connectionPool.expireProxyConnection(proxyConnection, ConnectionListenerIF.MAXIMUM_CONNECTION_LIFETIME_EXCEEDED, reason, ConnectionPool.REQUEST_EXPIRY); } } else { *************** *** 138,147 **** // This connection has been active for way too long. We're // going to kill it :) ! try { ! connectionPool.onAboutToDie(proxyConnection.getConnection(), ConnectionListenerIF.LIFETIME_EXPIRED); ! } catch (SQLException e) { ! log.error("Problem during onAboutToDie (ignored)", e); ! } ! connectionPool.removeProxyConnection(proxyConnection, "it has been active for too long", ConnectionPool.FORCE_EXPIRY, true); String lastSqlCallMsg; --- 137,141 ---- // This connection has been active for way too long. We're // going to kill it :) ! connectionPool.removeProxyConnection(proxyConnection, ConnectionListenerIF.MAXIMUM_ACTIVE_TIME_EXPIRED, "it has been active for too long", ConnectionPool.FORCE_EXPIRY, true); String lastSqlCallMsg; *************** *** 266,269 **** --- 260,266 ---- Revision history: $Log$ + Revision 1.7 2007/01/25 23:38:24 billhorsman + Scrapped onAboutToDie and altered onDeath signature instead. Now includes reasonCode (see ConnectionListenerIF) + Revision 1.6 2007/01/25 00:10:25 billhorsman New onAboutToDie event for ConnectionListenerIF that gets called if the maximum-active-time is exceeded. Index: ConnectionPool.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ConnectionPool.java,v retrieving revision 1.85 retrieving revision 1.86 diff -C2 -d -r1.85 -r1.86 *** ConnectionPool.java 25 Jan 2007 00:10:24 -0000 1.85 --- ConnectionPool.java 25 Jan 2007 23:38:24 -0000 1.86 *************** *** 286,290 **** else { proxyConnection.setStatus(ProxyConnectionIF.STATUS_NULL); ! removeProxyConnection(proxyConnection, "it didn't pass the validation", ConnectionPool.REQUEST_EXPIRY, true); } --- 286,290 ---- else { proxyConnection.setStatus(ProxyConnectionIF.STATUS_NULL); ! removeProxyConnection(proxyConnection, ConnectionListenerIF.VALIDATION_FAIL, "it didn't pass the validation", ConnectionPool.REQUEST_EXPIRY, true); } *************** *** 343,347 **** if (proxyConnection.isMarkedForExpiry()) { if (proxyConnection.setStatus(ProxyConnectionIF.STATUS_ACTIVE, ProxyConnectionIF.STATUS_NULL)) { ! expireProxyConnection(proxyConnection, proxyConnection.getReasonForMark(), REQUEST_EXPIRY); } } else { --- 343,347 ---- if (proxyConnection.isMarkedForExpiry()) { if (proxyConnection.setStatus(ProxyConnectionIF.STATUS_ACTIVE, ProxyConnectionIF.STATUS_NULL)) { ! expireProxyConnection(proxyConnection, proxyConnection.getReasonCode(), proxyConnection.getReasonForMark(), REQUEST_EXPIRY); } } else { *************** *** 379,384 **** /** This means that there's something wrong the connection and it's probably best if no one uses it again. */ ! protected void throwConnection(ProxyConnectionIF proxyConnection, String reason) { ! expireConnectionAsSoonAsPossible(proxyConnection, reason, true); } --- 379,384 ---- /** This means that there's something wrong the connection and it's probably best if no one uses it again. */ ! protected void throwConnection(ProxyConnectionIF proxyConnection, int reasonCode, String reason) { ! expireConnectionAsSoonAsPossible(proxyConnection, reasonCode, reason, true); } *************** *** 405,409 **** * @param triggerSweep if true then this removal will trigger a prototype sweep */ ! protected void removeProxyConnection(ProxyConnectionIF proxyConnection, String reason, boolean forceExpiry, boolean triggerSweep) { // Just check that it is null if (forceExpiry || proxyConnection.isNull()) { --- 405,409 ---- * @param triggerSweep if true then this removal will trigger a prototype sweep */ ! protected void removeProxyConnection(ProxyConnectionIF proxyConnection, int reasonCode, String reason, boolean forceExpiry, boolean triggerSweep) { // Just check that it is null if (forceExpiry || proxyConnection.isNull()) { *************** *** 414,418 **** try { ! onDeath(proxyConnection.getConnection()); } catch (SQLException e) { log.error("Problem during onDeath (ignored)", e); --- 414,418 ---- try { ! onDeath(proxyConnection.getConnection(), reasonCode); } catch (SQLException e) { log.error("Problem during onDeath (ignored)", e); *************** *** 453,458 **** } ! protected void expireProxyConnection(ProxyConnectionIF proxyConnection, String reason, boolean forceExpiry) { ! removeProxyConnection(proxyConnection, reason, forceExpiry, true); } --- 453,458 ---- } ! protected void expireProxyConnection(ProxyConnectionIF proxyConnection, int reasonCode, String reason, boolean forceExpiry) { ! removeProxyConnection(proxyConnection, reasonCode, reason, forceExpiry, true); } *************** *** 543,547 **** try { connectionClosedManually = true; ! removeProxyConnection(getProxyConnection(i), "of shutdown", true, false); if (log.isDebugEnabled()) { log.debug("Connection #" + id + " closed"); --- 543,547 ---- try { connectionClosedManually = true; ! removeProxyConnection(getProxyConnection(i), ConnectionListenerIF.SHUTDOWN, "of shutdown", true, false); if (log.isDebugEnabled()) { log.debug("Connection #" + id + " closed"); *************** *** 648,652 **** } ! protected void expireAllConnections(String reason, boolean merciful) { // Do this in two stages because expiring a connection will trigger --- 648,652 ---- } ! protected void expireAllConnections(int reasonCode, String reason, boolean merciful) { // Do this in two stages because expiring a connection will trigger *************** *** 661,673 **** while (i.hasNext()) { ProxyConnectionIF pc = (ProxyConnectionIF) i.next(); ! expireConnectionAsSoonAsPossible(pc, reason, merciful); } } ! protected void expireConnectionAsSoonAsPossible(ProxyConnectionIF proxyConnection, String reason, boolean merciful) { if (proxyConnection.setStatus(ProxyConnectionIF.STATUS_AVAILABLE, ProxyConnectionIF.STATUS_OFFLINE)) { if (proxyConnection.setStatus(ProxyConnectionIF.STATUS_OFFLINE, ProxyConnectionIF.STATUS_NULL)) { // It is. Expire it now . ! expireProxyConnection(proxyConnection, reason, REQUEST_EXPIRY); } } else { --- 661,673 ---- while (i.hasNext()) { ProxyConnectionIF pc = (ProxyConnectionIF) i.next(); ! expireConnectionAsSoonAsPossible(pc, reasonCode, reason, merciful); } } ! protected void expireConnectionAsSoonAsPossible(ProxyConnectionIF proxyConnection, int reasonCode, String reason, boolean merciful) { if (proxyConnection.setStatus(ProxyConnectionIF.STATUS_AVAILABLE, ProxyConnectionIF.STATUS_OFFLINE)) { if (proxyConnection.setStatus(ProxyConnectionIF.STATUS_OFFLINE, ProxyConnectionIF.STATUS_NULL)) { // It is. Expire it now . ! expireProxyConnection(proxyConnection, reasonCode, reason, REQUEST_EXPIRY); } } else { *************** *** 686,690 **** // We have to make sure it's null first. ! expireProxyConnection(proxyConnection, reason, FORCE_EXPIRY); } --- 686,690 ---- // We have to make sure it's null first. ! expireProxyConnection(proxyConnection, reasonCode, reason, FORCE_EXPIRY); } *************** *** 785,795 **** /** Call the onDeath() method on each StateListenerIF . */ ! protected void onDeath(Connection connection) throws SQLException { ! this.compositeConnectionListener.onDeath(connection); ! } ! ! /** Call the onAboutToDie() method on each StateListenerIF . */ ! protected void onAboutToDie(Connection connection, int reason) throws SQLException { ! this.compositeConnectionListener.onAboutToDie(connection, reason); } --- 785,790 ---- /** Call the onDeath() method on each StateListenerIF . */ ! protected void onDeath(Connection connection, int reasonCode) throws SQLException { ! this.compositeConnectionListener.onDeath(connection, reasonCode); } *************** *** 879,883 **** proxyConnection.setStatus(ProxyConnectionIF.STATUS_AVAILABLE, ProxyConnectionIF.STATUS_OFFLINE); proxyConnection.setStatus(ProxyConnectionIF.STATUS_OFFLINE, ProxyConnectionIF.STATUS_NULL); ! removeProxyConnection(proxyConnection, "it was manually killed", forceExpiry, true); success = true; break; --- 874,878 ---- proxyConnection.setStatus(ProxyConnectionIF.STATUS_AVAILABLE, ProxyConnectionIF.STATUS_OFFLINE); proxyConnection.setStatus(ProxyConnectionIF.STATUS_OFFLINE, ProxyConnectionIF.STATUS_NULL); ! removeProxyConnection(proxyConnection, ConnectionListenerIF.MANUAL_EXPIRY, "it was manually killed", forceExpiry, true); success = true; break; *************** *** 913,919 **** * original state. * @param connection the one to reset */ ! protected boolean resetConnection(Connection connection, String id) { ! return connectionResetter.reset(connection, id); } --- 908,921 ---- * original state. * @param connection the one to reset + * @param id the id of the connection + * @throws SQLException if the call to {@link java.sql.Connection#isClosed()} fails + * @return true if it was successfully reset, false if there was a problem (like the connection being already closed) */ ! protected boolean resetConnection(Connection connection, String id) throws SQLException { ! if (connection.isClosed()) { ! return false; ! } else { ! return connectionResetter.reset(connection, id); ! } } *************** *** 1111,1114 **** --- 1113,1118 ---- return getPrototyper().getConnectionCount(); } + + } *************** *** 1116,1119 **** --- 1120,1126 ---- Revision history: $Log$ + Revision 1.86 2007/01/25 23:38:24 billhorsman + Scrapped onAboutToDie and altered onDeath signature instead. Now includes reasonCode (see ConnectionListenerIF) + Revision 1.85 2007/01/25 00:10:24 billhorsman New onAboutToDie event for ConnectionListenerIF that gets called if the maximum-active-time is exceeded. Index: ProxyConnection.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ProxyConnection.java,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** ProxyConnection.java 10 Jan 2007 23:47:39 -0000 1.38 --- ProxyConnection.java 25 Jan 2007 23:38:24 -0000 1.39 *************** *** 236,240 **** // slower if (!connectionPool.resetConnection(connection, "#" + getId())) { ! connectionPool.removeProxyConnection(this, "it couldn't be reset", true, true); removed = true; } --- 236,240 ---- // slower if (!connectionPool.resetConnection(connection, "#" + getId())) { ! connectionPool.removeProxyConnection(this, ConnectionListenerIF.RESET_FAIL, "it couldn't be reset", true, true); removed = true; } *************** *** 497,500 **** --- 497,504 ---- } + public int getReasonCode() { + return 0; //To change body of implemented methods use File | Settings | File Templates. + } + public void addSqlCall(String sqlCall) { this.sqlCalls.add(sqlCall); Index: ProxoolFacade.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ProxoolFacade.java,v retrieving revision 1.85 retrieving revision 1.86 diff -C2 -d -r1.85 -r1.86 *** ProxoolFacade.java 2 Nov 2006 10:00:34 -0000 1.85 --- ProxoolFacade.java 25 Jan 2007 23:38:24 -0000 1.86 *************** *** 351,355 **** */ public static void killAllConnections(String alias, String reason, boolean merciful) throws ProxoolException { ! ConnectionPoolManager.getInstance().getConnectionPool(alias).expireAllConnections(reason, merciful); } --- 351,355 ---- */ public static void killAllConnections(String alias, String reason, boolean merciful) throws ProxoolException { ! ConnectionPoolManager.getInstance().getConnectionPool(alias).expireAllConnections(ConnectionListenerIF.MANUAL_EXPIRY, reason, merciful); } *************** *** 855,858 **** --- 855,861 ---- Revision history: $Log$ + Revision 1.86 2007/01/25 23:38:24 billhorsman + Scrapped onAboutToDie and altered onDeath signature instead. Now includes reasonCode (see ConnectionListenerIF) + Revision 1.85 2006/11/02 10:00:34 billhorsman Added ProxoolFacade.disableShutdownHook. Index: ProxyConnectionIF.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ProxyConnectionIF.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ProxyConnectionIF.java 7 Oct 2005 08:18:24 -0000 1.7 --- ProxyConnectionIF.java 25 Jan 2007 23:38:24 -0000 1.8 *************** *** 132,135 **** --- 132,148 ---- String getLastSqlCall(); + /** + * Get the reason why this connection is {@link #getMark() marked} + * @return {@link org.logicalcobwebs.proxool.ConnectionListenerIF#MAXIMUM_ACTIVE_TIME_EXPIRED}, + * {@link org.logicalcobwebs.proxool.ConnectionListenerIF#HOUSE_KEEPER_TEST_FAIL}, + * {@link org.logicalcobwebs.proxool.ConnectionListenerIF#FATAL_SQL_EXCEPTION_DETECTED}, + * {@link org.logicalcobwebs.proxool.ConnectionListenerIF#MANUAL_EXPIRY}, + * {@link org.logicalcobwebs.proxool.ConnectionListenerIF#MAXIMUM_CONNECTION_LIFETIME_EXCEEDED}, + * {@link org.logicalcobwebs.proxool.ConnectionListenerIF#RESET_FAIL}, + * {@link org.logicalcobwebs.proxool.ConnectionListenerIF#SHUTDOWN}, or + * {@link org.logicalcobwebs.proxool.ConnectionListenerIF#VALIDATION_FAIL} + */ + int getReasonCode(); + } *************** *** 138,141 **** --- 151,157 ---- Revision history: $Log$ + Revision 1.8 2007/01/25 23:38:24 billhorsman + Scrapped onAboutToDie and altered onDeath signature instead. Now includes reasonCode (see ConnectionListenerIF) + Revision 1.7 2005/10/07 08:18:24 billhorsman New sqlCalls gives list of SQL calls rather than just he most recent (for when a connection makes more than one call before being returned to the pool) |
From: <bil...@us...> - 2007-01-25 23:38:27
|
Update of /cvsroot/proxool/proxool/src/java-test/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31111/src/java-test/org/logicalcobwebs/proxool Modified Files: HouseKeeperTest.java ConnectionListenerTest.java Log Message: Scrapped onAboutToDie and altered onDeath signature instead. Now includes reasonCode (see ConnectionListenerIF) Index: HouseKeeperTest.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java-test/org/logicalcobwebs/proxool/HouseKeeperTest.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** HouseKeeperTest.java 25 Jan 2007 00:10:24 -0000 1.14 --- HouseKeeperTest.java 25 Jan 2007 23:38:24 -0000 1.15 *************** *** 330,352 **** boolean called; ! public void onBirth(Connection connection) throws SQLException { ! //To change body of implemented methods use File | Settings | File Templates. ! } ! public void onDeath(Connection connection) throws SQLException { ! //To change body of implemented methods use File | Settings | File Templates. } ! public void onExecute(String command, long elapsedTime) { ! //To change body of implemented methods use File | Settings | File Templates. ! } ! public void onFail(String command, Exception exception) { ! //To change body of implemented methods use File | Settings | File Templates. ! } - public void onAboutToDie(Connection connection, int reason) throws SQLException { - called = true; - } } } --- 330,343 ---- boolean called; ! public void onBirth(Connection connection) throws SQLException {} ! public void onDeath(Connection connection, int reasonCode) throws SQLException { ! called = (reasonCode == ConnectionListenerIF.MAXIMUM_ACTIVE_TIME_EXPIRED); } ! public void onExecute(String command, long elapsedTime) {} ! public void onFail(String command, Exception exception) {} } } *************** *** 355,358 **** --- 346,352 ---- Revision history: $Log$ + Revision 1.15 2007/01/25 23:38:24 billhorsman + Scrapped onAboutToDie and altered onDeath signature instead. Now includes reasonCode (see ConnectionListenerIF) + Revision 1.14 2007/01/25 00:10:24 billhorsman New onAboutToDie event for ConnectionListenerIF that gets called if the maximum-active-time is exceeded. Index: ConnectionListenerTest.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java-test/org/logicalcobwebs/proxool/ConnectionListenerTest.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** ConnectionListenerTest.java 25 Jan 2007 00:10:24 -0000 1.16 --- ConnectionListenerTest.java 25 Jan 2007 23:38:24 -0000 1.17 *************** *** 214,218 **** } ! public void onDeath(Connection connection) throws SQLException { onDeathCalls++; } --- 214,218 ---- } ! public void onDeath(Connection connection, int reasonCode) throws SQLException { onDeathCalls++; } *************** *** 245,248 **** --- 245,251 ---- Revision history: $Log$ + Revision 1.17 2007/01/25 23:38:24 billhorsman + Scrapped onAboutToDie and altered onDeath signature instead. Now includes reasonCode (see ConnectionListenerIF) + Revision 1.16 2007/01/25 00:10:24 billhorsman New onAboutToDie event for ConnectionListenerIF that gets called if the maximum-active-time is exceeded. |
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5577/src/java/org/logicalcobwebs/proxool Modified Files: ConnectionListenerIF.java CompositeConnectionListener.java ConnectionPool.java HouseKeeper.java Log Message: New onAboutToDie event for ConnectionListenerIF that gets called if the maximum-active-time is exceeded. Index: ConnectionListenerIF.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ConnectionListenerIF.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ConnectionListenerIF.java 3 Mar 2003 11:11:57 -0000 1.7 --- ConnectionListenerIF.java 25 Jan 2007 00:10:24 -0000 1.8 *************** *** 30,33 **** --- 30,41 ---- /** + * We are killing a connection because the + * {@link ConnectionPoolDefinitionIF#getMaximumActiveTime() maximum-active-time} + * has been exceeded. + * @see #onAboutToDie(java.sql.Connection, int) + */ + static final int LIFETIME_EXPIRED = 0; + + /** * Happens everytime we create a new connection. You can use this * to allocate resources to a connection that might be useful during *************** *** 69,72 **** --- 77,88 ---- void onFail(String command, Exception exception); + /** + * Happens if we are deliberately killing a connection. It gets called + * just before the call to {@link #onDeath(java.sql.Connection)} + * @param connection the connection that is about to expire + * @param reason why it is being killed: {@link + * @throws SQLException if anything goes wrong (which will then be logged but ignored) + */ + void onAboutToDie(Connection connection, int reason) throws SQLException; } *************** *** 74,77 **** --- 90,96 ---- Revision history: $Log$ + Revision 1.8 2007/01/25 00:10:24 billhorsman + New onAboutToDie event for ConnectionListenerIF that gets called if the maximum-active-time is exceeded. + Revision 1.7 2003/03/03 11:11:57 billhorsman fixed licence Index: CompositeConnectionListener.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/CompositeConnectionListener.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CompositeConnectionListener.java 18 Jan 2006 14:40:01 -0000 1.6 --- CompositeConnectionListener.java 25 Jan 2007 00:10:24 -0000 1.7 *************** *** 6,16 **** package org.logicalcobwebs.proxool; - import java.sql.Connection; - import java.sql.SQLException; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.logicalcobwebs.proxool.util.AbstractListenerContainer; /** * A {@link ConnectionListenerIF} that keeps a list of <code>ConnectionListenerIF</code>s --- 6,16 ---- package org.logicalcobwebs.proxool; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.logicalcobwebs.proxool.util.AbstractListenerContainer; + import java.sql.Connection; + import java.sql.SQLException; + /** * A {@link ConnectionListenerIF} that keeps a list of <code>ConnectionListenerIF</code>s *************** *** 74,77 **** --- 74,99 ---- /** + * @see ConnectionListenerIF#onAboutToDie(java.sql.Connection, int) + */ + public void onAboutToDie(Connection connection, int reason) throws SQLException + { + Object[] listeners = getListeners(); + + for(int i=0; i<listeners.length; i++) { + try { + ConnectionListenerIF connectionListener = (ConnectionListenerIF) listeners[i]; + connectionListener.onAboutToDie(connection, reason); + } + catch (RuntimeException re) { + LOG.warn("RuntimeException received from listener "+listeners[i]+" when dispatching onAboutToDie event", re); + } + catch(SQLException se) { + LOG.warn("SQLException received from listener "+listeners[i]+" when dispatching onAboutToDie event - event dispatching cancelled"); + throw se; + } + } + } + + /** * @see ConnectionListenerIF#onExecute(String, long) */ *************** *** 113,116 **** --- 135,141 ---- Revision history: $Log$ + Revision 1.7 2007/01/25 00:10:24 billhorsman + New onAboutToDie event for ConnectionListenerIF that gets called if the maximum-active-time is exceeded. + Revision 1.6 2006/01/18 14:40:01 billhorsman Unbundled Jakarta's Commons Logging. Index: ConnectionPool.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ConnectionPool.java,v retrieving revision 1.84 retrieving revision 1.85 diff -C2 -d -r1.84 -r1.85 *** ConnectionPool.java 23 Mar 2006 11:44:57 -0000 1.84 --- ConnectionPool.java 25 Jan 2007 00:10:24 -0000 1.85 *************** *** 6,26 **** package org.logicalcobwebs.proxool; - import java.sql.Connection; - import java.sql.SQLException; - import java.util.Collection; - import java.util.Date; - import java.util.HashSet; - import java.util.Iterator; - import java.util.List; - import java.util.Set; - import java.util.TreeSet; - - import org.logicalcobwebs.concurrent.ReaderPreferenceReadWriteLock; - import org.logicalcobwebs.concurrent.WriterPreferenceReadWriteLock; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.logicalcobwebs.proxool.admin.Admin; import org.logicalcobwebs.proxool.util.FastArrayList; /** * This is where most things happen. (In fact, probably too many things happen in this one --- 6,20 ---- package org.logicalcobwebs.proxool; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.logicalcobwebs.concurrent.ReaderPreferenceReadWriteLock; + import org.logicalcobwebs.concurrent.WriterPreferenceReadWriteLock; import org.logicalcobwebs.proxool.admin.Admin; import org.logicalcobwebs.proxool.util.FastArrayList; + import java.sql.Connection; + import java.sql.SQLException; + import java.util.*; + /** * This is where most things happen. (In fact, probably too many things happen in this one *************** *** 795,798 **** --- 789,797 ---- } + /** Call the onAboutToDie() method on each StateListenerIF . */ + protected void onAboutToDie(Connection connection, int reason) throws SQLException { + this.compositeConnectionListener.onAboutToDie(connection, reason); + } + /** Call the onExecute() method on each StateListenerIF . */ protected void onExecute(String command, long elapsedTime, Exception exception) throws SQLException { *************** *** 1117,1120 **** --- 1116,1122 ---- Revision history: $Log$ + Revision 1.85 2007/01/25 00:10:24 billhorsman + New onAboutToDie event for ConnectionListenerIF that gets called if the maximum-active-time is exceeded. + Revision 1.84 2006/03/23 11:44:57 billhorsman More information when quickly refusing Index: HouseKeeper.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/HouseKeeper.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** HouseKeeper.java 18 Jan 2006 14:40:01 -0000 1.5 --- HouseKeeper.java 25 Jan 2007 00:10:25 -0000 1.6 *************** *** 11,14 **** --- 11,15 ---- import java.sql.Connection; import java.sql.Statement; + import java.sql.SQLException; /** *************** *** 137,140 **** --- 138,146 ---- // This connection has been active for way too long. We're // going to kill it :) + try { + connectionPool.onAboutToDie(proxyConnection.getConnection(), ConnectionListenerIF.LIFETIME_EXPIRED); + } catch (SQLException e) { + log.error("Problem during onAboutToDie (ignored)", e); + } connectionPool.removeProxyConnection(proxyConnection, "it has been active for too long", ConnectionPool.FORCE_EXPIRY, true); *************** *** 260,263 **** --- 266,272 ---- Revision history: $Log$ + Revision 1.6 2007/01/25 00:10:25 billhorsman + New onAboutToDie event for ConnectionListenerIF that gets called if the maximum-active-time is exceeded. + Revision 1.5 2006/01/18 14:40:01 billhorsman Unbundled Jakarta's Commons Logging. |
From: <bil...@us...> - 2007-01-25 00:10:26
|
Update of /cvsroot/proxool/proxool/src/java-test/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5577/src/java-test/org/logicalcobwebs/proxool Modified Files: HouseKeeperTest.java ConnectionListenerTest.java Log Message: New onAboutToDie event for ConnectionListenerIF that gets called if the maximum-active-time is exceeded. Index: HouseKeeperTest.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java-test/org/logicalcobwebs/proxool/HouseKeeperTest.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** HouseKeeperTest.java 24 Mar 2006 00:17:32 -0000 1.13 --- HouseKeeperTest.java 25 Jan 2007 00:10:24 -0000 1.14 *************** *** 54,57 **** --- 54,59 ---- ProxoolFacade.registerConnectionPool(url, info); + Listener listener = new Listener(); + ProxoolFacade.addConnectionListener(alias, listener); assertEquals("Shouldn't be any active connections yet", 0, ProxoolFacade.getSnapshot(alias, false).getServedCount()); *************** *** 76,79 **** --- 78,82 ---- long elapsed = System.currentTimeMillis() - start; assertTrue("Connection has not been closed after " + elapsed + " milliseconds as expected", connection.isClosed()); + assertTrue("onAboutToDie not called as expected", listener.called); assertEquals("Expected the connection to be inactive", 0, ProxoolFacade.getSnapshot(alias, false).getActiveConnectionCount()); *************** *** 323,326 **** --- 326,353 ---- } + class Listener implements ConnectionListenerIF { + + boolean called; + + public void onBirth(Connection connection) throws SQLException { + //To change body of implemented methods use File | Settings | File Templates. + } + + public void onDeath(Connection connection) throws SQLException { + //To change body of implemented methods use File | Settings | File Templates. + } + + public void onExecute(String command, long elapsedTime) { + //To change body of implemented methods use File | Settings | File Templates. + } + + public void onFail(String command, Exception exception) { + //To change body of implemented methods use File | Settings | File Templates. + } + + public void onAboutToDie(Connection connection, int reason) throws SQLException { + called = true; + } + } } *************** *** 328,331 **** --- 355,361 ---- Revision history: $Log$ + Revision 1.14 2007/01/25 00:10:24 billhorsman + New onAboutToDie event for ConnectionListenerIF that gets called if the maximum-active-time is exceeded. + Revision 1.13 2006/03/24 00:17:32 billhorsman Correct alias name Index: ConnectionListenerTest.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java-test/org/logicalcobwebs/proxool/ConnectionListenerTest.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** ConnectionListenerTest.java 23 Mar 2006 11:42:20 -0000 1.15 --- ConnectionListenerTest.java 25 Jan 2007 00:10:24 -0000 1.16 *************** *** 9,19 **** import org.apache.commons.logging.LogFactory; ! import java.sql.Connection; ! import java.sql.Date; ! import java.sql.DriverManager; ! import java.sql.PreparedStatement; ! import java.sql.SQLException; ! import java.sql.Statement; ! import java.util.Calendar; import java.util.Properties; --- 9,13 ---- import org.apache.commons.logging.LogFactory; ! import java.sql.*; import java.util.Properties; *************** *** 241,244 **** --- 235,242 ---- command = null; } + + public void onAboutToDie(Connection connection, int reason) throws SQLException { + // Ignore + } } } *************** *** 247,250 **** --- 245,251 ---- Revision history: $Log$ + Revision 1.16 2007/01/25 00:10:24 billhorsman + New onAboutToDie event for ConnectionListenerIF that gets called if the maximum-active-time is exceeded. + Revision 1.15 2006/03/23 11:42:20 billhorsman Create dummy table so test statements work. With HSQL 1.8 it is the prepareStatement() that throws the exception, not the execute() which means the listeners never gets the event. |
From: <bil...@us...> - 2007-01-11 09:51:22
|
Update of /cvsroot/proxool/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23834 Modified Files: CHANGES.txt Log Message: Draft changes Index: CHANGES.txt =================================================================== RCS file: /cvsroot/proxool/proxool/CHANGES.txt,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** CHANGES.txt 10 Jan 2007 09:24:35 -0000 1.46 --- CHANGES.txt 11 Jan 2007 09:51:20 -0000 1.47 *************** *** 6,9 **** --- 6,13 ---- $Author$ + - Changed the warning message when a statement is closed which isn't known to be + open. This can happen if you close a statement twice and the message now suggests + that as a cause. + 0.9.0RC3 |
From: <bil...@us...> - 2007-01-10 23:47:41
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21159/src/java/org/logicalcobwebs/proxool Modified Files: ProxyConnection.java Log Message: Improved warning message when a statement is closed twice. Index: ProxyConnection.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ProxyConnection.java,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** ProxyConnection.java 18 Jan 2006 14:40:02 -0000 1.37 --- ProxyConnection.java 10 Jan 2007 23:47:39 -0000 1.38 *************** *** 178,182 **** openStatements.remove(statement); } else { ! connectionPool.getLog().warn(connectionPool.displayStatistics() + " - #" + getId() + " registered a statement as closed which wasn't known to be open."); } } --- 178,182 ---- openStatements.remove(statement); } else { ! connectionPool.getLog().warn(connectionPool.displayStatistics() + " - #" + getId() + " registered a statement as closed which wasn't known to be open. This could happen if you close a statement twice."); } } |
From: <bil...@us...> - 2007-01-10 09:24:37
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11999/src/java/org/logicalcobwebs/proxool Modified Files: Version.java Log Message: 0.9.0RC3 Index: Version.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/Version.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Version.java 18 Jan 2006 14:40:02 -0000 1.20 --- Version.java 10 Jan 2007 09:24:35 -0000 1.21 *************** *** 40,44 **** private static final String BUILD_DATE = null; ! private static final String CVS = "0.8.9+"; public static String getVersion() { --- 40,44 ---- private static final String BUILD_DATE = null; ! private static final String CVS = "0.9.0RC3+"; public static String getVersion() { *************** *** 77,80 **** --- 77,83 ---- Revision history: $Log$ + Revision 1.21 2007/01/10 09:24:35 billhorsman + 0.9.0RC3 + Revision 1.20 2006/01/18 14:40:02 billhorsman Unbundled Jakarta's Commons Logging. |
From: <bil...@us...> - 2007-01-10 09:24:37
|
Update of /cvsroot/proxool/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11999 Modified Files: build.xml CHANGES.txt Log Message: 0.9.0RC3 Index: build.xml =================================================================== RCS file: /cvsroot/proxool/proxool/build.xml,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** build.xml 2 Nov 2006 10:01:32 -0000 1.76 --- build.xml 10 Jan 2007 09:24:35 -0000 1.77 *************** *** 27,31 **** <!-- Currect release, e.g. 0.6 --> ! <property name="release" value="0.9.0RC2+"/> <!-- Currect release, e.g. 0.6 --> --- 27,31 ---- <!-- Currect release, e.g. 0.6 --> ! <property name="release" value="0.9.0RC3+"/> <!-- Currect release, e.g. 0.6 --> *************** *** 198,202 **** depends="init,build-src,repackage-dependencies" > ! <javac srcdir="${build-dir}/src/java" destdir="${build-dir}/classes" debug="${debug}"> <classpath refid="source"/> <classpath path="build/proxool-cglib.jar"/> --- 198,202 ---- depends="init,build-src,repackage-dependencies" > ! <javac srcdir="${build-dir}/src/java" target="1.2" source="1.2" destdir="${build-dir}/classes" debug="${debug}"> <classpath refid="source"/> <classpath path="build/proxool-cglib.jar"/> Index: CHANGES.txt =================================================================== RCS file: /cvsroot/proxool/proxool/CHANGES.txt,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** CHANGES.txt 2 Nov 2006 10:01:11 -0000 1.45 --- CHANGES.txt 10 Jan 2007 09:24:35 -0000 1.46 *************** *** 9,13 **** - New naming policy for Cglib stops conflicts with other Cglib instances that are running ! (Even ones in different packages). Without using our own naming policy we end up with exceptions like: java.lang.LinkageError: duplicate class definition: --- 9,13 ---- - New naming policy for Cglib stops conflicts with other Cglib instances that are running ! (even ones in different packages). Without using our own naming policy we end up with exceptions like: java.lang.LinkageError: duplicate class definition: *************** *** 16,21 **** - Added ProxoolFacade.disableShutdownHook so that you can choose to explicitly shutdown Proxool programatically. This is useful because the order that the JVM calls shutdown ! hooks isn't easily controlled and you might want to shutdown Proxool *after* you've ! done some cleaning up yourself. - Fixed bug in ProxoolDataSource to add in maximum-active-time. Credit to Paolo Di Tommaso. --- 16,21 ---- - Added ProxoolFacade.disableShutdownHook so that you can choose to explicitly shutdown Proxool programatically. This is useful because the order that the JVM calls shutdown ! hooks isn't easily controlled and you might want to shutdown Proxool *after* you've ! done some cleaning up yourself. Suggested by Alex Lemaire. - Fixed bug in ProxoolDataSource to add in maximum-active-time. Credit to Paolo Di Tommaso. |