proxool-cvs Mailing List for Proxool: Proxy JDBC Connection Pool (Page 4)
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...> - 2005-09-26 21:47:55
|
Update of /cvsroot/proxool/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1469 Modified Files: build.xml proxool-ant.properties Log Message: no message Index: build.xml =================================================================== RCS file: /cvsroot/proxool/proxool/build.xml,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -d -r1.71 -r1.72 *** build.xml 26 May 2004 23:06:45 -0000 1.71 --- build.xml 26 Sep 2005 21:47:46 -0000 1.72 *************** *** 27,31 **** <!-- Currect release, e.g. 0.6 --> ! <property name="release" value="0.8.3"/> <!-- Currect release, e.g. 0.6 --> --- 27,31 ---- <!-- Currect release, e.g. 0.6 --> ! <property name="release" value="0.8.9b5"/> <!-- Currect release, e.g. 0.6 --> Index: proxool-ant.properties =================================================================== RCS file: /cvsroot/proxool/proxool/proxool-ant.properties,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** proxool-ant.properties 10 Sep 2003 22:12:19 -0000 1.11 --- proxool-ant.properties 26 Sep 2005 21:47:46 -0000 1.12 *************** *** 43,44 **** --- 43,45 ---- # default: org.logicalcobwebs.proxool.GlobalTest + version=0.8.9 \ No newline at end of file |
From: <bil...@us...> - 2005-09-26 21:47:55
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1469/src/java/org/logicalcobwebs/proxool Modified Files: Version.java Log Message: no message Index: Version.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/Version.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Version.java 13 Dec 2003 12:21:54 -0000 1.18 --- Version.java 26 Sep 2005 21:47:46 -0000 1.19 *************** *** 40,44 **** private static final String BUILD_DATE = null; ! private static final String CVS = "0.8.3+"; public static String getVersion() { --- 40,44 ---- private static final String BUILD_DATE = null; ! private static final String CVS = "0.8.9+"; public static String getVersion() { *************** *** 77,80 **** --- 77,83 ---- Revision history: $Log$ + Revision 1.19 2005/09/26 21:47:46 billhorsman + no message + Revision 1.18 2003/12/13 12:21:54 billhorsman Release 0.8.3 |
From: <bil...@us...> - 2005-09-26 13:31:24
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/admin/servlet In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6431/src/java/org/logicalcobwebs/proxool/admin/servlet Modified Files: AdminServlet.java Log Message: Smartened up AdminServlet Index: AdminServlet.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/admin/servlet/AdminServlet.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** AdminServlet.java 29 Sep 2003 17:49:19 -0000 1.8 --- AdminServlet.java 26 Sep 2005 13:31:14 -0000 1.9 *************** *** 8,19 **** import org.logicalcobwebs.logging.Log; import org.logicalcobwebs.logging.LogFactory; ! import org.logicalcobwebs.proxool.ConnectionInfoIF; ! import org.logicalcobwebs.proxool.ConnectionPoolDefinitionIF; ! import org.logicalcobwebs.proxool.ProxoolException; ! import org.logicalcobwebs.proxool.ProxoolFacade; ! import org.logicalcobwebs.proxool.Version; import org.logicalcobwebs.proxool.admin.SnapshotIF; import org.logicalcobwebs.proxool.admin.StatisticsIF; import javax.servlet.ServletException; import javax.servlet.ServletOutputStream; --- 8,16 ---- import org.logicalcobwebs.logging.Log; import org.logicalcobwebs.logging.LogFactory; ! import org.logicalcobwebs.proxool.*; import org.logicalcobwebs.proxool.admin.SnapshotIF; import org.logicalcobwebs.proxool.admin.StatisticsIF; + import javax.servlet.ServletConfig; import javax.servlet.ServletException; import javax.servlet.ServletOutputStream; *************** *** 25,31 **** import java.text.DecimalFormat; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Iterator; ! import java.util.Calendar; /** --- 22,29 ---- import java.text.DecimalFormat; import java.text.SimpleDateFormat; + import java.util.Calendar; import java.util.Date; import java.util.Iterator; ! import java.util.Properties; /** *************** *** 38,41 **** --- 36,47 ---- * <servlet-name>Admin</servlet-name> * <servlet-class>org.logicalcobwebs.proxool.admin.servlet.AdminServlet</servlet-class> + * <init-param> + * <param-name>output</param-name> + * <param-value>full|simple</param-value> + * </init-param> + * <init-param> + * <param-name>cssFile</param-name> + * <param-value>/my_path/my.css</param-value> + * </init-param> * </servlet> * *************** *** 55,67 **** private static final Log LOG = LogFactory.getLog(AdminServlet.class); ! protected static final String ACTION_LIST = "list"; ! private static final String ACTION_STATS = "stats"; ! protected static final String ACTION_CHART = "chart"; protected static final String TYPE = "type"; protected static final String TYPE_CONNECTIONS = "1"; protected static final String TYPE_ACTIVITY_LEVEL = "2"; ! private static final String STYLE_CAPTION = "text-align: right; color: #333333;"; ! private static final String STYLE_DATA = "background: white;"; ! private static final String STYLE_NO_DATA = "color: #666666;"; /** --- 61,105 ---- private static final Log LOG = LogFactory.getLog(AdminServlet.class); ! private static final String[] STATUS_CLASSES = {"null", "available", "active", "offline"}; ! protected static final String TYPE = "type"; protected static final String TYPE_CONNECTIONS = "1"; protected static final String TYPE_ACTIVITY_LEVEL = "2"; ! ! public static final String OUTPUT_FULL = "full"; ! ! public static final String OUTPUT_SIMPLE = "simple"; ! ! private String output; ! ! private String cssFile; ! private static final String STATISTIC = "statistic"; ! private static final String CORE_PROPERTY = "core-property"; ! private static final String STANDARD_PROPERTY = "standard-property"; ! private static final String DELEGATED_PROPERTY = "delegated-property"; ! private static final String SNAPSHOT = "snapshot"; ! ! public void init(ServletConfig servletConfig) throws ServletException { ! super.init(servletConfig); ! ! // Get output parameter. Default to OUTPUT_FULL. ! output = servletConfig.getInitParameter("output"); ! if (output != null) { ! if (output.equalsIgnoreCase(OUTPUT_FULL)) { ! output = OUTPUT_FULL; ! } else if (output.equalsIgnoreCase(OUTPUT_SIMPLE)) { ! output = OUTPUT_SIMPLE; ! } else { ! LOG.warn("Unrecognised output parameter for " + this.getClass().getName() + ". Expected: " + OUTPUT_FULL + " or " + OUTPUT_SIMPLE); ! output = null; ! } ! } ! if (output == null) { ! output = OUTPUT_FULL; ! } ! ! cssFile = servletConfig.getInitParameter("cssFile"); ! ! } /** *************** *** 74,81 **** private static final DecimalFormat DECIMAL_FORMAT = new DecimalFormat("0.00"); ! private static final String LEVEL = "level"; ! private static final String LEVEL_MORE = "more"; ! private static final String LEVEL_LESS = "less"; ! private static final String ACTION = "action"; private static final String ALIAS = "alias"; private static final String CONNECTION_ID = "id"; --- 112,122 ---- private static final DecimalFormat DECIMAL_FORMAT = new DecimalFormat("0.00"); ! private static final String DETAIL = "detail"; ! private static final String DETAIL_MORE = "more"; ! private static final String DETAIL_LESS = "less"; ! private static final String TAB = "tab"; ! private static final String TAB_DEFINITION = "definition"; ! private static final String TAB_SNAPSHOT = "snapshot"; ! private static final String TAB_STATISTICS = "statistics"; private static final String ALIAS = "alias"; private static final String CONNECTION_ID = "id"; *************** *** 90,171 **** String link = request.getRequestURI(); - // Check the action, and default to stats - String action = request.getParameter(ACTION); - if (action == null) { - action = ACTION_STATS; - } - String level = request.getParameter(LEVEL); - String connectionId = request.getParameter(CONNECTION_ID); - // Check the alias and if not defined and there is only one ! // then use that. Otherwise show the list. String alias = request.getParameter(ALIAS); String[] aliases = ProxoolFacade.getAliases(); if (alias == null) { ! if (aliases.length == 1) { alias = aliases[0]; - } else { - action = ACTION_LIST; } } ! ! // Check we can find the pool. If not, show the list ! if (alias != null) { try { ! ProxoolFacade.getConnectionPoolDefinition(alias); } catch (ProxoolException e) { ! action = ACTION_LIST; } } - openHtml(response.getOutputStream()); try { ! if (action.equals(ACTION_LIST)) { ! response.setContentType("text/html"); ! doList(response.getOutputStream(), alias, link, level); ! } else if (action.equals(ACTION_STATS)) { response.setContentType("text/html"); ! doStats(response.getOutputStream(), alias, link, level, connectionId); ! } else { ! LOG.error("Unrecognised action '" + action + "'"); } } catch (ProxoolException e) { ! LOG.error("Problem", e); } - response.getOutputStream().println("<div style=\"text-align: right; width: 550px; color: #333333;\">Proxool " + Version.getVersion() + "</div>"); - closeHtml(response.getOutputStream()); } ! private void doStats(ServletOutputStream out, String alias, String link, String level, String connectionId) throws ProxoolException, IOException { ! doList(out, alias, link, level); ! doDefinition(out, alias, link); ! doSnapshot(out, alias, link, level, connectionId); ! doStatistics(out, alias, link); } ! private void doStatistics(ServletOutputStream out, String alias, String link) throws ProxoolException, IOException { ! StatisticsIF[] statisticsArray = ProxoolFacade.getStatistics(alias); ! ConnectionPoolDefinitionIF cpd = ProxoolFacade.getConnectionPoolDefinition(alias); for (int i = 0; i < statisticsArray.length; i++) { StatisticsIF statistics = statisticsArray[i]; - out.print("<b>Statistics</b> from "); - out.print(TIME_FORMAT.format(statistics.getStartDate())); - out.print(" to "); - out.print(TIME_FORMAT.format(statistics.getStopDate())); ! openTable(out); // Served ! printDefinitionEntry(out, "Served", statistics.getServedCount() + " (" + DECIMAL_FORMAT.format(statistics.getServedPerSecond()) + "/s)"); // Refused ! printDefinitionEntry(out, "Refused", statistics.getRefusedCount() + " (" + DECIMAL_FORMAT.format(statistics.getRefusedPerSecond()) + "/s)"); // averageActiveTime ! printDefinitionEntry(out, "Average active time", DECIMAL_FORMAT.format(statistics.getAverageActiveTime() / 1000) + "s"); // activityLevel --- 131,241 ---- String link = request.getRequestURI(); // Check the alias and if not defined and there is only one ! // then use that. String alias = request.getParameter(ALIAS); + // Check we can find the pool. + ConnectionPoolDefinitionIF def = null; + if (alias != null) { + try { + def = ProxoolFacade.getConnectionPoolDefinition(alias); + } catch (ProxoolException e) { + alias = null; + } + } String[] aliases = ProxoolFacade.getAliases(); if (alias == null) { ! if (aliases.length > 0) { alias = aliases[0]; } } ! if (def == null && alias != null) { try { ! def = ProxoolFacade.getConnectionPoolDefinition(alias); } catch (ProxoolException e) { ! throw new ServletException("Couldn't find pool with alias " + alias); } } + String tab = request.getParameter(TAB); + if (tab == null) { + tab = TAB_DEFINITION; + } + + // If we are showing the snapshot, are we showing it in detail or not? + String snapshotDetail = request.getParameter(DETAIL); + + // If we are showing the snapshot, are we drilling down into a connection? + String snapshotConnectionId = request.getParameter(CONNECTION_ID); + try { ! if (output.equals(OUTPUT_FULL)) { response.setContentType("text/html"); ! openHtml(response.getOutputStream()); ! } ! response.getOutputStream().println("<div class=\"version\">Proxool " + Version.getVersion() + "</div>"); ! doList(response.getOutputStream(), alias, tab, link); ! // Skip everything if there aren't any pools ! if (aliases != null && aliases.length > 0) { ! StatisticsIF[] statisticsArray = ProxoolFacade.getStatistics(alias); ! final boolean statisticsAvailable = (statisticsArray != null && statisticsArray.length > 0); ! final boolean statisticsComingSoon = def.getStatistics() != null; ! // We can't be on the statistics tab if there are no statistics ! if (!statisticsComingSoon && tab.equals(TAB_STATISTICS)) { ! tab = TAB_DEFINITION; ! } ! doTabs(response.getOutputStream(), alias, link, tab, statisticsAvailable, statisticsComingSoon); ! if (tab.equals(TAB_DEFINITION)) { ! doDefinition(response.getOutputStream(), def); ! } else if (tab.equals(TAB_SNAPSHOT)) { ! doSnapshot(response.getOutputStream(), alias, link, snapshotDetail, snapshotConnectionId); ! } else if (tab.equals(TAB_STATISTICS)){ ! doStatistics(response.getOutputStream(), statisticsArray, def); ! } else { ! throw new ServletException("Unrecognised tab '" + tab + "'"); ! } } } catch (ProxoolException e) { ! throw new ServletException("Problem serving Proxool Admin", e); ! } ! ! if (output.equals(OUTPUT_FULL)) { ! closeHtml(response.getOutputStream()); } } ! private void doTabs(ServletOutputStream out, String alias, String link, String tab, boolean statisticsAvailable, boolean statisticsComingSoon) throws IOException { ! out.println("<ul>"); ! out.println("<li class=\"" + (tab.equals(TAB_DEFINITION) ? "active" : "inactive") + "\"><a class=\"quiet\" href=\"" + link + "?alias=" + alias + "&tab=" + TAB_DEFINITION + "\">Definition</a></li>"); ! out.println("<li class=\"" + (tab.equals(TAB_SNAPSHOT) ? "active" : "inactive") + "\"><a class=\"quiet\" href=\"" + link + "?alias=" + alias + "&tab=" + TAB_SNAPSHOT + "\">Snapshot</a></li>"); ! if (statisticsAvailable) { ! out.println("<li class=\"" + (tab.equals(TAB_STATISTICS) ? "active" : "inactive") + "\"><a class=\"quiet\" href=\"" + link + "?alias=" + alias + "&tab=" + TAB_STATISTICS + "\">Statistics</a></li>"); ! } else if (statisticsComingSoon) { ! out.println("<li class=\"disabled\">Statistics</li>"); ! } ! out.println("</ul>"); } ! ! private void doStatistics(ServletOutputStream out, StatisticsIF[] statisticsArray, ConnectionPoolDefinitionIF cpd) throws IOException { for (int i = 0; i < statisticsArray.length; i++) { StatisticsIF statistics = statisticsArray[i]; ! openDataTable(out); ! ! // Period ! printDefinitionEntry(out, "Period", TIME_FORMAT.format(statistics.getStartDate()) + " to " + TIME_FORMAT.format(statistics.getStopDate()), STATISTIC); // Served ! printDefinitionEntry(out, "Served", statistics.getServedCount() + " (" + DECIMAL_FORMAT.format(statistics.getServedPerSecond()) + "/s)", STATISTIC); // Refused ! printDefinitionEntry(out, "Refused", statistics.getRefusedCount() + " (" + DECIMAL_FORMAT.format(statistics.getRefusedPerSecond()) + "/s)", STATISTIC); // averageActiveTime ! printDefinitionEntry(out, "Average active time", DECIMAL_FORMAT.format(statistics.getAverageActiveTime() / 1000) + "s", STATISTIC); // activityLevel *************** *** 177,181 **** int[] lengths = {activityLevel, 100 - activityLevel}; drawBarChart(activityLevelBuffer, colours, lengths); ! printDefinitionEntry(out, "Activity level", activityLevelBuffer.toString()); closeTable(out); --- 247,251 ---- int[] lengths = {activityLevel, 100 - activityLevel}; drawBarChart(activityLevelBuffer, colours, lengths); ! printDefinitionEntry(out, "Activity level", activityLevelBuffer.toString(), STATISTIC); closeTable(out); *************** *** 197,201 **** int length = lengths[j]; if (length > 0) { ! out.append("<td bgcolor=\"#"); out.append(colour); out.append("\" width=\""); --- 267,271 ---- int length = lengths[j]; if (length > 0) { ! out.append("<td style=\"background-color: #"); out.append(colour); out.append("\" width=\""); *************** *** 207,240 **** } ! private void doDefinition(ServletOutputStream out, String alias, String link) throws ProxoolException, IOException { ! ConnectionPoolDefinitionIF cpd = ProxoolFacade.getConnectionPoolDefinition(alias); ! ! out.print("<b>Defintition</b> for "); ! out.println(alias); ! openTable(out); ! ! // url ! printDefinitionEntry(out, "URL", cpd.getUrl()); ! ! // driver ! printDefinitionEntry(out, "Driver", cpd.getDriver()); ! ! // minimumConnectionCount and maximumConnectionCount ! printDefinitionEntry(out, "Connections", cpd.getMinimumConnectionCount() + " (min), " + cpd.getMaximumConnectionCount() + " (max)"); ! ! // prototypeCount ! printDefinitionEntry(out, "Prototyping", cpd.getPrototypeCount() > 0 ? String.valueOf(cpd.getPrototypeCount()) : null); ! ! // maximumConnectionLifetime ! // printDefinitionEntry(out, "Connection Lifetime", TIME_FORMAT.format(new Date(cpd.getMaximumConnectionLifetime() - DATE_OFFSET))); ! printDefinitionEntry(out, "Connection Lifetime", formatMilliseconds(cpd.getMaximumConnectionLifetime())); ! ! // maximumActiveTime ! // printDefinitionEntry(out, "Maximum active time", TIME_FORMAT.format(new Date(cpd.getMaximumActiveTime() - DATE_OFFSET))); ! printDefinitionEntry(out, "Maximum active time", formatMilliseconds(cpd.getMaximumActiveTime())); ! printDefinitionEntry(out, "House keeping sleep time", (cpd.getHouseKeepingSleepTime() / 1000) + "s"); ! // houseKeepingTestSql ! printDefinitionEntry(out, "House keeping test SQL", cpd.getHouseKeepingTestSql()); // fatalSqlExceptions --- 277,302 ---- } ! private void doDefinition(ServletOutputStream out, ConnectionPoolDefinitionIF cpd) throws IOException { ! openDataTable(out); ! printDefinitionEntry(out, ProxoolConstants.ALIAS, cpd.getAlias(), CORE_PROPERTY); ! printDefinitionEntry(out, ProxoolConstants.DRIVER_URL, cpd.getUrl(), CORE_PROPERTY); ! printDefinitionEntry(out, ProxoolConstants.DRIVER_CLASS, cpd.getDriver(), CORE_PROPERTY); ! printDefinitionEntry(out, ProxoolConstants.MINIMUM_CONNECTION_COUNT, String.valueOf(cpd.getMinimumConnectionCount()), STANDARD_PROPERTY); ! printDefinitionEntry(out, ProxoolConstants.MAXIMUM_CONNECTION_COUNT, String.valueOf(cpd.getMaximumConnectionCount()), STANDARD_PROPERTY); ! printDefinitionEntry(out, ProxoolConstants.PROTOTYPE_COUNT, cpd.getPrototypeCount() > 0 ? String.valueOf(cpd.getPrototypeCount()) : null, STANDARD_PROPERTY); ! printDefinitionEntry(out, ProxoolConstants.SIMULTANEOUS_BUILD_THROTTLE, String.valueOf(cpd.getSimultaneousBuildThrottle()), STANDARD_PROPERTY); ! printDefinitionEntry(out, ProxoolConstants.MAXIMUM_CONNECTION_LIFETIME, formatMilliseconds(cpd.getMaximumConnectionLifetime()), STANDARD_PROPERTY); ! printDefinitionEntry(out, ProxoolConstants.MAXIMUM_ACTIVE_TIME, formatMilliseconds(cpd.getMaximumActiveTime()), STANDARD_PROPERTY); ! printDefinitionEntry(out, ProxoolConstants.HOUSE_KEEPING_SLEEP_TIME, (cpd.getHouseKeepingSleepTime() / 1000) + "s", STANDARD_PROPERTY); ! printDefinitionEntry(out, ProxoolConstants.HOUSE_KEEPING_TEST_SQL, cpd.getHouseKeepingTestSql(), STANDARD_PROPERTY); ! printDefinitionEntry(out, ProxoolConstants.TEST_BEFORE_USE, String.valueOf(cpd.isTestBeforeUse()), STANDARD_PROPERTY); ! printDefinitionEntry(out, ProxoolConstants.TEST_AFTER_USE, String.valueOf(cpd.isTestAfterUse()), STANDARD_PROPERTY); ! printDefinitionEntry(out, ProxoolConstants.RECENTLY_STARTED_THRESHOLD, formatMilliseconds(cpd.getRecentlyStartedThreshold()), STANDARD_PROPERTY); ! printDefinitionEntry(out, ProxoolConstants.OVERLOAD_WITHOUT_REFUSAL_LIFETIME, formatMilliseconds(cpd.getOverloadWithoutRefusalLifetime()), STANDARD_PROPERTY); ! printDefinitionEntry(out, ProxoolConstants.INJECTABLE_CONNECTION_INTERFACE_NAME, String.valueOf(cpd.getInjectableConnectionInterface()), STANDARD_PROPERTY); ! printDefinitionEntry(out, ProxoolConstants.INJECTABLE_STATEMENT_INTERFACE_NAME, String.valueOf(cpd.getInjectableStatementInterface()), STANDARD_PROPERTY); ! printDefinitionEntry(out, ProxoolConstants.INJECTABLE_CALLABLE_STATEMENT_INTERFACE_NAME, String.valueOf(cpd.getInjectableCallableStatementInterface()), STANDARD_PROPERTY); ! printDefinitionEntry(out, ProxoolConstants.INJECTABLE_PREPARED_STATEMENT_INTERFACE_NAME, String.valueOf(cpd.getInjectablePreparedStatementInterface()), STANDARD_PROPERTY); // fatalSqlExceptions *************** *** 250,258 **** fatalSqlExceptions = fatalSqlExceptionsBuffer.toString(); } ! printDefinitionEntry(out, "Fatal SQL exceptions", fatalSqlExceptions); ! printDefinitionEntry(out, "Wrapper", cpd.getFatalSqlExceptionWrapper()); ! ! // statistics ! printDefinitionEntry(out, "Statistics", cpd.getStatistics()); closeTable(out); --- 312,331 ---- fatalSqlExceptions = fatalSqlExceptionsBuffer.toString(); } ! printDefinitionEntry(out, ProxoolConstants.FATAL_SQL_EXCEPTION, fatalSqlExceptions, STANDARD_PROPERTY); ! printDefinitionEntry(out, ProxoolConstants.FATAL_SQL_EXCEPTION_WRAPPER_CLASS, cpd.getFatalSqlExceptionWrapper(), STANDARD_PROPERTY); ! printDefinitionEntry(out, ProxoolConstants.STATISTICS, cpd.getStatistics(), STANDARD_PROPERTY); ! printDefinitionEntry(out, ProxoolConstants.STATISTICS_LOG_LEVEL, cpd.getStatisticsLogLevel(), STANDARD_PROPERTY); ! printDefinitionEntry(out, ProxoolConstants.VERBOSE, String.valueOf(cpd.isVerbose()), STANDARD_PROPERTY); ! printDefinitionEntry(out, ProxoolConstants.TRACE, String.valueOf(cpd.isTrace()), STANDARD_PROPERTY); ! Properties p = cpd.getDelegateProperties(); ! Iterator i = p.keySet().iterator(); ! while (i.hasNext()) { ! String name = (String) i.next(); ! String value = p.getProperty(name); ! if (name.toLowerCase().indexOf("password") > -1 || name.toLowerCase().indexOf("passwd") > -1) { ! value = "******"; ! } ! printDefinitionEntry(out, name + " (delegated)", value, DELEGATED_PROPERTY); ! } closeTable(out); *************** *** 261,275 **** private void doSnapshot(ServletOutputStream out, String alias, String link, String level, String connectionId) throws IOException, ProxoolException { ! boolean detail = (level != null && level.equals(LEVEL_MORE)); SnapshotIF snapshot = ProxoolFacade.getSnapshot(alias, detail); if (snapshot != null) { ! out.print("<b>Snapshot</b> at "); ! out.println(TIME_FORMAT.format(snapshot.getSnapshotDate())); ! openTable(out); // dateStarted ! printDefinitionEntry(out, "Start date", DATE_FORMAT.format(snapshot.getDateStarted())); // connections --- 334,349 ---- private void doSnapshot(ServletOutputStream out, String alias, String link, String level, String connectionId) throws IOException, ProxoolException { ! boolean detail = (level != null && level.equals(DETAIL_MORE)); SnapshotIF snapshot = ProxoolFacade.getSnapshot(alias, detail); if (snapshot != null) { ! openDataTable(out); // dateStarted ! printDefinitionEntry(out, "Start date", DATE_FORMAT.format(snapshot.getDateStarted()), SNAPSHOT); ! ! // snapshot date ! printDefinitionEntry(out, "Snapshot", TIME_FORMAT.format(snapshot.getSnapshotDate()), SNAPSHOT); // connections *************** *** 289,321 **** snapshot.getMaximumConnectionCount() - snapshot.getActiveConnectionCount() - snapshot.getAvailableConnectionCount()}; drawBarChart(connectionsBuffer, colours, lengths); ! printDefinitionEntry(out, "Connections", connectionsBuffer.toString()); // servedCount ! printDefinitionEntry(out, "Served", String.valueOf(snapshot.getServedCount())); // refusedCount ! printDefinitionEntry(out, "Refused", String.valueOf(snapshot.getRefusedCount())); if (!detail) { out.println(" <tr>"); ! out.print("<td colspan=\"2\" align=\"right\"><a href=\""); ! out.print(link); ! out.print("?"); ! out.print(ALIAS); ! out.print("="); ! out.print(alias); ! out.print("&"); ! out.print(LEVEL); ! out.print("="); ! out.print(LEVEL_MORE); ! out.println("\">more information</a></td>"); out.println(" </tr>"); } else { out.println(" <tr>"); ! out.print(" <td width=\"200\" valign=\"top\" style=\"" + STYLE_CAPTION + "\">"); ! out.print("Details"); ! out.println("</td>"); ! out.print(" <td style=\"" + STYLE_NO_DATA + "\">"); doSnapshotDetails(out, alias, snapshot, link, connectionId); --- 363,390 ---- snapshot.getMaximumConnectionCount() - snapshot.getActiveConnectionCount() - snapshot.getAvailableConnectionCount()}; drawBarChart(connectionsBuffer, colours, lengths); ! printDefinitionEntry(out, "Connections", connectionsBuffer.toString(), SNAPSHOT); // servedCount ! printDefinitionEntry(out, "Served", String.valueOf(snapshot.getServedCount()), SNAPSHOT); // refusedCount ! printDefinitionEntry(out, "Refused", String.valueOf(snapshot.getRefusedCount()), SNAPSHOT); if (!detail) { out.println(" <tr>"); ! out.print(" <td colspan=\"2\" align=\"right\"><form action=\"" + link + "\" method=\"GET\">"); ! out.print("<input type=\"hidden\" name=\"" + ALIAS + "\" value=\"" + alias + "\">"); ! out.print("<input type=\"hidden\" name=\"" + TAB + "\" value=\"" + TAB_SNAPSHOT + "\">"); ! out.print("<input type=\"hidden\" name=\"" + DETAIL + "\" value=\"" + DETAIL_MORE + "\">"); ! out.print("<input type=\"submit\" value=\"More information>\">"); ! out.println("</form></td>"); out.println(" </tr>"); } else { out.println(" <tr>"); ! out.print(" <th width=\"200\" valign=\"top\">"); ! out.print("Details:<br>(click ID to drill down)"); ! out.println("</th>"); ! out.print(" <td>"); doSnapshotDetails(out, alias, snapshot, link, connectionId); *************** *** 324,328 **** out.println(" </tr>"); ! long drillDownConnectionId = 0; if (connectionId != null) { drillDownConnectionId = Long.valueOf(connectionId).longValue(); --- 393,397 ---- out.println(" </tr>"); ! long drillDownConnectionId; if (connectionId != null) { drillDownConnectionId = Long.valueOf(connectionId).longValue(); *************** *** 330,339 **** if (drillDownConnection != null) { out.println(" <tr>"); ! out.print(" <td width=\"200\" valign=\"top\" style=\"" + STYLE_CAPTION + "\">"); out.print("Connection #" + connectionId); out.println("</td>"); ! out.print(" <td style=\"" + STYLE_NO_DATA + "\">"); ! doDrillDownConnection(out, drillDownConnection, link); out.println("</td>"); --- 399,408 ---- if (drillDownConnection != null) { out.println(" <tr>"); ! out.print(" <th valign=\"top\">"); out.print("Connection #" + connectionId); out.println("</td>"); ! out.print(" <td>"); ! doDrillDownConnection(out, drillDownConnection); out.println("</td>"); *************** *** 343,357 **** out.println(" <tr>"); ! out.print("<td colspan=\"2\" align=\"right\"><a href=\""); ! out.print(link); ! out.print("?"); ! out.print(ALIAS); ! out.print("="); ! out.print(alias); ! out.print("&"); ! out.print(LEVEL); ! out.print("="); ! out.print(LEVEL_LESS); ! out.println("\">less information</a></td>"); out.println(" </tr>"); } --- 412,421 ---- out.println(" <tr>"); ! out.print(" <td colspan=\"2\" align=\"right\"><form action=\"" + link + "\" method=\"GET\">"); ! out.print("<input type=\"hidden\" name=\"" + ALIAS + "\" value=\"" + alias + "\">"); ! out.print("<input type=\"hidden\" name=\"" + TAB + "\" value=\"" + TAB_SNAPSHOT + "\">"); ! out.print("<input type=\"hidden\" name=\"" + DETAIL + "\" value=\"" + DETAIL_LESS + "\">"); ! out.print("<input type=\"submit\" value=\"< Less information\">"); ! out.println("</form></td>"); out.println(" </tr>"); } *************** *** 369,381 **** if (snapshot.getConnectionInfos() != null && snapshot.getConnectionInfos().length > 0) { ! out.println("<table cellpadding=\"2\" border=\"0\">"); out.println(" <tbody>"); out.print("<tr>"); ! out.print("<td style=\"font-size: 90%\">#</td>"); ! out.print("<td style=\"font-size: 90%\" align=\"center\">born</td>"); ! out.print("<td style=\"font-size: 90%\" align=\"center\">last<br>start</td>"); ! out.print("<td style=\"font-size: 90%\" align=\"center\">lap<br>(ms)</td>"); ! out.print("<td style=\"font-size: 90%\" width=\"90%\"> thread</td>"); out.print("</tr>"); --- 433,445 ---- if (snapshot.getConnectionInfos() != null && snapshot.getConnectionInfos().length > 0) { ! out.println("<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\">"); out.println(" <tbody>"); out.print("<tr>"); ! out.print("<td>#</td>"); ! out.print("<td align=\"center\">born</td>"); ! out.print("<td align=\"center\">last<br>start</td>"); ! out.print("<td align=\"center\">lap<br>(ms)</td>"); ! out.print("<td> thread</td>"); out.print("</tr>"); *************** *** 389,393 **** // drillDownConnectionId ! out.print("<td bgcolor=\"#"); if (connectionInfo.getStatus() == ConnectionInfoIF.STATUS_ACTIVE) { out.print("ffcccc"); --- 453,457 ---- // drillDownConnectionId ! out.print("<td style=\"background-color: #"); if (connectionInfo.getStatus() == ConnectionInfoIF.STATUS_ACTIVE) { out.print("ffcccc"); *************** *** 412,418 **** out.print(alias); out.print("&"); ! out.print(LEVEL); out.print("="); ! out.print(LEVEL_MORE); out.print("&"); out.print(CONNECTION_ID); --- 476,486 ---- out.print(alias); out.print("&"); ! out.print(TAB); out.print("="); ! out.print(TAB_SNAPSHOT); ! out.print("&"); ! out.print(DETAIL); ! out.print("="); ! out.print(DETAIL_MORE); out.print("&"); out.print(CONNECTION_ID); *************** *** 436,449 **** // active ! out.print("<td align=\"right\">"); if (connectionInfo.getTimeLastStopActive() > 0) { ! out.print((int) (connectionInfo.getTimeLastStopActive() - connectionInfo.getTimeLastStartActive())); } else if (connectionInfo.getTimeLastStartActive() > 0) { ! out.print("<font color=\"red\">"); ! out.print((int) (snapshot.getSnapshotDate().getTime() - connectionInfo.getTimeLastStartActive())); ! out.print("</font>"); ! } else { ! out.print(" "); } out.print(" </td>"); --- 504,517 ---- // active ! out.print("<td align=\"right\" class=\""); ! out.print(getStatusClass(connectionInfo)); ! out.print("\">"); ! String active = " "; if (connectionInfo.getTimeLastStopActive() > 0) { ! active = String.valueOf((int) (connectionInfo.getTimeLastStopActive() - connectionInfo.getTimeLastStartActive())); } else if (connectionInfo.getTimeLastStartActive() > 0) { ! active = String.valueOf((int) (snapshot.getSnapshotDate().getTime() - connectionInfo.getTimeLastStartActive())); } + out.print(active); out.print(" </td>"); *************** *** 464,471 **** } ! private void doDrillDownConnection(ServletOutputStream out, ConnectionInfoIF drillDownConnection, String link) throws IOException { // proxy ! out.print("<div style=\"font-size: 90%\">"); out.print("proxy = "); out.print(drillDownConnection.getProxyHashcode()); --- 532,556 ---- } ! private static String getStatusClass(ConnectionInfoIF info) { ! try { ! return STATUS_CLASSES[info.getStatus()]; ! } catch (ArrayIndexOutOfBoundsException e) { ! LOG.warn("Unknown status: " + info.getStatus()); ! return "unknown-" + info.getStatus(); ! } ! } ! ! private void doDrillDownConnection(ServletOutputStream out, ConnectionInfoIF drillDownConnection) throws IOException { // proxy ! if (drillDownConnection.getLastSqlCall() != null) { ! out.print("<div class=\"drill-down\">"); ! out.print("sql = "); ! out.print(drillDownConnection.getLastSqlCall()); ! out.print("</div>"); ! } ! ! // proxy ! out.print("<div class=\"drill-down\">"); out.print("proxy = "); out.print(drillDownConnection.getProxyHashcode()); *************** *** 473,477 **** // delegate ! out.print("<div style=\"font-size: 90%\">"); out.print("delegate = "); out.print(drillDownConnection.getDelegateHashcode()); --- 558,562 ---- // delegate ! out.print("<div class=\"drill-down\">"); out.print("delegate = "); out.print(drillDownConnection.getDelegateHashcode()); *************** *** 479,483 **** // url ! out.print("<div style=\"font-size: 90%\">"); out.print("url = "); out.print(drillDownConnection.getDelegateUrl()); --- 564,568 ---- // url ! out.print("<div class=\"drill-down\">"); out.print("url = "); out.print(drillDownConnection.getDelegateUrl()); *************** *** 487,491 **** private void openHtml(ServletOutputStream out) throws IOException { ! out.println("<html><header><title>Proxool Admin</title></header><body BGCOLOR=\"#eeeeee\">"); } --- 572,601 ---- private void openHtml(ServletOutputStream out) throws IOException { ! out.println("<html><header><title>Proxool Admin</title>"); ! if (cssFile != null) { ! out.println("<script type=\"text/css\" src=\"" + cssFile + "\"></script>"); ! } else { ! out.println("<style>"); ! out.println("body {background-color: #93bde6;}\n" + ! "div.version {font-weight: bold; font-size: 100%; margin-bottom: 8px;}\n" + ! "h1 {font-weight: bold; font-size: 100%}\n" + ! "table.data {font-size: 90%; border-collapse: collapsed; border: 1px solid black;}\n" + ! "table.data th {background: #bddeff; width: 200px; text-align: left; padding-right: 8px; font-weight: normal;}\n" + ! "table.data td {background: #ffffff; vertical-align: top;}\n" + ! "td.null {background: yellow;}\n" + ! "td.available {font-color: black;}\n" + ! "td.active {font-color: red;}\n" + ! "td.offline {font-color: blue;}\n" + ! "div.drill-down {}\n" + ! "ul {list-style: none; padding: 0px; margin: 0px; position: relative;}\n" + ! "li {padding: 0px; margin: 0px 4px 0px 0px; display: inline; border: 1px solid black; border-width: 1px 1px 0px 1px;}\n" + ! "li.active {background: #bddeff;}\n" + ! "li.inactive {background: #eeeeee;}\n" + ! "li.disabled {background: #dddddd; color: #999999; padding: 0px 4px 0px 4px;}\n" + ! "a.quiet {color: black; text-decoration: none; padding: 0px 4px 0px 4px; }\n" + ! "a.quiet:hover {background: white;}\n"); ! out.println("</style>"); ! } ! out.println("</header><body>"); } *************** *** 494,499 **** } ! private void openTable(ServletOutputStream out) throws IOException { ! out.println("<table width=\"550\" cellpadding=\"2\" cellspacing=\"2\" border=\"0\" bgcolor=\"#EEEEEE\" style=\"border: 1px solid black\">"); out.println(" <tbody>"); } --- 604,609 ---- } ! private void openDataTable(ServletOutputStream out) throws IOException { ! out.println("<table cellpadding=\"2\" cellspacing=\"0\" border=\"1\" class=\"data\">"); out.println(" <tbody>"); } *************** *** 506,519 **** ! private void printDefinitionEntry(ServletOutputStream out, String name, String value) throws IOException { out.println(" <tr>"); ! out.print(" <td width=\"200\" valign=\"top\" style=\"" + STYLE_CAPTION + "\">"); out.print(name); ! out.println("</td>"); ! if (value != null) { ! out.print(" <td style=\"" + STYLE_DATA + "\">"); out.print(value); } else { ! out.print(" <td style=\"" + STYLE_NO_DATA + "\">off"); } out.print("</td>"); --- 616,629 ---- ! private void printDefinitionEntry(ServletOutputStream out, String name, String value, String type) throws IOException { out.println(" <tr>"); ! out.print(" <th valign=\"top\">"); out.print(name); ! out.println(":</th>"); ! out.print(" <td class=\"" + type + "\"nowrap>"); ! if (value != null && !value.equals("null")) { out.print(value); } else { ! out.print("-"); } out.print("</td>"); *************** *** 521,553 **** } ! private void doList(ServletOutputStream out, String alias, String link, String level) throws IOException, ProxoolException { ! ! out.print("<b>Pools</b>"); ! openTable(out); String[] aliases = ProxoolFacade.getAliases(); - for (int i = 0; i < aliases.length; i++) { - String a = aliases[i]; - String style = ""; - if (a.equals(alias)) { - style = "background: white;"; - } - ConnectionPoolDefinitionIF cpd = ProxoolFacade.getConnectionPoolDefinition(a); - out.println(" <tr style=\"" + style + "\">"); ! out.print(" <td width=\"200\" style=\"" + STYLE_CAPTION + "\">"); ! out.print(a.equals(alias) ? ">" : " "); ! out.println("</td>"); ! ! out.print(" <td><a href=\"" + link + "?" + ALIAS + "=" + a + "&" + LEVEL + "=" + level + "\">"); ! out.print(a); ! out.println("</a> -> "); ! out.print(cpd.getUrl()); ! out.println("</td>"); ! out.println(" </tr>"); } - - closeTable(out); - } --- 631,659 ---- } ! private void doList(ServletOutputStream out, String alias, String tab, String link) throws IOException { String[] aliases = ProxoolFacade.getAliases(); ! if (aliases.length == 0) { ! out.println("<p>No pools have been registered.</p>"); ! } else if (aliases.length == 1) { ! // Don't bother listing. Just show it. ! } else { ! out.println("<form action=\"" + link + "\" method=\"GET\" name=\"alias\">"); ! out.println("<select name=\"alias\" size=\"" + Math.min(aliases.length, 5) + "\""); ! for (int i = 0; i < aliases.length; i++) { ! out.print(" <option value=\""); ! out.print(aliases[i]); ! out.print("\""); ! out.print(aliases[i].equals(alias) ? " selected" : ""); ! out.print(">"); ! out.print(aliases[i]); ! out.println("</option>"); ! } ! out.println("</select>"); ! out.println("<input name=\"" + TAB + "\" value=\"" + tab + "\" type=\"hidden\">"); ! out.println("<input value=\"Show\" type=\"submit\">"); ! out.println("</form>"); } } *************** *** 570,573 **** --- 676,682 ---- Revision history: $Log$ + Revision 1.9 2005/09/26 13:31:14 billhorsman + Smartened up AdminServlet + Revision 1.8 2003/09/29 17:49:19 billhorsman Includes new fatal-sql-exception-wrapper-class in display |
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11741/src/java/org/logicalcobwebs/proxool Modified Files: AbstractProxyStatement.java ConnectionInfo.java ConnectionInfoIF.java ProxyConnection.java ProxyConnectionIF.java Log Message: Added lastSqlCall when trace is on. Index: AbstractProxyStatement.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/AbstractProxyStatement.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** AbstractProxyStatement.java 2 Jun 2004 20:04:54 -0000 1.18 --- AbstractProxyStatement.java 26 Sep 2005 10:01:31 -0000 1.19 *************** *** 183,186 **** --- 183,187 ---- // Send to any listener connectionPool.onExecute(sqlLog.toString(), (System.currentTimeMillis() - startTime), exception); + ((ProxyConnection) proxyConnection).setLastSqlCall(sqlLog.toString()); } *************** *** 266,269 **** --- 267,273 ---- Revision history: $Log$ + Revision 1.19 2005/09/26 10:01:31 billhorsman + Added lastSqlCall when trace is on. + Revision 1.18 2004/06/02 20:04:54 billhorsman Fixed sql log: boolean and date now supported, and last parameter is included Index: ConnectionInfo.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ConnectionInfo.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ConnectionInfo.java 30 Oct 2003 00:05:50 -0000 1.6 --- ConnectionInfo.java 26 Sep 2005 10:01:31 -0000 1.7 *************** *** 43,46 **** --- 43,47 ---- private String delegateHashcode; + private String lastSqlCall; public Date getBirthDate() { *************** *** 153,156 **** --- 154,165 ---- return new Long(((ConnectionInfoIF) o).getId()).compareTo(new Long(getId())); } + + public String getLastSqlCall() { + return lastSqlCall; + } + + public void setLastSqlCall(String lastSqlCall) { + this.lastSqlCall = lastSqlCall; + } } *************** *** 159,162 **** --- 168,174 ---- Revision history: $Log$ + Revision 1.7 2005/09/26 10:01:31 billhorsman + Added lastSqlCall when trace is on. + Revision 1.6 2003/10/30 00:05:50 billhorsman now implements Comparable (using ID) Index: ConnectionInfoIF.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ConnectionInfoIF.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ConnectionInfoIF.java 30 Oct 2003 00:05:50 -0000 1.10 --- ConnectionInfoIF.java 26 Sep 2005 10:01:31 -0000 1.11 *************** *** 147,150 **** --- 147,157 ---- String getDelegateUrl(); + /** + * A log of the last SQL used on this connection. Only populated + * if {@link org.logicalcobwebs.proxool.ConnectionPoolDefinitionIF#isTrace()} + * is enabled. + * @return the most recent SQL to be used + */ + String getLastSqlCall(); } *************** *** 152,155 **** --- 159,165 ---- Revision history: $Log$ + Revision 1.11 2005/09/26 10:01:31 billhorsman + Added lastSqlCall when trace is on. + Revision 1.10 2003/10/30 00:05:50 billhorsman now implements Comparable (using ID) Index: ProxyConnection.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ProxyConnection.java,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** ProxyConnection.java 4 May 2005 16:24:13 -0000 1.34 --- ProxyConnection.java 26 Sep 2005 10:01:31 -0000 1.35 *************** *** 62,65 **** --- 62,66 ---- private DecimalFormat idFormat = new DecimalFormat("0000"); + private String lastSqlCall; /** * Whether we have invoked a method that requires us to reset *************** *** 468,470 **** --- 469,478 ---- } + public String getLastSqlCall() { + return lastSqlCall; + } + + public void setLastSqlCall(String lastSqlCall) { + this.lastSqlCall = lastSqlCall; + } } Index: ProxyConnectionIF.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ProxyConnectionIF.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ProxyConnectionIF.java 4 May 2005 16:24:13 -0000 1.5 --- ProxyConnectionIF.java 26 Sep 2005 10:01:31 -0000 1.6 *************** *** 125,128 **** --- 125,129 ---- ConnectionPoolDefinitionIF getDefinition(); + } *************** *** 131,134 **** --- 132,138 ---- Revision history: $Log$ + Revision 1.6 2005/09/26 10:01:31 billhorsman + Added lastSqlCall when trace is on. + Revision 1.5 2005/05/04 16:24:13 billhorsman include a reference to the definition so we can spot it changing. |
From: <bil...@us...> - 2005-09-26 09:59:32
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11135/src/java/org/logicalcobwebs/proxool Modified Files: ProxyFactory.java Log Message: Explicitly use the ProxyFactory class loader when using Cglib's Enhancer to avoid class loading issues. Index: ProxyFactory.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ProxyFactory.java,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** ProxyFactory.java 4 May 2005 16:31:41 -0000 1.30 --- ProxyFactory.java 26 Sep 2005 09:59:22 -0000 1.31 *************** *** 8,11 **** --- 8,12 ---- import org.logicalcobwebs.cglib.proxy.Enhancer; import org.logicalcobwebs.cglib.proxy.Factory; + import org.logicalcobwebs.cglib.proxy.Callback; import org.logicalcobwebs.logging.Log; import org.logicalcobwebs.logging.LogFactory; *************** *** 45,66 **** */ protected static Connection getWrappedConnection(ProxyConnection proxyConnection) { ! final WrappedConnection wrappedConnection = new WrappedConnection(proxyConnection); ! /* ! Object delegate = Proxy.newProxyInstance( ! proxyConnection.getConnection().getClass().getClassLoader(), ! getInterfaces(proxyConnection.getConnection().getClass(), proxyConnection.getConnectionPool()), ! wrappedConnection); ! */ ! /* ! Object delegate = Enhancer.create( ! proxyConnection.getConnection().getClass(), ! getInterfaces(proxyConnection.getConnection().getClass(), proxyConnection.getConnectionPool()), ! wrappedConnection); ! */ ! Object delegate = Enhancer.create( ! null, ! getInterfaces(proxyConnection.getConnection().getClass(), proxyConnection.getDefinition()), ! wrappedConnection); ! return (Connection) delegate; } --- 46,80 ---- */ protected static Connection getWrappedConnection(ProxyConnection proxyConnection) { ! return (Connection) getProxy(proxyConnection.getConnection(), new WrappedConnection(proxyConnection), proxyConnection.getDefinition()); ! } ! ! /** ! * Proxies a statement inside a {@link ProxyStatement}. ! * @param delegate the real statement ! * @param connectionPool the pool it belongs to ! * @param proxyConnection the connection it was built from ! * @param sqlStatement Can be null? ! * @return the proxied statement ! */ ! protected static Statement getStatement(Statement delegate, ConnectionPool connectionPool, ProxyConnectionIF proxyConnection, String sqlStatement) { ! return (Statement) getProxy(delegate, new ProxyStatement(delegate, connectionPool, proxyConnection, sqlStatement), proxyConnection.getDefinition()); ! } ! ! /** ! * Create a new DatabaseMetaData from a connection ! * @param databaseMetaData the meta data we use to delegate all calls to (except getConnection()) ! * @param wrappedConnection the connection we return if asked for the connection ! * @return databaseMetaData ! */ ! protected static DatabaseMetaData getDatabaseMetaData(DatabaseMetaData databaseMetaData, Connection wrappedConnection) { ! return (DatabaseMetaData) getProxy(databaseMetaData, new ProxyDatabaseMetaData(databaseMetaData, wrappedConnection), null); ! } ! ! private static Object getProxy(Object delegate, Callback callback, ConnectionPoolDefinitionIF def) { ! Enhancer e = new Enhancer(); ! e.setInterfaces(getInterfaces(delegate.getClass(), def)); ! e.setCallback(callback); ! e.setClassLoader(ProxyFactory.class.getClassLoader()); ! return e.create(); } *************** *** 74,80 **** protected static Statement getDelegateStatement(Statement statement) { Statement ds = statement; - /* - ProxyStatement ps = (ProxyStatement) Proxy.getInvocationHandler(statement); - */ ProxyStatement ps = (ProxyStatement) ((Factory)statement).getCallback(0); ds = ps.getDelegateStatement(); --- 88,91 ---- *************** *** 90,120 **** */ protected static Connection getDelegateConnection(Connection connection) { - /* - WrappedConnection wc = (WrappedConnection) Proxy.getInvocationHandler(connection); - */ WrappedConnection wc = (WrappedConnection) ((Factory)connection).getCallback(0); return wc.getProxyConnection().getConnection(); } - protected static Statement getStatement(Statement delegate, ConnectionPool connectionPool, ProxyConnectionIF proxyConnection, String sqlStatement) { - Object o = Enhancer.create( - null, - getInterfaces(delegate.getClass(), proxyConnection.getDefinition()), - new ProxyStatement(delegate, connectionPool, proxyConnection, sqlStatement)); - /* - Object o = Enhancer.create( - delegate.getClass(), - getInterfaces(delegate.getClass(), connectionPool), - new ProxyStatement(delegate, connectionPool, proxyConnection, sqlStatement)); - */ - return (Statement) o; - /* - return (Statement) Proxy.newProxyInstance( - delegate.getClass().getClassLoader(), - getInterfaces(delegate.getClass(), connectionPool), - new ProxyStatement(delegate, connectionPool, proxyConnection, sqlStatement)); - */ - } - /** * Get all the interfaces that a class implements. Drills down into super interfaces too --- 101,108 ---- *************** *** 244,274 **** /** - * Create a new DatabaseMetaData from a connection - * @param databaseMetaData the meta data we use to delegate all calls to (except getConnection()) - * @param wrappedConnection the connection we return if asked for the connection - * @return databaseMetaData - */ - protected static DatabaseMetaData getDatabaseMetaData(DatabaseMetaData databaseMetaData, Connection wrappedConnection) { - /* - return (DatabaseMetaData) Proxy.newProxyInstance( - DatabaseMetaData.class.getClassLoader(), - new Class[]{DatabaseMetaData.class}, - new ProxyDatabaseMetaData(connection, wrappedConnection) - ); - */ - ProxyDatabaseMetaData proxyDatabaseMetaData = new ProxyDatabaseMetaData(databaseMetaData, wrappedConnection); - Object delegate = Enhancer.create( - null, - getInterfaces(databaseMetaData.getClass(), null), - proxyDatabaseMetaData); - /* - Object delegate = Enhancer.create( - databaseMetaData.getClass(), - proxyDatabaseMetaData); - */ - return (DatabaseMetaData) delegate; - } - - /** * Get the WrappedConnection behind this proxy connection. * @param connection the connection that was served --- 232,235 ---- *************** *** 276,282 **** */ public static WrappedConnection getWrappedConnection(Connection connection) { - /* - return (WrappedConnection) Proxy.getInvocationHandler(connection); - */ return (WrappedConnection) ((Factory)connection).getCallback(0); } --- 237,240 ---- *************** *** 287,290 **** --- 245,251 ---- Revision history: $Log$ + Revision 1.31 2005/09/26 09:59:22 billhorsman + Explicitly use the ProxyFactory class loader when using Cglib's Enhancer to avoid class loading issues. + Revision 1.30 2005/05/04 16:31:41 billhorsman Use the definition referenced by the proxy connection rather than the pool instead. |
From: <bil...@us...> - 2005-09-26 09:54:22
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10278/src/java/org/logicalcobwebs/proxool Modified Files: ConnectionPool.java ProxoolFacade.java Log Message: Avoid suspected deadlock when getting a detailed snapshot. Only attempt to get the concurrent lock for 10 seconds before giving up. Index: ConnectionPool.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ConnectionPool.java,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -d -r1.79 -r1.80 *** ConnectionPool.java 4 May 2005 16:26:31 -0000 1.79 --- ConnectionPool.java 26 Sep 2005 09:54:14 -0000 1.80 *************** *** 850,853 **** --- 850,854 ---- ci.setProxyHashcode(connectionInfo.getProxyHashcode()); ci.setDelegateHashcode(connectionInfo.getDelegateHashcode()); + ci.setLastSqlCall(connectionInfo.getLastSqlCall()); cis.add(ci); } *************** *** 1085,1091 **** protected void acquireConnectionStatusReadLock() { try { - // LOG.debug("About to acquire connectionStatus read lock"); connectionStatusReadWriteLock.readLock().acquire(); - // LOG.debug("Acquired connectionStatus read lock"); } catch (InterruptedException e) { log.error("Couldn't acquire connectionStatus read lock", e); --- 1086,1090 ---- *************** *** 1093,1096 **** --- 1092,1104 ---- } + protected boolean attemptConnectionStatusReadLock(long msecs) { + try { + return connectionStatusReadWriteLock.readLock().attempt(msecs); + } catch (InterruptedException e) { + log.error("Couldn't acquire connectionStatus read lock", e); + return false; + } + } + protected void releaseConnectionStatusReadLock() { connectionStatusReadWriteLock.readLock().release(); *************** *** 1106,1109 **** --- 1114,1120 ---- Revision history: $Log$ + Revision 1.80 2005/09/26 09:54:14 billhorsman + Avoid suspected deadlock when getting a detailed snapshot. Only attempt to get the concurrent lock for 10 seconds before giving up. + Revision 1.79 2005/05/04 16:26:31 billhorsman Only add a new connection if the definition matches Index: ProxoolFacade.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ProxoolFacade.java,v retrieving revision 1.82 retrieving revision 1.83 diff -C2 -d -r1.82 -r1.83 *** ProxoolFacade.java 4 May 2005 16:32:31 -0000 1.82 --- ProxoolFacade.java 26 Sep 2005 09:54:14 -0000 1.83 *************** *** 695,706 **** if (detail) { try { ! cp.acquireConnectionStatusReadLock(); ! LOG.debug("Starting snapshot"); ! snapshot = Admin.getSnapshot(cp, cp.getDefinition(), cp.getConnectionInfos()); ! LOG.debug("Finishing snapshot"); } finally { cp.releaseConnectionStatusReadLock(); } ! } else { snapshot = Admin.getSnapshot(cp, cp.getDefinition(), null); } --- 695,710 ---- if (detail) { try { ! // Only try for 10 seconds! ! long start = System.currentTimeMillis(); ! if (cp.attemptConnectionStatusReadLock(10000)) { ! snapshot = Admin.getSnapshot(cp, cp.getDefinition(), cp.getConnectionInfos()); ! } else { ! LOG.warn("Give up waiting for detailed snapshot after " + (System.currentTimeMillis() - start) + " milliseconds. Serving standard snapshot instead."); ! } } finally { cp.releaseConnectionStatusReadLock(); } ! } ! if (snapshot == null) { snapshot = Admin.getSnapshot(cp, cp.getDefinition(), null); } *************** *** 818,821 **** --- 822,828 ---- Revision history: $Log$ + Revision 1.83 2005/09/26 09:54:14 billhorsman + Avoid suspected deadlock when getting a detailed snapshot. Only attempt to get the concurrent lock for 10 seconds before giving up. + Revision 1.82 2005/05/04 16:32:31 billhorsman Clone the definition when redefining or updating the pool. |
From: <bil...@us...> - 2005-09-25 21:48:19
|
Update of /cvsroot/proxool/proxool/src/java-test/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23975/src/java-test/org/logicalcobwebs/proxool Modified Files: UpdateDefinitionTest.java Log Message: New test to check that asking for a connection using the same URL and properties doesn't redefine the pool. Index: UpdateDefinitionTest.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java-test/org/logicalcobwebs/proxool/UpdateDefinitionTest.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** UpdateDefinitionTest.java 26 May 2004 17:19:10 -0000 1.7 --- UpdateDefinitionTest.java 25 Sep 2005 21:48:09 -0000 1.8 *************** *** 10,13 **** --- 10,15 ---- import java.sql.DriverManager; + import java.sql.Connection; + import java.sql.SQLException; import java.util.Properties; *************** *** 107,110 **** --- 109,155 ---- /** + * If we request a connection using exactly the same URL and properties check that it doesn't trigger an update + * which forces the pool to be restarted (all existing connections destroyed). + */ + public void testDefinitionNotChanging() throws SQLException, ProxoolException { + + String testName = "definitionNotChanging"; + String alias = testName; + + + Connection c1 = null; + try { + String url = TestHelper.buildProxoolUrl(alias, + TestConstants.HYPERSONIC_DRIVER, + TestConstants.HYPERSONIC_TEST_URL); + Properties info = new Properties(); + info.setProperty(ProxoolConstants.USER_PROPERTY, TestConstants.HYPERSONIC_USER); + info.setProperty(ProxoolConstants.PASSWORD_PROPERTY, TestConstants.HYPERSONIC_PASSWORD); + info.setProperty(ProxoolConstants.MAXIMUM_CONNECTION_COUNT_PROPERTY, "1"); + c1 = DriverManager.getConnection(url, info); + assertEquals("id=1", 1L, ProxoolFacade.getId(c1)); + } finally { + c1.close(); + } + // The second attempt (using the same definition) should give back the same connection ID + Connection c2 = null; + try { + String url = TestHelper.buildProxoolUrl(alias, + TestConstants.HYPERSONIC_DRIVER, + TestConstants.HYPERSONIC_TEST_URL); + Properties info = new Properties(); + info.setProperty(ProxoolConstants.USER_PROPERTY, TestConstants.HYPERSONIC_USER); + info.setProperty(ProxoolConstants.PASSWORD_PROPERTY, TestConstants.HYPERSONIC_PASSWORD); + info.setProperty(ProxoolConstants.MAXIMUM_CONNECTION_COUNT_PROPERTY, "1"); + c2 = DriverManager.getConnection(url, info); + assertEquals("id=1", 1L, ProxoolFacade.getId(c2)); + } finally { + c2.close(); + } + // Not the same object. It's wrapped. + assertNotSame("c1!=c2", c1, c2); + } + + /** * Can we update a pool definition by calling updateConnectionPool? */ *************** *** 151,154 **** --- 196,202 ---- Revision history: $Log$ + Revision 1.8 2005/09/25 21:48:09 billhorsman + New test to check that asking for a connection using the same URL and properties doesn't redefine the pool. + Revision 1.7 2004/05/26 17:19:10 brenuart Allow JUnit tests to be executed against another database. |
From: <bil...@us...> - 2005-07-01 08:02:58
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32528/src/java/org/logicalcobwebs/proxool Modified Files: FatalSqlExceptionHelper.java Log Message: Check for exception message being null Index: FatalSqlExceptionHelper.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/FatalSqlExceptionHelper.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FatalSqlExceptionHelper.java 30 Sep 2003 18:39:08 -0000 1.3 --- FatalSqlExceptionHelper.java 1 Jul 2005 08:02:50 -0000 1.4 *************** *** 115,119 **** Iterator i = cpd.getFatalSqlExceptions().iterator(); while (i.hasNext()) { ! if (t.getMessage().indexOf((String) i.next()) > -1) { // This SQL exception indicates a fatal problem with this connection. fatalSqlExceptionDetected = true; --- 115,119 ---- Iterator i = cpd.getFatalSqlExceptions().iterator(); while (i.hasNext()) { ! if (t.getMessage() != null && t.getMessage().indexOf((String) i.next()) > -1) { // This SQL exception indicates a fatal problem with this connection. fatalSqlExceptionDetected = true; *************** *** 198,201 **** --- 198,204 ---- Revision history: $Log$ + Revision 1.4 2005/07/01 08:02:50 billhorsman + Check for exception message being null + Revision 1.3 2003/09/30 18:39:08 billhorsman New test-before-use, test-after-use and fatal-sql-exception-wrapper-class properties. |
From: <bil...@us...> - 2005-05-04 16:32:40
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10977/src/java/org/logicalcobwebs/proxool Modified Files: ProxoolFacade.java Log Message: Clone the definition when redefining or updating the pool. Index: ProxoolFacade.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ProxoolFacade.java,v retrieving revision 1.81 retrieving revision 1.82 diff -C2 -d -r1.81 -r1.82 *** ProxoolFacade.java 29 Sep 2004 15:43:25 -0000 1.81 --- ProxoolFacade.java 4 May 2005 16:32:31 -0000 1.82 *************** *** 533,538 **** String alias = getAlias(url); ConnectionPool cp = ConnectionPoolManager.getInstance().getConnectionPool(alias); ! ConnectionPoolDefinition cpd = cp.getDefinition(); ! cpd.redefine(url, info); } --- 533,544 ---- String alias = getAlias(url); ConnectionPool cp = ConnectionPoolManager.getInstance().getConnectionPool(alias); ! try { ! // Clone the old one ! ConnectionPoolDefinition cpd = (ConnectionPoolDefinition) cp.getDefinition().clone(); ! cpd.redefine(url, info); ! cp.setDefinition(cpd); ! } catch (CloneNotSupportedException e) { ! throw new ProxoolException("Funny, why couldn't we clone a definition?", e); ! } } *************** *** 549,554 **** String alias = getAlias(url); ConnectionPool cp = ConnectionPoolManager.getInstance().getConnectionPool(alias); ! ConnectionPoolDefinition cpd = cp.getDefinition(); ! cpd.update(url, info); } --- 555,566 ---- String alias = getAlias(url); ConnectionPool cp = ConnectionPoolManager.getInstance().getConnectionPool(alias); ! try { ! // Clone the old one ! ConnectionPoolDefinition cpd = (ConnectionPoolDefinition) cp.getDefinition().clone(); ! cpd.update(url, info); ! cp.setDefinition(cpd); ! } catch (CloneNotSupportedException e) { ! throw new ProxoolException("Funny, why couldn't we clone a definition?", e); ! } } *************** *** 806,809 **** --- 818,824 ---- Revision history: $Log$ + Revision 1.82 2005/05/04 16:32:31 billhorsman + Clone the definition when redefining or updating the pool. + Revision 1.81 2004/09/29 15:43:25 billhorsman Recheck isPoolExists inside synchronized registerConnectionPool method. Credit Juergen Hoeller. |
From: <bil...@us...> - 2005-05-04 16:31:50
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10759/src/java/org/logicalcobwebs/proxool Modified Files: ProxyFactory.java WrappedConnection.java Log Message: Use the definition referenced by the proxy connection rather than the pool instead. Index: ProxyFactory.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ProxyFactory.java,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** ProxyFactory.java 27 Jul 2004 21:44:15 -0000 1.29 --- ProxyFactory.java 4 May 2005 16:31:41 -0000 1.30 *************** *** 60,64 **** Object delegate = Enhancer.create( null, ! getInterfaces(proxyConnection.getConnection().getClass(), proxyConnection.getConnectionPool()), wrappedConnection); return (Connection) delegate; --- 60,64 ---- Object delegate = Enhancer.create( null, ! getInterfaces(proxyConnection.getConnection().getClass(), proxyConnection.getDefinition()), wrappedConnection); return (Connection) delegate; *************** *** 100,104 **** Object o = Enhancer.create( null, ! getInterfaces(delegate.getClass(), connectionPool), new ProxyStatement(delegate, connectionPool, proxyConnection, sqlStatement)); /* --- 100,104 ---- Object o = Enhancer.create( null, ! getInterfaces(delegate.getClass(), proxyConnection.getDefinition()), new ProxyStatement(delegate, connectionPool, proxyConnection, sqlStatement)); /* *************** *** 124,138 **** * @return an array of classes (all interfaces) that this class implements. */ ! private static Class[] getInterfaces(Class clazz, ConnectionPool connectionPool) { Class[] interfaceArray = (Class[]) interfaceMap.get(clazz); if (interfaceArray == null) { Set interfaces = new HashSet(); traverseInterfacesRecursively(interfaces, clazz); ! if (connectionPool != null) { // Work out which interface we should be injecting (if it has been configured). Make sure // we check CallableStatement then PreparedStatement then Statement or all three will get // caught by Statement if (Connection.class.isAssignableFrom(clazz)) { ! Class injectableClass = connectionPool.getDefinition().getInjectableConnectionInterface(); // Inject it if it was configured. if (injectableClass != null) { --- 124,138 ---- * @return an array of classes (all interfaces) that this class implements. */ ! private static Class[] getInterfaces(Class clazz, ConnectionPoolDefinitionIF cpd) { Class[] interfaceArray = (Class[]) interfaceMap.get(clazz); if (interfaceArray == null) { Set interfaces = new HashSet(); traverseInterfacesRecursively(interfaces, clazz); ! if (cpd != null) { // Work out which interface we should be injecting (if it has been configured). Make sure // we check CallableStatement then PreparedStatement then Statement or all three will get // caught by Statement if (Connection.class.isAssignableFrom(clazz)) { ! Class injectableClass = cpd.getInjectableConnectionInterface(); // Inject it if it was configured. if (injectableClass != null) { *************** *** 147,151 **** LOG.debug("Getting injectableCallableStatementInterface"); } ! Class injectableClass = connectionPool.getDefinition().getInjectableCallableStatementInterface(); // Inject it if it was configured. if (injectableClass != null) { --- 147,151 ---- LOG.debug("Getting injectableCallableStatementInterface"); } ! Class injectableClass = cpd.getInjectableCallableStatementInterface(); // Inject it if it was configured. if (injectableClass != null) { *************** *** 157,161 **** } if (PreparedStatement.class.isAssignableFrom(clazz)) { ! Class injectableClass = connectionPool.getDefinition().getInjectablePreparedStatementInterface(); // Inject it if it was configured. if (injectableClass != null) { --- 157,161 ---- } if (PreparedStatement.class.isAssignableFrom(clazz)) { ! Class injectableClass = cpd.getInjectablePreparedStatementInterface(); // Inject it if it was configured. if (injectableClass != null) { *************** *** 167,171 **** } if (Statement.class.isAssignableFrom(clazz)) { ! Class injectableClass = connectionPool.getDefinition().getInjectableStatementInterface(); // Inject it if it was configured. if (injectableClass != null) { --- 167,171 ---- } if (Statement.class.isAssignableFrom(clazz)) { ! Class injectableClass = cpd.getInjectableStatementInterface(); // Inject it if it was configured. if (injectableClass != null) { *************** *** 287,290 **** --- 287,293 ---- Revision history: $Log$ + Revision 1.30 2005/05/04 16:31:41 billhorsman + Use the definition referenced by the proxy connection rather than the pool instead. + Revision 1.29 2004/07/27 21:44:15 billhorsman Remove insane amount of debug logging. Index: WrappedConnection.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/WrappedConnection.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** WrappedConnection.java 13 Jul 2004 21:06:21 -0000 1.3 --- WrappedConnection.java 4 May 2005 16:31:41 -0000 1.4 *************** *** 61,65 **** this.proxyConnection = proxyConnection; this.id = proxyConnection.getId(); ! this.alias= proxyConnection.getConnectionPool().getDefinition().getAlias(); } --- 61,65 ---- this.proxyConnection = proxyConnection; this.id = proxyConnection.getId(); ! this.alias= proxyConnection.getDefinition().getAlias(); } *************** *** 175,180 **** } catch (InvocationTargetException e) { // We might get a fatal exception here. Let's test for it. ! if (FatalSqlExceptionHelper.testException(proxyConnection.getConnectionPool().getDefinition(), e.getTargetException())) { ! FatalSqlExceptionHelper.throwFatalSQLException(proxyConnection.getConnectionPool().getDefinition().getFatalSqlExceptionWrapper(), e.getTargetException()); } throw e.getTargetException(); --- 175,180 ---- } catch (InvocationTargetException e) { // We might get a fatal exception here. Let's test for it. ! if (FatalSqlExceptionHelper.testException(proxyConnection.getDefinition(), e.getTargetException())) { ! FatalSqlExceptionHelper.throwFatalSQLException(proxyConnection.getDefinition().getFatalSqlExceptionWrapper(), e.getTargetException()); } throw e.getTargetException(); *************** *** 183,188 **** } catch (Exception e) { LOG.error("Unexpected invocation exception", e); ! if (FatalSqlExceptionHelper.testException(proxyConnection.getConnectionPool().getDefinition(), e)) { ! FatalSqlExceptionHelper.throwFatalSQLException(proxyConnection.getConnectionPool().getDefinition().getFatalSqlExceptionWrapper(), e); } throw new RuntimeException("Unexpected invocation exception: " --- 183,188 ---- } catch (Exception e) { LOG.error("Unexpected invocation exception", e); ! if (FatalSqlExceptionHelper.testException(proxyConnection.getDefinition(), e)) { ! FatalSqlExceptionHelper.throwFatalSQLException(proxyConnection.getDefinition().getFatalSqlExceptionWrapper(), e); } throw new RuntimeException("Unexpected invocation exception: " *************** *** 242,245 **** --- 242,248 ---- Revision history: $Log$ + Revision 1.4 2005/05/04 16:31:41 billhorsman + Use the definition referenced by the proxy connection rather than the pool instead. + Revision 1.3 2004/07/13 21:06:21 billhorsman Fix problem using injectable interfaces on methods that are declared in non-public classes. |
From: <bil...@us...> - 2005-05-04 16:28:03
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9422/src/java/org/logicalcobwebs/proxool Modified Files: Prototyper.java Log Message: Check to see whether a new connection was really added to the pool. Index: Prototyper.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/Prototyper.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Prototyper.java 25 Mar 2004 22:02:15 -0000 1.9 --- Prototyper.java 4 May 2005 16:27:54 -0000 1.10 *************** *** 156,160 **** try { // get a new *real* connection ! realConnection = connectionBuilder.buildConnection(connectionPool.getDefinition()); // build a proxy around it --- 156,161 ---- try { // get a new *real* connection ! final ConnectionPoolDefinition definition = connectionPool.getDefinition(); ! realConnection = connectionBuilder.buildConnection(definition); // build a proxy around it *************** *** 164,169 **** // The ProxyConnection is passed the ConnectionPoolDefinition as well so it doesn't // need the url in its constructor... ! String url = connectionPool.getDefinition().getUrl(); ! proxyConnection = new ProxyConnection(realConnection, id, url, connectionPool, status); try { --- 165,170 ---- // The ProxyConnection is passed the ConnectionPoolDefinition as well so it doesn't // need the url in its constructor... ! String url = definition.getUrl(); ! proxyConnection = new ProxyConnection(realConnection, id, url, connectionPool, definition, status); try { *************** *** 179,184 **** // ConnectionPool maintains the pool and its integrity, the Prototyper creates new // connections when instructed. ! connectionPool.addProxyConnection(proxyConnection); ! if (log.isDebugEnabled()) { StringBuffer out = new StringBuffer(connectionPool.displayStatistics()); --- 180,184 ---- // ConnectionPool maintains the pool and its integrity, the Prototyper creates new // connections when instructed. ! boolean added = connectionPool.addProxyConnection(proxyConnection); if (log.isDebugEnabled()) { StringBuffer out = new StringBuffer(connectionPool.displayStatistics()); *************** *** 203,207 **** --- 203,218 ---- } log.debug(out); + if (!added) { + out = new StringBuffer(connectionPool.displayStatistics()); + out.append(" - Connection #"); + out.append(proxyConnection.getId()); + out.append(" has been discarded immediately because the definition it was built with is out of date"); + log.debug(out); + } + } + if (!added) { + proxyConnection.reallyClose(); } + } catch (SQLException e) { // log.error(displayStatistics() + " - Couldn't initialise connection #" + proxyConnection.getId() + ": " + e); *************** *** 291,296 **** Revision history: $Log$ Revision 1.9 2004/03/25 22:02:15 brenuart ! First step towards pluggable ConnectionBuilderIF & ConnectionValidatorIF. Include some minor refactoring that lead to deprecation of some PrototyperController methods. --- 302,310 ---- Revision history: $Log$ + Revision 1.10 2005/05/04 16:27:54 billhorsman + Check to see whether a new connection was really added to the pool. + Revision 1.9 2004/03/25 22:02:15 brenuart ! First step towards pluggable ConnectionBuilderIF & ConnectionValidatorIF. Include some minor refactoring that lead to deprecation of some PrototyperController methods. |
From: <bil...@us...> - 2005-05-04 16:26:40
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9103/src/java/org/logicalcobwebs/proxool Modified Files: ConnectionPool.java Log Message: Only add a new connection if the definition matches Index: ConnectionPool.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ConnectionPool.java,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** ConnectionPool.java 25 Mar 2004 22:02:15 -0000 1.78 --- ConnectionPool.java 4 May 2005 16:26:31 -0000 1.79 *************** *** 303,315 **** * Add a ProxyConnection to the pool * @param proxyConnection new connection */ ! protected void addProxyConnection(ProxyConnectionIF proxyConnection) { try { acquireConnectionStatusWriteLock(); ! proxyConnections.add(proxyConnection); ! connectionCountByState[proxyConnection.getStatus()]++; } finally { releaseConnectionStatusWriteLock(); } } --- 303,322 ---- * Add a ProxyConnection to the pool * @param proxyConnection new connection + * @return true if the connection was added or false if it wasn't (for instance, if the definition it + * was built with is out of date). */ ! protected boolean addProxyConnection(ProxyConnectionIF proxyConnection) { ! boolean added = false; try { acquireConnectionStatusWriteLock(); ! if (proxyConnection.getDefinition() == getDefinition()) { ! proxyConnections.add(proxyConnection); ! connectionCountByState[proxyConnection.getStatus()]++; ! added = true; ! } } finally { releaseConnectionStatusWriteLock(); } + return added; } *************** *** 1099,1104 **** Revision history: $Log$ Revision 1.78 2004/03/25 22:02:15 brenuart ! First step towards pluggable ConnectionBuilderIF & ConnectionValidatorIF. Include some minor refactoring that lead to deprecation of some PrototyperController methods. --- 1106,1114 ---- Revision history: $Log$ + Revision 1.79 2005/05/04 16:26:31 billhorsman + Only add a new connection if the definition matches + Revision 1.78 2004/03/25 22:02:15 brenuart ! First step towards pluggable ConnectionBuilderIF & ConnectionValidatorIF. Include some minor refactoring that lead to deprecation of some PrototyperController methods. |
From: <bil...@us...> - 2005-05-04 16:25:10
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8593/src/java/org/logicalcobwebs/proxool Modified Files: ConnectionPoolDefinition.java Log Message: Now supports cloning. Index: ConnectionPoolDefinition.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ConnectionPoolDefinition.java,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** ConnectionPoolDefinition.java 2 Jun 2004 20:19:14 -0000 1.32 --- ConnectionPoolDefinition.java 4 May 2005 16:24:59 -0000 1.33 *************** *** 576,579 **** --- 576,624 ---- /** + * Deep clone of definition + * @return the new definition + * @throws CloneNotSupportedException + */ + protected Object clone() throws CloneNotSupportedException { + ConnectionPoolDefinition clone = new ConnectionPoolDefinition(); + + clone.setCompleteUrl(completeUrl); + clone.setDelegateProperties((Properties) delegateProperties.clone()); + clone.setCompleteInfo((Properties) completeInfo.clone()); + clone.clearChangedInfo(); + + clone.setAlias(alias); + clone.setUrl(url); + clone.setDriver(driver); + clone.setMaximumConnectionLifetime(maximumConnectionLifetime); + clone.setPrototypeCount(prototypeCount); + clone.setMinimumConnectionCount(minimumConnectionCount); + clone.setMaximumConnectionCount(maximumConnectionCount); + clone.setHouseKeepingSleepTime(houseKeepingSleepTime); + clone.setHouseKeepingTestSql(houseKeepingTestSql); + clone.setTestAfterUse(testAfterUse); + clone.setTestBeforeUse(testBeforeUse); + clone.setSimultaneousBuildThrottle(simultaneousBuildThrottle); + clone.setRecentlyStartedThreshold(recentlyStartedThreshold); + clone.setOverloadWithoutRefusalLifetime(overloadWithoutRefusalLifetime); + clone.setMaximumActiveTime(maximumActiveTime); + clone.setVerbose(verbose); + clone.setTrace(trace); + clone.setStatistics(statistics); + clone.setStatisticsLogLevel(statisticsLogLevel); + clone.setFatalSqlExceptionsAsString(fatalSqlExceptionsAsString); + try { + clone.setFatalSqlExceptionWrapper(fatalSqlExceptionWrapper); + } catch (ProxoolException e) { + throw new IllegalArgumentException("Problem cloning fatalSqlExceptionWrapper: " + fatalSqlExceptionWrapper); + } + return clone; + } + + private void clearChangedInfo() { + changedInfo.clear(); + } + + /** * Reset all properties to their default values */ *************** *** 615,618 **** --- 660,672 ---- /** + * Overwrite the complete info + * @param completeInfo the new properties + * @see #getCompleteInfo() + */ + public void setCompleteInfo(Properties completeInfo) { + this.completeInfo = completeInfo; + } + + /** * @see ConnectionPoolDefinitionIF#getUser */ *************** *** 823,826 **** --- 877,889 ---- /** + * Overwrite the delegate properties + * @param delegateProperties the new properties + * @see ConnectionPoolDefinitionIF#getProperties + */ + public void setDelegateProperties(Properties delegateProperties) { + this.delegateProperties = delegateProperties; + } + + /** * @see ConnectionPoolDefinitionIF#getUrl */ *************** *** 1298,1301 **** --- 1361,1367 ---- Revision history: $Log$ + Revision 1.33 2005/05/04 16:24:59 billhorsman + Now supports cloning. + Revision 1.32 2004/06/02 20:19:14 billhorsman Added injectable interface properties |
From: <bil...@us...> - 2005-05-04 16:24:22
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8386/src/java/org/logicalcobwebs/proxool Modified Files: ProxyConnection.java ProxyConnectionIF.java Log Message: include a reference to the definition so we can spot it changing. Index: ProxyConnection.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ProxyConnection.java,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** ProxyConnection.java 26 Mar 2004 20:00:37 -0000 1.33 --- ProxyConnection.java 4 May 2005 16:24:13 -0000 1.34 *************** *** 54,57 **** --- 54,59 ---- private ConnectionPool connectionPool; + private ConnectionPoolDefinitionIF definition; + private String requester; *************** *** 65,73 **** private boolean needToReset = false; ! protected ProxyConnection(Connection connection, long id, String delegateUrl, ConnectionPool connectionPool, int status) throws SQLException { this.connection = connection; this.delegateUrl = delegateUrl; setId(id); this.connectionPool = connectionPool; setBirthTime(System.currentTimeMillis()); --- 67,87 ---- private boolean needToReset = false; ! /** ! * ! * @param connection the real connection that is used ! * @param id unique ID ! * @param delegateUrl ! * @param connectionPool the pool it is a member of ! * @param definition the definition that was used to build it (could possibly be different from ! * the one held in the connectionPool) ! * @param status {@link #STATUS_ACTIVE}, {@link #STATUS_AVAILABLE}, {@link #STATUS_FORCE}, {@link #STATUS_NULL}, or {@link #STATUS_OFFLINE} ! * @throws SQLException ! */ ! protected ProxyConnection(Connection connection, long id, String delegateUrl, ConnectionPool connectionPool, ConnectionPoolDefinitionIF definition, int status) throws SQLException { this.connection = connection; this.delegateUrl = delegateUrl; setId(id); this.connectionPool = connectionPool; + this.definition = definition; setBirthTime(System.currentTimeMillis()); *************** *** 128,132 **** /** ! * The ConnectionPool that was used to create this connection * @return connectionPool */ --- 142,146 ---- /** ! * The ConnectionPool that this connection belongs to * @return connectionPool */ *************** *** 136,139 **** --- 150,161 ---- /** + * Get the definition that was used to create this connection + * @return definition + */ + public ConnectionPoolDefinitionIF getDefinition() { + return definition; + } + + /** * By calling this we can keep track of any statements that are * left open when this connection is returned to the pool. Index: ProxyConnectionIF.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ProxyConnectionIF.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ProxyConnectionIF.java 10 Mar 2003 15:26:49 -0000 1.4 --- ProxyConnectionIF.java 4 May 2005 16:24:13 -0000 1.5 *************** *** 124,127 **** --- 124,128 ---- boolean isReallyClosed() throws SQLException; + ConnectionPoolDefinitionIF getDefinition(); } *************** *** 130,133 **** --- 131,137 ---- Revision history: $Log$ + Revision 1.5 2005/05/04 16:24:13 billhorsman + include a reference to the definition so we can spot it changing. + Revision 1.4 2003/03/10 15:26:49 billhorsman refactoringn of concurrency stuff (and some import |
From: <bil...@us...> - 2005-05-04 16:03:31
|
Update of /cvsroot/proxool/proxool/src/java-test/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2904/src/java-test/org/logicalcobwebs/proxool Modified Files: StateListenerTest.java Log Message: Now catches ProxoolException when pool is updated with bogus driver. Index: StateListenerTest.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java-test/org/logicalcobwebs/proxool/StateListenerTest.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** StateListenerTest.java 2 Jun 2004 21:05:19 -0000 1.12 --- StateListenerTest.java 4 May 2005 16:03:23 -0000 1.13 *************** *** 93,97 **** // Bogus definition -> should be down ! ProxoolFacade.updateConnectionPool("proxool." + alias + ":blah:foo", null); srm.setExpectedUpState(StateListenerIF.STATE_DOWN); assertEquals("Timeout waiting for DOWN", ResultMonitor.SUCCESS, srm.getResult()); --- 93,101 ---- // Bogus definition -> should be down ! try { ! ProxoolFacade.updateConnectionPool("proxool." + alias + ":blah:foo", null); ! } catch (ProxoolException e) { ! LOG.debug("Ignoring expected exception when trying to register a pool with a bogus driver", e); ! } srm.setExpectedUpState(StateListenerIF.STATE_DOWN); assertEquals("Timeout waiting for DOWN", ResultMonitor.SUCCESS, srm.getResult()); *************** *** 157,160 **** --- 161,167 ---- Revision history: $Log$ + Revision 1.13 2005/05/04 16:03:23 billhorsman + Now catches ProxoolException when pool is updated with bogus driver. + Revision 1.12 2004/06/02 21:05:19 billhorsman Don't log worrying stack traces for expected exceptions. |
From: <bil...@us...> - 2005-05-04 16:02:14
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/logging/impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2556/src/java/org/logicalcobwebs/logging/impl Modified Files: SimpleLog.java Log Message: Renamed enum variable because of potential conflicts with JDK 1.5 Index: SimpleLog.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/logging/impl/SimpleLog.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SimpleLog.java 11 Mar 2003 00:02:10 -0000 1.3 --- SimpleLog.java 4 May 2005 16:02:05 -0000 1.4 *************** *** 159,165 **** try { // add all system props that start with the specified prefix ! Enumeration enum = System.getProperties ().propertyNames (); ! while (enum.hasMoreElements ()) { ! String name = (String) (enum.nextElement ()); if (null != name && name.startsWith (SYSTEM_PREFIX)) { SIMLE_LOG_PROPS.setProperty (name, System.getProperty (name)); --- 159,165 ---- try { // add all system props that start with the specified prefix ! Enumeration propertyNames = System.getProperties ().propertyNames (); ! while (propertyNames.hasMoreElements ()) { ! String name = (String) (propertyNames.nextElement ()); if (null != name && name.startsWith (SYSTEM_PREFIX)) { SIMLE_LOG_PROPS.setProperty (name, System.getProperty (name)); |
From: <bil...@us...> - 2004-09-29 15:43:35
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27909/src/java/org/logicalcobwebs/proxool Modified Files: ProxoolFacade.java Log Message: Recheck isPoolExists inside synchronized registerConnectionPool method. Credit Juergen Hoeller. Index: ProxoolFacade.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ProxoolFacade.java,v retrieving revision 1.80 retrieving revision 1.81 diff -C2 -d -r1.80 -r1.81 *** ProxoolFacade.java 2 Jun 2004 20:47:05 -0000 1.80 --- ProxoolFacade.java 29 Sep 2004 15:43:25 -0000 1.81 *************** *** 97,110 **** } ! protected static void registerConnectionPool(ConnectionPoolDefinition connectionPoolDefinition) throws ProxoolException { ! Properties jndiProperties = extractJndiProperties(connectionPoolDefinition); ! ConnectionPool connectionPool = ConnectionPoolManager.getInstance().createConnectionPool(connectionPoolDefinition); ! connectionPool.start(); ! compositeProxoolListener.onRegistration(connectionPoolDefinition, connectionPoolDefinition.getCompleteInfo()); ! if (isConfiguredForJMX(connectionPoolDefinition.getCompleteInfo())) { ! registerForJmx(connectionPoolDefinition.getAlias(), connectionPoolDefinition.getCompleteInfo()); ! } ! if (jndiProperties != null) { ! registerDataSource(connectionPoolDefinition.getAlias(), jndiProperties); } } --- 97,115 ---- } ! protected synchronized static void registerConnectionPool(ConnectionPoolDefinition connectionPoolDefinition) throws ProxoolException { ! // check isPoolExists once more now we are inside synchronized block. ! if (!ConnectionPoolManager.getInstance().isPoolExists(connectionPoolDefinition.getAlias())) { ! Properties jndiProperties = extractJndiProperties(connectionPoolDefinition); ! ConnectionPool connectionPool = ConnectionPoolManager.getInstance().createConnectionPool(connectionPoolDefinition); ! connectionPool.start(); ! compositeProxoolListener.onRegistration(connectionPoolDefinition, connectionPoolDefinition.getCompleteInfo()); ! if (isConfiguredForJMX(connectionPoolDefinition.getCompleteInfo())) { ! registerForJmx(connectionPoolDefinition.getAlias(), connectionPoolDefinition.getCompleteInfo()); ! } ! if (jndiProperties != null) { ! registerDataSource(connectionPoolDefinition.getAlias(), jndiProperties); ! } ! } else { ! LOG.debug("Ignoring duplicate attempt to register " + connectionPoolDefinition.getAlias() + " pool"); } } *************** *** 801,804 **** --- 806,812 ---- Revision history: $Log$ + Revision 1.81 2004/09/29 15:43:25 billhorsman + Recheck isPoolExists inside synchronized registerConnectionPool method. Credit Juergen Hoeller. + Revision 1.80 2004/06/02 20:47:05 billhorsman Override shutdown with a zero-parameter version for Spring integration. |
From: <ch...@us...> - 2004-09-29 14:59:46
|
Update of /cvsroot/proxool/proxool-doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18496 Added Files: datasource.html Log Message: Saving here so it is not lost. --- NEW FILE: datasource.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Untitled</title> <style type="text/css"> .code { margin-top: 4px; margin-bottom: 4px; padding: 5px 5px 5px 5px; color: inherit; background-color: #eeeeee; border: 1px dotted #003366; font-family: courier, courier new, monospace; font-size: 12px; line-height: 100%; white-space: pre; width: 98%; overflow: auto; /*overflow: scroll -moz-scrollbars-horizontal; overflow-x: auto;*/ } .xml-tag { color: #0000aa; background-color: inherit; } .xml-quote { color: #000000; background-color: inherit; } </style> </head> <body> <H1>Proxool DataSource support</H1> <P> 1. <A href="#intro">Introduction</A> <BR> 2. <A href="#about">About the DataSource</A> <BR> 3. <A href="#deploy">DataSource deployment</A><BR> 4. <A href="#conf">ProxoolDataSource configuration</A><BR> 5. <A href="#examples">Configuration examples</A> <BR> 6. <A href="#resources">Resources</A> </P> <A name=intro></A> <H2>1. Introduction</H2> <P> Community feedback suggests that JDBC DataSource support has been the most sorely missed feature amongst Proxool users. The JDBC JavaDoc documentation also states that "the use of a DataSource object is the preferred means of connecting to a data source", so we have endeavoured to implement a simple DataSource implementation for Proxool.</P> <P><STRONG>Be warned</STRONG>:<BR>ProxoolDataSource is a simple DataSource implementation. It does not currently implement PooledDataSource or support distributed transactions. Also, it does not integrate directly with your container, so do not use ProxoolDataSource if you are using Container Manged Persistance etc. unless your container explicitly allows you to swap to a third party DataSource implementation.</P> <A name=about></A> <H2>2. About the DataSource</H2> <P>Like the <code>java.sql.DriverManager</code> the <code>javax.sql.DataSource</code> is a factory for <code>java.sql.Connection</code> instances. The application must include specific configuration information about the data source (e.g. a connection url) when obtaining a connection from the <code>DriverManger</code> . This creates a somewhat explicit coupling between your application and the data source. </P> <P>A DataSource however is configured outside of your application and retrieved through a naming service (JNDI). This makes the configuration of the DataSource completely decoupled from your code. </P> <A name=deploy></A> <H2>3. DataSource deployment</H2> <P> DataSources are normally deployed within a Servlet or J2EE container. The J2EE 1.4 specification recommends that the DataSources are placed in the 'jdbc' subcontext of the application component's JNDI environment (java:comp/env/). For example: the full JNDI name of a DataSource named 'UserDB' would be "java:comp/env/jdbc/UserDB". The specification also states that applications must declare the DataSources they are using in 'resource-ref' elements in their deployment descriptor. </P> <P>The java:comp/env/ environment is read-only at runtime, and the spec states that the container vendor must "provide a deployment tool that allows the Deployer to set and modify the values of the application component's environment entries." This is where the spec ends and implementation specifics begin. </P> <P> Most containers come with their own DataSource implementation that can be configured and deployed with a tool or through vendor specific configuration files. The support for plugging in a third party DataSource implementation like Proxool is extremely varied. Some vendors have direct support for this, while others make it almost impossible to deploy a foreign DataSource into the java:comp/env/jdbc/ namespace. Remember: this is outside of the spec and there is no common way to achieve it. Because of this we have made the ProxoolDataSource configurable in a number of different ways. The next section describes these ways.</P> <A name=conf></A> <H2>4. ProxoolDataSource configuration</H2> <P>We have made it possible to configure ProxoolDatasource in three different ways to make it useful in as many deployment scenarios as possible.</P> <A name=factory></A> <H3>ObjectFactory configuration</H3> <P>ProxoolDataSource implements the javax.naming.spi.ObjectFactory interface. This is the standard way of providing a factory for object implementations in JNDI. In such a scenario ProxoolDatasource functions as a ObjectFactory for DataSource instances. It is a practical way of deploying a ProxoolDataSource into the JNDI environment for containers that supports this idiom. You configure the ProxoolDataSource ObjectFactory by handing it the Proxool <A href="http://proxool.sourceforge.net/properties.html" target=_blank>properties</A> plus properties for the underlying JDBC Driver. The Proxool properties must be prefixed with 'proxool.'. Properties not prefixed with 'proxool.' will be passed on to the underlying JDBC driver ('delegate driver' in Proxool parlance).</P> <H3>JavaBean configuration</H3> <P>ProxoolDataSource exposes its configuration properties as JavaBean getters and setters. This is useful for containers that offer the posibility of configuring and deploying JavaBeans into the JNDI environment. It also makes it possible to deploy ProxoolDataSources through component frameworks like the Spring Framework. Since a lot of the Proxool propery names are illegal bean property names we have applied the following translation: '-<lower case letter>' is translated to <upper case letter>. E.g.:<BR> 'maximum-connection-count' becomes 'maximumConnectionCount'.</P> <P>All properties that are to be passed to the underlying JDBC driver are set with the 'driverProperties' property as a comma separated property string. E.g.:<BR>proxoolDataSource.setDriverProperties("user=testUser, password=testPassword, loglevel=WARN");<BR> </P> <H3>Self-deployed configuration</H3> <P> In this scenario Proxool itself instantiates ProxoolDataSources and binds them to JNDI names. This is the least standard-conformant way of deploying a ProxoolDataSource. It is also the only way that is garanteed to work in any setting as long as there is a writable JNDI name available for the Proxool process when it starts up. You configure Proxool as you would when using it through the DriverManager. In addition you use the new 'jndi-name' configuration property to tell Proxool to wrap a pool in a ProxoolDataSource and bind it to JNDI. In addition any properties you prefix with 'jndi-' will be passed on the JNDI InitialContext used to bind Proxool. E.g:<BR> </P> <div class="code"><pre> <span class="xml-tag"><proxool></span> <span class="xml-tag"><alias></span>jndi-test<span class="xml-tag"></alias></span> <span class="xml-tag"><driver-url></span>jdbc:hsqldb:.<span class="xml-tag"></driver-url></span> <span class="xml-tag"><driver-class></span>org.hsqldb.jdbcDriver<span class="xml-tag"></driver-class></span> <span class="xml-tag"><driver-class></span>org.hsqldb.jdbcDriver<span class="xml-tag"></driver-class></span> <span class="xml-tag"><driver-properties></span> <span class="xml-tag"><property name=<span class="xml-quote">"user"</span> value=<span class="xml-quote">"sa"</span>/></span> <span class="xml-tag"><property name=<span class="xml-quote">"password"</span> value=<span class="xml-quote">""</span>/></span> <span class="xml-tag"></driver-properties></span> <b><span class="xml-tag"><jndi-name></span>/datasources/UserDB<span class="xml-tag"></jndi-name></span></b> <b><span class="xml-tag"><jndi-java.naming.factory.initial></span>com.caucho.naming.InitialContextFactoryImpl<span class="xml-tag"></jndi-java.naming.factory.initial></span></b> <b><span class="xml-tag"><jndi-java.naming.provider.url></span>localhost:1099<span class="xml-tag"></jndi-java.naming.provider.url></span></b> <span class="xml-tag"></proxool></span></pre></div> <P>Make sure that jndi-name is actually writable. Remember that the java:comp/env/ environment is read-only at runtime, so your ProxoolDataSources need to go somewhere else in this configuration scenario.</P> <P>Also remember that with this configuration option Proxool needs to be explicitly initialised, for example using the <A href="http://proxool.sourceforge.net/servlets.html" target=_blank>ServletConfigurator</A>.</P> <P></P> <A name=examples></A> <H2>5. Configuration examples</H2> <P>TODO</P> <H3>Resin 2.x</H3> <P>TODO</P> <H3>Resin 3.x</H3> <P>TODO</P> <H3>Tomcat 4.x</H3> <P>TODO</P> <H3>Tomcat 5.x</H3> <P>Configuration method: <A href="#factory">ObjectFactory</A> </P> <P>Configure a resource with ProxoolDataSource as the factory in server.xml: </P> <P> </P> <div class="code"><pre> <span class="xml-tag"><Context path=<span class="xml-quote">"/dstest"</span>></span> <span class="xml-tag"><Resource name=<span class="xml-quote">"jdbc/ObjectFactoryDS"</span> auth=<span class="xml-quote">"Container"</span> type=<span class="xml-quote">"org.logicalcobwebs.proxool.ProxoolDataSource"</span> /></span> <span class="xml-tag"><ResourceParams name=<span class="xml-quote">"jdbc/ObjectFactoryDS"</span>></span> <span class="xml-tag"><parameter></span> <span class="xml-tag"><name></span>factory<span class="xml-tag"></name></span> <span class="xml-tag"><value></span>org.logicalcobwebs.proxool.ProxoolDataSource<span class="xml-tag"></value></span> <span class="xml-tag"></parameter></span> <span class="xml-tag"><parameter></span> <span class="xml-tag"><name></span>proxool.alias<span class="xml-tag"></name></span> <span class="xml-tag"><value></span>ObjectFactoryDS<span class="xml-tag"></value></span> <span class="xml-tag"></parameter></span> <span class="xml-tag"><parameter></span> <span class="xml-tag"><name></span>proxool.driver-url<span class="xml-tag"></name></span> <span class="xml-tag"><value></span>jdbc:mckoi://localhost/<span class="xml-tag"></value></span> <span class="xml-tag"></parameter></span> <span class="xml-tag"><parameter></span> <span class="xml-tag"><name></span>proxool.driver-class<span class="xml-tag"></name></span> <span class="xml-tag"><value></span>com.mckoi.JDBCDriver<span class="xml-tag"></value></span> <span class="xml-tag"></parameter></span> <span class="xml-tag"><parameter></span> <span class="xml-tag"><name></span>user<span class="xml-tag"></name></span> <span class="xml-tag"><value></span>admin<span class="xml-tag"></value></span> <span class="xml-tag"></parameter></span> <span class="xml-tag"><parameter></span> <span class="xml-tag"><name></span>password<span class="xml-tag"></name></span> <span class="xml-tag"><value></span>admin<span class="xml-tag"></value></span> <span class="xml-tag"></parameter></span> <span class="xml-tag"></ResourceParams></span> <span class="xml-tag"></Context></span></pre></div> <P> </P> <P></P> <A name=resources></A> <H2>6. Resources</H2> <UL> <LI> J2SE 1.4.2 DataSource interface <A href="http://java.sun.com/j2se/1.4.2/docs/api/javax/sql/DataSource.html" target=_blank>JavaDoc</A>. <LI>Chapter 9.4 "The DataSource Interface" of the <A href="http://java.sun.com/products/jdbc/download.html#corespec30" target=_blank>JDBC 3.0 specification</A>. <LI>The Sun <A href="http://java.sun.com/products/jndi/tutorial/index.html" target=_blank>JNDI tutorial</A>. <LI>Chapter 5.4 "Resource Manager Connection Factory References" of the <A href="http://java.sun.com/j2ee/j2ee-1_4-fr-spec.pdf" target=_blank>J2EE 1.4 specification</A>. <LI>J2SE 1.4.2 ObjectFactory interface <A href="http://java.sun.com/j2se/1.4.2/docs/api/javax/naming/spi/ObjectFactory.html" target=_blank>JavaDoc</A>. <LI>The <A href="http://java.sun.com/j2se/1.4.2/docs/api/javax/naming/spi/ObjectFactory.html" target=_blank>Spring</A> Framework.</LI> </UL> </body> </html> |
From: <ch...@us...> - 2004-08-19 12:28:39
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25174/src/java/org/logicalcobwebs/proxool Modified Files: ProxoolDataSource.java Log Message: Removed factory type test. Index: ProxoolDataSource.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ProxoolDataSource.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ProxoolDataSource.java 18 Mar 2004 17:16:58 -0000 1.3 --- ProxoolDataSource.java 19 Aug 2004 12:28:28 -0000 1.4 *************** *** 141,148 **** --- 141,150 ---- } Reference reference = (Reference) refObject; + /* Removed because JNDI implementations can not be trusted to implement reference.getFactoryClassName() correctly. // check if this is relevant for us if (!ProxoolDataSource.class.getName().equals(reference.getFactoryClassName())) { return null; } + */ // check if we've allready parsed the properties. if (!ConnectionPoolManager.getInstance().isPoolExists(reference.get(ProxoolConstants.ALIAS_PROPERTY).toString())) { *************** *** 644,647 **** --- 646,652 ---- Revision history: $Log$ + Revision 1.4 2004/08/19 12:28:28 chr32 + Removed factory type test. + Revision 1.3 2004/03/18 17:16:58 chr32 Added a timy bit of doc. |
From: <bil...@us...> - 2004-07-27 21:44:25
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28869/src/java/org/logicalcobwebs/proxool Modified Files: ProxyFactory.java Log Message: Remove insane amount of debug logging. Index: ProxyFactory.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ProxyFactory.java,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** ProxyFactory.java 17 Jun 2004 21:58:36 -0000 1.28 --- ProxyFactory.java 27 Jul 2004 21:44:15 -0000 1.29 *************** *** 125,131 **** */ private static Class[] getInterfaces(Class clazz, ConnectionPool connectionPool) { - if (LOG.isDebugEnabled()) { - LOG.debug("Looking up injectable interfaces for " + clazz); - } Class[] interfaceArray = (Class[]) interfaceMap.get(clazz); if (interfaceArray == null) { --- 125,128 ---- *************** *** 290,293 **** --- 287,293 ---- Revision history: $Log$ + Revision 1.29 2004/07/27 21:44:15 billhorsman + Remove insane amount of debug logging. + Revision 1.28 2004/06/17 21:58:36 billhorsman Injectable interface fixes. |
From: <bil...@us...> - 2004-07-13 21:32:49
|
Update of /cvsroot/proxool/proxool/src/java-test/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17968/src/java-test/org/logicalcobwebs/proxool Modified Files: ProxyStatementTest.java Log Message: Close the first connection first before opening the real connection (directly) otherwise you get a "database already in use"error on Windows. Index: ProxyStatementTest.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java-test/org/logicalcobwebs/proxool/ProxyStatementTest.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ProxyStatementTest.java 26 May 2004 17:19:09 -0000 1.10 --- ProxyStatementTest.java 13 Jul 2004 21:32:41 -0000 1.11 *************** *** 80,90 **** Class delegateStatementClass = delegateStatement.getClass(); s.close(); ! LOG.debug("Statement " + s.getClass() + " is delegating to " + delegateStatementClass); // get a *real* connection directly from the native driver (bypassing the pool) Connection realConnection = TestHelper.getDirectConnection(); ! Statement realStatement = realConnection.prepareStatement(TestConstants.HYPERSONIC_TEST_SQL); ! Class realStatementClass = realStatement.getClass(); realStatement.close(); --- 80,91 ---- Class delegateStatementClass = delegateStatement.getClass(); s.close(); ! c.close(); ! LOG.debug("Statement " + s.getClass() + " is delegating to " + delegateStatementClass); // get a *real* connection directly from the native driver (bypassing the pool) Connection realConnection = TestHelper.getDirectConnection(); ! Statement realStatement = realConnection.prepareStatement(TestConstants.HYPERSONIC_TEST_SQL); ! Class realStatementClass = realStatement.getClass(); realStatement.close(); *************** *** 178,181 **** --- 179,185 ---- Revision history: $Log$ + Revision 1.11 2004/07/13 21:32:41 billhorsman + Close the first connection first before opening the real connection (directly) otherwise you get a "database already in use"error on Windows. + Revision 1.10 2004/05/26 17:19:09 brenuart Allow JUnit tests to be executed against another database. |
From: <bil...@us...> - 2004-07-13 21:13:23
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/proxy In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13723/src/java/org/logicalcobwebs/proxool/proxy Modified Files: InvokerFacade.java Log Message: Optimise using injectable interfaces on methods that are declared in non-public classes by not bothering to use concrete methods at all (it's not possible). Index: InvokerFacade.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/proxy/InvokerFacade.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** InvokerFacade.java 13 Jul 2004 21:06:16 -0000 1.2 --- InvokerFacade.java 13 Jul 2004 21:13:14 -0000 1.3 *************** *** 11,14 **** --- 11,15 ---- import java.util.HashMap; import java.lang.reflect.Method; + import java.lang.reflect.Modifier; /** *************** *** 32,42 **** */ public static Method getConcreteMethod(Class concreteClass, Method injectableMethod) throws ProxoolException { ! Object key = concreteClass.getName() + ":" + injectableMethod.getName(); ! MethodMapper methodMapper = (MethodMapper) methodMappers.get(key); ! if (methodMapper == null) { ! methodMapper = new MethodMapper(concreteClass); ! methodMappers.put(key, methodMapper); } - return methodMapper.getConcreteMethod(injectableMethod); } --- 33,48 ---- */ public static Method getConcreteMethod(Class concreteClass, Method injectableMethod) throws ProxoolException { ! // Unless the concrete class is public we can't do anything ! if (Modifier.isPublic(concreteClass.getModifiers())) { ! Object key = concreteClass.getName() + ":" + injectableMethod.getName(); ! MethodMapper methodMapper = (MethodMapper) methodMappers.get(key); ! if (methodMapper == null) { ! methodMapper = new MethodMapper(concreteClass); ! methodMappers.put(key, methodMapper); ! } ! return methodMapper.getConcreteMethod(injectableMethod); ! } else { ! return injectableMethod; } } *************** *** 63,66 **** --- 69,75 ---- Revision history: $Log$ + Revision 1.3 2004/07/13 21:13:14 billhorsman + Optimise using injectable interfaces on methods that are declared in non-public classes by not bothering to use concrete methods at all (it's not possible). + Revision 1.2 2004/07/13 21:06:16 billhorsman Fix problem using injectable interfaces on methods that are declared in non-public classes. |
From: <bil...@us...> - 2004-07-13 21:06:57
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/proxy In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12207/src/java/org/logicalcobwebs/proxool/proxy Modified Files: InvokerFacade.java MethodMapper.java Log Message: Fix problem using injectable interfaces on methods that are declared in non-public classes. Index: InvokerFacade.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/proxy/InvokerFacade.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** InvokerFacade.java 2 Jun 2004 20:43:53 -0000 1.1 --- InvokerFacade.java 13 Jul 2004 21:06:16 -0000 1.2 *************** *** 41,48 **** --- 41,69 ---- } + /** + * Override the method provided by the {@link #getConcreteMethod(java.lang.Class, java.lang.reflect.Method)}. Use this + * if you decide that the concrete method provided wasn't any good. For instance, if you get an IllegalAccessException + * whilst invoking the concrete method then you should perhaps try using the proxy supplied method instead. + * @param concreteClass the class we are invoking upon + * @param injectableMethod the method supplied by the proxy + * @param overridenMethod the one we are going to use (probably the same as injectrableMethod actually) + */ + public static void overrideConcreteMethod(Class concreteClass, Method injectableMethod, Method overridenMethod) { + Object key = concreteClass.getName() + ":" + injectableMethod.getName(); + MethodMapper methodMapper = (MethodMapper) methodMappers.get(key); + if (methodMapper == null) { + methodMapper = new MethodMapper(concreteClass); + methodMappers.put(key, methodMapper); + } + methodMapper.overrideConcreteMethod(injectableMethod, overridenMethod); + } + } /* Revision history: $Log$ + Revision 1.2 2004/07/13 21:06:16 billhorsman + Fix problem using injectable interfaces on methods that are declared in non-public classes. + Revision 1.1 2004/06/02 20:43:53 billhorsman New classes to support injectable interfaces Index: MethodMapper.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/proxy/MethodMapper.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MethodMapper.java 2 Jun 2004 20:43:53 -0000 1.1 --- MethodMapper.java 13 Jul 2004 21:06:18 -0000 1.2 *************** *** 87,90 **** --- 87,99 ---- } + /** + * Don't use the one we calculate using {@link #getConcreteMethod(java.lang.reflect.Method)}, use this one instead. + * @param injectableMethod the method supplied by the proxy + * @param overridenMethod the one we are going to use (probably the same as injectrableMethod actually) + */ + public void overrideConcreteMethod(Method injectableMethod, Method overridenMethod) { + cachedConcreteMethods.put(injectableMethod, overridenMethod); + } + } *************** *** 92,95 **** --- 101,107 ---- Revision history: $Log$ + Revision 1.2 2004/07/13 21:06:18 billhorsman + Fix problem using injectable interfaces on methods that are declared in non-public classes. + Revision 1.1 2004/06/02 20:43:53 billhorsman New classes to support injectable interfaces |
From: <bil...@us...> - 2004-07-13 21:06:29
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12207/src/java/org/logicalcobwebs/proxool Modified Files: ProxyStatement.java WrappedConnection.java Log Message: Fix problem using injectable interfaces on methods that are declared in non-public classes. Index: ProxyStatement.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ProxyStatement.java,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** ProxyStatement.java 17 Jun 2004 21:56:53 -0000 1.27 --- ProxyStatement.java 13 Jul 2004 21:06:18 -0000 1.28 *************** *** 68,72 **** close(); } else { ! result = concreteMethod.invoke(getStatement(), args); } --- 68,85 ---- close(); } else { ! try { ! result = concreteMethod.invoke(getStatement(), args); ! } catch (IllegalAccessException e) { ! // This is probably because we are trying to access a non-public concrete class. But don't worry, ! // we can always use the proxy supplied method. This will only fail if we try to use an injectable ! // method on a method in a class that isn't public and for a method that isn't declared in an interface - ! // but if that is the case then that method is inaccessible by any means (even by bypassing Proxool and ! // using the vendor's driver directly). ! LOG.debug("Ignoring IllegalAccessException whilst invoking the " + concreteMethod + " concrete method and trying the " + method + " method directly."); ! // By overriding the method cached in the InvokerFacade we ensure that we only log this message once, and ! // we speed up subsequent usages by not calling the method that fails first. ! InvokerFacade.overrideConcreteMethod(getStatement().getClass(), method, method); ! result = method.invoke(getStatement(), args); ! } } *************** *** 138,141 **** --- 151,157 ---- Revision history: $Log$ + Revision 1.28 2004/07/13 21:06:18 billhorsman + Fix problem using injectable interfaces on methods that are declared in non-public classes. + Revision 1.27 2004/06/17 21:56:53 billhorsman Use MethodMapper for concrete methods. Index: WrappedConnection.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/WrappedConnection.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** WrappedConnection.java 2 Jun 2004 20:50:47 -0000 1.2 --- WrappedConnection.java 13 Jul 2004 21:06:21 -0000 1.3 *************** *** 134,138 **** proxyConnection.setNeedToReset(true); } ! result = concreteMethod.invoke(proxyConnection.getConnection(), args); } else { throw new SQLException("You can't perform a " + concreteMethod.getName() + " operation after the connection has been closed"); --- 134,151 ---- proxyConnection.setNeedToReset(true); } ! try { ! result = concreteMethod.invoke(proxyConnection.getConnection(), args); ! } catch (IllegalAccessException e) { ! // This is probably because we are trying to access a non-public concrete class. But don't worry, ! // we can always use the proxy supplied method. This will only fail if we try to use an injectable ! // method on a method in a class that isn't public and for a method that isn't declared in an interface - ! // but if that is the case then that method is inaccessible by any means (even by bypassing Proxool and ! // using the vendor's driver directly). ! LOG.debug("Ignoring IllegalAccessException whilst invoking the " + concreteMethod + " concrete method and trying the " + method + " method directly."); ! // By overriding the method cached in the InvokerFacade we ensure that we only log this message once, and ! // we speed up subsequent usages by not calling the method that fails first. ! InvokerFacade.overrideConcreteMethod(proxyConnection.getConnection().getClass(), method, method); ! result = method.invoke(proxyConnection.getConnection(), args); ! } } else { throw new SQLException("You can't perform a " + concreteMethod.getName() + " operation after the connection has been closed"); *************** *** 229,232 **** --- 242,248 ---- Revision history: $Log$ + Revision 1.3 2004/07/13 21:06:21 billhorsman + Fix problem using injectable interfaces on methods that are declared in non-public classes. + Revision 1.2 2004/06/02 20:50:47 billhorsman Dropped obsolete InvocationHandler reference and injectable interface stuff. |
From: <bil...@us...> - 2004-07-13 20:37:06
|
Update of /cvsroot/proxool/proxool/src/java-test/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6561/src/java-test/org/logicalcobwebs/proxool Modified Files: ManyPoolsTest.java Log Message: Open a different database for each pool. Otherwise Hypersonic has some threading issues. Index: ManyPoolsTest.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java-test/org/logicalcobwebs/proxool/ManyPoolsTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ManyPoolsTest.java 26 May 2004 17:19:09 -0000 1.2 --- ManyPoolsTest.java 13 Jul 2004 20:36:57 -0000 1.3 *************** *** 53,57 **** + TestConstants.HYPERSONIC_DRIVER + ProxoolConstants.URL_DELIMITER ! + TestConstants.HYPERSONIC_TEST_URL; ProxoolFacade.registerConnectionPool(url, info); } --- 53,57 ---- + TestConstants.HYPERSONIC_DRIVER + ProxoolConstants.URL_DELIMITER ! + TestConstants.HYPERSONIC_URL_PREFIX + i; ProxoolFacade.registerConnectionPool(url, info); } *************** *** 75,78 **** --- 75,81 ---- Revision history: $Log$ + Revision 1.3 2004/07/13 20:36:57 billhorsman + Open a different database for each pool. Otherwise Hypersonic has some threading issues. + Revision 1.2 2004/05/26 17:19:09 brenuart Allow JUnit tests to be executed against another database. |