db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r533835 - in /db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc: BrokeredConnection.java EngineConnection.java
Date Mon, 30 Apr 2007 19:38:08 GMT
Author: rhillegas
Date: Mon Apr 30 12:38:07 2007
New Revision: 533835

URL: http://svn.apache.org/viewvc?view=rev&rev=533835
Log:
DERBY-2566: Commit Narayanan's BrokeredMethodsNeedForwarding.diff, which forwards various
internal operations on LOB locators to the wrapped connection.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/EngineConnection.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection.java?view=diff&rev=533835&r1=533834&r2=533835
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection.java Mon
Apr 30 12:38:07 2007
@@ -616,35 +616,39 @@
         
     }
 	/**
-	* Dummy implementation for method in EngineConnection.
-        *
+	* Add the locator and the corresponding LOB object into the
+	* HashMap
+	*
 	* @param LOBReference The object which contains the LOB object that
 	*                     that is added to the HashMap.
 	* @return an integer that represents the locator that has been
 	*         allocated to this LOB.
 	*/
-	public int addLOBMapping(Object LOBReference) {
-		//This call is forwarded to the implementation in the EmbedConnection
-		//class and hence the actual implementation here is not necessary.
-		return -1;
+	public int addLOBMapping(Object LOBReference) throws SQLException {
+            //Forward the methods implementation to the implementation in the
+            //underlying EmbedConnection object. 
+            return getRealConnection().addLOBMapping(LOBReference);
 	}
 
 	/**
-	* Dummy implementation for method in EngineConnection.
+	* Clear the HashMap of all entries.
+	* Called when a commit or rollback of the transaction
+	* happens.
 	*/
-	public void clearLOBMapping() {
-		//This call is forwarded to the implementation in the EmbedConnection
-		//class and hence the actual implementation here is not necessary.
+	public void clearLOBMapping() throws SQLException {
+            //Forward the methods implementation to the implementation in the
+            //underlying EmbedConnection object. 
+            getRealConnection().clearLOBMapping();
 	}
 
 	/**
-	* Dummy implementation for method in EngineConnection.
+	* Get the LOB reference corresponding to the locator.
 	* @param key the integer that represents the LOB locator value.
 	* @return the LOB Object corresponding to this locator.
 	*/
-	public Object getLOBMapping(int key) {
-		//This call is forwarded to the implementation in the EmbedConnection
-		//class and hence the actual implementation here is not necessary.
-		return null;
+	public Object getLOBMapping(int key) throws SQLException {
+            //Forward the methods implementation to the implementation in the
+            //underlying EmbedConnection object. 
+            return getRealConnection().getLOBMapping(key);
 	}
 }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/EngineConnection.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/EngineConnection.java?view=diff&rev=533835&r1=533834&r2=533835
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/EngineConnection.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/EngineConnection.java Mon Apr
30 12:38:07 2007
@@ -101,7 +101,7 @@
     * @return an integer that represents the locator that has been
     *         allocated to this LOB.
     */
-    public int addLOBMapping(Object LOBReference);
+    public int addLOBMapping(Object LOBReference) throws SQLException;
 
     /**
     * Clear the HashTable of all entries.
@@ -115,5 +115,5 @@
     * @param key the integer that represents the LOB locator value.
     * @return the LOB Object corresponding to this locator.
     */
-    public Object getLOBMapping(int key);
+    public Object getLOBMapping(int key) throws SQLException;
 }



Mime
View raw message