You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by tb...@apache.org on 2004/05/11 23:23:02 UTC

cvs commit: avalon-components/facilities/dbcp/api/src/java/org/apache/avalon/dbcp DbUrlNotFoundException.java DriverNotFoundException.java ConnectionManager.java

tbennett    2004/05/11 14:23:02

  Modified:    facilities/dbcp/api/src/java/org/apache/avalon/dbcp
                        ConnectionManager.java
  Added:       facilities/dbcp/api/src/java/org/apache/avalon/dbcp
                        DbUrlNotFoundException.java
                        DriverNotFoundException.java
  Log:
  New database Connection Pooling facility
  
  Revision  Changes    Path
  1.2       +4 -3      avalon-components/facilities/dbcp/api/src/java/org/apache/avalon/dbcp/ConnectionManager.java
  
  Index: ConnectionManager.java
  ===================================================================
  RCS file: /home/cvs/avalon-components/facilities/dbcp/api/src/java/org/apache/avalon/dbcp/ConnectionManager.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ConnectionManager.java	7 May 2004 23:18:20 -0000	1.1
  +++ ConnectionManager.java	11 May 2004 21:23:02 -0000	1.2
  @@ -18,6 +18,7 @@
   package org.apache.avalon.dbcp;
   
   import java.sql.Connection;
  +import java.sql.SQLException;
   
   /**
    * Service definition for a JDBC SQL connection manager for obtaining
  @@ -34,12 +35,12 @@
   	 * 
   	 * @return a <code>java.sql.Connection</code> to the default data source
   	 */
  -	Connection getConnection();
  +	Connection getConnection() throws SQLException;
   	/**
   	 * Returns a <code>java.sql.Connection</code> to the specified data source.
   	 * 
   	 * @param name the name of the data source to obtain a connection to
   	 * @return a <code>java.sql.Connection</code> to the specified data source
   	 */
  -	Connection getConnection(String name);
  +	Connection getConnection(String name) throws SQLException;
   }
  
  
  
  1.1                  avalon-components/facilities/dbcp/api/src/java/org/apache/avalon/dbcp/DbUrlNotFoundException.java
  
  Index: DbUrlNotFoundException.java
  ===================================================================
  /* 
   * Copyright 2004 Apache Software Foundation
   * Licensed  under the  Apache License,  Version 2.0  (the "License");
   * you may not use  this file  except in  compliance with the License.
   * You may obtain a copy of the License at 
   * 
   *   http://www.apache.org/licenses/LICENSE-2.0
   * 
   * Unless required by applicable law or agreed to in writing, software
   * distributed  under the  License is distributed on an "AS IS" BASIS,
   * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or
   * implied.
   * 
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
   
  package org.apache.avalon.dbcp;
  
  /**
   * Thrown when determined that the user has not defined the database
   * URL of the datasource.
   * 
   * @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a>
   * @version $Revision: 1.1 $ $Date: 2004/05/11 21:23:02 $
   */
  public class DbUrlNotFoundException extends Exception {
  
      /**
       * Constructs a new exception with <code>null</code> as the
       * detailed message.
       */
      public DbUrlNotFoundException()
      {
          super();
      }
  
      /**
       * Constructs a new exception with the specified detail
       * message.
       * 
       * @param message the detail message
       */
      public DbUrlNotFoundException( final String message )
      {
          super( message );
      }
  
      /**
       * Constructs a new exception with the specified cause and a
       * detail message of (cause==null ? null : cause.toString())
       * (which typically contains the class and detail message of
       * cause). This constructor is useful for exceptions that are
       * little more than wrappers for other throwables.
       *  
       * @param cause the cause
       */
      public DbUrlNotFoundException( final Throwable cause )
      {
          super( cause );
      }
  
      /**
       * Constructs a new exception with the specified detail message
       * and cause.
       * <p>
       * Note that the detail message associated with cause is not
       * automatically incorporated in this exception's detail message.
       *  
       * @param message the detail message
       * @param cause the cause
       */
      public DbUrlNotFoundException( final String message,
              final Throwable cause)
      {
          super( message, cause );
      }
  
  }
  
  
  
  1.1                  avalon-components/facilities/dbcp/api/src/java/org/apache/avalon/dbcp/DriverNotFoundException.java
  
  Index: DriverNotFoundException.java
  ===================================================================
  /* 
   * Copyright 2004 Apache Software Foundation
   * Licensed  under the  Apache License,  Version 2.0  (the "License");
   * you may not use  this file  except in  compliance with the License.
   * You may obtain a copy of the License at 
   * 
   *   http://www.apache.org/licenses/LICENSE-2.0
   * 
   * Unless required by applicable law or agreed to in writing, software
   * distributed  under the  License is distributed on an "AS IS" BASIS,
   * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or
   * implied.
   * 
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
   
  package org.apache.avalon.dbcp;
  
  /**
   * Thrown when determined that the user has not defined at least
   * the JDBC driver of the named datasource.
   * 
   * @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a>
   * @version $Revision: 1.1 $ $Date: 2004/05/11 21:23:02 $
   */
  public class DriverNotFoundException extends Exception {
  
      /**
       * Constructs a new exception with <code>null</code> as the
       * detailed message.
       */
      public DriverNotFoundException()
      {
          super();
      }
  
      /**
       * Constructs a new exception with the specified detail
       * message.
       * 
       * @param message the detail message
       */
      public DriverNotFoundException( final String message )
      {
          super( message );
      }
  
      /**
       * Constructs a new exception with the specified cause and a
       * detail message of (cause==null ? null : cause.toString())
       * (which typically contains the class and detail message of
       * cause). This constructor is useful for exceptions that are
       * little more than wrappers for other throwables.
       *  
       * @param cause the cause
       */
      public DriverNotFoundException( final Throwable cause )
      {
          super( cause );
      }
  
      /**
       * Constructs a new exception with the specified detail message
       * and cause.
       * <p>
       * Note that the detail message associated with cause is not
       * automatically incorporated in this exception's detail message.
       *  
       * @param message the detail message
       * @param cause the cause
       */
      public DriverNotFoundException( final String message,
              final Throwable cause)
      {
          super( message, cause );
      }
  
  }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org