You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by bl...@apache.org on 2001/11/02 19:57:11 UTC
cvs commit: jakarta-avalon-excalibur/src/java/org/apache/avalon/excalibur/datasource NoAvailableConnectionException.java NoValidConnectionException.java JdbcDataSource.java
bloritsch 01/11/02 10:57:11
Modified: src/java/org/apache/avalon/excalibur/datasource
JdbcDataSource.java
Added: src/java/org/apache/avalon/excalibur/datasource
NoAvailableConnectionException.java
NoValidConnectionException.java
Log:
Add new Exceptions so that better ExceptionHandling can be done by clients
Revision Changes Path
1.10 +2 -2 jakarta-avalon-excalibur/src/java/org/apache/avalon/excalibur/datasource/JdbcDataSource.java
Index: JdbcDataSource.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/src/java/org/apache/avalon/excalibur/datasource/JdbcDataSource.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- JdbcDataSource.java 2001/11/01 14:25:57 1.9
+++ JdbcDataSource.java 2001/11/02 18:57:11 1.10
@@ -34,7 +34,7 @@
* </pre>
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
- * @version CVS $Revision: 1.9 $ $Date: 2001/11/01 14:25:57 $
+ * @version CVS $Revision: 1.10 $ $Date: 2001/11/02 18:57:11 $
* @since 4.0
*/
public class JdbcDataSource
@@ -187,7 +187,7 @@
getLogger().warn( "Could not return Connection", e );
}
- throw new SQLException( e.getMessage() );
+ throw new NoAvailableConnectionException( e.getMessage() );
}
}
1.1 jakarta-avalon-excalibur/src/java/org/apache/avalon/excalibur/datasource/NoAvailableConnectionException.java
Index: NoAvailableConnectionException.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE file.
*/
package org.apache.avalon.excalibur.datasource;
import java.sql.SQLException;
/**
* Exception that is thrown when there are no more Connection objects available
* in the pool.
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
* @version CVS $Revision: 1.1 $ $Date: 2001/11/02 18:57:11 $
* @since 4.1
*/
public class NoAvailableConnectionException extends SQLException {
public NoAvailableConnectionException()
{
super();
}
public NoAvailableConnectionException( String message )
{
super( message );
}
public NoAvailableConnectionException( String message, String SQLState )
{
super( message, SQLState );
}
public NoAvailableConnectionException( String message, String SQLState, int vendorCode )
{
super( message, SQLState, vendorCode );
}
}
1.1 jakarta-avalon-excalibur/src/java/org/apache/avalon/excalibur/datasource/NoValidConnectionException.java
Index: NoValidConnectionException.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE file.
*/
package org.apache.avalon.excalibur.datasource;
import java.sql.SQLException;
/**
* Exception that is thrown when there is no valid Connection wrapper available
* in the ClassLoader.
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
* @version CVS $Revision: 1.1 $ $Date: 2001/11/02 18:57:11 $
* @since 4.1
*/
public class NoValidConnectionException extends SQLException {
public NoValidConnectionException()
{
super();
}
public NoValidConnectionException( String message )
{
super( message );
}
public NoValidConnectionException( String message, String SQLState )
{
super( message, SQLState );
}
public NoValidConnectionException( String message, String SQLState, int vendorCode )
{
super( message, SQLState, vendorCode );
}
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>