db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oyste...@apache.org
Subject svn commit: r644761 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java
Date Fri, 04 Apr 2008 16:26:30 GMT
Author: oysteing
Date: Fri Apr  4 09:26:28 2008
New Revision: 644761

URL: http://svn.apache.org/viewvc?rev=644761&view=rev
Log:
Reverse incomplete commit.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java?rev=644761&r1=644760&r2=644761&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java Fri Apr  4 09:26:28
2008
@@ -75,7 +75,7 @@
     private InputStream     myStream;
     
     // locator key for lob. used by Network Server.
-    private int             locator;
+    private final int             locator;
     
     /*
      * Length of the BLOB if known. Set to -1 if
@@ -117,7 +117,7 @@
              materialized = true;
              //add entry in connection so it can be cleared 
              //when transaction is not valid
-             con.addLOBReference (this);
+             locator = con.addLOBMapping (this);
          }
          catch (IOException e) {
              throw Util.setStreamFailure (e);
@@ -193,7 +193,7 @@
         pos = 0;
         //add entry in connection so it can be cleared 
         //when transaction is not valid
-        con.addLOBReference (this);
+        this.locator = con.addLOBMapping (this);
     }
 
 
@@ -906,8 +906,6 @@
         //valid
         isValid = false;
         
-        //remove entry from connection
-        localConn.removeLOBMapping(locator);
         //initialialize length to default value -1
         myLength = -1;
         
@@ -1002,9 +1000,6 @@
      * @return The locator identifying this lob.
      */
     public int getLocator() {
-        if (locator == 0) {
-            locator = localConn.addLOBMapping(this);
-        }
         return locator;
     }
 }



Mime
View raw message