jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r647147 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/DatabasePersistenceManager.java
Date Fri, 11 Apr 2008 12:43:43 GMT
Author: stefan
Date: Fri Apr 11 05:43:38 2008
New Revision: 647147

URL: http://svn.apache.org/viewvc?rev=647147&view=rev
Log:
JCR-1532: ERROR 40XD0: Container has been closed exception with Derby DB

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/DatabasePersistenceManager.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/DatabasePersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/DatabasePersistenceManager.java?rev=647147&r1=647146&r2=647147&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/DatabasePersistenceManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/DatabasePersistenceManager.java
Fri Apr 11 05:43:38 2008
@@ -394,6 +394,15 @@
                 }
 
                 in = rs.getBinaryStream(1);
+
+                if (!externalBLOBs) {
+                    // JCR-1532: pre-fetch/buffer stream data
+                    ByteArrayInputStream bain = new ByteArrayInputStream(
+                            IOUtils.toByteArray(in));
+                    IOUtils.closeQuietly(in);
+                    in = bain;
+                }
+
                 PropertyState state = createNew(id);
                 Serializer.deserialize(state, in, blobStore);
 



Mime
View raw message