avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: jakarta-avalon/src/java/org/apache/avalon/util/datasource JdbcConnection.java
Date Fri, 09 Mar 2001 16:58:09 GMT
bloritsch    01/03/09 08:58:09

  Modified:    src/java/org/apache/avalon/util/datasource
                        JdbcConnection.java
  Log:
  Fixing autocommit code.
  
  Revision  Changes    Path
  1.2       +39 -39    jakarta-avalon/src/java/org/apache/avalon/util/datasource/JdbcConnection.java
  
  Index: JdbcConnection.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon/src/java/org/apache/avalon/util/datasource/JdbcConnection.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JdbcConnection.java	2001/02/24 03:59:38	1.1
  +++ JdbcConnection.java	2001/03/09 16:58:08	1.2
  @@ -1,10 +1,10 @@
  -/* 
  - * 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. 
  - */ 
  +/*
  + * 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.util.datasource;
   
   import java.sql.CallableStatement;
  @@ -28,9 +28,9 @@
    * total number of Connection objects that are created.
    *
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Revision: 1.1 $ $Date: 2001/02/24 03:59:38 $
  + * @version CVS $Revision: 1.2 $ $Date: 2001/03/09 16:58:08 $
    */
  -public class JdbcConnection 
  +public class JdbcConnection
       extends AbstractLoggable
       implements Connection, Recyclable
   {
  @@ -43,154 +43,154 @@
           m_pool = pool;
       }
   
  -    public Statement createStatement() 
  +    public Statement createStatement()
           throws SQLException
       {
           return m_connection.createStatement();
       }
   
  -    public PreparedStatement prepareStatement( final String sql ) 
  +    public PreparedStatement prepareStatement( final String sql )
           throws SQLException
       {
           return m_connection.prepareStatement( sql );
       }
   
  -    public CallableStatement prepareCall( final String sql ) 
  +    public CallableStatement prepareCall( final String sql )
           throws SQLException
       {
           return m_connection.prepareCall( sql );
       }
   
  -    public String nativeSQL( final String sql ) 
  +    public String nativeSQL( final String sql )
           throws SQLException
       {
           return m_connection.nativeSQL( sql );
       }
   
  -    public void setAutoCommit( final boolean autoCommit ) 
  +    public void setAutoCommit( final boolean autoCommit )
           throws SQLException
       {
           m_connection.setAutoCommit( autoCommit );
       }
   
  -    public boolean getAutoCommit() 
  +    public boolean getAutoCommit()
           throws SQLException
       {
           return m_connection.getAutoCommit();
       }
   
  -    public void commit() 
  +    public void commit()
           throws SQLException
       {
           m_connection.commit();
       }
   
  -    public void rollback() 
  +    public void rollback()
           throws SQLException
       {
           m_connection.rollback();
       }
   
  -    public void close() 
  +    public void close()
           throws SQLException
       {
  -        setAutoCommit( false );
  +        clearWarnings();
           m_pool.put( this );
       }
   
  -    public void recycle() 
  +    public void recycle()
       {
  -        try { m_connection.close(); } 
  +        try { m_connection.close(); }
           catch( final SQLException se )
           {
               getLogger().warn( "Could not close connection", se );
           }
       }
   
  -    public boolean isClosed() 
  +    public boolean isClosed()
           throws SQLException
       {
           return m_connection.isClosed();
       }
   
  -    public DatabaseMetaData getMetaData() 
  +    public DatabaseMetaData getMetaData()
           throws SQLException
       {
           return m_connection.getMetaData();
       }
   
  -    public void setReadOnly( final boolean readOnly ) 
  +    public void setReadOnly( final boolean readOnly )
           throws SQLException
       {
           m_connection.setReadOnly( readOnly );
       }
   
  -    public boolean isReadOnly() 
  +    public boolean isReadOnly()
           throws SQLException
       {
           return m_connection.isReadOnly();
       }
   
  -    public void setCatalog( final String catalog ) 
  +    public void setCatalog( final String catalog )
           throws SQLException
       {
           m_connection.setCatalog( catalog );
       }
   
  -    public String getCatalog() 
  +    public String getCatalog()
           throws SQLException
       {
           return m_connection.getCatalog();
       }
   
  -    public void setTransactionIsolation( final int level ) 
  +    public void setTransactionIsolation( final int level )
           throws SQLException
       {
           m_connection.setTransactionIsolation(level);
       }
   
  -    public int getTransactionIsolation() 
  +    public int getTransactionIsolation()
           throws SQLException
       {
           return m_connection.getTransactionIsolation();
       }
   
  -    public SQLWarning getWarnings() 
  +    public SQLWarning getWarnings()
           throws SQLException
       {
           return m_connection.getWarnings();
       }
   
  -    public void clearWarnings() 
  +    public void clearWarnings()
           throws SQLException
       {
           m_connection.clearWarnings();
       }
   
  -    public Statement createStatement( final int resultSetType, 
  -                                      final int resultSetConcurrency ) 
  +    public Statement createStatement( final int resultSetType,
  +                                      final int resultSetConcurrency )
           throws SQLException
       {
           return m_connection.createStatement(resultSetType, resultSetConcurrency);
       }
   
  -    public PreparedStatement prepareStatement( final String sql, 
  -                                               final int resultSetType, 
  -                                               final int resultSetConcurrency ) 
  +    public PreparedStatement prepareStatement( final String sql,
  +                                               final int resultSetType,
  +                                               final int resultSetConcurrency )
           throws SQLException
       {
           return m_connection.prepareStatement( sql, resultSetType, resultSetConcurrency
);
       }
   
  -    public CallableStatement prepareCall( final String sql, 
  -                                          final int resultSetType, 
  +    public CallableStatement prepareCall( final String sql,
  +                                          final int resultSetType,
                                             final int resultSetConcurrency )
           throws SQLException
       {
           return m_connection.prepareCall( sql, resultSetType, resultSetConcurrency );
       }
   
  -    public Map getTypeMap() 
  +    public Map getTypeMap()
           throws SQLException
       {
           return m_connection.getTypeMap();
  
  
  

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


Mime
View raw message