[Proxool-cvs] proxool/src/java/org/logicalcobwebs/proxool/admin/jmx ConnectionPoolMBean.java,1.10,1.
UNMAINTAINED!
Brought to you by:
billhorsman
From: <ch...@us...> - 2003-09-14 21:29:35
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/admin/jmx In directory sc8-pr-cvs1:/tmp/cvs-serv31550 Modified Files: ConnectionPoolMBean.java Log Message: Added support for wrap-fatal-sql-exceptions,statistics and statistics-log-level properties. Index: ConnectionPoolMBean.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/admin/jmx/ConnectionPoolMBean.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ConnectionPoolMBean.java 10 Sep 2003 22:21:04 -0000 1.10 --- ConnectionPoolMBean.java 14 Sep 2003 21:29:31 -0000 1.11 *************** *** 228,231 **** --- 228,237 ---- resultList.add (new Attribute (attributeNames[i], new Integer (this.poolDefinition.getRecentlyStartedThreshold ()))); + } else if (equalsProperty(attributeNames[i], ProxoolConstants.STATISTICS)) { + resultList.add (new Attribute (attributeNames[i], + getValueOrEmpty(this.poolDefinition.getStatistics ()))); + } else if (equalsProperty(attributeNames[i], ProxoolConstants.STATISTICS_LOG_LEVEL)) { + resultList.add (new Attribute (attributeNames[i], + getValueOrEmpty(this.poolDefinition.getStatisticsLogLevel ()))); } else if (equalsProperty(attributeNames[i], ProxoolConstants.TRACE)) { resultList.add (new Attribute (attributeNames[i], *************** *** 234,237 **** --- 240,246 ---- resultList.add (new Attribute (attributeNames[i], new Boolean (this.poolDefinition.isVerbose ()))); + } else if (equalsProperty(attributeNames[i], ProxoolConstants.WRAP_FATAL_SQL_EXCEPTIONS)) { + resultList.add (new Attribute (attributeNames[i], + new Boolean (this.poolDefinition.isWrapFatalSqlExceptions ()))); } else { final String message = "Unknown attribute: " + attributeNames[i]; *************** *** 280,283 **** --- 289,294 ---- if (notEmpty(value.toString())) { newProperties.setProperty(ProxoolConstants.DRIVER_URL_PROPERTY, value.toString()); + } else { + newProperties.remove(ProxoolConstants.DRIVER_URL_PROPERTY); } resultList.add (new Attribute (name, value)); *************** *** 286,289 **** --- 297,302 ---- if (notEmpty(value.toString())) { newProperties.setProperty(ProxoolConstants.FATAL_SQL_EXCEPTION_PROPERTY, value.toString()); + } else { + newProperties.remove(ProxoolConstants.FATAL_SQL_EXCEPTION_PROPERTY); } resultList.add (new Attribute (name, value)); *************** *** 295,298 **** --- 308,313 ---- if (notEmpty(value.toString())) { newProperties.setProperty(ProxoolConstants.HOUSE_KEEPING_TEST_SQL_PROPERTY, value.toString()); + } else { + newProperties.remove(ProxoolConstants.HOUSE_KEEPING_TEST_SQL_PROPERTY); } resultList.add (new Attribute (name, value)); *************** *** 326,329 **** --- 341,360 ---- setIntegerAttribute(name, ProxoolConstants.RECENTLY_STARTED_THRESHOLD_PROPERTY, value, ConnectionPoolDefinitionIF.DEFAULT_RECENTLY_STARTED_THRESHOLD, newProperties, resultList); + } else if (equalsProperty(name, ProxoolConstants.STATISTICS)) { + checkAssignable (name, String.class, value.getClass ()); + if (notEmpty(value.toString())) { + newProperties.setProperty(ProxoolConstants.STATISTICS_PROPERTY, value.toString()); + } else { + newProperties.remove(ProxoolConstants.STATISTICS_PROPERTY); + } + resultList.add (new Attribute (name, value)); + } else if (equalsProperty(name, ProxoolConstants.STATISTICS_LOG_LEVEL)) { + checkAssignable (name, String.class, value.getClass ()); + if (notEmpty(value.toString())) { + newProperties.setProperty(ProxoolConstants.STATISTICS_LOG_LEVEL_PROPERTY, value.toString()); + } else { + newProperties.remove(ProxoolConstants.STATISTICS_LOG_LEVEL_PROPERTY); + } + resultList.add (new Attribute (name, value)); } else if (equalsProperty(name, ProxoolConstants.TRACE)) { checkAssignable (name, Boolean.class, value.getClass ()); *************** *** 334,337 **** --- 365,372 ---- newProperties.setProperty(ProxoolConstants.VERBOSE_PROPERTY, value.toString()); resultList.add (new Attribute (name, value)); + } else if (equalsProperty(name, ProxoolConstants.WRAP_FATAL_SQL_EXCEPTIONS)) { + checkAssignable (name, Boolean.class, value.getClass ()); + newProperties.setProperty(ProxoolConstants.WRAP_FATAL_SQL_EXCEPTIONS_PROPERTY, value.toString()); + resultList.add (new Attribute (name, value)); } else { final String message = "Unknown attribute: " + name; *************** *** 398,403 **** createProxoolAttribute (ProxoolConstants.PROTOTYPE_COUNT, Integer.class), createProxoolAttribute (ProxoolConstants.RECENTLY_STARTED_THRESHOLD, Integer.class), createProxoolAttribute (ProxoolConstants.TRACE, Boolean.class), ! createProxoolAttribute (ProxoolConstants.VERBOSE, Boolean.class) }; --- 433,441 ---- createProxoolAttribute (ProxoolConstants.PROTOTYPE_COUNT, Integer.class), createProxoolAttribute (ProxoolConstants.RECENTLY_STARTED_THRESHOLD, Integer.class), + createProxoolAttribute (ProxoolConstants.STATISTICS, String.class), + createProxoolAttribute (ProxoolConstants.STATISTICS_LOG_LEVEL, String.class), createProxoolAttribute (ProxoolConstants.TRACE, Boolean.class), ! createProxoolAttribute (ProxoolConstants.VERBOSE, Boolean.class), ! createProxoolAttribute (ProxoolConstants.WRAP_FATAL_SQL_EXCEPTIONS, Boolean.class), }; *************** *** 644,647 **** --- 682,688 ---- Revision history: $Log$ + Revision 1.11 2003/09/14 21:29:31 chr32 + Added support for wrap-fatal-sql-exceptions,statistics and statistics-log-level properties. + Revision 1.10 2003/09/10 22:21:04 chr32 Removing > jdk 1.2 dependencies. |