jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1143393 - /jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java
Date Wed, 06 Jul 2011 13:01:45 GMT
Author: mduerig
Date: Wed Jul  6 13:01:45 2011
New Revision: 1143393

URL: http://svn.apache.org/viewvc?rev=1143393&view=rev
Log:
fix getEvents

Modified:
    jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java

Modified: jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java?rev=1143393&r1=1143392&r2=1143393&view=diff
==============================================================================
--- jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java
(original)
+++ jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java
Wed Jul  6 13:01:45 2011
@@ -69,6 +69,7 @@ public class SubscriptionImpl implements
     }
 
     public EventBundle[] getEvents(long timeout) throws RepositoryException, InterruptedException
{
+        String head = microKernel.waitForCommit(microKernel.getHeadRevision(), timeout);
 
         List<EventBundle> eventBundles = new ArrayList<EventBundle>();
 
@@ -82,8 +83,7 @@ public class SubscriptionImpl implements
                     current = next;
                 }
 
-                String old = current.getStartRevision();
-                String head = microKernel.waitForCommit(old, timeout);
+                microKernel.getHeadRevision();
                 eventBundles.addAll(current.getEventsBundles(head));
                 eventSources.add(current.update(head));
             }



Mime
View raw message