You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by dj...@apache.org on 2006/02/21 23:43:23 UTC

svn commit: r379609 - in /db/derby/code/trunk/java/drda/org/apache/derby/impl/drda: Database.java XADatabase.java

Author: djd
Date: Tue Feb 21 14:43:21 2006
New Revision: 379609

URL: http://svn.apache.org/viewcvs?rev=379609&view=rev
Log:
DERBY-1015 Use the EngineConnection class to call setDRDAId, set/getPrepareIsolation from
the network server on an embedded connction. Removes the requirement for specialized methods
in XADatasource.

Modified:
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/Database.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/XADatabase.java

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/Database.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/Database.java?rev=379609&r1=379608&r2=379609&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/Database.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/Database.java Tue Feb 21 14:43:21 2006
@@ -33,7 +33,6 @@
 import org.apache.derby.iapi.jdbc.EngineConnection;
 import org.apache.derby.iapi.reference.Attribute;
 import org.apache.derby.iapi.tools.i18n.LocalizedResource;
-import org.apache.derby.impl.jdbc.EmbedConnection;
 import org.apache.derby.iapi.services.sanity.SanityManager;
 /**
 	Database stores information about the current database
@@ -322,10 +321,10 @@
 		}
 	}
 
-	protected void setDrdaID(String drdaID)
+	final void setDrdaID(String drdaID)
 	{
 		if (conn != null)
-			((EmbedConnection)conn).setDrdaID(drdaID);
+			conn.setDrdaID(drdaID);
 	}
 
 	/**
@@ -334,17 +333,17 @@
 	 * @param level internal isolation level 
 	 *
 	 * @throws SQLException
-	 * @see EmbedConnection#setPrepareIsolation
+	 * @see EngineConnection#setPrepareIsolation
 	 * 
 	 */
-	protected void setPrepareIsolation(int level) throws SQLException
+	final void setPrepareIsolation(int level) throws SQLException
 	{
-		((EmbedConnection) conn).setPrepareIsolation(level);
+		conn.setPrepareIsolation(level);
 	}
 
-	protected int getPrepareIsolation() throws SQLException
+	final int getPrepareIsolation() throws SQLException
 	{
-		return ((EmbedConnection) conn).getPrepareIsolation();
+		return conn.getPrepareIsolation();
 	}
 
 	protected String buildRuntimeInfo(String indent, LocalizedResource localLangUtil)

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/XADatabase.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/XADatabase.java?rev=379609&r1=379608&r2=379609&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/XADatabase.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/XADatabase.java Tue Feb 21 14:43:21 2006
@@ -106,38 +106,6 @@
 		this.xaResource = resource;
 	}
 
-	/** Set DRDA id for this connection
-	 * @param drdaID
-	 */
-	protected void setDrdaID(String drdaID)
-	{
-		if (getConnection() != null)
-			((BrokeredConnection) getConnection()).setDrdaID(drdaID);
-	}
-
-
-	/**
-	 *  Set the internal isolation level to use for preparing statements.
-	 *  Subsequent prepares will use this isoalation level
-	 * @param level internal isolation level 
-	 *
-	 * @throws SQLException
-	 * @see BrokeredConnection#setPrepareIsolation
-	 * 
-	 */
-	protected void setPrepareIsolation(int level) throws SQLException
-	{
-		((BrokeredConnection) getConnection()).setPrepareIsolation(level);
-	}
-
-	/** get prepare isolation level for this connection.
-	 * 
-	 */
-	protected int getPrepareIsolation() throws SQLException
-	{
-		return ((BrokeredConnection) getConnection()).getPrepareIsolation();
-	}
-
 	/**
 	 * get XA Resource for this connection
 	 */