User: d_jencks
  Date: 01/11/22 21:54:56

  Modified:    src/main/org/jboss/resource/adapter/jdbc/local
                        ConnectionInPool.java PSCacheKey.java
  Log:
  refixed bug 424768 so it doesn't prevent usage of jboss with jdbc 1 drivers
  
  Revision  Changes    Path
  1.3       +3 -1      
jbosscx/src/main/org/jboss/resource/adapter/jdbc/local/ConnectionInPool.java
  
  Index: ConnectionInPool.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbosscx/src/main/org/jboss/resource/adapter/jdbc/local/ConnectionInPool.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ConnectionInPool.java     2001/11/04 06:56:18     1.2
  +++ ConnectionInPool.java     2001/11/23 05:54:55     1.3
  @@ -650,7 +650,9 @@
            else
            {
               wrapper = new PreparedStatementInPool(
  -               con.prepareStatement( pKey.sql, pKey.rsType, pKey.rsConcur ),
  +               (pKey.jdbc1Flag) ? 
  +                  con.prepareStatement(pKey.sql) 
  +                  : con.prepareStatement( pKey.sql, pKey.rsType, pKey.rsConcur ),
                  this,
                  pKey.sql
               );
  
  
  
  1.2       +12 -6     
jbosscx/src/main/org/jboss/resource/adapter/jdbc/local/PSCacheKey.java
  
  Index: PSCacheKey.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbosscx/src/main/org/jboss/resource/adapter/jdbc/local/PSCacheKey.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PSCacheKey.java   2001/09/08 19:32:20     1.1
  +++ PSCacheKey.java   2001/11/23 05:54:55     1.2
  @@ -25,12 +25,14 @@
      /**
       * Description of the Field
       */
  -   public int rsType;
  +   public int rsType = -1; //illegal value
      /**
       * Description of the Field
       */
  -   public int rsConcur;
  +   public int rsConcur = -1; //illegal value
   
  +   public boolean jdbc1Flag;
  +
      /**
       * Constructor for the PSCacheKey object
       *
  @@ -41,8 +43,9 @@
      {
         this.con = con;
         this.sql = sql;
  -      this.rsType = ResultSet.TYPE_FORWARD_ONLY;
  -      this.rsConcur = ResultSet.CONCUR_READ_ONLY;
  +      jdbc1Flag = true;
  +      //this.rsType = ResultSet.TYPE_FORWARD_ONLY;
  +      //this.rsConcur = ResultSet.CONCUR_READ_ONLY;
      }
   
      /**
  @@ -59,6 +62,7 @@
         this.sql = sql;
         this.rsType = rsType;
         this.rsConcur = rsConcur;
  +      jdbc1Flag = false;
      }
   
      /**
  @@ -71,7 +75,8 @@
      {
         PSCacheKey key = (PSCacheKey)o;
         return key.con.equals(con) && key.sql.equals(sql) &&
  -            key.rsType == rsType && key.rsConcur == rsConcur;
  +            key.rsType == rsType && key.rsConcur == rsConcur &&
  +         key.jdbc1Flag == jdbc1Flag;
      }
   
      /**
  @@ -81,6 +86,7 @@
       */
      public int hashCode()
      {
  -      return con.hashCode() ^ sql.hashCode() ^ rsType ^ rsConcur;
  +      return con.hashCode() ^ sql.hashCode() ^ rsType ^ rsConcur
  +         ^ (jdbc1Flag ? 1:2);
      }
   }
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to