jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r610132 - in /jackrabbit/branches/1.4: RELEASE-NOTES.txt jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java
Date Tue, 08 Jan 2008 20:29:50 GMT
Author: jukka
Date: Tue Jan  8 12:29:49 2008
New Revision: 610132

URL: http://svn.apache.org/viewvc?rev=610132&view=rev
Log:
1.4: Merged revision 609938 (JCR-1296)

Modified:
    jackrabbit/branches/1.4/RELEASE-NOTES.txt
    jackrabbit/branches/1.4/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java

Modified: jackrabbit/branches/1.4/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.4/RELEASE-NOTES.txt?rev=610132&r1=610131&r2=610132&view=diff
==============================================================================
--- jackrabbit/branches/1.4/RELEASE-NOTES.txt (original)
+++ jackrabbit/branches/1.4/RELEASE-NOTES.txt Tue Jan  8 12:29:49 2008
@@ -530,6 +530,7 @@
   [JCR-1160] JCR2SPI: test regression for WorkspaceMoveReferenceableTest...
   [JCR-1183] JCR2SPI: potential race condition in event listener registration
   [JCR-1245] JCR2SPI: Use namespace decl. present in imported xml to ...
+  [JCR-1296] Exception may get lost in WorkspaceManager....
 
 jackrabbit-spi
 

Modified: jackrabbit/branches/1.4/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.4/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java?rev=610132&r1=610131&r2=610132&view=diff
==============================================================================
--- jackrabbit/branches/1.4/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java
(original)
+++ jackrabbit/branches/1.4/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java
Tue Jan  8 12:29:49 2008
@@ -746,6 +746,7 @@
          * Executes the operations on the repository service.
          */
         private void execute(ChangeLog changeLog) throws RepositoryException, ConstraintViolationException,
AccessDeniedException, ItemExistsException, NoSuchNodeTypeException, UnsupportedRepositoryOperationException,
VersionException {
+            RepositoryException ex = null;
             try {
                 ItemState target = changeLog.getTarget();
                 batch = service.createBatch(sessionInfo, target.getId());
@@ -755,12 +756,28 @@
                     log.debug("executing " + op.getName());
                     op.accept(this);
                 }
+            } catch (RepositoryException e) {
+                ex = e;
             } finally {
                 if (batch != null) {
-                    service.submit(batch);
+                    try {
+                        // submit must be called even in case there is an
+                        // exception to give the service a chance to clean
+                        // up the batch
+                        service.submit(batch);
+                    } catch (RepositoryException e) {
+                        if (ex == null) {
+                            ex = e;
+                        } else {
+                            log.warn("Exception submitting batch", e);
+                        }
+                    }
                     // reset batch field
                     batch = null;
                 }
+            }
+            if (ex != null) {
+                throw ex;
             }
         }
 



Mime
View raw message