db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r495543 - in /db/derby/code/trunk: ./ java/drda/org/apache/derby/drda/ java/drda/org/apache/derby/impl/drda/ java/engine/org/apache/derby/iapi/jdbc/ java/engine/org/apache/derby/impl/jdbc/ tools/ant/properties/
Date Fri, 12 Jan 2007 10:49:45 GMT
Author: kahatlen
Date: Fri Jan 12 02:49:44 2007
New Revision: 495543

URL: http://svn.apache.org/viewvc?view=rev&rev=495543
Log:
DERBY-2121: Remove JDK 1.3 build dependency in network server

Modified:
    db/derby/code/trunk/BUILDING.txt
    db/derby/code/trunk/java/drda/org/apache/derby/drda/build.xml
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAStatement.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/EnginePreparedStatement.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement.java
    db/derby/code/trunk/tools/ant/properties/compilepath.properties

Modified: db/derby/code/trunk/BUILDING.txt
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/BUILDING.txt?view=diff&rev=495543&r1=495542&r2=495543
==============================================================================
--- db/derby/code/trunk/BUILDING.txt (original)
+++ db/derby/code/trunk/BUILDING.txt Fri Jan 12 02:49:44 2007
@@ -417,7 +417,7 @@
       ant.properties file to account for the difference in
       packaging. Define the variable as follows:
 
-      java14compile.classpath=${j14lib}/core.jar;${j14lib}/server.jar;${j14lib}/xml.jar
+      java14compile.classpath=${j14lib}/core.jar;${j14lib}/server.jar;${j14lib}/xml.jar;${j14lib}/ibmjcefw.jar
       
     - build.compiler
 

Modified: db/derby/code/trunk/java/drda/org/apache/derby/drda/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/drda/build.xml?view=diff&rev=495543&r1=495542&r2=495543
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/drda/build.xml (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/drda/build.xml Fri Jan 12 02:49:44 2007
@@ -37,8 +37,8 @@
 
   <target name="compile">
     <javac
-      source="1.3"
-      target="1.3"
+      source="1.4"
+      target="1.4"
       bootclasspath="${empty}"
       nowarn="on"
       debug="${debug}"
@@ -50,7 +50,7 @@
       srcdir="${derby.drda.src.dir}"
       destdir="${out.dir}">
       <classpath>
-        <pathelement path="${compile.classpath}"/>
+        <pathelement path="${java14compile.classpath}"/>
       </classpath>
       <include name="${derby.dir}/drda/*.java"/>
       <exclude name="${derby.dir}/drda/NetServlet.java"/>
@@ -59,8 +59,8 @@
 
   <target name="servlet" depends="checkservletjar" if="servletjar.available">
     <javac
-      source="1.3"
-      target="1.3"
+      source="1.4"
+      target="1.4"
       bootclasspath="${empty}"
       nowarn="on"
       debug="${debug}"
@@ -73,7 +73,7 @@
       destdir="${out.dir}">
       <classpath>
 	 	<pathelement location="${servlet24}"/>
-        <pathelement path="${compile.classpath}"/>
+        <pathelement path="${java14compile.classpath}"/>
       </classpath>
 	  <include name="${derby.dir}/drda/NetServlet.java"/>
     </javac>

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java?view=diff&rev=495543&r1=495542&r2=495543
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java Fri Jan 12
02:49:44 2007
@@ -36,6 +36,7 @@
 import java.sql.CallableStatement;
 import java.sql.Connection;
 import java.sql.Driver;
+import java.sql.ParameterMetaData;
 import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.ResultSetMetaData;
@@ -61,7 +62,6 @@
 import org.apache.derby.iapi.services.stream.HeaderPrintWriter;
 import org.apache.derby.iapi.tools.i18n.LocalizedResource;
 import org.apache.derby.iapi.jdbc.AuthenticationService;
-import org.apache.derby.iapi.jdbc.EngineParameterMetaData;
 import org.apache.derby.impl.jdbc.EmbedSQLException;
 import org.apache.derby.impl.jdbc.Util;
 import org.apache.derby.jdbc.InternalDriver;
@@ -4115,7 +4115,7 @@
 		String strVal;
 		PreparedStatement ps = stmt.getPreparedStatement();
 		int codePoint;
-		EngineParameterMetaData pmeta = null;
+		ParameterMetaData pmeta = null;
 
 		// Clear params without releasing storage
 		stmt.clearDrdaParams();
@@ -4254,7 +4254,7 @@
 	 */
 	private void readAndSetParams(int i,
 								  DRDAStatement stmt,
-								  EngineParameterMetaData pmeta)
+								  ParameterMetaData pmeta)
 				throws DRDAProtocolException, SQLException
 	{
 		PreparedStatement ps = stmt.getPreparedStatement();
@@ -6077,7 +6077,7 @@
 	{
 		PreparedStatement ps = stmt.getPreparedStatement();
 		ResultSetMetaData rsmeta = ps.getMetaData();
-		EngineParameterMetaData pmeta = stmt.getParameterMetaData();
+		ParameterMetaData pmeta = stmt.getParameterMetaData();
 		int numElems = 0;
 		if (e == null || e instanceof SQLWarning)
 		{
@@ -6129,7 +6129,7 @@
 
 		ResultSet rs = null;
 		ResultSetMetaData rsmeta = null;
-		EngineParameterMetaData pmeta = null;
+		ParameterMetaData pmeta = null;
 		if (!stmt.needsToSendParamData)
 			rs = stmt.getResultSet();
 		if (rs == null)		// this is a CallableStatement, use parameter meta data
@@ -6225,7 +6225,7 @@
      * @throws SQLException
 	 */
 	private void writeSQLDTAGRP(DRDAStatement stmt, ResultSetMetaData rsmeta, 
-								EngineParameterMetaData pmeta,
+								ParameterMetaData pmeta,
 								int colStart, int colEnd, boolean first)
 		throws DRDAProtocolException, SQLException
 	{
@@ -6971,7 +6971,9 @@
 	 * @throws DRDAProtocolException
      * @throws SQLException
 	 */
-	private void writeSQLDAGRP(ResultSetMetaData rsmeta, EngineParameterMetaData pmeta, int
elemNum, boolean rtnOutput)
+	private void writeSQLDAGRP(ResultSetMetaData rsmeta,
+							   ParameterMetaData pmeta,
+							   int elemNum, boolean rtnOutput)
 		throws DRDAProtocolException, SQLException
 	{
 		//jdbc uses offset of 1
@@ -7106,14 +7108,18 @@
 	}
 
   
-	private void writeSQLUDTGRP(ResultSetMetaData rsmeta, EngineParameterMetaData pmeta, int
jdbcElemNum, boolean rtnOutput)
+	private void writeSQLUDTGRP(ResultSetMetaData rsmeta,
+								ParameterMetaData pmeta,
+								int jdbcElemNum, boolean rtnOutput)
 		throws DRDAProtocolException,SQLException
 	{
 		writer.writeByte(CodePoint.NULLDATA);
 
 	}
 
-	private void writeSQLDOPTGRP(ResultSetMetaData rsmeta, EngineParameterMetaData pmeta, int
jdbcElemNum, boolean rtnOutput)
+	private void writeSQLDOPTGRP(ResultSetMetaData rsmeta,
+								 ParameterMetaData pmeta,
+								 int jdbcElemNum, boolean rtnOutput)
 		throws DRDAProtocolException,SQLException
 	{
 
@@ -7133,7 +7139,9 @@
 	}
 
 
-	private void writeSQLDXGRP(ResultSetMetaData rsmeta, EngineParameterMetaData pmeta, int
jdbcElemNum, boolean rtnOutput)
+	private void writeSQLDXGRP(ResultSetMetaData rsmeta,
+							   ParameterMetaData pmeta,
+							   int jdbcElemNum, boolean rtnOutput)
 		throws DRDAProtocolException,SQLException
 	{
 		// Null indicator indicates we have data

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAStatement.java?view=diff&rev=495543&r1=495542&r2=495543
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAStatement.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAStatement.java Fri Jan 12
02:49:44 2007
@@ -27,6 +27,7 @@
 import java.math.BigInteger;
 import java.sql.CallableStatement;
 import java.sql.Connection;
+import java.sql.ParameterMetaData;
 import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
@@ -40,9 +41,7 @@
 import org.apache.derby.iapi.jdbc.BrokeredConnection;
 import org.apache.derby.iapi.jdbc.BrokeredPreparedStatement;
 import org.apache.derby.iapi.jdbc.EngineConnection;
-import org.apache.derby.iapi.jdbc.EngineStatement;
 import org.apache.derby.iapi.jdbc.EnginePreparedStatement;
-import org.apache.derby.iapi.jdbc.EngineParameterMetaData;
 import org.apache.derby.iapi.reference.JDBC30Translation;
 import org.apache.derby.iapi.sql.execute.ExecutionContext;
 import org.apache.derby.iapi.util.StringUtil;
@@ -84,7 +83,7 @@
 	protected byte [] rslsetflg;		// Result Set Flags
 	protected int maxrslcnt;			// Maximum Result set count
 	protected PreparedStatement ps;     // Prepared statement
-	protected EngineParameterMetaData stmtPmeta; // param metadata
+	protected ParameterMetaData stmtPmeta; // param metadata
 	protected boolean isCall;
 	protected String procName;			// callable statement's method name
 	private   int[] outputTypes;		// jdbc type for output parameter or NOT_OUTPUT_PARAM
@@ -380,18 +379,7 @@
 	 */
 	protected int getResultSetHoldability() throws SQLException
 	{
-		Statement rsstmt;
-		ResultSet rs = getResultSet();
-
-		if (rs  != null)
-			rsstmt = rs.getStatement();
-		else
-			rsstmt = getPreparedStatement();
-        
-        int holdValue = 
-            ((EngineStatement) rsstmt).getResultSetHoldability();
-
-		return holdValue;
+		return getResultSetHoldability(getResultSet());
 	}
 	
 	/**
@@ -411,10 +399,7 @@
 		else
 			rsstmt = getPreparedStatement();
         
-        int holdValue = 
-            ((EngineStatement) rsstmt).getResultSetHoldability();
-
-		return holdValue;
+        return rsstmt.getResultSetHoldability();
 	}	
 
 	/*
@@ -1303,7 +1288,7 @@
 	{
 		if (ps != null && ps instanceof CallableStatement)
 		{
-			EngineParameterMetaData pmeta = 	getParameterMetaData();
+			ParameterMetaData pmeta = getParameterMetaData();
 
 			return Math.min(pmeta.getPrecision(index),
 							FdocaConstants.NUMERIC_MAX_PRECISION);
@@ -1324,7 +1309,7 @@
 	{
 		if (ps != null && ps instanceof CallableStatement)
 		{
-			EngineParameterMetaData pmeta = 	getParameterMetaData();
+			ParameterMetaData pmeta = getParameterMetaData();
 			return Math.min(pmeta.getScale(index),FdocaConstants.NUMERIC_MAX_PRECISION);
 		}
 		else 
@@ -1450,7 +1435,7 @@
 
 	private void setupCallableStatementParams(CallableStatement cs) throws SQLException
 	{
-		EngineParameterMetaData pmeta = 	getParameterMetaData();
+		ParameterMetaData pmeta = getParameterMetaData();
 		int numElems = pmeta.getParameterCount();
 
 		for ( int i = 0; i < numElems; i ++)
@@ -1682,18 +1667,15 @@
 	
 	/** 
 	 * Retrieve the ParameterMetaData for the prepared statement. 
-     * To do so, use the engine defined interfaces:
-     * @see org.apache.derby.iapi.jdbc.EnginePreparedStatement
-     * @see org.apache.derby.iapi.jdbc.EngineParameterMetaData 
-	 * @return EngineParameterMetaData for the prepared statement. 
+	 * @return ParameterMetaData for the prepared statement. 
 	 * Note: there is no separate BrokeredParameterSetMetaData.
 	 */
-	protected EngineParameterMetaData getParameterMetaData() throws SQLException
+	protected ParameterMetaData getParameterMetaData() throws SQLException
 	{
 		if (stmtPmeta != null)
 			return stmtPmeta;
 
-		stmtPmeta = ((EnginePreparedStatement)ps).getEmbedParameterSetMetaData();
+		stmtPmeta = ps.getParameterMetaData();
         
         return stmtPmeta;
 	}
@@ -1708,8 +1690,7 @@
 	 */
 	private boolean getMoreResults(int current) throws SQLException
 	{       
-        return
-            ((EngineStatement) getPreparedStatement()).getMoreResults(current);
+        return getPreparedStatement().getMoreResults(current);
 	}
 
 	/**

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/build.xml?view=diff&rev=495543&r1=495542&r2=495543
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/build.xml (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/build.xml Fri Jan 12 02:49:44
2007
@@ -37,8 +37,8 @@
 
   <target name="compile">
   <javac
-      source="1.3"
-      target="1.3"
+      source="1.4"
+      target="1.4"
       bootclasspath="${empty}"
       nowarn="on"
       debug="${debug}"
@@ -50,14 +50,13 @@
       srcdir="${derby.drda.src.dir}"
       destdir="${out.dir}">
       <classpath>
-        <pathelement location="${jce1_2_1}"/>
-        <pathelement path="${java13compile.classpath}"/>
+        <pathelement path="${java14compile.classpath}"/>
       </classpath>
       <include name="${derby.dir}/impl/drda/DecryptionManager.java"/>
     </javac>
   <javac
-    source="1.3"
-    target="1.3"
+    source="1.4"
+    target="1.4"
       bootclasspath="${empty}"
       nowarn="on"
       debug="${debug}"
@@ -70,15 +69,15 @@
       destdir="${out.dir}">
       <classpath>
       <pathelement location="${jta1_2}"/>
-        <pathelement path="${java13compile.classpath}"/>
+        <pathelement path="${java14compile.classpath}"/>
       </classpath>
       <include name="${derby.dir}/impl/drda/DRDAXAProtocol.java"/>
       <include name="${derby.dir}/impl/drda/DRDAXid.java"/>
       <include name="${derby.dir}/impl/drda/XADatabase.java"/>
     </javac>
     <javac
-      source="1.3"
-      target="1.3"
+      source="1.4"
+      target="1.4"
       bootclasspath="${empty}"
       nowarn="on"
       debug="${debug}"
@@ -90,7 +89,7 @@
       srcdir="${derby.drda.src.dir}"
       destdir="${out.dir}">
       <classpath>
-        <pathelement path="${java13compile.classpath}"/>
+        <pathelement path="${java14compile.classpath}"/>
       </classpath>
       <include name="${derby.dir}/impl/drda/*.java"/>
       <exclude name="${derby.dir}/impl/drda/DecryptionManager.java"/>

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement.java?view=diff&rev=495543&r1=495542&r2=495543
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement.java
Fri Jan 12 02:49:44 2007
@@ -47,21 +47,6 @@
 		this.sql = sql;
     }
 
-    /**
-     * Imitate the getParameterMetaData() function in JDBC 3.0
-     *
-     * Retrieves the number, types and properties of this PreparedStatement
-     * object's parameters.
-     *
-     * @return a EngineParameterMetaData object that contains information about the
-     * number, types and properties of this PreparedStatement object's parameters.
-     * @exception SQLException if a database access error occurs
-     */
-    public EngineParameterMetaData getEmbedParameterSetMetaData()
-    throws SQLException
-    {
-        return ((EnginePreparedStatement)getPreparedStatement()).getEmbedParameterSetMetaData();
-    }
 	/**
      * A prepared SQL query is executed and its ResultSet is returned.
      *

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/EnginePreparedStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/EnginePreparedStatement.java?view=diff&rev=495543&r1=495542&r2=495543
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/EnginePreparedStatement.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/EnginePreparedStatement.java
Fri Jan 12 02:49:44 2007
@@ -34,21 +34,6 @@
  */
 public interface EnginePreparedStatement extends PreparedStatement {
     
-    /**
-     * Imitate the getParameterMetaData() that is in JDBC 3.0
-     * Once,JDK1.3 stops being supported, instead of returning EngineParameterMetaData
-     * the JDBC 3.0 class - ParameterMetaData can be used.
-     *
-     * Retrieves the number, types and properties of this PreparedStatement
-     * object's parameters.
-     *
-     * @return a EngineParameterMetaData object that contains information about the
-     * number, types and properties of this PreparedStatement object's parameters.
-     * @exception SQLException if a database access error occurs
-     */
-    public EngineParameterMetaData getEmbedParameterSetMetaData()
-        throws SQLException;
-    
     public void setBinaryStream(int parameterIndex, InputStream x)
         throws SQLException; 
     

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement.java?view=diff&rev=495543&r1=495542&r2=495543
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement.java
Fri Jan 12 02:49:44 2007
@@ -1590,7 +1590,7 @@
     * number, types and properties of this PreparedStatement object's parameters.
     * @exception SQLException if a database access error occurs
 	*/
-	public EngineParameterMetaData getEmbedParameterSetMetaData()
+	private EngineParameterMetaData getEmbedParameterSetMetaData()
     	throws SQLException
 	{
 	  checkExecStatus();

Modified: db/derby/code/trunk/tools/ant/properties/compilepath.properties
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/tools/ant/properties/compilepath.properties?view=diff&rev=495543&r1=495542&r2=495543
==============================================================================
--- db/derby/code/trunk/tools/ant/properties/compilepath.properties (original)
+++ db/derby/code/trunk/tools/ant/properties/compilepath.properties Fri Jan 12 02:49:44 2007
@@ -18,7 +18,7 @@
 # Java2 1.4 paths - for JDBC 3.0/JDK1.4
 
 #j14lib=${basedir}/jdk141/jre/lib
-java14compile.classpath=${j14lib}/rt.jar
+java14compile.classpath=${j14lib}/rt.jar;${j14lib}/jce.jar
 
 # base compile path
 



Mime
View raw message