diff --git a/src/net/java/dev/simplepool/SimplePool.java b/src/net/java/dev/simplepool/SimplePool.java
index 160a068..1a38857 100644
--- a/src/net/java/dev/simplepool/SimplePool.java
+++ b/src/net/java/dev/simplepool/SimplePool.java
@@ -1,7 +1,7 @@
/*
* $Source: /zpool01/javanet/scm/svn/tmp/cvs2svn/simplepool/src/net/java/dev/simplepool/SimplePool.java,v $
- * $Revision: 1.1 $
- * $Date: 2004-03-28 02:04:57 $
+ * $Revision: 1.2 $
+ * $Date: 2004-03-30 02:10:16 $
*
* Copyright (c) 2002, Marc A. Mnich (http://www.javaexchange.com/)
* All rights reserved.
@@ -33,7 +33,7 @@ import java.util.Date;
* @author Marc A. Mnich
* @author Russell Beattie
* @author Erik C. Thauvin
- * @version $Revision: 1.1 $, $Date: 2004-03-28 02:04:57 $
+ * @version $Revision: 1.2 $, $Date: 2004-03-30 02:10:16 $
* @since 1.0
*/
public class SimplePool implements Runnable {
@@ -398,9 +398,10 @@ public class SimplePool implements Runnable {
res = "freed " + conn.toString();
log.debug("Freed connection [" + String.valueOf(thisconn) + ']');
} else {
- log.error("Could not free connection [" + String.valueOf(thisconn) + ']');
+ log.error("Could not free connection.");
}
+
return res;
}
diff --git a/src/net/java/dev/simplepool/SimplePoolConnection.java b/src/net/java/dev/simplepool/SimplePoolConnection.java
index a68e878..0336af2 100644
--- a/src/net/java/dev/simplepool/SimplePoolConnection.java
+++ b/src/net/java/dev/simplepool/SimplePoolConnection.java
@@ -1,7 +1,7 @@
/*
* $Source: /zpool01/javanet/scm/svn/tmp/cvs2svn/simplepool/src/net/java/dev/simplepool/SimplePoolConnection.java,v $
- * $Revision: 1.1 $
- * $Date: 2004-03-28 02:04:57 $
+ * $Revision: 1.2 $
+ * $Date: 2004-03-30 02:10:16 $
*
* Copyright (c) 2004, Russell Beattie (http://www.russellbeattie.com/)
* All rights reserved.
@@ -47,7 +47,7 @@ import java.util.Map;
*
* @author Russell Beattie
* @author Erik C. Thauvin
- * @version $Revision: 1.1 $, $Date: 2004-03-28 02:04:57 $
+ * @version $Revision: 1.2 $, $Date: 2004-03-30 02:10:16 $
* @since 1.0
*/
public class SimplePoolConnection implements Connection {
@@ -60,9 +60,14 @@ public class SimplePoolConnection implements Connection {
*
* @param pool The connection pool.
*/
- public SimplePoolConnection(SimplePool pool) {
+ public SimplePoolConnection(SimplePool pool)
+ throws SQLException {
this.pool = pool;
conn = pool.getConnection();
+ if (conn == null)
+ {
+ throw new SQLException("No connections currently available in the pool.");
+ }
}
/**