[Proxool-cvs] proxool/src/java/org/logicalcobwebs/proxool ProxyConnection.java,1.33,1.34 ProxyConnec
UNMAINTAINED!
Brought to you by:
billhorsman
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 |