avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pro...@apache.org
Subject cvs commit: avalon-excalibur/datasource/src/java/org/apache/avalon/excalibur/datasource AbstractJdbcConnection.java
Date Thu, 17 Apr 2003 20:46:49 GMT
proyal      2003/04/17 13:46:49

  Modified:    datasource default.properties
               datasource/src/java/org/apache/avalon/excalibur/datasource
                        AbstractJdbcConnection.java
  Log:
  Throw the TargetException, so SQLException's get thrown correctly. DOH!
  
  Revision  Changes    Path
  1.27      +1 -1      avalon-excalibur/datasource/default.properties
  
  Index: default.properties
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/datasource/default.properties,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- default.properties	7 Apr 2003 18:45:55 -0000	1.26
  +++ default.properties	17 Apr 2003 20:46:49 -0000	1.27
  @@ -8,7 +8,7 @@
   name=excalibur-datasource
   Name=Excalibur Datasource
   dir-name=datasource
  -version=1.1
  +version=1.1a
   package-version=1.0
   year=2000-2002
   
  
  
  
  1.28      +13 -5     avalon-excalibur/datasource/src/java/org/apache/avalon/excalibur/datasource/AbstractJdbcConnection.java
  
  Index: AbstractJdbcConnection.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/datasource/src/java/org/apache/avalon/excalibur/datasource/AbstractJdbcConnection.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- AbstractJdbcConnection.java	8 Apr 2003 18:34:33 -0000	1.27
  +++ AbstractJdbcConnection.java	17 Apr 2003 20:46:49 -0000	1.28
  @@ -52,6 +52,7 @@
   import java.lang.reflect.Method;
   import java.lang.reflect.Proxy;
   import java.lang.reflect.InvocationHandler;
  +import java.lang.reflect.InvocationTargetException;
   import java.sql.Connection;
   import java.sql.PreparedStatement;
   import java.sql.ResultSet;
  @@ -345,13 +346,20 @@
           Object retVal = null;
           Method executeMethod = (Method)m_methods.get( method.getName() );
   
  -        if( null == executeMethod )
  +        try
           {
  -            retVal = method.invoke( m_connection, args );
  +            if( null == executeMethod )
  +            {
  +                retVal = method.invoke( m_connection, args );
  +            }
  +            else
  +            {
  +                retVal = executeMethod.invoke( this, args );
  +            }
           }
  -        else
  +        catch( InvocationTargetException e )
           {
  -            retVal = executeMethod.invoke( this, args );
  +            throw e.getTargetException();
           }
   
           return retVal;
  
  
  

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


Mime
View raw message