incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r575559 - /incubator/sling/trunk/event/src/main/java/org/apache/sling/event/impl/JobEventHandler.java
Date Fri, 14 Sep 2007 06:44:22 GMT
Author: cziegeler
Date: Thu Sep 13 23:44:13 2007
New Revision: 575559

URL: http://svn.apache.org/viewvc?rev=575559&view=rev
Log:
Keep lock token in global session until it is released by another session.

Modified:
    incubator/sling/trunk/event/src/main/java/org/apache/sling/event/impl/JobEventHandler.java

Modified: incubator/sling/trunk/event/src/main/java/org/apache/sling/event/impl/JobEventHandler.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/event/src/main/java/org/apache/sling/event/impl/JobEventHandler.java?rev=575559&r1=575558&r2=575559&view=diff
==============================================================================
--- incubator/sling/trunk/event/src/main/java/org/apache/sling/event/impl/JobEventHandler.java
(original)
+++ incubator/sling/trunk/event/src/main/java/org/apache/sling/event/impl/JobEventHandler.java
Thu Sep 13 23:44:13 2007
@@ -193,9 +193,7 @@
                                     eventNode.refresh(true);
                                     if ( eventNode.getProperty(EventHelper.NODE_PROPERTY_ACTIVE).getBoolean()
) {
                                         unlock = false;
-                                        final String lockToken = lock.getLockToken();
-                                        this.processJob(info.event, eventNode, lockToken);
-                                        this.session.removeLockToken(lockToken);
+                                        this.processJob(info.event, eventNode, lock.getLockToken());
                                     } else {
                                         eventNode.unlock();
                                     }
@@ -570,7 +568,8 @@
         Session s = null;
         try {
             s = this.createSession();
-            // add lock token to current session
+            // remove lock token from shared session and add it to current session
+            this.session.removeLockToken(lockToken);
             s.addLockToken(lockToken);
             final Node eventNode = (Node) s.getItem(eventNodePath);
             try {



Mime
View raw message