[Proxool-cvs] proxool/src/java/org/logicalcobwebs/proxool ConnectionListenerIF.java, 1.8, 1.9 Abst
UNMAINTAINED!
Brought to you by:
billhorsman
From: <bil...@us...> - 2007-01-25 23:38:27
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31111/src/java/org/logicalcobwebs/proxool Modified Files: ConnectionListenerIF.java AbstractProxyStatement.java CompositeConnectionListener.java HouseKeeper.java ConnectionPool.java ProxyConnection.java ProxoolFacade.java ProxyConnectionIF.java Log Message: Scrapped onAboutToDie and altered onDeath signature instead. Now includes reasonCode (see ConnectionListenerIF) Index: ConnectionListenerIF.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ConnectionListenerIF.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ConnectionListenerIF.java 25 Jan 2007 00:10:24 -0000 1.8 --- ConnectionListenerIF.java 25 Jan 2007 23:38:24 -0000 1.9 *************** *** 31,39 **** /** * We are killing a connection because the ! * {@link ConnectionPoolDefinitionIF#getMaximumActiveTime() maximum-active-time} * has been exceeded. ! * @see #onAboutToDie(java.sql.Connection, int) */ ! static final int LIFETIME_EXPIRED = 0; /** --- 31,86 ---- /** * We are killing a connection because the ! * {@link org.logicalcobwebs.proxool.ProxoolConstants#MAXIMUM_ACTIVE_TIME MAXIMUM_ACTIVE_TIME} * has been exceeded. ! * @see #onDeath(java.sql.Connection, int) */ ! static final int MAXIMUM_ACTIVE_TIME_EXPIRED = 1; ! ! /** ! * We are killing a connection because it's manually been expired (by something external to ! * Proxool) ! * @see #onDeath(java.sql.Connection, int) ! */ ! static final int MANUAL_EXPIRY = 2; ! ! /** ! * We are killing a connection because it has not been ! * {@link org.logicalcobwebs.proxool.ConnectionValidatorIF#validate(ConnectionPoolDefinitionIF, java.sql.Connection) validated}. ! * @see #onDeath(java.sql.Connection, int) ! */ ! static final int VALIDATION_FAIL = 3; ! ! /** ! * We are killing a connection because Proxool is shutting down ! * @see #onDeath(java.sql.Connection, int) ! */ ! static final int SHUTDOWN = 4; ! ! /** ! * We are killing a connection because it couldn't be {@link org.logicalcobwebs.proxool.ConnectionResetter#reset(java.sql.Connection, String) reset} ! * after it was returned to the pool and we don't want to give it out again in an unknown state. ! * @see #onDeath(java.sql.Connection, int) ! */ ! static final int RESET_FAIL = 5; ! ! /** ! * We are killing a connection because the routine house keeper test failed ! * @see #onDeath(java.sql.Connection, int) ! */ ! static final int HOUSE_KEEPER_TEST_FAIL = 6; ! ! /** ! * We are killing a connection because it's {@link org.logicalcobwebs.proxool.ProxoolConstants#MAXIMUM_CONNECTION_LIFETIME MAXIMUM_CONNECTION_LIFETIME} ! * has been exceeded. ! * @see #onDeath(java.sql.Connection, int) ! */ ! static final int MAXIMUM_CONNECTION_LIFETIME_EXCEEDED = 7; ! ! /** ! * We are killing a connection because a {@link org.logicalcobwebs.proxool.ProxoolConstants#FATAL_SQL_EXCEPTION FATAL_SQL_EXCEPTION} ! * has been detected. ! * @see #onDeath(java.sql.Connection, int) ! */ ! static final int FATAL_SQL_EXCEPTION_DETECTED = 8; /** *************** *** 52,58 **** * * @param connection the connection that is about to expire * @throws SQLException if anything goes wrong (which will then be logged but ignored) */ ! void onDeath(Connection connection) throws SQLException; /** --- 99,113 ---- * * @param connection the connection that is about to expire + * @param reasonCode {@link #MAXIMUM_ACTIVE_TIME_EXPIRED}, + * {@link #HOUSE_KEEPER_TEST_FAIL}, + * {@link #FATAL_SQL_EXCEPTION_DETECTED}, + * {@link #MANUAL_EXPIRY}, + * {@link #MAXIMUM_CONNECTION_LIFETIME_EXCEEDED}, + * {@link #RESET_FAIL}, + * {@link #SHUTDOWN}, or + * {@link #VALIDATION_FAIL} * @throws SQLException if anything goes wrong (which will then be logged but ignored) */ ! void onDeath(Connection connection, int reasonCode) throws SQLException; /** *************** *** 77,88 **** void onFail(String command, Exception exception); - /** - * Happens if we are deliberately killing a connection. It gets called - * just before the call to {@link #onDeath(java.sql.Connection)} - * @param connection the connection that is about to expire - * @param reason why it is being killed: {@link - * @throws SQLException if anything goes wrong (which will then be logged but ignored) - */ - void onAboutToDie(Connection connection, int reason) throws SQLException; } --- 132,135 ---- *************** *** 90,93 **** --- 137,143 ---- Revision history: $Log$ + Revision 1.9 2007/01/25 23:38:24 billhorsman + Scrapped onAboutToDie and altered onDeath signature instead. Now includes reasonCode (see ConnectionListenerIF) + Revision 1.8 2007/01/25 00:10:24 billhorsman New onAboutToDie event for ConnectionListenerIF that gets called if the maximum-active-time is exceeded. Index: AbstractProxyStatement.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/AbstractProxyStatement.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** AbstractProxyStatement.java 3 Mar 2006 09:58:26 -0000 1.22 --- AbstractProxyStatement.java 25 Jan 2007 23:38:24 -0000 1.23 *************** *** 68,72 **** try { statement.close(); ! connectionPool.throwConnection(proxyConnection, "Fatal SQL Exception has been detected"); // We should check all the existing connections as soon as possible --- 68,72 ---- try { statement.close(); ! connectionPool.throwConnection(proxyConnection, ConnectionListenerIF.FATAL_SQL_EXCEPTION_DETECTED, "Fatal SQL Exception has been detected"); // We should check all the existing connections as soon as possible *************** *** 277,280 **** --- 277,283 ---- Revision history: $Log$ + Revision 1.23 2007/01/25 23:38:24 billhorsman + Scrapped onAboutToDie and altered onDeath signature instead. Now includes reasonCode (see ConnectionListenerIF) + Revision 1.22 2006/03/03 09:58:26 billhorsman Fix for statement.getConnection(). See bug 1149834. Index: CompositeConnectionListener.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/CompositeConnectionListener.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** CompositeConnectionListener.java 25 Jan 2007 00:10:24 -0000 1.7 --- CompositeConnectionListener.java 25 Jan 2007 23:38:24 -0000 1.8 *************** *** 52,58 **** /** ! * @see ConnectionListenerIF#onDeath(Connection) */ ! public void onDeath(Connection connection) throws SQLException { Object[] listeners = getListeners(); --- 52,58 ---- /** ! * @see ConnectionListenerIF#onDeath(java.sql.Connection, int) */ ! public void onDeath(Connection connection, int reasonCode) throws SQLException { Object[] listeners = getListeners(); *************** *** 61,65 **** try { ConnectionListenerIF connectionListener = (ConnectionListenerIF) listeners[i]; ! connectionListener.onDeath(connection); } catch (RuntimeException re) { --- 61,65 ---- try { ConnectionListenerIF connectionListener = (ConnectionListenerIF) listeners[i]; ! connectionListener.onDeath(connection, reasonCode); } catch (RuntimeException re) { *************** *** 74,99 **** /** - * @see ConnectionListenerIF#onAboutToDie(java.sql.Connection, int) - */ - public void onAboutToDie(Connection connection, int reason) throws SQLException - { - Object[] listeners = getListeners(); - - for(int i=0; i<listeners.length; i++) { - try { - ConnectionListenerIF connectionListener = (ConnectionListenerIF) listeners[i]; - connectionListener.onAboutToDie(connection, reason); - } - catch (RuntimeException re) { - LOG.warn("RuntimeException received from listener "+listeners[i]+" when dispatching onAboutToDie event", re); - } - catch(SQLException se) { - LOG.warn("SQLException received from listener "+listeners[i]+" when dispatching onAboutToDie event - event dispatching cancelled"); - throw se; - } - } - } - - /** * @see ConnectionListenerIF#onExecute(String, long) */ --- 74,77 ---- *************** *** 135,138 **** --- 113,119 ---- Revision history: $Log$ + Revision 1.8 2007/01/25 23:38:24 billhorsman + Scrapped onAboutToDie and altered onDeath signature instead. Now includes reasonCode (see ConnectionListenerIF) + Revision 1.7 2007/01/25 00:10:24 billhorsman New onAboutToDie event for ConnectionListenerIF that gets called if the maximum-active-time is exceeded. Index: HouseKeeper.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/HouseKeeper.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** HouseKeeper.java 25 Jan 2007 00:10:25 -0000 1.6 --- HouseKeeper.java 25 Jan 2007 23:38:24 -0000 1.7 *************** *** 11,15 **** import java.sql.Connection; import java.sql.Statement; - import java.sql.SQLException; /** --- 11,14 ---- *************** *** 69,73 **** if (proxyConnection.isReallyClosed()) { proxyConnection.setStatus(ProxyConnectionIF.STATUS_OFFLINE, ProxyConnectionIF.STATUS_NULL); ! connectionPool.removeProxyConnection(proxyConnection, "it appears to be closed", ConnectionPool.FORCE_EXPIRY, true); } --- 68,72 ---- if (proxyConnection.isReallyClosed()) { proxyConnection.setStatus(ProxyConnectionIF.STATUS_OFFLINE, ProxyConnectionIF.STATUS_NULL); ! connectionPool.removeProxyConnection(proxyConnection, ConnectionListenerIF.HOUSE_KEEPER_TEST_FAIL, "it appears to be closed", ConnectionPool.FORCE_EXPIRY, true); } *************** *** 89,93 **** // There is a problem with this connection. Let's remove it! proxyConnection.setStatus(ProxyConnectionIF.STATUS_OFFLINE, ProxyConnectionIF.STATUS_NULL); ! connectionPool.removeProxyConnection(proxyConnection, "it has problems: " + e, ConnectionPool.REQUEST_EXPIRY, true); } finally { try { --- 88,92 ---- // There is a problem with this connection. Let's remove it! proxyConnection.setStatus(ProxyConnectionIF.STATUS_OFFLINE, ProxyConnectionIF.STATUS_NULL); ! connectionPool.removeProxyConnection(proxyConnection, ConnectionListenerIF.HOUSE_KEEPER_TEST_FAIL, "it has problems: " + e, ConnectionPool.REQUEST_EXPIRY, true); } finally { try { *************** *** 105,109 **** if (proxyConnection.setStatus(ProxyConnectionIF.STATUS_OFFLINE, ProxyConnectionIF.STATUS_NULL)) { // It is. Expire it now . ! connectionPool.expireProxyConnection(proxyConnection, reason, ConnectionPool.REQUEST_EXPIRY); } } else { --- 104,108 ---- if (proxyConnection.setStatus(ProxyConnectionIF.STATUS_OFFLINE, ProxyConnectionIF.STATUS_NULL)) { // It is. Expire it now . ! connectionPool.expireProxyConnection(proxyConnection, ConnectionListenerIF.MAXIMUM_CONNECTION_LIFETIME_EXCEEDED, reason, ConnectionPool.REQUEST_EXPIRY); } } else { *************** *** 138,147 **** // This connection has been active for way too long. We're // going to kill it :) ! try { ! connectionPool.onAboutToDie(proxyConnection.getConnection(), ConnectionListenerIF.LIFETIME_EXPIRED); ! } catch (SQLException e) { ! log.error("Problem during onAboutToDie (ignored)", e); ! } ! connectionPool.removeProxyConnection(proxyConnection, "it has been active for too long", ConnectionPool.FORCE_EXPIRY, true); String lastSqlCallMsg; --- 137,141 ---- // This connection has been active for way too long. We're // going to kill it :) ! connectionPool.removeProxyConnection(proxyConnection, ConnectionListenerIF.MAXIMUM_ACTIVE_TIME_EXPIRED, "it has been active for too long", ConnectionPool.FORCE_EXPIRY, true); String lastSqlCallMsg; *************** *** 266,269 **** --- 260,266 ---- Revision history: $Log$ + Revision 1.7 2007/01/25 23:38:24 billhorsman + Scrapped onAboutToDie and altered onDeath signature instead. Now includes reasonCode (see ConnectionListenerIF) + Revision 1.6 2007/01/25 00:10:25 billhorsman New onAboutToDie event for ConnectionListenerIF that gets called if the maximum-active-time is exceeded. Index: ConnectionPool.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ConnectionPool.java,v retrieving revision 1.85 retrieving revision 1.86 diff -C2 -d -r1.85 -r1.86 *** ConnectionPool.java 25 Jan 2007 00:10:24 -0000 1.85 --- ConnectionPool.java 25 Jan 2007 23:38:24 -0000 1.86 *************** *** 286,290 **** else { proxyConnection.setStatus(ProxyConnectionIF.STATUS_NULL); ! removeProxyConnection(proxyConnection, "it didn't pass the validation", ConnectionPool.REQUEST_EXPIRY, true); } --- 286,290 ---- else { proxyConnection.setStatus(ProxyConnectionIF.STATUS_NULL); ! removeProxyConnection(proxyConnection, ConnectionListenerIF.VALIDATION_FAIL, "it didn't pass the validation", ConnectionPool.REQUEST_EXPIRY, true); } *************** *** 343,347 **** if (proxyConnection.isMarkedForExpiry()) { if (proxyConnection.setStatus(ProxyConnectionIF.STATUS_ACTIVE, ProxyConnectionIF.STATUS_NULL)) { ! expireProxyConnection(proxyConnection, proxyConnection.getReasonForMark(), REQUEST_EXPIRY); } } else { --- 343,347 ---- if (proxyConnection.isMarkedForExpiry()) { if (proxyConnection.setStatus(ProxyConnectionIF.STATUS_ACTIVE, ProxyConnectionIF.STATUS_NULL)) { ! expireProxyConnection(proxyConnection, proxyConnection.getReasonCode(), proxyConnection.getReasonForMark(), REQUEST_EXPIRY); } } else { *************** *** 379,384 **** /** This means that there's something wrong the connection and it's probably best if no one uses it again. */ ! protected void throwConnection(ProxyConnectionIF proxyConnection, String reason) { ! expireConnectionAsSoonAsPossible(proxyConnection, reason, true); } --- 379,384 ---- /** This means that there's something wrong the connection and it's probably best if no one uses it again. */ ! protected void throwConnection(ProxyConnectionIF proxyConnection, int reasonCode, String reason) { ! expireConnectionAsSoonAsPossible(proxyConnection, reasonCode, reason, true); } *************** *** 405,409 **** * @param triggerSweep if true then this removal will trigger a prototype sweep */ ! protected void removeProxyConnection(ProxyConnectionIF proxyConnection, String reason, boolean forceExpiry, boolean triggerSweep) { // Just check that it is null if (forceExpiry || proxyConnection.isNull()) { --- 405,409 ---- * @param triggerSweep if true then this removal will trigger a prototype sweep */ ! protected void removeProxyConnection(ProxyConnectionIF proxyConnection, int reasonCode, String reason, boolean forceExpiry, boolean triggerSweep) { // Just check that it is null if (forceExpiry || proxyConnection.isNull()) { *************** *** 414,418 **** try { ! onDeath(proxyConnection.getConnection()); } catch (SQLException e) { log.error("Problem during onDeath (ignored)", e); --- 414,418 ---- try { ! onDeath(proxyConnection.getConnection(), reasonCode); } catch (SQLException e) { log.error("Problem during onDeath (ignored)", e); *************** *** 453,458 **** } ! protected void expireProxyConnection(ProxyConnectionIF proxyConnection, String reason, boolean forceExpiry) { ! removeProxyConnection(proxyConnection, reason, forceExpiry, true); } --- 453,458 ---- } ! protected void expireProxyConnection(ProxyConnectionIF proxyConnection, int reasonCode, String reason, boolean forceExpiry) { ! removeProxyConnection(proxyConnection, reasonCode, reason, forceExpiry, true); } *************** *** 543,547 **** try { connectionClosedManually = true; ! removeProxyConnection(getProxyConnection(i), "of shutdown", true, false); if (log.isDebugEnabled()) { log.debug("Connection #" + id + " closed"); --- 543,547 ---- try { connectionClosedManually = true; ! removeProxyConnection(getProxyConnection(i), ConnectionListenerIF.SHUTDOWN, "of shutdown", true, false); if (log.isDebugEnabled()) { log.debug("Connection #" + id + " closed"); *************** *** 648,652 **** } ! protected void expireAllConnections(String reason, boolean merciful) { // Do this in two stages because expiring a connection will trigger --- 648,652 ---- } ! protected void expireAllConnections(int reasonCode, String reason, boolean merciful) { // Do this in two stages because expiring a connection will trigger *************** *** 661,673 **** while (i.hasNext()) { ProxyConnectionIF pc = (ProxyConnectionIF) i.next(); ! expireConnectionAsSoonAsPossible(pc, reason, merciful); } } ! protected void expireConnectionAsSoonAsPossible(ProxyConnectionIF proxyConnection, String reason, boolean merciful) { if (proxyConnection.setStatus(ProxyConnectionIF.STATUS_AVAILABLE, ProxyConnectionIF.STATUS_OFFLINE)) { if (proxyConnection.setStatus(ProxyConnectionIF.STATUS_OFFLINE, ProxyConnectionIF.STATUS_NULL)) { // It is. Expire it now . ! expireProxyConnection(proxyConnection, reason, REQUEST_EXPIRY); } } else { --- 661,673 ---- while (i.hasNext()) { ProxyConnectionIF pc = (ProxyConnectionIF) i.next(); ! expireConnectionAsSoonAsPossible(pc, reasonCode, reason, merciful); } } ! protected void expireConnectionAsSoonAsPossible(ProxyConnectionIF proxyConnection, int reasonCode, String reason, boolean merciful) { if (proxyConnection.setStatus(ProxyConnectionIF.STATUS_AVAILABLE, ProxyConnectionIF.STATUS_OFFLINE)) { if (proxyConnection.setStatus(ProxyConnectionIF.STATUS_OFFLINE, ProxyConnectionIF.STATUS_NULL)) { // It is. Expire it now . ! expireProxyConnection(proxyConnection, reasonCode, reason, REQUEST_EXPIRY); } } else { *************** *** 686,690 **** // We have to make sure it's null first. ! expireProxyConnection(proxyConnection, reason, FORCE_EXPIRY); } --- 686,690 ---- // We have to make sure it's null first. ! expireProxyConnection(proxyConnection, reasonCode, reason, FORCE_EXPIRY); } *************** *** 785,795 **** /** Call the onDeath() method on each StateListenerIF . */ ! protected void onDeath(Connection connection) throws SQLException { ! this.compositeConnectionListener.onDeath(connection); ! } ! ! /** Call the onAboutToDie() method on each StateListenerIF . */ ! protected void onAboutToDie(Connection connection, int reason) throws SQLException { ! this.compositeConnectionListener.onAboutToDie(connection, reason); } --- 785,790 ---- /** Call the onDeath() method on each StateListenerIF . */ ! protected void onDeath(Connection connection, int reasonCode) throws SQLException { ! this.compositeConnectionListener.onDeath(connection, reasonCode); } *************** *** 879,883 **** proxyConnection.setStatus(ProxyConnectionIF.STATUS_AVAILABLE, ProxyConnectionIF.STATUS_OFFLINE); proxyConnection.setStatus(ProxyConnectionIF.STATUS_OFFLINE, ProxyConnectionIF.STATUS_NULL); ! removeProxyConnection(proxyConnection, "it was manually killed", forceExpiry, true); success = true; break; --- 874,878 ---- proxyConnection.setStatus(ProxyConnectionIF.STATUS_AVAILABLE, ProxyConnectionIF.STATUS_OFFLINE); proxyConnection.setStatus(ProxyConnectionIF.STATUS_OFFLINE, ProxyConnectionIF.STATUS_NULL); ! removeProxyConnection(proxyConnection, ConnectionListenerIF.MANUAL_EXPIRY, "it was manually killed", forceExpiry, true); success = true; break; *************** *** 913,919 **** * original state. * @param connection the one to reset */ ! protected boolean resetConnection(Connection connection, String id) { ! return connectionResetter.reset(connection, id); } --- 908,921 ---- * original state. * @param connection the one to reset + * @param id the id of the connection + * @throws SQLException if the call to {@link java.sql.Connection#isClosed()} fails + * @return true if it was successfully reset, false if there was a problem (like the connection being already closed) */ ! protected boolean resetConnection(Connection connection, String id) throws SQLException { ! if (connection.isClosed()) { ! return false; ! } else { ! return connectionResetter.reset(connection, id); ! } } *************** *** 1111,1114 **** --- 1113,1118 ---- return getPrototyper().getConnectionCount(); } + + } *************** *** 1116,1119 **** --- 1120,1126 ---- Revision history: $Log$ + Revision 1.86 2007/01/25 23:38:24 billhorsman + Scrapped onAboutToDie and altered onDeath signature instead. Now includes reasonCode (see ConnectionListenerIF) + Revision 1.85 2007/01/25 00:10:24 billhorsman New onAboutToDie event for ConnectionListenerIF that gets called if the maximum-active-time is exceeded. Index: ProxyConnection.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ProxyConnection.java,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** ProxyConnection.java 10 Jan 2007 23:47:39 -0000 1.38 --- ProxyConnection.java 25 Jan 2007 23:38:24 -0000 1.39 *************** *** 236,240 **** // slower if (!connectionPool.resetConnection(connection, "#" + getId())) { ! connectionPool.removeProxyConnection(this, "it couldn't be reset", true, true); removed = true; } --- 236,240 ---- // slower if (!connectionPool.resetConnection(connection, "#" + getId())) { ! connectionPool.removeProxyConnection(this, ConnectionListenerIF.RESET_FAIL, "it couldn't be reset", true, true); removed = true; } *************** *** 497,500 **** --- 497,504 ---- } + public int getReasonCode() { + return 0; //To change body of implemented methods use File | Settings | File Templates. + } + public void addSqlCall(String sqlCall) { this.sqlCalls.add(sqlCall); Index: ProxoolFacade.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ProxoolFacade.java,v retrieving revision 1.85 retrieving revision 1.86 diff -C2 -d -r1.85 -r1.86 *** ProxoolFacade.java 2 Nov 2006 10:00:34 -0000 1.85 --- ProxoolFacade.java 25 Jan 2007 23:38:24 -0000 1.86 *************** *** 351,355 **** */ public static void killAllConnections(String alias, String reason, boolean merciful) throws ProxoolException { ! ConnectionPoolManager.getInstance().getConnectionPool(alias).expireAllConnections(reason, merciful); } --- 351,355 ---- */ public static void killAllConnections(String alias, String reason, boolean merciful) throws ProxoolException { ! ConnectionPoolManager.getInstance().getConnectionPool(alias).expireAllConnections(ConnectionListenerIF.MANUAL_EXPIRY, reason, merciful); } *************** *** 855,858 **** --- 855,861 ---- Revision history: $Log$ + Revision 1.86 2007/01/25 23:38:24 billhorsman + Scrapped onAboutToDie and altered onDeath signature instead. Now includes reasonCode (see ConnectionListenerIF) + Revision 1.85 2006/11/02 10:00:34 billhorsman Added ProxoolFacade.disableShutdownHook. Index: ProxyConnectionIF.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ProxyConnectionIF.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ProxyConnectionIF.java 7 Oct 2005 08:18:24 -0000 1.7 --- ProxyConnectionIF.java 25 Jan 2007 23:38:24 -0000 1.8 *************** *** 132,135 **** --- 132,148 ---- String getLastSqlCall(); + /** + * Get the reason why this connection is {@link #getMark() marked} + * @return {@link org.logicalcobwebs.proxool.ConnectionListenerIF#MAXIMUM_ACTIVE_TIME_EXPIRED}, + * {@link org.logicalcobwebs.proxool.ConnectionListenerIF#HOUSE_KEEPER_TEST_FAIL}, + * {@link org.logicalcobwebs.proxool.ConnectionListenerIF#FATAL_SQL_EXCEPTION_DETECTED}, + * {@link org.logicalcobwebs.proxool.ConnectionListenerIF#MANUAL_EXPIRY}, + * {@link org.logicalcobwebs.proxool.ConnectionListenerIF#MAXIMUM_CONNECTION_LIFETIME_EXCEEDED}, + * {@link org.logicalcobwebs.proxool.ConnectionListenerIF#RESET_FAIL}, + * {@link org.logicalcobwebs.proxool.ConnectionListenerIF#SHUTDOWN}, or + * {@link org.logicalcobwebs.proxool.ConnectionListenerIF#VALIDATION_FAIL} + */ + int getReasonCode(); + } *************** *** 138,141 **** --- 151,157 ---- Revision history: $Log$ + Revision 1.8 2007/01/25 23:38:24 billhorsman + Scrapped onAboutToDie and altered onDeath signature instead. Now includes reasonCode (see ConnectionListenerIF) + Revision 1.7 2005/10/07 08:18:24 billhorsman New sqlCalls gives list of SQL calls rather than just he most recent (for when a connection makes more than one call before being returned to the pool) |