bloritsch 2002/11/04 20:34:02
Modified: datasource/src/java/org/apache/avalon/excalibur/datasource
AbstractJdbcConnection.java
datasource/src/java/org/apache/avalon/excalibur/datasource/cluster
AbstractDataSourceCluster.java
DefaultHashedDataSourceCluster.java
DefaultRoundRobinDataSourceCluster.java
HashedDataSourceCluster.java
IndexedDataSourceCluster.java
Log:
fix compile error
Revision Changes Path
1.17 +14 -1
jakarta-avalon-excalibur/datasource/src/java/org/apache/avalon/excalibur/datasource/AbstractJdbcConnection.java
Index: AbstractJdbcConnection.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/datasource/src/java/org/apache/avalon/excalibur/datasource/AbstractJdbcConnection.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- AbstractJdbcConnection.java 13 Jun 2002 17:24:50 -0000 1.16
+++ AbstractJdbcConnection.java 5 Nov 2002 04:34:02 -0000 1.17
@@ -42,6 +42,8 @@
protected SQLException m_testException;
protected long m_lastUsed = System.currentTimeMillis();
+ protected Map m_statements;
+
/**
* Private default constructor so that it cannot be instantiated any
* other way than we desire.
@@ -120,6 +122,17 @@
try
{
m_connection.clearWarnings();
+
+ Iterator it = m_statements.getKeySet().iterator();
+ while (it.hasNext())
+ {
+ Object key = it.next();
+ Statement statement = (Statement)m_statements.get( key );
+
+ try { statement.close(); } catch ( SQLException se ) {}
+
+ m_statements.remove( key );
+ }
}
catch( SQLException se )
{
1.3 +3 -3
jakarta-avalon-excalibur/datasource/src/java/org/apache/avalon/excalibur/datasource/cluster/AbstractDataSourceCluster.java
Index: AbstractDataSourceCluster.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/datasource/src/java/org/apache/avalon/excalibur/datasource/cluster/AbstractDataSourceCluster.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- AbstractDataSourceCluster.java 13 Jun 2002 17:24:51 -0000 1.2
+++ AbstractDataSourceCluster.java 5 Nov 2002 04:34:02 -0000 1.3
@@ -68,7 +68,7 @@
* @throws NoValidConnectionException when there is no valid Connection wrapper
* available in the classloader or when the index is not valid.
*
- * @throws NoAvailableConnectionException when there are no more available
+ * @throws NoValidConnectionException when there are no more available
* Connections in the pool.
*/
public Connection getConnectionForIndex( int index ) throws SQLException
@@ -88,7 +88,7 @@
* Called by the Container to tell the component which ComponentLocator
* is controlling it.
*
- * @param ComponentLocator which curently owns the component.
+ * @param manager which curently owns the component.
*/
public void compose( ComponentManager manager )
{
1.2 +3 -3
jakarta-avalon-excalibur/datasource/src/java/org/apache/avalon/excalibur/datasource/cluster/DefaultHashedDataSourceCluster.java
Index: DefaultHashedDataSourceCluster.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/datasource/src/java/org/apache/avalon/excalibur/datasource/cluster/DefaultHashedDataSourceCluster.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DefaultHashedDataSourceCluster.java 22 Apr 2002 03:04:27 -0000 1.1
+++ DefaultHashedDataSourceCluster.java 5 Nov 2002 04:34:02 -0000 1.2
@@ -144,7 +144,7 @@
* @throws NoValidConnectionException when there is no valid Connection wrapper
* available in the classloader or when the index is not valid.
*
- * @throws NoAvailableConnectionException when there are no more available
+ * @throws NoValidConnectionException when there are no more available
* Connections in the pool.
*/
public Connection getConnectionForHashObject( Object hashObject ) throws
SQLException
@@ -161,7 +161,7 @@
* @throws NoValidConnectionException when there is no valid Connection wrapper
* available in the classloader or when the index is not valid.
*
- * @throws NoAvailableConnectionException when there are no more available
+ * @throws NoValidConnectionException when there are no more available
* Connections in the pool.
*/
public Connection getConnectionForHashCode( int hashCode ) throws SQLException
1.2 +2 -2
jakarta-avalon-excalibur/datasource/src/java/org/apache/avalon/excalibur/datasource/cluster/DefaultRoundRobinDataSourceCluster.java
Index: DefaultRoundRobinDataSourceCluster.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/datasource/src/java/org/apache/avalon/excalibur/datasource/cluster/DefaultRoundRobinDataSourceCluster.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DefaultRoundRobinDataSourceCluster.java 22 Apr 2002 03:04:27 -0000 1.1
+++ DefaultRoundRobinDataSourceCluster.java 5 Nov 2002 04:34:02 -0000 1.2
@@ -99,7 +99,7 @@
* @throws NoValidConnectionException when there is no valid Connection wrapper
* available in the classloader.
*
- * @throws NoAvailableConnectionException when there are no more available
+ * @throws NoValidConnectionException when there are no more available
* Connections in the pool.
*/
public Connection getConnection() throws SQLException
1.2 +7 -7
jakarta-avalon-excalibur/datasource/src/java/org/apache/avalon/excalibur/datasource/cluster/HashedDataSourceCluster.java
Index: HashedDataSourceCluster.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/datasource/src/java/org/apache/avalon/excalibur/datasource/cluster/HashedDataSourceCluster.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- HashedDataSourceCluster.java 22 Apr 2002 03:04:27 -0000 1.1
+++ HashedDataSourceCluster.java 5 Nov 2002 04:34:02 -0000 1.2
@@ -37,10 +37,10 @@
* @param hashObject Object whose hashCode will be used to select which of the
Clusted
* DataSources will be provide a Connection.
*
- * @throws NoValidConnectionException when there is no valid Connection wrapper
+ * @throws org.apache.avalon.excalibur.datasource.NoValidConnectionException
when there is no valid Connection wrapper
* available in the classloader or when the index is not valid.
*
- * @throws NoAvailableConnectionException when there are no more available
+ * @throws
org.apache.avalon.excalibur.datasource.NoAvailableConnectionException when there are
no more available
* Connections in the pool.
*/
Connection getConnectionForHashObject( Object hashObject ) throws SQLException;
@@ -51,10 +51,10 @@
* @param hashCode HashCode which will be used to select which of the Clusted
* DataSources will be provide a Connection.
*
- * @throws NoValidConnectionException when there is no valid Connection wrapper
+ * @throws org.apache.avalon.excalibur.datasource.NoValidConnectionException
when there is no valid Connection wrapper
* available in the classloader or when the index is not valid.
*
- * @throws NoAvailableConnectionException when there are no more available
+ * @throws
org.apache.avalon.excalibur.datasource.NoAvailableConnectionException when there are
no more available
* Connections in the pool.
*/
Connection getConnectionForHashCode( int hashCode ) throws SQLException;
@@ -64,10 +64,10 @@
*
* @param index Index of the DataSource for which a connection is to be
returned.
*
- * @throws NoValidConnectionException when there is no valid Connection wrapper
+ * @throws org.apache.avalon.excalibur.datasource.NoValidConnectionException
when there is no valid Connection wrapper
* available in the classloader or when the index is not valid.
*
- * @throws NoAvailableConnectionException when there are no more available
+ * @throws
org.apache.avalon.excalibur.datasource.NoAvailableConnectionException when there are
no more available
* Connections in the pool.
*/
Connection getConnectionForIndex( int index ) throws SQLException;
1.2 +3 -3
jakarta-avalon-excalibur/datasource/src/java/org/apache/avalon/excalibur/datasource/cluster/IndexedDataSourceCluster.java
Index: IndexedDataSourceCluster.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/datasource/src/java/org/apache/avalon/excalibur/datasource/cluster/IndexedDataSourceCluster.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- IndexedDataSourceCluster.java 22 Apr 2002 03:04:27 -0000 1.1
+++ IndexedDataSourceCluster.java 5 Nov 2002 04:34:02 -0000 1.2
@@ -36,10 +36,10 @@
*
* @param index Index of the DataSource for which a connection is to be
returned.
*
- * @throws NoValidConnectionException when there is no valid Connection wrapper
+ * @throws org.apache.avalon.excalibur.datasource.NoValidConnectionException
when there is no valid Connection wrapper
* available in the classloader or when the index is not valid.
*
- * @throws NoAvailableConnectionException when there are no more available
+ * @throws
org.apache.avalon.excalibur.datasource.NoAvailableConnectionException when there are
no more available
* Connections in the pool.
*/
Connection getConnectionForIndex( int index ) throws SQLException;
--
To unsubscribe, e-mail: <mailto:avalon-cvs-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@;jakarta.apache.org>