[Proxool-cvs] proxool/src/java/org/logicalcobwebs/proxool ProxoolFacade.java,1.73,1.74
UNMAINTAINED!
Brought to you by:
billhorsman
From: <bil...@us...> - 2003-10-30 00:16:16
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool In directory sc8-pr-cvs1:/tmp/cvs-serv1407/src/java/org/logicalcobwebs/proxool Modified Files: ProxoolFacade.java Log Message: Throw a friendlier exception if you try and add a statistics listener to a pool with no statistics Index: ProxoolFacade.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ProxoolFacade.java,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -d -r1.73 -r1.74 *** ProxoolFacade.java 16 Oct 2003 18:52:35 -0000 1.73 --- ProxoolFacade.java 30 Oct 2003 00:16:13 -0000 1.74 *************** *** 614,619 **** */ public static void addStatisticsListener(String alias, StatisticsListenerIF statisticsListener) throws ProxoolException { final Admin monitor = ConnectionPoolManager.getInstance().getConnectionPool(alias).getAdmin(); ! monitor.addStatisticsListener(statisticsListener); } --- 614,624 ---- */ public static void addStatisticsListener(String alias, StatisticsListenerIF statisticsListener) throws ProxoolException { + // TODO investigate what happens if we add a statistics monitor after we register a listener final Admin monitor = ConnectionPoolManager.getInstance().getConnectionPool(alias).getAdmin(); ! if (monitor != null) { ! monitor.addStatisticsListener(statisticsListener); ! } else { ! throw new ProxoolException("Statistics are switched off, your can't add a listener"); ! } } *************** *** 704,707 **** --- 709,715 ---- Revision history: $Log$ + Revision 1.74 2003/10/30 00:16:13 billhorsman + Throw a friendlier exception if you try and add a statistics listener to a pool with no statistics + Revision 1.73 2003/10/16 18:52:35 billhorsman Fixed a bug: the redefine() method was actually calling the update() method. Also, added checks to make the |