craigmcc    01/01/31 13:45:14

  Modified:    src/share/org/apache/struts/util GenericConnection.java
  Log:
  Ignore SQLException thrown by the Informix implementation of
  setReadOnly(), which does not support this capability.
  
  Revision  Changes    Path
  1.6       +11 -7     
jakarta-struts/src/share/org/apache/struts/util/GenericConnection.java
  
  Index: GenericConnection.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/GenericConnection.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- GenericConnection.java    2001/01/11 00:03:38     1.5
  +++ GenericConnection.java    2001/01/31 21:45:13     1.6
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/GenericConnection.java,v 1.5 
2001/01/11 00:03:38 craigmcc Exp $
  - * $Revision: 1.5 $
  - * $Date: 2001/01/11 00:03:38 $
  + * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/GenericConnection.java,v 1.6 
2001/01/31 21:45:13 craigmcc Exp $
  + * $Revision: 1.6 $
  + * $Date: 2001/01/31 21:45:13 $
    *
    * ====================================================================
    *
  @@ -82,7 +82,7 @@
    *
    * @author Craig R. McClanahan
    * @author Ted Husted
  - * @version $Revision: 1.5 $ $Date: 2001/01/11 00:03:38 $
  + * @version $Revision: 1.6 $ $Date: 2001/01/31 21:45:13 $
   
    */
   
  @@ -121,10 +121,14 @@
           } catch (UnsupportedOperationException e) {
               ;   // JDBC-ODBC bridge throws this
           }
  -        this.readOnly = readOnly;
  -
  +     this.readOnly = readOnly;
           this.conn.setAutoCommit(this.autoCommit);
  -        this.conn.setReadOnly(this.readOnly);
  +     try {
  +         this.conn.setReadOnly(this.readOnly);
  +     } catch (SQLException e) {
  +         ;  // Informix throws a "not supported" exception
  +     }
  +
   
       }
   
  
  
  

Reply via email to