db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1482632 - /db/derby/code/trunk/java/client/org/apache/derby/jdbc/
Date Tue, 14 May 2013 22:44:13 GMT
Author: kahatlen
Date: Tue May 14 22:44:13 2013
New Revision: 1482632

URL: http://svn.apache.org/r1482632
Log:
DERBY-6213: Deprecate support for Java 5 and CDC

Move getParentLogger() to ClientBaseDataSourceRoot and remove it
from all the *40 leaf classes.

Modified:
    db/derby/code/trunk/java/client/org/apache/derby/jdbc/BasicClientConnectionPoolDataSource40.java
    db/derby/code/trunk/java/client/org/apache/derby/jdbc/BasicClientDataSource40.java
    db/derby/code/trunk/java/client/org/apache/derby/jdbc/BasicClientXADataSource40.java
    db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientBaseDataSourceRoot.java
    db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientConnectionPoolDataSource.java
    db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientConnectionPoolDataSource40.java
    db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDataSource.java
    db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDataSource40.java
    db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientXADataSource.java
    db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientXADataSource40.java

Modified: db/derby/code/trunk/java/client/org/apache/derby/jdbc/BasicClientConnectionPoolDataSource40.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/jdbc/BasicClientConnectionPoolDataSource40.java?rev=1482632&r1=1482631&r2=1482632&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/jdbc/BasicClientConnectionPoolDataSource40.java
(original)
+++ db/derby/code/trunk/java/client/org/apache/derby/jdbc/BasicClientConnectionPoolDataSource40.java
Tue May 14 22:44:13 2013
@@ -34,7 +34,7 @@ import org.apache.derby.shared.common.re
  * running on Java 8 Compact Profile 2 or higher.
  * <p/>
  * BasicClientConnectionPoolDataSource40 is similar to
- * ClientConnectionPoolDataSource40 except that it does not support JNDI,
+ * ClientConnectionPoolDataSource except that it does not support JNDI,
  * i.e. it does not implement {@code javax.naming.Referenceable}.
  *
  * @see ClientConnectionPoolDataSource40

Modified: db/derby/code/trunk/java/client/org/apache/derby/jdbc/BasicClientDataSource40.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/jdbc/BasicClientDataSource40.java?rev=1482632&r1=1482631&r2=1482632&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/jdbc/BasicClientDataSource40.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/jdbc/BasicClientDataSource40.java Tue
May 14 22:44:13 2013
@@ -21,18 +21,13 @@
 
 package org.apache.derby.jdbc;
 
-import java.sql.SQLFeatureNotSupportedException;
-import java.util.logging.Logger;
 import javax.sql.DataSource;
-import org.apache.derby.client.am.ClientMessageId;
-import org.apache.derby.client.am.SqlException;
-import org.apache.derby.shared.common.reference.SQLState;
 
 /**
  * This datasource is suitable for client/server use of Derby,
  * running on Java 8 Compact Profile 2 or higher.
  * <p/>
- * BasicClientDataSource40 is similar to ClientDataSource40 except it
+ * BasicClientDataSource40 is similar to ClientDataSource except it
  * can not be used with JNDI, i.e. it does not implement
  * {@code javax.naming.Referenceable}.
  */
@@ -56,20 +51,4 @@ public class BasicClientDataSource40
     public BasicClientDataSource40() {
         super();
     }
-
-
-    ////////////////////////////////////////////////////////////////////
-    //
-    // INTRODUCED BY JDBC 4.1 IN JAVA 7
-    //
-    ////////////////////////////////////////////////////////////////////
-
-    public  Logger getParentLogger() throws SQLFeatureNotSupportedException {
-        SqlException e = new SqlException(
-                null,
-                new ClientMessageId(SQLState.NOT_IMPLEMENTED),
-                "getParentLogger");
-
-        throw (SQLFeatureNotSupportedException)e.getSQLException();
-    }
 }

Modified: db/derby/code/trunk/java/client/org/apache/derby/jdbc/BasicClientXADataSource40.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/jdbc/BasicClientXADataSource40.java?rev=1482632&r1=1482631&r2=1482632&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/jdbc/BasicClientXADataSource40.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/jdbc/BasicClientXADataSource40.java Tue
May 14 22:44:13 2013
@@ -29,7 +29,7 @@ import javax.sql.XADataSource;
  * This datasource is suitable for client/server use of Derby,
  * running on Java 8 Compact Profile 2 or higher.
  * <p/>
- * Similar to ClientXADataSource40 except it does not support JNDI,
+ * Similar to ClientXADataSource except it does not support JNDI,
  * i.e. it does not implement {@code javax.naming.Referenceable}.
  */
 public class BasicClientXADataSource40

Modified: db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientBaseDataSourceRoot.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientBaseDataSourceRoot.java?rev=1482632&r1=1482631&r2=1482632&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientBaseDataSourceRoot.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientBaseDataSourceRoot.java Tue
May 14 22:44:13 2013
@@ -31,15 +31,18 @@ import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.sql.Connection;
 import java.sql.SQLException;
+import java.sql.SQLFeatureNotSupportedException;
 import java.util.Locale;
 import java.util.NoSuchElementException;
 import java.util.Properties;
 import java.util.StringTokenizer;
+import java.util.logging.Logger;
 import javax.sql.PooledConnection;
 import javax.sql.XAConnection;
 import org.apache.derby.client.am.ClientMessageId;
 import org.apache.derby.client.am.EncryptionManager;
 import org.apache.derby.client.am.LogWriter;
+import org.apache.derby.client.am.SQLExceptionFactory;
 import org.apache.derby.client.am.SqlException;
 import org.apache.derby.client.net.NetConfiguration;
 import org.apache.derby.client.net.NetLogWriter;
@@ -1236,6 +1239,18 @@ public abstract class ClientBaseDataSour
         }
     }
 
+    ////////////////////////////////////////////////////////////////////
+    //
+    // INTRODUCED BY JDBC 4.1 IN JAVA 7
+    //
+    ////////////////////////////////////////////////////////////////////
+
+    public final Logger getParentLogger()
+            throws SQLFeatureNotSupportedException {
+        throw SQLExceptionFactory.notImplemented("getParentLogger");
+    }
+
+    // Helper methods
 
     protected final PooledConnection getPooledConnectionMinion()
             throws SQLException {

Modified: db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientConnectionPoolDataSource.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientConnectionPoolDataSource.java?rev=1482632&r1=1482631&r2=1482632&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientConnectionPoolDataSource.java
(original)
+++ db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientConnectionPoolDataSource.java
Tue May 14 22:44:13 2013
@@ -30,8 +30,7 @@ import org.apache.derby.shared.common.re
 
 /**
  * This datasource is suitable for a client/server use of Derby,
- * running on full Java SE 5 or 6, corresponding to JDBC 3.0 and 4.0.
- * If running on Java SE 7 or higher, consider a more capable data source.
+ * running on full Java SE 6, 7 or 8, corresponding to JDBC 4.0, 4.1 and 4.2.
  * <p/>
  * ClientConnectionPoolDataSource is a factory for PooledConnection objects.
  * An object that implements this interface

Modified: db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientConnectionPoolDataSource40.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientConnectionPoolDataSource40.java?rev=1482632&r1=1482631&r2=1482632&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientConnectionPoolDataSource40.java
(original)
+++ db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientConnectionPoolDataSource40.java
Tue May 14 22:44:13 2013
@@ -21,37 +21,40 @@
 
 package org.apache.derby.jdbc;
 
-import java.sql.SQLFeatureNotSupportedException;
-import java.util.logging.Logger;
 import javax.sql.ConnectionPoolDataSource;
-import org.apache.derby.client.am.ClientMessageId;
-import org.apache.derby.client.am.SqlException;
-import org.apache.derby.shared.common.reference.SQLState;
 
 /**
+ * <p>
  * This datasource is suitable for a client/server use of Derby,
  * running on the following platforms:
+ * </p>
+ *
  * <p>
  * <ul>
- *   <li>Java SE 7 (JDBC 4.1) and
- *   <li>full Java SE 8 (JDBC 4.2).
+ *   <li>Java SE 6 (JDBC 4.0) and</li>
+ *   <li>Java SE 7 (JDBC 4.1) and</li>
+ *   <li>full Java SE 8 (JDBC 4.2).</li>
  * </ul>
+ * </p>
+ *
+ * <p>
+ * Those platforms are also supported by {@code ClientConnectionPoolDataSource}
+ * now, and applications should use {@code ClientConnectionPoolDataSource}
+ * instead of this class. This class is provided only for backward
+ * compatibility and may be removed in later versions of Derby.
+ * </p>
+ *
  * <p>
  * Use BasicClientConnectionPoolDataSource40 if your application
  * runs on Java 8 Compact Profile 2.
- * <p>
- * Use ClientConnectionPoolDataSource if your application
- * runs on the following platforms:
- * <p>
- * <ul>
- *   <li> JDBC 4.0 - Java SE 6
- *   <li> JDBC 3.0 - J2SE 5.0
- * </ul>
+ * </p>
+ *
  * <p>
  * ClientConnectionPoolDataSource40 is a factory for PooledConnection objects.
  * An object that implements this interface
  * will typically be registered with a naming service that is based on the
  * Java Naming and Directory Interface (JNDI).
+ * </p>
  */
 public class ClientConnectionPoolDataSource40
     extends ClientConnectionPoolDataSource
@@ -60,20 +63,4 @@ public class ClientConnectionPoolDataSou
                                          * extension */
 {
    private static final long serialVersionUID = 6313966728809326579L;
-
-    ////////////////////////////////////////////////////////////////////
-    //
-    // INTRODUCED BY JDBC 4.1 IN JAVA 7
-    //
-    ////////////////////////////////////////////////////////////////////
-
-    public  Logger getParentLogger()
-        throws SQLFeatureNotSupportedException
-    {
-        throw (SQLFeatureNotSupportedException)
-            (
-             new SqlException( null, new ClientMessageId(SQLState.NOT_IMPLEMENTED), "getParentLogger"
)
-             ).getSQLException();
-    }
-    
 }

Modified: db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDataSource.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDataSource.java?rev=1482632&r1=1482631&r2=1482632&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDataSource.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDataSource.java Tue May 14
22:44:13 2013
@@ -23,8 +23,7 @@ package org.apache.derby.jdbc;
 
 /**
  * This datasource is suitable for a client/server use of Derby,
- * running on full Java SE 5 or 6, corresponding to JDBC 3.0 and 4.0.
- * If running on Java SE 7 or higher, consider a more capable data source.
+ * running on full Java SE 6, 7 or 8, corresponding to JDBC 4.0, 4.1 and 4.2.
  * <p/>
  * ClientDataSource is a simple data source implementation
  * that can be used for establishing connections in a
@@ -80,7 +79,7 @@ package org.apache.derby.jdbc;
  * it's own private <code>password</code> property.
  * <p/>
  * The specified password, along with the user, is validated by DERBY.
- * This property can be overwritten by specifing
+ * This property can be overwritten by specifying
  * the password parameter on the DataSource.getConnection() method call.
  * <p/>
  * This password property is not declared transient, and therefore

Modified: db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDataSource40.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDataSource40.java?rev=1482632&r1=1482631&r2=1482632&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDataSource40.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDataSource40.java Tue May
14 22:44:13 2013
@@ -21,32 +21,34 @@
 
 package org.apache.derby.jdbc;
 
-import java.sql.SQLFeatureNotSupportedException;
-import java.util.logging.Logger;
 import javax.sql.DataSource;
-import org.apache.derby.client.am.ClientMessageId;
-import org.apache.derby.client.am.SqlException;
-import org.apache.derby.shared.common.reference.SQLState;
 
 /**
+ * <p>
  * This datasource is suitable for a client/server use of Derby,
  * running on the following platforms:
+ * </p>
+ *
  * <p>
  * <ul>
- *   <li>Java SE 7 (JDBC 4.1) and
- *   <li>full Java SE 8 (JDBC 4.2).
+ *   <li>Java SE 6 (JDBC 4.0) and</li>
+ *   <li>Java SE 7 (JDBC 4.1) and</li>
+ *   <li>full Java SE 8 (JDBC 4.2).</li>
  * </ul>
+ * </p>
+ *
+ * <p>
+ * Those platforms are also supported by {@code ClientXADataSource}
+ * now, and applications should use {@code ClientXADataSource}
+ * instead of this class. This class is provided only for backward
+ * compatibility and may be removed in later versions of Derby.
+ * </p>
+ *
  * <p>
  * Use BasicClientDataSource40 if your application runs on Java 8
  * Compact Profile 2.
- * <p>
- * Use ClientDataSource if your application runs on the following
- * platforms:
- * <p>
- * <ul>
- *  <li> JDBC 4.0 - Java SE 6
- *  <li> JDBC 3.0 - J2SE 5.0
- * </ul>
+ * </p>
+ *
  * <p>
  * ClientDataSource40 is a simple data source implementation
  * that can be used for establishing connections in a
@@ -54,6 +56,7 @@ import org.apache.derby.shared.common.re
  * The class ClientConnectionPoolDataSource40 can be used in a connection pooling environment,
  * and the class ClientXADataSource40 can be used in a distributed, and pooling
  * environment.
+ * </p>
  *
  * <p>The example below registers a DNC data source object with a JNDI naming service.
  * <pre>
@@ -119,21 +122,5 @@ public class ClientDataSource40 extends 
     
     public ClientDataSource40() {
         super();
-    }   
-    
-    ////////////////////////////////////////////////////////////////////
-    //
-    // INTRODUCED BY JDBC 4.1 IN JAVA 7
-    //
-    ////////////////////////////////////////////////////////////////////
-
-    public  Logger getParentLogger()
-        throws SQLFeatureNotSupportedException
-    {
-        throw (SQLFeatureNotSupportedException)
-            (
-             new SqlException( null, new ClientMessageId(SQLState.NOT_IMPLEMENTED), "getParentLogger"
)
-             ).getSQLException();
     }
-    
 }

Modified: db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientXADataSource.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientXADataSource.java?rev=1482632&r1=1482631&r2=1482632&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientXADataSource.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientXADataSource.java Tue May
14 22:44:13 2013
@@ -25,9 +25,9 @@ import java.sql.SQLException;
 import javax.sql.XAConnection;
 
 /**
+ * <p>
  * This datasource is suitable for a client/server use of Derby,
- * running on full Java SE 5 or 6, corresponding to JDBC 3.0 and 4.0.
- * If running on Java SE 7 or higher, consider a more capable data source.
+ * running on full Java SE 6, 7 or 8, corresponding to JDBC 4.0, 4.1 and 4.2.
  * </p>
  * An XADataSource is a factory for XAConnection objects.  It represents a
  * RM in a DTP environment.  An object that implements the XADataSource
@@ -36,8 +36,9 @@ import javax.sql.XAConnection;
  * ClientXADataSource automatically supports the correct JDBC specification version
  * for the Java Virtual Machine's environment.
  * <UL>
- * <LI> JDBC 4.0 - Java SE 6
- * <LI> JDBC 3.0 - J2SE 5.0
+ * <LI> JDBC 4.2 - Java SE 8 </LI>
+ * <LI> JDBC 4.1 - Java SE 7 </LI>
+ * <LI> JDBC 4.0 - Java SE 6 </LI>
  * </UL>
  *
  * <P>ClientXADataSource is serializable and referenceable.</p>

Modified: db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientXADataSource40.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientXADataSource40.java?rev=1482632&r1=1482631&r2=1482632&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientXADataSource40.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientXADataSource40.java Tue May
14 22:44:13 2013
@@ -21,37 +21,40 @@
 
 package org.apache.derby.jdbc;
 
-import java.sql.SQLFeatureNotSupportedException;
-import java.util.logging.Logger;
 import javax.sql.XADataSource;
-import org.apache.derby.client.am.ClientMessageId;
-import org.apache.derby.client.am.SqlException;
-import org.apache.derby.shared.common.reference.SQLState;
 
 /**
+ * <p>
  * This datasource is suitable for a client/server use of Derby,
  * running on the following platforms:
+ * </p>
+ *
  * <p>
  * <ul>
- *   <li>Java SE 7 (JDBC 4.1) and
- *   <li>full Java SE 8 (JDBC 4.2).
+ *   <li>Java SE 6 (JDBC 4.0) and</li>
+ *   <li>Java SE 7 (JDBC 4.1) and</li>
+ *   <li>full Java SE 8 (JDBC 4.2).</li>
  * </ul>
+ * </p>
+ *
+ * <p>
+ * Those platforms are also supported by {@code ClientXADataSource}
+ * now, and applications should use {@code ClientXADataSource}
+ * instead of this class. This class is provided only for backward
+ * compatibility and may be removed in later versions of Derby.
+ * </p>
+ *
  * <p>
  * Use BasicClientXADataSource40 if your application runs on Java 8
  * Compact Profile 2.
- * <p>
- * Use ClientXADataSource if your application runs on the following
- * platforms:
- * <p>
- * <ul>
- *   <li> JDBC 4.0 - Java SE 6
- *   <li> JDBC 3.0 - J2SE 5.0
- * </ul>
+ * </p>
+ *
  * <p>
  * An XADataSource is a factory for XAConnection objects.  It represents a
  * RM in a DTP environment.  An object that implements the XADataSource
  * interface is typically registered with a JNDI service provider.
- * <P>
+ * </p>
+ *
  * <P>ClientXADataSource40 is serializable and referenceable.</p>
  *
  * <P>See ClientDataSource40 for DataSource properties.</p>
@@ -60,20 +63,4 @@ public class ClientXADataSource40 extend
     implements XADataSource /* compile-time check for 4.1 extension */
 {
    private static final long serialVersionUID = -3463444509507830926L;
-
-    ////////////////////////////////////////////////////////////////////
-    //
-    // INTRODUCED BY JDBC 4.1 IN JAVA 7
-    //
-    ////////////////////////////////////////////////////////////////////
-
-    public  Logger getParentLogger()
-        throws SQLFeatureNotSupportedException
-    {
-        throw (SQLFeatureNotSupportedException)
-            (
-             new SqlException( null, new ClientMessageId(SQLState.NOT_IMPLEMENTED), "getParentLogger"
)
-             ).getSQLException();
-    }
-    
 }



Mime
View raw message