User: boissier
  Date: 01/12/04 11:01:14

  Modified:    src/main/org/jboss/resource/adapter/jdbc/local
                        ConnectionInPool.java PreparedStatementInPool.java
                        ResultSetInPool.java StatementInPool.java
  Log:
  * In JDK 1.4, the interfaces java.sql.Statement, java.sql.PreparedStatement,
    java.sql.Connection and java.sql.ResultSet have new methods.
  
  The patch below adds code to classes implementing those interfaces to
  make the project compile.  The code is kept commented out so that:
  1. it works with JDK 1.3.*
  2. users using JDK 1.4 can easily figure out what to uncomment to make
     it work without having to go through the whole debugging process.
  
  Revision  Changes    Path
  1.4       +51 -0     
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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ConnectionInPool.java     2001/11/23 05:54:55     1.3
  +++ ConnectionInPool.java     2001/12/04 19:01:13     1.4
  @@ -3,11 +3,18 @@
    */
   package org.jboss.resource.adapter.jdbc.local;
   
  +// Uncomment this one line to compile JBoss with JDK 1.4
  +//import java.lang.UnsupportedOperationException;
  +
   import java.sql.CallableStatement;
   import java.sql.Connection;
   import java.sql.DatabaseMetaData;
   import java.sql.PreparedStatement;
   import java.sql.ResultSet;
  +
  +// Uncomment this one line to compile JBoss with JDK 1.4
  +//import java.sql.Savepoint;
  +
   import java.sql.SQLException;
   import java.sql.SQLWarning;
   import java.sql.Statement;
  @@ -898,4 +905,48 @@
            }
         }
      }
  +   
  +   
  +   // Note: The following methods have been added to make JBoss compile with JDK 
1.4.
  +   //       These methods will need to be implemented later on.
  +   // Uncomment those 12 methods to compile JBoss with JDK 1.4.
  +   /*
  +   public Statement createStatement(int resultSetType, int resultSetConcurrency, 
int resultSetHoldability) throws SQLException { 
  +      throw new UnsupportedOperationException("Method createStatement() not yet 
implemented."); 
  +   }
  +   public int getHoldability() throws SQLException { 
  +      throw new UnsupportedOperationException("Method getHoldability() not yet 
implemented."); 
  +   }
  +   public CallableStatement prepareCall(String sql, int resultSetType, int 
resultSetConcurrency, int resultSetHoldability) throws SQLException { 
  +      throw new UnsupportedOperationException("Method prepareCall() not yet 
implemented."); 
  +   }
  +   public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) 
throws SQLException { 
  +      throw new UnsupportedOperationException("Method prepareStatement() not yet 
implemented."); 
  +   }
  +   public PreparedStatement prepareStatement(String sql, int resultSetType, int 
resultSetConcurrency, int resultSetHoldability) throws SQLException { 
  +      throw new UnsupportedOperationException("Method prepareStatement() not yet 
implemented."); 
  +   }
  +   public PreparedStatement prepareStatement(String sql, int[] columnIndexes) 
throws SQLException { 
  +      throw new UnsupportedOperationException("Method prepareStatement() not yet 
implemented."); 
  +   }
  +   public PreparedStatement prepareStatement(String sql, String[] columnNames) 
throws SQLException { 
  +      throw new UnsupportedOperationException("Method prepareStatement() not yet 
implemented."); 
  +   }
  +   public void releaseSavepoint(Savepoint savepoint) throws SQLException { 
  +      throw new UnsupportedOperationException("Method releaseSavepoint() not yet 
implemented."); 
  +   }
  +   public void rollback(Savepoint savepoint) throws SQLException { 
  +      throw new UnsupportedOperationException("Method rollback() not yet 
implemented."); 
  +   }
  +   public void setHoldability(int holdability) throws SQLException { 
  +      throw new UnsupportedOperationException("Method setHoldability() not yet 
implemented."); 
  +   }
  +   public Savepoint setSavepoint() throws SQLException { 
  +      throw new UnsupportedOperationException("Method setSavepoint() not yet 
implemented."); 
  +   }
  +   public Savepoint setSavepoint(String name) throws SQLException { 
  +      throw new UnsupportedOperationException("Method setSavepoint() not yet 
implemented."); 
  +   }
  +   */
  +   
   }
  
  
  
  1.2       +19 -0     
jbosscx/src/main/org/jboss/resource/adapter/jdbc/local/PreparedStatementInPool.java
  
  Index: PreparedStatementInPool.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbosscx/src/main/org/jboss/resource/adapter/jdbc/local/PreparedStatementInPool.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PreparedStatementInPool.java      2001/09/08 19:32:20     1.1
  +++ PreparedStatementInPool.java      2001/12/04 19:01:13     1.2
  @@ -6,6 +6,12 @@
   import java.io.InputStream;
   import java.io.Reader;
   import java.math.BigDecimal;
  +
  +// Uncomment these 3 lines to compile JBoss with JDK 1.4
  +//import java.lang.UnsupportedOperationException;
  +//import java.net.URL;
  +//import java.sql.ParameterMetaData;
  +
   import java.sql.Array;
   import java.sql.Blob;
   import java.sql.Clob;
  @@ -976,4 +982,17 @@
         impl = null;
         sql = null;
      }
  +   
  +   
  +   // Note: The following methods have been added to make JBoss compile with JDK 
1.4.
  +   //       These methods will need to be implemented later on.
  +   // Uncomment those 2 methods to compile JBoss with JDK 1.4.
  +   /*
  +   public ParameterMetaData getParameterMetaData() throws SQLException {
  +      throw new UnsupportedOperationException("Method getParameterMetaData() not 
yet implemented.");         
  +   }
  +   public void setURL(int parameterIndex, URL x) throws SQLException {
  +      throw new UnsupportedOperationException("Method setURL() not yet 
implemented.");         
  +   }
  +   */
   }
  
  
  
  1.2       +41 -0     
jbosscx/src/main/org/jboss/resource/adapter/jdbc/local/ResultSetInPool.java
  
  Index: ResultSetInPool.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbosscx/src/main/org/jboss/resource/adapter/jdbc/local/ResultSetInPool.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ResultSetInPool.java      2001/09/08 19:32:20     1.1
  +++ ResultSetInPool.java      2001/12/04 19:01:13     1.2
  @@ -3,6 +3,10 @@
    */
   package org.jboss.resource.adapter.jdbc.local;
   
  +// Uncomment these 2 lines to compile JBoss with JDK 1.4
  +//import java.lang.UnsupportedOperationException;
  +//import java.net.URL;
  +
   import java.sql.Array;
   import java.sql.Blob;
   import java.sql.Clob;
  @@ -3284,6 +3288,43 @@
            throw e;
         }
      }
  +
  +
  +   // Note: The following methods have been added to make JBoss compile with JDK 
1.4.
  +   //       These methods will need to be implemented later on.
  +   // Uncomment those 10 methods to compile JBoss with JDK 1.4.
  +   /*
  +   public URL getURL(int columnIndex) throws SQLException {
  +      throw new UnsupportedOperationException("Method getURL() not yet 
implemented.");               
  +   }
  +   public URL getURL(String columnName) throws SQLException {
  +      throw new UnsupportedOperationException("Method getURL() not yet 
implemented.");       
  +   }
  +   public void updateArray(int columnIndex, Array x) throws SQLException {
  +      throw new UnsupportedOperationException("Method updateArray() not yet 
implemented.");
  +   }
  +   public void updateArray(String columnName, Array x) throws SQLException {
  +      throw new UnsupportedOperationException("Method updateArray() not yet 
implemented.");
  +   }
  +   public void updateBlob(int columnIndex, Blob x) throws SQLException {
  +      throw new UnsupportedOperationException("Method updateBlob() not yet 
implemented.");
  +   }
  +   public void updateBlob(String columnName, Blob x) throws SQLException {
  +      throw new UnsupportedOperationException("Method updateBlob() not yet 
implemented.");
  +   }
  +   public void updateClob(int columnIndex, Clob x) throws SQLException {
  +      throw new UnsupportedOperationException("Method updateClob() not yet 
implemented.");
  +   }
  +   public void updateClob(String columnName, Clob x) throws SQLException {
  +      throw new UnsupportedOperationException("Method updateClob() not yet 
implemented.");
  +   }
  +   public void updateRef(int columnIndex, Ref x) throws SQLException {
  +      throw new UnsupportedOperationException("Method updateRef() not yet 
implemented.");
  +   }
  +   public void updateRef(String columnName, Ref x) throws SQLException {
  +      throw new UnsupportedOperationException("Method updateRef() not yet 
implemented.");
  +   }
  +   */
   
      // ---- End Implementation of ResultSet ----
   }
  
  
  
  1.3       +37 -0     
jbosscx/src/main/org/jboss/resource/adapter/jdbc/local/StatementInPool.java
  
  Index: StatementInPool.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbosscx/src/main/org/jboss/resource/adapter/jdbc/local/StatementInPool.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- StatementInPool.java      2001/11/30 02:34:28     1.2
  +++ StatementInPool.java      2001/12/04 19:01:14     1.3
  @@ -3,6 +3,9 @@
    */
   package org.jboss.resource.adapter.jdbc.local;
   
  +// Uncomment this line to compile JBoss with JDK 1.4
  +//import java.lang.UnsupportedOperationException;
  +
   import java.sql.Connection;
   import java.sql.ResultSet;
   import java.sql.SQLException;
  @@ -748,5 +751,39 @@
         impl = null;
      }
   
  +
  +   // Note: The following methods have been added to make JBoss compile with JDK 
1.4.
  +   //       These methods will need to be implemented later on.
  +   // Uncomment those 9 methods to compile JBoss with JDK 1.4.
  +   /*
  +   public boolean execute(String sql, int autoGeneratedKeys) throws SQLException {
  +      throw new UnsupportedOperationException("Method execute() not yet 
implemented."); 
  +   }
  +   public boolean execute(String sql, int[] columnIndexes) throws SQLException {
  +      throw new UnsupportedOperationException("Method execute() not yet 
implemented."); 
  +   }
  +   public boolean execute(String sql, String[] columnNames) throws SQLException {
  +      throw new UnsupportedOperationException("Method execute() not yet 
implemented."); 
  +   }
  +   public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException {
  +      throw new UnsupportedOperationException("Method executeUpdate() not yet 
implemented."); 
  +   }
  +   public int executeUpdate(String sql, int[] columnIndexes) throws SQLException {
  +      throw new UnsupportedOperationException("Method executeUpdate() not yet 
implemented."); 
  +   }
  +   public int executeUpdate(String sql, String[] columnNames) throws SQLException {
  +      throw new UnsupportedOperationException("Method executeUpdate() not yet 
implemented."); 
  +   }
  +   public ResultSet getGeneratedKeys() throws SQLException {
  +      throw new UnsupportedOperationException("Method getGeneratedKeys() not yet 
implemented."); 
  +   }
  +   public boolean getMoreResults(int current) throws SQLException {
  +      throw new UnsupportedOperationException("Method getMoreResults() not yet 
implemented."); 
  +   }
  +   public int getResultSetHoldability() throws SQLException {
  +      throw new UnsupportedOperationException("Method getResultSetHoldability() not 
yet implemented."); 
  +   }
  +   */
  +   
      // ---- End Implementation of Statement ----
   }
  
  
  

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

Reply via email to