incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1127887 - in /sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs: JobEvent.java jcr/PersistenceHandler.java
Date Thu, 26 May 2011 12:36:46 GMT
Author: cziegeler
Date: Thu May 26 12:36:46 2011
New Revision: 1127887

URL: http://svn.apache.org/viewvc?rev=1127887&view=rev
Log:
Add toString for debugging

Modified:
    sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobEvent.java
    sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/jcr/PersistenceHandler.java

Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobEvent.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobEvent.java?rev=1127887&r1=1127886&r2=1127887&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobEvent.java
(original)
+++ sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobEvent.java
Thu May 26 12:36:46 2011
@@ -57,4 +57,10 @@ public abstract class JobEvent {
         }
         return this.uniqueId.equals(((JobEvent)obj).uniqueId);
     }
+
+    @Override
+    public String toString() {
+        // TODO Auto-generated method stub
+        return "JobEvent(" + uniqueId + ")";
+    }
 }
\ No newline at end of file

Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/jcr/PersistenceHandler.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/jcr/PersistenceHandler.java?rev=1127887&r1=1127886&r2=1127887&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/jcr/PersistenceHandler.java
(original)
+++ sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/jcr/PersistenceHandler.java
Thu May 26 12:36:46 2011
@@ -723,7 +723,13 @@ public class PersistenceHandler implemen
         try {
             writerSession = this.environment.createAdminSession();
             // we only listen for all node added events not coming from this session(!)
-            writerSession.getWorkspace().getObservationManager().addEventListener(this,
+            writerSession.getWorkspace().getObservationManager().addEventListener(
+                    new EventListener() {
+
+                        public void onEvent(final EventIterator events) {
+                            PersistenceHandler.this.onEvent(events);
+                        }
+                    },
                          javax.jcr.observation.Event.NODE_ADDED,
                          this.repositoryPath,
                          true,



Mime
View raw message