You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/10/18 23:19:25 UTC

[sling-org-apache-sling-event-dea] branch master created (now 5abf801)

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git.


      at 5abf801  SLING-7167 Adjust READMEs

This branch includes the following new commits:

     new 10facb4  SLING-3882 : Move the distributed event admin into a separate project
     new 7c8f3ba  Update to latest API version
     new de028cd  Use released SLING API
     new 5737ca9  [maven-release-plugin] prepare release org.apache.sling.event.dea-1.0.0
     new e68430a  [maven-release-plugin] prepare for next development iteration
     new 366a9f5  Use latest parent pom
     new 43b1827  SLING-4698 - Set parent.relativePath to empty for all modules
     new e7f4b5a  SLING-4758 : Make the DEA bundle usable on older Sling installations
     new fda81fb  Update to Sling Parent 23
     new 8e3926b  Remove superflous sling.java.version=6 as it's the default now
     new 4861052  set parent version to 24 and add empty relativePath where missing
     new c470555  [maven-release-plugin] prepare release org.apache.sling.event.dea-1.0.2
     new bc4e06c  [maven-release-plugin] prepare for next development iteration
     new 2078d18  SLING-5052 : avoid NPE when resource no longer exists
     new 7141f1b  [maven-release-plugin] prepare release org.apache.sling.event.dea-1.0.4
     new 7ee6f2c  [maven-release-plugin] prepare for next development iteration
     new 4951e4f  Update the main reactor to parent 25
     new bb2720a  Switch to parent pom 26
     new 02c7267  SLING-5996 : DistributedEventSender should move to new ResourceChangeListener API
     new 6e74a99  Fix javadoc generation
     new 4b53762  SLING-5230 : Remove getAdministrativeResourceResolver() usage from org.apache.sling.event.dea
     new cfa25d7  [maven-release-plugin] prepare release org.apache.sling.event.dea-1.1.0
     new c819971  [maven-release-plugin] prepare for next development iteration
     new 688898c  Update to parent pom 29
     new df5a645  SLING-6497 Use ServiceUserMapped to ensure presence of service user mapping
     new 1f429ba  [maven-release-plugin] prepare release org.apache.sling.event.dea-1.1.2
     new f0ec8ae  [maven-release-plugin] prepare for next development iteration
     new 81a7f16  use Sling Parent 30
     new 5abf801  SLING-7167 Adjust READMEs

The 29 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


-- 
To stop receiving notification emails like this one, please contact
['"commits@sling.apache.org" <co...@sling.apache.org>'].

[sling-org-apache-sling-event-dea] 12/29: [maven-release-plugin] prepare release org.apache.sling.event.dea-1.0.2

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit c470555ed0f2f44382837235afefe9ffa0770225
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Jul 15 12:04:13 2015 +0000

    [maven-release-plugin] prepare release org.apache.sling.event.dea-1.0.2
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1691185 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/pom.xml b/pom.xml
index 51dee7e..3f90dc4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,12 +24,12 @@
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
         <version>24</version>
-        <relativePath/>
+        <relativePath />
     </parent>
 
     <artifactId>org.apache.sling.event.dea</artifactId>
     <packaging>bundle</packaging>
-    <version>1.0.1-SNAPSHOT</version>
+    <version>1.0.2</version>
 
     <name>Apache Sling Distributed Event Admin</name>
     <description>
@@ -37,9 +37,9 @@
     </description>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/dea</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/dea</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/dea</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.event.dea-1.0.2</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.event.dea-1.0.2</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.event.dea-1.0.2</url>
     </scm>
 
     <build>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 11/29: set parent version to 24 and add empty relativePath where missing

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit 486105292aee9647ba39fcb8cb61217793610768
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Tue Jul 7 08:09:17 2015 +0000

    set parent version to 24 and add empty relativePath where missing
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1689593 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index fa1a215..51dee7e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>23</version>
+        <version>24</version>
         <relativePath/>
     </parent>
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 27/29: [maven-release-plugin] prepare for next development iteration

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit f0ec8ae4d4d4966fc6a99e5385311f8917738b03
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Sun Mar 5 07:33:38 2017 +0000

    [maven-release-plugin] prepare for next development iteration
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1785531 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index b93b3b9..0967427 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
 
     <artifactId>org.apache.sling.event.dea</artifactId>
     <packaging>bundle</packaging>
-    <version>1.1.2</version>
+    <version>1.1.3-SNAPSHOT</version>
 
     <name>Apache Sling Distributed Event Admin</name>
     <description>
@@ -37,9 +37,9 @@
     </description>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.event.dea-1.1.2</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.event.dea-1.1.2</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.event.dea-1.1.2</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/dea</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/dea</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/dea</url>
     </scm>
 
     <build>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 14/29: SLING-5052 : avoid NPE when resource no longer exists

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit 2078d1825bf6f48a281be44122c49d457d013685
Author: Stefan Egli <st...@apache.org>
AuthorDate: Tue Sep 22 16:20:39 2015 +0000

    SLING-5052 : avoid NPE when resource no longer exists
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1704664 13f79535-47bb-0310-9956-ffa450edef68
---
 .../java/org/apache/sling/event/dea/impl/DistributedEventSender.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/event/dea/impl/DistributedEventSender.java b/src/main/java/org/apache/sling/event/dea/impl/DistributedEventSender.java
index 8bc982f..1cf81ec 100644
--- a/src/main/java/org/apache/sling/event/dea/impl/DistributedEventSender.java
+++ b/src/main/java/org/apache/sling/event/dea/impl/DistributedEventSender.java
@@ -192,7 +192,9 @@ public class DistributedEventSender
                 try {
                     resolver = this.resourceResolverFactory.getAdministrativeResourceResolver(null);
                     final Resource eventResource = resolver.getResource(path);
-                    if ( DistributedEventAdminImpl.RESOURCE_TYPE_EVENT.equals(eventResource.getResourceType())) {
+                    if (eventResource == null) {
+                        this.logger.warn("runInBackground : resource not found at "+path);
+                    } else if ( DistributedEventAdminImpl.RESOURCE_TYPE_EVENT.equals(eventResource.getResourceType())) {
                         final Event e = this.readEvent(eventResource);
                         if ( e != null ) {
                             // we check event admin as processing is async

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 03/29: Use released SLING API

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit de028cd7a7166a7dd2b12532f5c4fb4efeb513b1
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Sep 2 06:09:54 2014 +0000

    Use released SLING API
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1621924 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 1f8f517..538ea2b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -113,7 +113,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.api</artifactId>
-            <version>2.8.1-SNAPSHOT</version>
+            <version>2.8.0</version>
             <scope>provided</scope>
         </dependency>
       <!-- Testing -->

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 10/29: Remove superflous sling.java.version=6 as it's the default now

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit 8e3926be33a8e30a31e79c594d461ba065446887
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu Jun 25 13:14:53 2015 +0000

    Remove superflous sling.java.version=6 as it's the default now
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1687505 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/pom.xml b/pom.xml
index c7a60d9..fa1a215 100644
--- a/pom.xml
+++ b/pom.xml
@@ -42,11 +42,6 @@
         <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/dea</url>
     </scm>
 
-    <properties>
-        <sling.java.version>6</sling.java.version>
-    </properties>
-
-
     <build>
         <plugins>
             <plugin>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 23/29: [maven-release-plugin] prepare for next development iteration

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit c819971e0241d21cb1594892192b0c069dc16934
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Oct 12 13:07:39 2016 +0000

    [maven-release-plugin] prepare for next development iteration
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1764457 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index f1a65b6..8d05e48 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
 
     <artifactId>org.apache.sling.event.dea</artifactId>
     <packaging>bundle</packaging>
-    <version>1.1.0</version>
+    <version>1.1.1-SNAPSHOT</version>
 
     <name>Apache Sling Distributed Event Admin</name>
     <description>
@@ -37,9 +37,9 @@
     </description>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.event.dea-1.1.0</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.event.dea-1.1.0</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.event.dea-1.1.0</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/dea</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/dea</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/dea</url>
     </scm>
 
     <build>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 05/29: [maven-release-plugin] prepare for next development iteration

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit e68430a867fd4f76d1e89778c2d6d1894fb96dd4
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Oct 21 07:18:51 2014 +0000

    [maven-release-plugin] prepare for next development iteration
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1633292 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 7830ea4..0dd5a31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
 
     <artifactId>org.apache.sling.event.dea</artifactId>
     <packaging>bundle</packaging>
-    <version>1.0.0</version>
+    <version>1.0.1-SNAPSHOT</version>
 
     <name>Apache Sling Distributed Event Admin</name>
     <description>
@@ -37,9 +37,9 @@
     </description>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.event.dea-1.0.0</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.event.dea-1.0.0</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.event.dea-1.0.0</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/dea</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/dea</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/dea</url>
     </scm>
 
     <properties>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 07/29: SLING-4698 - Set parent.relativePath to empty for all modules

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit 43b1827a0cb5595b217bd564f8a7f13cd6f058ef
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu May 7 10:14:40 2015 +0000

    SLING-4698 - Set parent.relativePath to empty for all modules
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1678154 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 9e084e2..a1bae10 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
         <version>22</version>
-        <relativePath>../../../parent/pom.xml</relativePath>
+        <relativePath/>
     </parent>
 
     <artifactId>org.apache.sling.event.dea</artifactId>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 09/29: Update to Sling Parent 23

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit fda81fbf417c5adb03b778716f0e5a682e48e134
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu Jun 25 13:08:16 2015 +0000

    Update to Sling Parent 23
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1687500 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 11606d1..c7a60d9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>22</version>
+        <version>23</version>
         <relativePath/>
     </parent>
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 29/29: SLING-7167 Adjust READMEs

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit 5abf801544b63557a6491ae1f4ce7c73442152fa
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Tue Oct 3 09:20:21 2017 +0000

    SLING-7167 Adjust READMEs
    
    add missing README
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1810682 13f79535-47bb-0310-9956-ffa450edef68
---
 README.md | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/README.md b/README.md
new file mode 100644
index 0000000..1336de0
--- /dev/null
+++ b/README.md
@@ -0,0 +1,3 @@
+# Apache Sling Distributed Event Admin
+
+This module is part of the [Apache Sling](https://sling.apache.org) project.

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 15/29: [maven-release-plugin] prepare release org.apache.sling.event.dea-1.0.4

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit 7141f1bd9241f7c618b5825ac28c589f22166b9d
Author: Stefan Egli <st...@apache.org>
AuthorDate: Wed Sep 23 10:05:27 2015 +0000

    [maven-release-plugin] prepare release org.apache.sling.event.dea-1.0.4
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1704802 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 832e51b..048688f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
 
     <artifactId>org.apache.sling.event.dea</artifactId>
     <packaging>bundle</packaging>
-    <version>1.0.3-SNAPSHOT</version>
+    <version>1.0.4</version>
 
     <name>Apache Sling Distributed Event Admin</name>
     <description>
@@ -37,9 +37,9 @@
     </description>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/dea</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/dea</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/dea</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.event.dea-1.0.4</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.event.dea-1.0.4</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.event.dea-1.0.4</url>
     </scm>
 
     <build>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 02/29: Update to latest API version

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit 7c8f3bab556c94bc134a62b6c66e05232a54f2e7
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Aug 28 08:26:20 2014 +0000

    Update to latest API version
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1621090 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                                               | 2 +-
 .../org/apache/sling/event/dea/impl/DistributedEventReceiver.java     | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/pom.xml b/pom.xml
index afeacbe..1f8f517 100644
--- a/pom.xml
+++ b/pom.xml
@@ -113,7 +113,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.api</artifactId>
-            <version>2.7.1-SNAPSHOT</version>
+            <version>2.8.1-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
       <!-- Testing -->
diff --git a/src/main/java/org/apache/sling/event/dea/impl/DistributedEventReceiver.java b/src/main/java/org/apache/sling/event/dea/impl/DistributedEventReceiver.java
index 58ed940..5f6d2f9 100644
--- a/src/main/java/org/apache/sling/event/dea/impl/DistributedEventReceiver.java
+++ b/src/main/java/org/apache/sling/event/dea/impl/DistributedEventReceiver.java
@@ -301,7 +301,7 @@ public class DistributedEventReceiver
                 final Resource baseResource = resolver.getResource(this.rootPath);
                 // sanity check - should never be null
                 if ( baseResource != null ) {
-                    final ResourceUtil.BatchResourceRemover brr = ResourceUtil.getBatchResourceResourceRemover(50);
+                    final ResourceUtil.BatchResourceRemover brr = ResourceUtil.getBatchResourceRemover(50);
                     final Iterator<Resource> iter = baseResource.listChildren();
                     while ( iter.hasNext() ) {
                         final Resource rootResource = iter.next();
@@ -333,7 +333,7 @@ public class DistributedEventReceiver
             ResourceResolver resolver = null;
             try {
                 resolver = this.resourceResolverFactory.getAdministrativeResourceResolver(null);
-                final ResourceUtil.BatchResourceRemover brr = ResourceUtil.getBatchResourceResourceRemover(50);
+                final ResourceUtil.BatchResourceRemover brr = ResourceUtil.getBatchResourceRemover(50);
 
                 final Resource baseResource = resolver.getResource(this.ownRootPath);
                 // sanity check - should never be null

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 22/29: [maven-release-plugin] prepare release org.apache.sling.event.dea-1.1.0

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit cfa25d7610aea5eb9da3db17a6beb5f3f9feb591
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Oct 12 13:07:24 2016 +0000

    [maven-release-plugin] prepare release org.apache.sling.event.dea-1.1.0
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1764455 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 9b654e4..f1a65b6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
 
     <artifactId>org.apache.sling.event.dea</artifactId>
     <packaging>bundle</packaging>
-    <version>1.0.5-SNAPSHOT</version>
+    <version>1.1.0</version>
 
     <name>Apache Sling Distributed Event Admin</name>
     <description>
@@ -37,9 +37,9 @@
     </description>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/dea</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/dea</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/dea</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.event.dea-1.1.0</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.event.dea-1.1.0</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.event.dea-1.1.0</url>
     </scm>
 
     <build>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 26/29: [maven-release-plugin] prepare release org.apache.sling.event.dea-1.1.2

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit 1f429bad355b6e6b8a2e0f6eea3827bd5fda819d
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Sun Mar 5 07:33:22 2017 +0000

    [maven-release-plugin] prepare release org.apache.sling.event.dea-1.1.2
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1785529 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index dcba8b9..b93b3b9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
 
     <artifactId>org.apache.sling.event.dea</artifactId>
     <packaging>bundle</packaging>
-    <version>1.1.1-SNAPSHOT</version>
+    <version>1.1.2</version>
 
     <name>Apache Sling Distributed Event Admin</name>
     <description>
@@ -37,9 +37,9 @@
     </description>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/dea</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/dea</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/dea</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.event.dea-1.1.2</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.event.dea-1.1.2</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.event.dea-1.1.2</url>
     </scm>
 
     <build>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 19/29: SLING-5996 : DistributedEventSender should move to new ResourceChangeListener API

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit 02c7267fc7d855b44ddcc61d15387ae70b10ff85
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Sep 22 13:33:05 2016 +0000

    SLING-5996 : DistributedEventSender should move to new ResourceChangeListener API
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1761965 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                            | 28 ++++++---------
 .../event/dea/impl/DistributedEventAdminImpl.java  | 40 +++++++++-------------
 .../event/dea/impl/DistributedEventReceiver.java   |  4 +--
 .../event/dea/impl/DistributedEventSender.java     | 38 ++++++++++----------
 .../org/apache/sling/event/dea/package-info.java   |  3 +-
 .../dea/impl/DistributingEventHandlerTest.java     |  6 +++-
 6 files changed, 55 insertions(+), 64 deletions(-)

diff --git a/pom.xml b/pom.xml
index 83d3675..c2d9718 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>26</version>
+        <version>28</version>
         <relativePath />
     </parent>
 
@@ -46,10 +46,6 @@
         <plugins>
             <plugin>
                 <groupId>org.apache.felix</groupId>
-                <artifactId>maven-scr-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
                 <extensions>true</extensions>
             </plugin>
@@ -70,28 +66,24 @@
     </reporting>
     <dependencies>
         <dependency>
-            <groupId>org.apache.felix</groupId>
-            <artifactId>org.apache.felix.scr.annotations</artifactId>
-        </dependency>
-        <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.discovery.api</artifactId>
             <version>1.0.0</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.service.event</artifactId>
+            <version>1.3.1</version>
+            <scope>provided</scope>
         </dependency>
         <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.core</artifactId>
-            <version>4.2.0</version>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
         </dependency>
         <dependency>
             <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.compendium</artifactId>
-            <version>4.2.0</version>
+            <artifactId>osgi.core</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.sling</groupId>
@@ -108,7 +100,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.api</artifactId>
-            <version>2.4.0</version>
+            <version>2.11.0</version>
             <scope>provided</scope>
         </dependency>
       <!-- Testing -->
@@ -125,7 +117,7 @@
         <dependency>
             <groupId>org.mockito</groupId>
             <artifactId>mockito-all</artifactId>
-            <version>1.9.5</version>
+            <version>1.10.19</version>
             <scope>test</scope>
         </dependency>
         <dependency>
diff --git a/src/main/java/org/apache/sling/event/dea/impl/DistributedEventAdminImpl.java b/src/main/java/org/apache/sling/event/dea/impl/DistributedEventAdminImpl.java
index df128b4..27a811c 100644
--- a/src/main/java/org/apache/sling/event/dea/impl/DistributedEventAdminImpl.java
+++ b/src/main/java/org/apache/sling/event/dea/impl/DistributedEventAdminImpl.java
@@ -18,17 +18,13 @@
  */
 package org.apache.sling.event.dea.impl;
 
-import java.util.Map;
-
-import org.apache.felix.scr.annotations.Activate;
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Deactivate;
-import org.apache.felix.scr.annotations.Property;
-import org.apache.felix.scr.annotations.Reference;
 import org.apache.sling.api.resource.ResourceResolverFactory;
-import org.apache.sling.commons.osgi.PropertiesUtil;
 import org.apache.sling.settings.SlingSettingsService;
 import org.osgi.framework.BundleContext;
+import org.osgi.service.component.annotations.Activate;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Deactivate;
+import org.osgi.service.component.annotations.Reference;
 import org.osgi.service.event.EventAdmin;
 
 /**
@@ -38,6 +34,14 @@ import org.osgi.service.event.EventAdmin;
 @Component(name="org.apache.sling.event.impl.DistributingEventHandler")
 public class DistributedEventAdminImpl {
 
+    public @interface Config {
+
+        /** The path where all jobs are stored. */
+        String repository_path() default DEFAULT_REPOSITORY_PATH;
+
+        int cleanup_period() default DEFAULT_CLEANUP_PERIOD;
+    }
+
     public static final String RESOURCE_TYPE_FOLDER = "sling:Folder";
 
     public static final String RESOURCE_TYPE_EVENT = "sling/distributed/event";
@@ -54,16 +58,9 @@ public class DistributedEventAdminImpl {
     /** Default repository path. */
     public static final String DEFAULT_REPOSITORY_PATH = "/var/eventing/distribution";
 
-    /** The path where all jobs are stored. */
-    @Property(value=DEFAULT_REPOSITORY_PATH)
-    private static final String CONFIG_PROPERTY_REPOSITORY_PATH = "repository.path";
-
     /** Default clean up time is 15 minutes. */
     private static final int DEFAULT_CLEANUP_PERIOD = 15;
 
-    @Property(intValue=DEFAULT_CLEANUP_PERIOD)
-    private static final String CONFIG_PROPERTY_CLEANUP_PERIOD = "cleanup.period";
-
     /** The local receiver of distributed events .*/
     private DistributedEventReceiver receiver;
 
@@ -71,19 +68,16 @@ public class DistributedEventAdminImpl {
     private DistributedEventSender sender;
 
     @Activate
-    protected void activate(final BundleContext bundleContext, final Map<String, Object> props) {
-        final int cleanupPeriod = PropertiesUtil.toInteger(props.get(CONFIG_PROPERTY_CLEANUP_PERIOD), DEFAULT_CLEANUP_PERIOD);
-        final String rootPath = PropertiesUtil.toString(props.get(
-                CONFIG_PROPERTY_REPOSITORY_PATH), DEFAULT_REPOSITORY_PATH);
-        final String ownRootPath = rootPath.concat("/").concat(settings.getSlingId());
+    protected void activate(final BundleContext bundleContext, final Config props) {
+        final String ownRootPath = props.repository_path().concat("/").concat(settings.getSlingId());
 
         this.receiver = new DistributedEventReceiver(bundleContext,
-                rootPath,
+                props.repository_path(),
                 ownRootPath,
-                cleanupPeriod,
+                props.cleanup_period(),
                 this.resourceResolverFactory, this.settings);
         this.sender = new DistributedEventSender(bundleContext,
-                              rootPath,
+                              props.repository_path(),
                               ownRootPath,
                               this.resourceResolverFactory, this.eventAdmin);
     }
diff --git a/src/main/java/org/apache/sling/event/dea/impl/DistributedEventReceiver.java b/src/main/java/org/apache/sling/event/dea/impl/DistributedEventReceiver.java
index 995a0a9..7635f81 100644
--- a/src/main/java/org/apache/sling/event/dea/impl/DistributedEventReceiver.java
+++ b/src/main/java/org/apache/sling/event/dea/impl/DistributedEventReceiver.java
@@ -97,7 +97,7 @@ public class DistributedEventReceiver
     private volatile Set<String> instances;
 
     /** The service registration. */
-    private volatile ServiceRegistration serviceRegistration;
+    private volatile ServiceRegistration<?> serviceRegistration;
 
     public DistributedEventReceiver(final BundleContext bundleContext,
             final String rootPath,
@@ -127,7 +127,7 @@ public class DistributedEventReceiver
                 props.put("scheduler.period", 1800L);
                 props.put("scheduler.concurrent", Boolean.FALSE);
 
-                final ServiceRegistration reg =
+                final ServiceRegistration<?> reg =
                         bundleContext.registerService(new String[] {EventHandler.class.getName(),
                                                                    Runnable.class.getName(),
                                                                    TopologyEventListener.class.getName()},
diff --git a/src/main/java/org/apache/sling/event/dea/impl/DistributedEventSender.java b/src/main/java/org/apache/sling/event/dea/impl/DistributedEventSender.java
index 1cf81ec..e277bf9 100644
--- a/src/main/java/org/apache/sling/event/dea/impl/DistributedEventSender.java
+++ b/src/main/java/org/apache/sling/event/dea/impl/DistributedEventSender.java
@@ -25,12 +25,14 @@ import java.util.Map;
 import java.util.concurrent.BlockingQueue;
 import java.util.concurrent.LinkedBlockingQueue;
 
-import org.apache.sling.api.SlingConstants;
 import org.apache.sling.api.resource.LoginException;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceResolver;
 import org.apache.sling.api.resource.ResourceResolverFactory;
 import org.apache.sling.api.resource.ValueMap;
+import org.apache.sling.api.resource.observation.ExternalResourceChangeListener;
+import org.apache.sling.api.resource.observation.ResourceChange;
+import org.apache.sling.api.resource.observation.ResourceChangeListener;
 import org.apache.sling.event.dea.DEAConstants;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Constants;
@@ -38,7 +40,6 @@ import org.osgi.framework.ServiceRegistration;
 import org.osgi.service.event.Event;
 import org.osgi.service.event.EventAdmin;
 import org.osgi.service.event.EventConstants;
-import org.osgi.service.event.EventHandler;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -52,7 +53,7 @@ import org.slf4j.LoggerFactory;
  * <p>
  */
 public class DistributedEventSender
-    implements EventHandler {
+    implements ResourceChangeListener, ExternalResourceChangeListener {
 
     /** Default logger. */
     private final Logger logger = LoggerFactory.getLogger(this.getClass());
@@ -69,7 +70,7 @@ public class DistributedEventSender
 
     private final String ownRootPathWithSlash;
 
-    private volatile ServiceRegistration serviceRegistration;
+    private volatile ServiceRegistration<ResourceChangeListener> serviceRegistration;
 
     public DistributedEventSender(final BundleContext bundleContext,
             final String rootPath,
@@ -89,12 +90,12 @@ public class DistributedEventSender
                 props.put(Constants.SERVICE_VENDOR, "The Apache Software Foundation");
 
                 // listen for all resource added OSGi events in the DEA area
-                props.put(EventConstants.EVENT_TOPIC, SlingConstants.TOPIC_RESOURCE_ADDED);
-                props.put(EventConstants.EVENT_FILTER, "(path=" + rootPath + "/*)");
+                props.put(ResourceChangeListener.CHANGES, ResourceChange.ChangeType.ADDED.name());
+                props.put(ResourceChangeListener.PATHS, rootPath);
 
-                final ServiceRegistration reg =
-                        bundleContext.registerService(new String[] {EventHandler.class.getName()},
-                        DistributedEventSender.this, props);
+                final ServiceRegistration<ResourceChangeListener> reg =
+                        bundleContext.registerService(ResourceChangeListener.class,
+                                       DistributedEventSender.this, props);
 
                 DistributedEventSender.this.serviceRegistration = reg;
 
@@ -218,17 +219,18 @@ public class DistributedEventSender
     }
 
     /**
-     * @see org.osgi.service.event.EventHandler#handleEvent(org.osgi.service.event.Event)
+     * @see org.apache.sling.api.resource.observation.ResourceChangeListener#onChange(java.util.List)
      */
     @Override
-    public void handleEvent(final Event event) {
-        final String path = (String) event.getProperty(SlingConstants.PROPERTY_PATH);
-        if ( !path.startsWith(this.ownRootPathWithSlash) ) {
-            try {
-                this.queue.put(path);
-            } catch (final InterruptedException ex) {
-                this.ignoreException(ex);
-                Thread.currentThread().interrupt();
+    public void onChange(final List<ResourceChange> changes) {
+        for(final ResourceChange c : changes) {
+            if ( !c.getPath().startsWith(this.ownRootPathWithSlash) ) {
+                try {
+                    this.queue.put(c.getPath());
+                } catch (final InterruptedException ex) {
+                    this.ignoreException(ex);
+                    Thread.currentThread().interrupt();
+                }
             }
         }
     }
diff --git a/src/main/java/org/apache/sling/event/dea/package-info.java b/src/main/java/org/apache/sling/event/dea/package-info.java
index 9495421..8e790d4 100644
--- a/src/main/java/org/apache/sling/event/dea/package-info.java
+++ b/src/main/java/org/apache/sling/event/dea/package-info.java
@@ -17,8 +17,7 @@
  * under the License.
  */
 
-@Version("1.0.0")
+@org.osgi.annotation.versioning.Version("1.0.0")
 package org.apache.sling.event.dea;
 
-import aQute.bnd.annotation.Version;
 
diff --git a/src/test/java/org/apache/sling/event/dea/impl/DistributingEventHandlerTest.java b/src/test/java/org/apache/sling/event/dea/impl/DistributingEventHandlerTest.java
index 3547300..2b7293e 100644
--- a/src/test/java/org/apache/sling/event/dea/impl/DistributingEventHandlerTest.java
+++ b/src/test/java/org/apache/sling/event/dea/impl/DistributingEventHandlerTest.java
@@ -30,6 +30,8 @@ import java.util.List;
 import org.apache.sling.api.SlingConstants;
 import org.apache.sling.api.resource.ResourceResolver;
 import org.apache.sling.api.resource.ResourceResolverFactory;
+import org.apache.sling.api.resource.observation.ResourceChange;
+import org.apache.sling.api.resource.observation.ResourceChange.ChangeType;
 import org.apache.sling.event.dea.DEAConstants;
 import org.apache.sling.settings.SlingSettingsService;
 import org.apache.sling.testing.resourceresolver.MockResourceResolverFactory;
@@ -77,7 +79,9 @@ public class DistributingEventHandlerTest {
             public void postEvent(final Event event) {
                 final String topic = event.getTopic();
                 if ( topic.equals(SlingConstants.TOPIC_RESOURCE_ADDED) ) {
-                    sender.handleEvent(event);
+                    final ResourceChange change = new ResourceChange(ChangeType.ADDED,
+                            (String)event.getProperty(SlingConstants.PROPERTY_PATH), false, null, null, null);
+                    sender.onChange(Collections.singletonList(change));
                 } else if ( topic.startsWith(TOPIC_PREFIX) ) {
                     events.add(event);
                 }

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 18/29: Switch to parent pom 26

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit bb2720a97c1fa1f8ecc7dafc1a01b3bb894072e0
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Sun Jan 3 14:07:46 2016 +0000

    Switch to parent pom 26
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1722720 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 494ffa6..83d3675 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>25</version>
+        <version>26</version>
         <relativePath />
     </parent>
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 01/29: SLING-3882 : Move the distributed event admin into a separate project

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit 10facb4225ca07cbe08bce163171ca2f38da640d
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Aug 26 08:24:57 2014 +0000

    SLING-3882 : Move the distributed event admin into a separate project
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1620527 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                            | 148 +++++++
 .../org/apache/sling/event/dea/DEAConstants.java   |  47 +++
 .../event/dea/impl/DistributedEventAdminImpl.java  | 102 +++++
 .../event/dea/impl/DistributedEventReceiver.java   | 438 +++++++++++++++++++++
 .../event/dea/impl/DistributedEventSender.java     | 243 ++++++++++++
 .../sling/event/dea/impl/ResourceHelper.java       |  96 +++++
 .../org/apache/sling/event/dea/package-info.java   |  24 ++
 .../dea/impl/DistributingEventHandlerTest.java     | 182 +++++++++
 8 files changed, 1280 insertions(+)

diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..afeacbe
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.sling</groupId>
+        <artifactId>sling</artifactId>
+        <version>19</version>
+        <relativePath>../../../parent/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>org.apache.sling.event.dea</artifactId>
+    <packaging>bundle</packaging>
+    <version>0.0.1-SNAPSHOT</version>
+
+    <name>Apache Sling Distributed Event Admin</name>
+    <description>
+        Support distributing events through the OSGi event admin.
+    </description>
+
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/dea</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/dea</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/dea</url>
+    </scm>
+
+    <properties>
+        <sling.java.version>6</sling.java.version>
+    </properties>
+
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-scr-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+            </plugin>
+        </plugins>
+    </build>
+    <reporting>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-javadoc-plugin</artifactId>
+                <configuration>
+                    <excludePackageNames>
+                        org.apache.sling.event.dea.impl
+                    </excludePackageNames>
+                </configuration>
+            </plugin>
+        </plugins>
+    </reporting>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.scr.annotations</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.discovery.api</artifactId>
+            <version>1.0.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <version>5.0.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+            <version>5.0.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.settings</artifactId>
+            <version>1.0.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.commons.osgi</artifactId>
+            <version>2.2.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.api</artifactId>
+            <version>2.7.1-SNAPSHOT</version>
+            <scope>provided</scope>
+        </dependency>
+      <!-- Testing -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>junit-addons</groupId>
+            <artifactId>junit-addons</artifactId>
+            <version>1.4</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-all</artifactId>
+            <version>1.9.5</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-simple</artifactId>
+        </dependency>
+         <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.testing.resourceresolver-mock</artifactId>
+            <version>0.2.0</version>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+</project>
diff --git a/src/main/java/org/apache/sling/event/dea/DEAConstants.java b/src/main/java/org/apache/sling/event/dea/DEAConstants.java
new file mode 100644
index 0000000..6ea8718
--- /dev/null
+++ b/src/main/java/org/apache/sling/event/dea/DEAConstants.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.event.dea;
+
+
+/**
+ * The <code>DEAConstants</code> provides some constants for
+ * handling distributed OSGi events.
+ * <p>
+ * If an event should be sent to other instances, the event
+ * property {@link #PROPERTY_DISTRIBUTE} should be set to
+ * an empty string.
+ * <p>
+ * An event, regardless if distributed or not, should never be
+ * created with the property {@link #PROPERTY_APPLICATION}. In
+ * addition properties starting with "event.dea." are reserved
+ * attributes of this implementation and must not be used
+ * by custom events.
+ * <p>
+ * If the event is a local event, the {@link #PROPERTY_APPLICATION}
+ * is not available. If it is available, it contains the application
+ * (Sling ID) of the instance where the event originated.
+ */
+public abstract class DEAConstants {
+
+    /** This event property indicates, if the event should be distributed in the cluster. */
+    public static final String PROPERTY_DISTRIBUTE = "event.distribute";
+
+    /** This event property specifies the application node. */
+    public static final String PROPERTY_APPLICATION = "event.application";
+}
\ No newline at end of file
diff --git a/src/main/java/org/apache/sling/event/dea/impl/DistributedEventAdminImpl.java b/src/main/java/org/apache/sling/event/dea/impl/DistributedEventAdminImpl.java
new file mode 100644
index 0000000..df128b4
--- /dev/null
+++ b/src/main/java/org/apache/sling/event/dea/impl/DistributedEventAdminImpl.java
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.event.dea.impl;
+
+import java.util.Map;
+
+import org.apache.felix.scr.annotations.Activate;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Deactivate;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.sling.api.resource.ResourceResolverFactory;
+import org.apache.sling.commons.osgi.PropertiesUtil;
+import org.apache.sling.settings.SlingSettingsService;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.event.EventAdmin;
+
+/**
+ * This service wraps the configuration of the distributed event admin
+ * and starts the different parts.
+ */
+@Component(name="org.apache.sling.event.impl.DistributingEventHandler")
+public class DistributedEventAdminImpl {
+
+    public static final String RESOURCE_TYPE_FOLDER = "sling:Folder";
+
+    public static final String RESOURCE_TYPE_EVENT = "sling/distributed/event";
+
+    @Reference
+    private SlingSettingsService settings;
+
+    @Reference
+    private ResourceResolverFactory resourceResolverFactory;
+
+    @Reference
+    private EventAdmin eventAdmin;
+
+    /** Default repository path. */
+    public static final String DEFAULT_REPOSITORY_PATH = "/var/eventing/distribution";
+
+    /** The path where all jobs are stored. */
+    @Property(value=DEFAULT_REPOSITORY_PATH)
+    private static final String CONFIG_PROPERTY_REPOSITORY_PATH = "repository.path";
+
+    /** Default clean up time is 15 minutes. */
+    private static final int DEFAULT_CLEANUP_PERIOD = 15;
+
+    @Property(intValue=DEFAULT_CLEANUP_PERIOD)
+    private static final String CONFIG_PROPERTY_CLEANUP_PERIOD = "cleanup.period";
+
+    /** The local receiver of distributed events .*/
+    private DistributedEventReceiver receiver;
+
+    /** The local sender for distributed events. */
+    private DistributedEventSender sender;
+
+    @Activate
+    protected void activate(final BundleContext bundleContext, final Map<String, Object> props) {
+        final int cleanupPeriod = PropertiesUtil.toInteger(props.get(CONFIG_PROPERTY_CLEANUP_PERIOD), DEFAULT_CLEANUP_PERIOD);
+        final String rootPath = PropertiesUtil.toString(props.get(
+                CONFIG_PROPERTY_REPOSITORY_PATH), DEFAULT_REPOSITORY_PATH);
+        final String ownRootPath = rootPath.concat("/").concat(settings.getSlingId());
+
+        this.receiver = new DistributedEventReceiver(bundleContext,
+                rootPath,
+                ownRootPath,
+                cleanupPeriod,
+                this.resourceResolverFactory, this.settings);
+        this.sender = new DistributedEventSender(bundleContext,
+                              rootPath,
+                              ownRootPath,
+                              this.resourceResolverFactory, this.eventAdmin);
+    }
+
+    @Deactivate
+    protected void deactivate() {
+        if ( this.receiver != null ) {
+            this.receiver.stop();
+            this.receiver = null;
+        }
+        if ( this.sender != null ) {
+            this.sender.stop();
+            this.sender = null;
+        }
+    }
+}
diff --git a/src/main/java/org/apache/sling/event/dea/impl/DistributedEventReceiver.java b/src/main/java/org/apache/sling/event/dea/impl/DistributedEventReceiver.java
new file mode 100644
index 0000000..58ed940
--- /dev/null
+++ b/src/main/java/org/apache/sling/event/dea/impl/DistributedEventReceiver.java
@@ -0,0 +1,438 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.event.dea.impl;
+
+import java.util.Calendar;
+import java.util.Dictionary;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.atomic.AtomicLong;
+
+import org.apache.sling.api.resource.LoginException;
+import org.apache.sling.api.resource.PersistenceException;
+import org.apache.sling.api.resource.Resource;
+import org.apache.sling.api.resource.ResourceResolver;
+import org.apache.sling.api.resource.ResourceResolverFactory;
+import org.apache.sling.api.resource.ResourceUtil;
+import org.apache.sling.discovery.InstanceDescription;
+import org.apache.sling.discovery.TopologyEvent;
+import org.apache.sling.discovery.TopologyEvent.Type;
+import org.apache.sling.discovery.TopologyEventListener;
+import org.apache.sling.event.dea.DEAConstants;
+import org.apache.sling.settings.SlingSettingsService;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
+import org.osgi.framework.ServiceRegistration;
+import org.osgi.service.event.Event;
+import org.osgi.service.event.EventConstants;
+import org.osgi.service.event.EventHandler;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * This is the distributed event receiver.
+ * It listens for all distributable events and stores them in the
+ * repository for other cluster instance to pick them up.
+ * <p>
+ * This component is scheduled to run some clean up tasks in the
+ * background periodically.
+ * <p>
+ */
+public class DistributedEventReceiver
+    implements EventHandler, Runnable, TopologyEventListener {
+
+    /** Special topic to stop the queue. */
+    private static final String TOPIC_STOPPED = "org/apache/sling/event/dea/impl/STOPPED";
+
+    /** Logger */
+    private final Logger logger = LoggerFactory.getLogger(this.getClass());
+
+    /** A local queue for writing received events into the repository. */
+    private final BlockingQueue<Event> writeQueue = new LinkedBlockingQueue<Event>();
+
+    /** The resource resolver factory. */
+    private final ResourceResolverFactory resourceResolverFactory;
+
+    /** The current instance id. */
+    private final String slingId;
+
+    /** The root path for events . */
+    private final String rootPath;
+
+    /** The root path for events written by this instance. */
+    private final String ownRootPath;
+
+    /** The cleanup period. */
+    private final int cleanupPeriod;
+
+    /** Resolver used for writing. */
+    private volatile ResourceResolver writerResolver;
+
+    /** Is the background task still running? */
+    private volatile boolean running;
+
+    /** The current instances if this is the leader. */
+    private volatile Set<String> instances;
+
+    /** The service registration. */
+    private volatile ServiceRegistration<?> serviceRegistration;
+
+    public DistributedEventReceiver(final BundleContext bundleContext,
+            final String rootPath,
+            final String ownRootPath,
+            final int cleanupPeriod,
+            final ResourceResolverFactory rrFactory,
+            final SlingSettingsService settings) {
+        this.rootPath = rootPath;
+        this.ownRootPath = ownRootPath;
+        this.resourceResolverFactory = rrFactory;
+        this.slingId = settings.getSlingId();
+        this.cleanupPeriod = cleanupPeriod;
+
+        this.running = true;
+        // start writer thread
+        final Thread writerThread = new Thread(new Runnable() {
+            @Override
+            public void run() {
+                // create service registration properties
+                final Dictionary<String, Object> props = new Hashtable<String, Object>();
+                props.put(Constants.SERVICE_VENDOR, "The Apache Software Foundation");
+
+                // listen for all OSGi events with the distributable flag
+                props.put(EventConstants.EVENT_TOPIC, "*");
+                props.put(EventConstants.EVENT_FILTER, "(" + DEAConstants.PROPERTY_DISTRIBUTE + "=*)");
+                // schedule this service every 30 minutes
+                props.put("scheduler.period", 1800L);
+                props.put("scheduler.concurrent", Boolean.FALSE);
+
+                final ServiceRegistration<?> reg =
+                        bundleContext.registerService(new String[] {EventHandler.class.getName(),
+                                                                   Runnable.class.getName(),
+                                                                   TopologyEventListener.class.getName()},
+                                                      DistributedEventReceiver.this, props);
+
+                DistributedEventReceiver.this.serviceRegistration = reg;
+
+                try {
+                    writerResolver = resourceResolverFactory.getAdministrativeResourceResolver(null);
+                    ResourceUtil.getOrCreateResource(writerResolver,
+                            ownRootPath,
+                            DistributedEventAdminImpl.RESOURCE_TYPE_FOLDER,
+                            DistributedEventAdminImpl.RESOURCE_TYPE_FOLDER,
+                            true);
+                } catch (final Exception e) {
+                    // there is nothing we can do except log!
+                    logger.error("Error during resource resolver creation.", e);
+                    running = false;
+                }
+                try {
+                    processWriteQueue();
+                } catch (final Throwable t) { //NOSONAR
+                    logger.error("Writer thread stopped with exception: " + t.getMessage(), t);
+                    running = false;
+                }
+                if ( writerResolver != null ) {
+                    writerResolver.close();
+                    writerResolver = null;
+                }
+            }
+        });
+        writerThread.start();
+    }
+
+    /**
+     * Deactivate this component.
+     */
+    public void stop() {
+        if ( this.serviceRegistration != null ) {
+            this.serviceRegistration.unregister();
+            this.serviceRegistration = null;
+        }
+        // stop background threads by putting empty objects into the queue
+        this.running = false;
+        try {
+            this.writeQueue.put(new Event(TOPIC_STOPPED, (Dictionary<String, Object>)null));
+        } catch (final InterruptedException e) {
+            this.ignoreException(e);
+            Thread.currentThread().interrupt();
+        }
+    }
+
+    /**
+     * Background thread writing events into the queue.
+     */
+    private void processWriteQueue() {
+        while ( this.running ) {
+            // so let's wait/get the next event from the queue
+            Event event = null;
+            try {
+                event = this.writeQueue.take();
+            } catch (final InterruptedException e) {
+                this.ignoreException(e);
+                Thread.currentThread().interrupt();
+                this.running = false;
+            }
+            if ( event != null && this.running ) {
+                try {
+                    this.writeEvent(event);
+                } catch (final Exception e) {
+                    this.logger.error("Exception during writing the event to the resource tree.", e);
+                }
+            }
+        }
+    }
+
+    /** Counter for events. */
+    private final AtomicLong eventCounter = new AtomicLong(0);
+
+    /**
+     * Write an event to the resource tree.
+     * @param event The event
+     * @throws PersistenceException
+     */
+    private void writeEvent(final Event event)
+    throws PersistenceException {
+        final Calendar now = Calendar.getInstance();
+
+        final StringBuilder sb = new StringBuilder(this.ownRootPath);
+        sb.append('/');
+        sb.append(now.get(Calendar.YEAR));
+        sb.append('/');
+        sb.append(now.get(Calendar.MONTH) + 1);
+        sb.append('/');
+        sb.append(now.get(Calendar.DAY_OF_MONTH));
+        sb.append('/');
+        sb.append(now.get(Calendar.HOUR_OF_DAY));
+        sb.append('/');
+        sb.append(now.get(Calendar.MINUTE));
+        sb.append('/');
+        sb.append("event-");
+        sb.append(String.valueOf(eventCounter.getAndIncrement()));
+
+        // create properties
+        final Map<String, Object> properties = new HashMap<String, Object>();
+
+        final String[] propNames = event.getPropertyNames();
+        if ( propNames != null && propNames.length > 0 ) {
+            for(final String propName : propNames) {
+                properties.put(propName, event.getProperty(propName));
+            }
+        }
+
+        properties.remove(DEAConstants.PROPERTY_DISTRIBUTE);
+        properties.put(EventConstants.EVENT_TOPIC, event.getTopic());
+        properties.put(DEAConstants.PROPERTY_APPLICATION, this.slingId);
+        final Object oldRT = properties.get(ResourceResolver.PROPERTY_RESOURCE_TYPE);
+        if ( oldRT != null ) {
+            properties.put("event.dea." + ResourceResolver.PROPERTY_RESOURCE_TYPE, oldRT);
+        }
+        properties.put(ResourceResolver.PROPERTY_RESOURCE_TYPE, DistributedEventAdminImpl.RESOURCE_TYPE_EVENT);
+        ResourceUtil.getOrCreateResource(this.writerResolver,
+                sb.toString(),
+                properties,
+                DistributedEventAdminImpl.RESOURCE_TYPE_FOLDER,
+                true);
+    }
+
+    /**
+     * @see org.osgi.service.event.EventHandler#handleEvent(org.osgi.service.event.Event)
+     */
+    @Override
+    public void handleEvent(final Event event) {
+        try {
+            this.writeQueue.put(event);
+        } catch (final InterruptedException ex) {
+            this.ignoreException(ex);
+            Thread.currentThread().interrupt();
+        }
+    }
+
+    /**
+     * Helper method which just logs the exception in debug mode.
+     * @param e
+     */
+    private void ignoreException(final Exception e) {
+        if ( this.logger.isDebugEnabled() ) {
+            this.logger.debug("Ignored exception " + e.getMessage(), e);
+        }
+    }
+
+    /**
+     * This method is invoked periodically.
+     * @see java.lang.Runnable#run()
+     */
+    @Override
+    public void run() {
+        this.cleanUpObsoleteInstances();
+        this.cleanUpObsoleteEvents();
+    }
+
+    private void cleanUpObsoleteInstances() {
+        final Set<String> slingIds = this.instances;
+        if ( slingIds != null ) {
+            this.instances = null;
+            this.logger.debug("Checking for old instance trees for distributed events.");
+            ResourceResolver resolver = null;
+            try {
+                resolver = this.resourceResolverFactory.getAdministrativeResourceResolver(null);
+
+                final Resource baseResource = resolver.getResource(this.rootPath);
+                // sanity check - should never be null
+                if ( baseResource != null ) {
+                    final ResourceUtil.BatchResourceRemover brr = ResourceUtil.getBatchResourceResourceRemover(50);
+                    final Iterator<Resource> iter = baseResource.listChildren();
+                    while ( iter.hasNext() ) {
+                        final Resource rootResource = iter.next();
+                        if ( !slingIds.contains(rootResource.getName()) ) {
+                            brr.delete(rootResource);
+                        }
+                    }
+                    // final commit for outstanding deletes
+                    resolver.commit();
+                }
+
+            } catch (final PersistenceException pe) {
+                // in the case of an error, we just log this as a warning
+                this.logger.warn("Exception during job resource tree cleanup.", pe);
+            } catch (final LoginException ignore) {
+                this.ignoreException(ignore);
+            } finally {
+                if ( resolver != null ) {
+                    resolver.close();
+                }
+            }
+        }
+    }
+
+    private void cleanUpObsoleteEvents() {
+        if ( this.cleanupPeriod > 0 ) {
+            this.logger.debug("Cleaning up distributed events, removing all entries older than {} minutes.", this.cleanupPeriod);
+
+            ResourceResolver resolver = null;
+            try {
+                resolver = this.resourceResolverFactory.getAdministrativeResourceResolver(null);
+                final ResourceUtil.BatchResourceRemover brr = ResourceUtil.getBatchResourceResourceRemover(50);
+
+                final Resource baseResource = resolver.getResource(this.ownRootPath);
+                // sanity check - should never be null
+                if ( baseResource != null ) {
+                    final Calendar oldDate = Calendar.getInstance();
+                    oldDate.add(Calendar.MINUTE, -1 * this.cleanupPeriod);
+
+                    // check years
+                    final int oldYear = oldDate.get(Calendar.YEAR);
+                    final Iterator<Resource> yearIter = baseResource.listChildren();
+                    while ( yearIter.hasNext() ) {
+                        final Resource yearResource = yearIter.next();
+                        final int year = Integer.valueOf(yearResource.getName());
+                        if ( year < oldYear ) {
+                            brr.delete(yearResource);
+                        } else if ( year == oldYear ) {
+
+                            // same year - check months
+                            final int oldMonth = oldDate.get(Calendar.MONTH) + 1;
+                            final Iterator<Resource> monthIter = yearResource.listChildren();
+                            while ( monthIter.hasNext() ) {
+                                final Resource monthResource = monthIter.next();
+                                final int month = Integer.valueOf(monthResource.getName());
+                                if ( month < oldMonth ) {
+                                    brr.delete(monthResource);
+                                } else if ( month == oldMonth ) {
+
+                                    // same month - check days
+                                    final int oldDay = oldDate.get(Calendar.DAY_OF_MONTH);
+                                    final Iterator<Resource> dayIter = monthResource.listChildren();
+                                    while ( dayIter.hasNext() ) {
+                                        final Resource dayResource = dayIter.next();
+                                        final int day = Integer.valueOf(dayResource.getName());
+                                        if ( day < oldDay ) {
+                                            brr.delete(dayResource);
+                                        } else if ( day == oldDay ) {
+
+                                            // same day - check hours
+                                            final int oldHour = oldDate.get(Calendar.HOUR_OF_DAY);
+                                            final Iterator<Resource> hourIter = dayResource.listChildren();
+                                            while ( hourIter.hasNext() ) {
+                                                final Resource hourResource = hourIter.next();
+                                                final int hour = Integer.valueOf(hourResource.getName());
+                                                if ( hour < oldHour ) {
+                                                    brr.delete(hourResource);
+                                                } else if ( hour == oldHour ) {
+
+                                                    // same hour - check minutes
+                                                    final int oldMinute = oldDate.get(Calendar.MINUTE);
+                                                    final Iterator<Resource> minuteIter = hourResource.listChildren();
+                                                    while ( minuteIter.hasNext() ) {
+                                                        final Resource minuteResource = minuteIter.next();
+
+                                                        final int minute = Integer.valueOf(minuteResource.getName());
+                                                        if ( minute < oldMinute ) {
+                                                            brr.delete(minuteResource);
+                                                        }
+                                                    }
+                                                }
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+                // final commit for outstanding resources
+                resolver.commit();
+
+            } catch (final PersistenceException pe) {
+                // in the case of an error, we just log this as a warning
+                this.logger.warn("Exception during job resource tree cleanup.", pe);
+            } catch (final LoginException ignore) {
+                this.ignoreException(ignore);
+            } finally {
+                if ( resolver != null ) {
+                    resolver.close();
+                }
+            }
+        }
+    }
+
+    /**
+     * @see org.apache.sling.discovery.TopologyEventListener#handleTopologyEvent(org.apache.sling.discovery.TopologyEvent)
+     */
+    @Override
+    public void handleTopologyEvent(final TopologyEvent event) {
+        if ( event.getType() == Type.TOPOLOGY_CHANGING ) {
+            this.instances = null;
+        } else if ( event.getType() == Type.TOPOLOGY_CHANGED || event.getType() == Type.TOPOLOGY_INIT ) {
+            if ( event.getNewView().getLocalInstance().isLeader() ) {
+                final Set<String> set = new HashSet<String>();
+                for(final InstanceDescription desc : event.getNewView().getInstances() ) {
+                    set.add(desc.getSlingId());
+                }
+                this.instances = set;
+            }
+        }
+    }
+}
+
diff --git a/src/main/java/org/apache/sling/event/dea/impl/DistributedEventSender.java b/src/main/java/org/apache/sling/event/dea/impl/DistributedEventSender.java
new file mode 100644
index 0000000..95aa021
--- /dev/null
+++ b/src/main/java/org/apache/sling/event/dea/impl/DistributedEventSender.java
@@ -0,0 +1,243 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.event.dea.impl;
+
+import java.util.Dictionary;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.LinkedBlockingQueue;
+
+import org.apache.sling.api.SlingConstants;
+import org.apache.sling.api.resource.LoginException;
+import org.apache.sling.api.resource.Resource;
+import org.apache.sling.api.resource.ResourceResolver;
+import org.apache.sling.api.resource.ResourceResolverFactory;
+import org.apache.sling.api.resource.ValueMap;
+import org.apache.sling.event.dea.DEAConstants;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
+import org.osgi.framework.ServiceRegistration;
+import org.osgi.service.event.Event;
+import org.osgi.service.event.EventAdmin;
+import org.osgi.service.event.EventConstants;
+import org.osgi.service.event.EventHandler;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * This event handler distributes events from other application nodes in
+ * the cluster on the current instance.
+ * <p>
+ * It's listening for resource added events in the resource tree storing the
+ * distributed events. If a new resource is added, the resource is read,
+ * converted to an event and then send using the local event admin.
+ * <p>
+ */
+public class DistributedEventSender
+    implements EventHandler {
+
+    /** Default logger. */
+    private final Logger logger = LoggerFactory.getLogger(this.getClass());
+
+    /** Is the background task still running? */
+    private volatile boolean running;
+
+    /** A local queue for serializing the event processing. */
+    private final BlockingQueue<String> queue = new LinkedBlockingQueue<String>();
+
+    private final ResourceResolverFactory resourceResolverFactory;
+
+    private final EventAdmin eventAdmin;
+
+    private final String ownRootPathWithSlash;
+
+    private volatile ServiceRegistration<?> serviceRegistration;
+
+    public DistributedEventSender(final BundleContext bundleContext,
+            final String rootPath,
+            final String ownRootPath,
+            final ResourceResolverFactory rrFactory,
+            final EventAdmin eventAdmin) {
+        this.eventAdmin = eventAdmin;
+        this.resourceResolverFactory = rrFactory;
+        this.ownRootPathWithSlash = ownRootPath + "/";
+
+        this.running = true;
+        final Thread backgroundThread = new Thread(new Runnable() {
+            @Override
+            public void run() {
+                // create service registration properties
+                final Dictionary<String, Object> props = new Hashtable<String, Object>();
+                props.put(Constants.SERVICE_VENDOR, "The Apache Software Foundation");
+
+                // listen for all resource added OSGi events in the DEA area
+                props.put(EventConstants.EVENT_TOPIC, SlingConstants.TOPIC_RESOURCE_ADDED);
+                props.put(EventConstants.EVENT_FILTER, "(path=" + rootPath + "/*)");
+
+                final ServiceRegistration<?> reg =
+                        bundleContext.registerService(new String[] {EventHandler.class.getName()},
+                        DistributedEventSender.this, props);
+
+                DistributedEventSender.this.serviceRegistration = reg;
+
+                try {
+                    runInBackground();
+                } catch (Throwable t) { //NOSONAR
+                    logger.error("Background thread stopped with exception: " + t.getMessage(), t);
+                    running = false;
+                }
+            }
+        });
+        backgroundThread.start();
+    }
+
+    /**
+     * Deactivate this component.
+     */
+    public void stop() {
+        if ( this.serviceRegistration != null ) {
+            this.serviceRegistration.unregister();
+            this.serviceRegistration = null;
+        }
+        // stop background threads by putting empty objects into the queue
+        this.running = false;
+        try {
+            this.queue.put("");
+        } catch (final InterruptedException e) {
+            this.ignoreException(e);
+            Thread.currentThread().interrupt();
+        }
+    }
+
+    /**
+     * Read an event from the resource
+     * @return The event object or <code>null</code>
+     */
+    private Event readEvent(final Resource eventResource) {
+        try {
+            final ValueMap vm = ResourceHelper.getValueMap(eventResource);
+            final String topic = vm.get(EventConstants.EVENT_TOPIC, String.class);
+            if ( topic == null ) {
+                // no topic should never happen as we check the resource type before
+                logger.error("Unable to read distributed event from " + eventResource.getPath() + " : no topic property available.");
+            } else {
+                final Map<String, Object> properties = ResourceHelper.cloneValueMap(vm);
+                // only send event if there are no read errors, otherwise discard it
+                @SuppressWarnings("unchecked")
+                final List<Exception> readErrorList = (List<Exception>) properties.remove(ResourceHelper.PROPERTY_MARKER_READ_ERROR_LIST);
+                if ( readErrorList == null ) {
+                    properties.remove(EventConstants.EVENT_TOPIC);
+                    properties.remove(DEAConstants.PROPERTY_DISTRIBUTE);
+                    final Object oldRT = properties.remove("event.dea." + ResourceResolver.PROPERTY_RESOURCE_TYPE);
+                    if ( oldRT != null ) {
+                        properties.put(ResourceResolver.PROPERTY_RESOURCE_TYPE, oldRT);
+                    } else {
+                        properties.remove(ResourceResolver.PROPERTY_RESOURCE_TYPE);
+                    }
+                    try {
+                        final Event event = new Event(topic, properties);
+                        return event;
+                    } catch (final IllegalArgumentException iae) {
+                        // this exception occurs if the topic is not correct (it should never happen,
+                        // but you never know)
+                        logger.error("Unable to read event: " + iae.getMessage(), iae);
+                    }
+                } else {
+                    for(final Exception e : readErrorList) {
+                        logger.warn("Unable to read distributed event from " + eventResource.getPath(), e);
+                    }
+                }
+            }
+        } catch (final InstantiationException ie) {
+            // something happened with the resource in the meantime
+            this.ignoreException(ie);
+        }
+        return null;
+    }
+
+    /**
+     * Background thread
+     */
+    private void runInBackground() {
+        while ( this.running ) {
+            // so let's wait/get the next event from the queue
+            String path = null;
+            try {
+                path = this.queue.take();
+            } catch (final InterruptedException e) {
+                this.ignoreException(e);
+                Thread.currentThread().interrupt();
+                this.running = false;
+            }
+            if ( path != null && path.length() > 0 && this.running ) {
+                ResourceResolver resolver = null;
+                try {
+                    resolver = this.resourceResolverFactory.getAdministrativeResourceResolver(null);
+                    final Resource eventResource = resolver.getResource(path);
+                    if ( DistributedEventAdminImpl.RESOURCE_TYPE_EVENT.equals(eventResource.getResourceType())) {
+                        final Event e = this.readEvent(eventResource);
+                        if ( e != null ) {
+                            // we check event admin as processing is async
+                            final EventAdmin localEA = this.eventAdmin;
+                            if ( localEA != null ) {
+                                localEA.postEvent(e);
+                            } else {
+                                this.logger.error("Unable to post event as no event admin is available.");
+                            }
+                        }
+                    }
+                } catch (final LoginException ex) {
+                    this.logger.error("Exception during creation of resource resolver.", ex);
+                } finally {
+                    if ( resolver != null ) {
+                        resolver.close();
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * @see org.osgi.service.event.EventHandler#handleEvent(org.osgi.service.event.Event)
+     */
+    @Override
+    public void handleEvent(final Event event) {
+        final String path = (String) event.getProperty(SlingConstants.PROPERTY_PATH);
+        if ( !path.startsWith(this.ownRootPathWithSlash) ) {
+            try {
+                this.queue.put(path);
+            } catch (final InterruptedException ex) {
+                this.ignoreException(ex);
+                Thread.currentThread().interrupt();
+            }
+        }
+    }
+
+    /**
+     * Helper method which just logs the exception in debug mode.
+     * @param e
+     */
+    private void ignoreException(final Exception e) {
+        if ( this.logger.isDebugEnabled() ) {
+            this.logger.debug("Ignored exception " + e.getMessage(), e);
+        }
+    }
+}
diff --git a/src/main/java/org/apache/sling/event/dea/impl/ResourceHelper.java b/src/main/java/org/apache/sling/event/dea/impl/ResourceHelper.java
new file mode 100644
index 0000000..0694b74
--- /dev/null
+++ b/src/main/java/org/apache/sling/event/dea/impl/ResourceHelper.java
@@ -0,0 +1,96 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.event.dea.impl;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ObjectInputStream;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.sling.api.resource.Resource;
+import org.apache.sling.api.resource.ValueMap;
+
+public abstract class ResourceHelper {
+
+    public static final String PROPERTY_MARKER_READ_ERROR_LIST = ResourceHelper.class.getName() + "/ReadErrorList";
+
+    public static Map<String, Object> cloneValueMap(final ValueMap vm) throws InstantiationException {
+        List<Exception> hasReadError = null;
+        try {
+            final Map<String, Object> result = new HashMap<String, Object>(vm);
+            for(final Map.Entry<String, Object> entry : result.entrySet()) {
+                if ( entry.getValue() instanceof InputStream ) {
+                    final Object value = vm.get(entry.getKey(), Serializable.class);
+                    if ( value != null ) {
+                        entry.setValue(value);
+                    } else {
+                        if ( hasReadError == null ) {
+                            hasReadError = new ArrayList<Exception>();
+                        }
+                        final int count = hasReadError.size();
+                        // let's find out which class might be missing
+                        ObjectInputStream ois = null;
+                        try {
+                            ois = new ObjectInputStream((InputStream)entry.getValue());
+                            ois.readObject();
+                        } catch (final ClassNotFoundException cnfe) {
+                             hasReadError.add(new Exception("Unable to deserialize property '" + entry.getKey() + "'", cnfe));
+                        } catch (final IOException ioe) {
+                            hasReadError.add(new Exception("Unable to deserialize property '" + entry.getKey() + "'", ioe));
+                        } finally {
+                            if ( ois != null ) {
+                                try {
+                                    ois.close();
+                                } catch (IOException ignore) {
+                                    // ignore
+                                }
+                            }
+                        }
+                        if ( hasReadError.size() == count ) {
+                            hasReadError.add(new Exception("Unable to deserialize property '" + entry.getKey() + "'"));
+                        }
+                    }
+                }
+            }
+            if ( hasReadError != null ) {
+                result.put(PROPERTY_MARKER_READ_ERROR_LIST, hasReadError);
+            }
+            return result;
+        } catch ( final IllegalArgumentException iae) {
+            // the JCR implementation might throw an IAE if something goes wrong
+            throw (InstantiationException)new InstantiationException(iae.getMessage()).initCause(iae);
+        }
+    }
+
+    public static ValueMap getValueMap(final Resource resource) throws InstantiationException {
+        final ValueMap vm = resource.getValueMap();
+        // trigger full loading
+        try {
+            vm.size();
+        } catch ( final IllegalArgumentException iae) {
+            // the JCR implementation might throw an IAE if something goes wrong
+            throw (InstantiationException)new InstantiationException(iae.getMessage()).initCause(iae);
+        }
+        return vm;
+    }
+}
\ No newline at end of file
diff --git a/src/main/java/org/apache/sling/event/dea/package-info.java b/src/main/java/org/apache/sling/event/dea/package-info.java
new file mode 100644
index 0000000..9495421
--- /dev/null
+++ b/src/main/java/org/apache/sling/event/dea/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+@Version("1.0.0")
+package org.apache.sling.event.dea;
+
+import aQute.bnd.annotation.Version;
+
diff --git a/src/test/java/org/apache/sling/event/dea/impl/DistributingEventHandlerTest.java b/src/test/java/org/apache/sling/event/dea/impl/DistributingEventHandlerTest.java
new file mode 100644
index 0000000..3547300
--- /dev/null
+++ b/src/test/java/org/apache/sling/event/dea/impl/DistributingEventHandlerTest.java
@@ -0,0 +1,182 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.event.dea.impl;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Dictionary;
+import java.util.Hashtable;
+import java.util.List;
+
+import org.apache.sling.api.SlingConstants;
+import org.apache.sling.api.resource.ResourceResolver;
+import org.apache.sling.api.resource.ResourceResolverFactory;
+import org.apache.sling.event.dea.DEAConstants;
+import org.apache.sling.settings.SlingSettingsService;
+import org.apache.sling.testing.resourceresolver.MockResourceResolverFactory;
+import org.apache.sling.testing.resourceresolver.MockResourceResolverFactoryOptions;
+import org.junit.After;
+import org.junit.Before;
+import org.mockito.Mockito;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.event.Event;
+import org.osgi.service.event.EventAdmin;
+
+public class DistributingEventHandlerTest {
+
+    private static final String TOPIC_PREFIX = "write/";
+
+    private DistributedEventReceiver receiver;
+
+    private DistributedEventSender sender;
+
+    private static final String MY_APP_ID = "1234";
+
+    private static final String OTHER_APP_ID = "5678";
+
+    private final List<Event> events = Collections.synchronizedList(new ArrayList<Event>());
+
+    @SuppressWarnings("unchecked")
+    @Before
+    public void setup() throws Exception {
+        final BundleContext bc = Mockito.mock(BundleContext.class);
+        Mockito.when(bc.registerService(Mockito.any(String[].class),
+                Mockito.any(),
+                Mockito.any(Dictionary.class))).thenReturn(null);
+
+        final SlingSettingsService otherSettings = Mockito.mock(SlingSettingsService.class);
+        Mockito.when(otherSettings.getSlingId()).thenReturn(OTHER_APP_ID);
+
+        final EventAdmin ea = new EventAdmin() {
+
+            @Override
+            public void sendEvent(final Event event) {
+                this.postEvent(event);
+            }
+
+            @Override
+            public void postEvent(final Event event) {
+                final String topic = event.getTopic();
+                if ( topic.equals(SlingConstants.TOPIC_RESOURCE_ADDED) ) {
+                    sender.handleEvent(event);
+                } else if ( topic.startsWith(TOPIC_PREFIX) ) {
+                    events.add(event);
+                }
+            }
+        };
+        final MockResourceResolverFactoryOptions opts = new MockResourceResolverFactoryOptions();
+        opts.setEventAdmin(ea);
+        final ResourceResolverFactory factory = new MockResourceResolverFactory(opts);
+
+        this.sender = new DistributedEventSender(bc, DistributedEventAdminImpl.DEFAULT_REPOSITORY_PATH,
+                DistributedEventAdminImpl.DEFAULT_REPOSITORY_PATH + "/" + MY_APP_ID, factory, ea);
+
+        this.receiver = new DistributedEventReceiver(bc, DistributedEventAdminImpl.DEFAULT_REPOSITORY_PATH,
+                DistributedEventAdminImpl.DEFAULT_REPOSITORY_PATH + "/" + OTHER_APP_ID, 15, factory, otherSettings);
+    }
+
+    @After
+    public void cleanup() {
+        if ( this.sender != null ) {
+            this.sender.stop();
+            this.sender = null;
+        }
+        if ( this.receiver != null ) {
+            this.receiver.stop();
+            this.receiver = null;
+        }
+    }
+
+    @org.junit.Test(timeout=5000) public void testSendEvent() throws Exception {
+        this.events.clear();
+
+        final String VALUE = "some value";
+        final String topic = TOPIC_PREFIX + "event/test";
+        final Dictionary<String, Object> props = new Hashtable<String, Object>();
+        props.put("a property", VALUE);
+        final Event e = new Event(topic, props);
+        this.receiver.handleEvent(e);
+
+        while ( this.events.size() == 0 ) {
+            Thread.sleep(5);
+        }
+        final Event receivedEvent = this.events.get(0);
+
+        assertEquals(topic, receivedEvent.getTopic());
+        assertEquals(OTHER_APP_ID, receivedEvent.getProperty(DEAConstants.PROPERTY_APPLICATION));
+        assertEquals(VALUE, receivedEvent.getProperty("a property"));
+        assertNull(receivedEvent.getProperty(ResourceResolver.PROPERTY_RESOURCE_TYPE));
+
+        this.events.clear();
+    }
+
+    @org.junit.Test(timeout=5000) public void testSendEventPlusAppId() throws Exception {
+        this.events.clear();
+
+        final String VALUE = "some value";
+        final String topic = TOPIC_PREFIX + "event/test";
+        final Dictionary<String, Object> props = new Hashtable<String, Object>();
+        props.put("a property", "some value");
+        // now we check if the application id is handled correctly
+        props.put(DEAConstants.PROPERTY_APPLICATION, "foo");
+
+        final Event e = new Event(topic, props);
+        this.receiver.handleEvent(e);
+
+        while ( this.events.size() == 0 ) {
+            Thread.sleep(5);
+        }
+        final Event receivedEvent = this.events.get(0);
+
+        assertEquals(topic, receivedEvent.getTopic());
+        assertEquals(OTHER_APP_ID, receivedEvent.getProperty(DEAConstants.PROPERTY_APPLICATION));
+        assertEquals(VALUE, receivedEvent.getProperty("a property"));
+        assertNull(receivedEvent.getProperty(ResourceResolver.PROPERTY_RESOURCE_TYPE));
+
+        this.events.clear();
+    }
+
+    @org.junit.Test(timeout=5000) public void testSendEventWithResourceType() throws Exception {
+        this.events.clear();
+
+        final String topic = TOPIC_PREFIX + "event/test";
+        final String RT = "my:resourceType";
+
+        final Dictionary<String, Object> props = new Hashtable<String, Object>();
+        props.put(ResourceResolver.PROPERTY_RESOURCE_TYPE, RT);
+
+        final Event e = new Event(topic, props);
+        this.receiver.handleEvent(e);
+
+        while ( this.events.size() == 0 ) {
+            Thread.sleep(5);
+        }
+        final Event receivedEvent = this.events.get(0);
+
+        assertEquals(topic, receivedEvent.getTopic());
+        assertEquals(OTHER_APP_ID, receivedEvent.getProperty(DEAConstants.PROPERTY_APPLICATION));
+        assertEquals(RT, receivedEvent.getProperty(ResourceResolver.PROPERTY_RESOURCE_TYPE));
+        assertNull(receivedEvent.getProperty("event.dea." + ResourceResolver.PROPERTY_RESOURCE_TYPE));
+
+        this.events.clear();
+    }
+}

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 24/29: Update to parent pom 29

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit 688898c67778774eed89a1bd1422bb9a84409f27
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon Oct 31 14:43:30 2016 +0000

    Update to parent pom 29
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1767293 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 8d05e48..88d27e2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>28</version>
+        <version>29</version>
         <relativePath />
     </parent>
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 13/29: [maven-release-plugin] prepare for next development iteration

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit bc4e06c18a99031aa56cfa66e112d858cd5af83f
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Jul 15 12:04:28 2015 +0000

    [maven-release-plugin] prepare for next development iteration
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1691187 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 3f90dc4..832e51b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
 
     <artifactId>org.apache.sling.event.dea</artifactId>
     <packaging>bundle</packaging>
-    <version>1.0.2</version>
+    <version>1.0.3-SNAPSHOT</version>
 
     <name>Apache Sling Distributed Event Admin</name>
     <description>
@@ -37,9 +37,9 @@
     </description>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.event.dea-1.0.2</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.event.dea-1.0.2</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.event.dea-1.0.2</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/dea</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/dea</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/dea</url>
     </scm>
 
     <build>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 04/29: [maven-release-plugin] prepare release org.apache.sling.event.dea-1.0.0

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit 5737ca970e3050848c6f5ff74c342d96e6b0dc38
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Oct 21 07:18:28 2014 +0000

    [maven-release-plugin] prepare release org.apache.sling.event.dea-1.0.0
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1633290 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 538ea2b..7830ea4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
 
     <artifactId>org.apache.sling.event.dea</artifactId>
     <packaging>bundle</packaging>
-    <version>0.0.1-SNAPSHOT</version>
+    <version>1.0.0</version>
 
     <name>Apache Sling Distributed Event Admin</name>
     <description>
@@ -37,9 +37,9 @@
     </description>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/dea</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/dea</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/dea</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.event.dea-1.0.0</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.event.dea-1.0.0</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.event.dea-1.0.0</url>
     </scm>
 
     <properties>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 16/29: [maven-release-plugin] prepare for next development iteration

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit 7ee6f2c7bfdd5e6f680138af9dfeb1f5ffb12922
Author: Stefan Egli <st...@apache.org>
AuthorDate: Wed Sep 23 10:06:20 2015 +0000

    [maven-release-plugin] prepare for next development iteration
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1704804 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 048688f..2dceaba 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
 
     <artifactId>org.apache.sling.event.dea</artifactId>
     <packaging>bundle</packaging>
-    <version>1.0.4</version>
+    <version>1.0.5-SNAPSHOT</version>
 
     <name>Apache Sling Distributed Event Admin</name>
     <description>
@@ -37,9 +37,9 @@
     </description>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.event.dea-1.0.4</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.event.dea-1.0.4</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.event.dea-1.0.4</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/dea</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/dea</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/dea</url>
     </scm>
 
     <build>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 08/29: SLING-4758 : Make the DEA bundle usable on older Sling installations

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit e7f4b5a39257c33cb0bb99a3b12f653abf42777d
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu May 28 08:54:14 2015 +0000

    SLING-4758 : Make the DEA bundle usable on older Sling installations
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1682177 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                            |  6 +--
 .../event/dea/impl/DistributedEventReceiver.java   |  8 ++--
 .../event/dea/impl/DistributedEventSender.java     |  4 +-
 .../sling/event/dea/impl/ResourceHelper.java       | 52 +++++++++++++++++++++-
 4 files changed, 60 insertions(+), 10 deletions(-)

diff --git a/pom.xml b/pom.xml
index a1bae10..11606d1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -91,12 +91,12 @@
         <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>org.osgi.core</artifactId>
-            <version>5.0.0</version>
+            <version>4.2.0</version>
         </dependency>
         <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>org.osgi.compendium</artifactId>
-            <version>5.0.0</version>
+            <version>4.2.0</version>
         </dependency>
         <dependency>
             <groupId>org.apache.sling</groupId>
@@ -113,7 +113,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.api</artifactId>
-            <version>2.8.0</version>
+            <version>2.4.0</version>
             <scope>provided</scope>
         </dependency>
       <!-- Testing -->
diff --git a/src/main/java/org/apache/sling/event/dea/impl/DistributedEventReceiver.java b/src/main/java/org/apache/sling/event/dea/impl/DistributedEventReceiver.java
index 5f6d2f9..995a0a9 100644
--- a/src/main/java/org/apache/sling/event/dea/impl/DistributedEventReceiver.java
+++ b/src/main/java/org/apache/sling/event/dea/impl/DistributedEventReceiver.java
@@ -97,7 +97,7 @@ public class DistributedEventReceiver
     private volatile Set<String> instances;
 
     /** The service registration. */
-    private volatile ServiceRegistration<?> serviceRegistration;
+    private volatile ServiceRegistration serviceRegistration;
 
     public DistributedEventReceiver(final BundleContext bundleContext,
             final String rootPath,
@@ -127,7 +127,7 @@ public class DistributedEventReceiver
                 props.put("scheduler.period", 1800L);
                 props.put("scheduler.concurrent", Boolean.FALSE);
 
-                final ServiceRegistration<?> reg =
+                final ServiceRegistration reg =
                         bundleContext.registerService(new String[] {EventHandler.class.getName(),
                                                                    Runnable.class.getName(),
                                                                    TopologyEventListener.class.getName()},
@@ -301,7 +301,7 @@ public class DistributedEventReceiver
                 final Resource baseResource = resolver.getResource(this.rootPath);
                 // sanity check - should never be null
                 if ( baseResource != null ) {
-                    final ResourceUtil.BatchResourceRemover brr = ResourceUtil.getBatchResourceRemover(50);
+                    final ResourceHelper.BatchResourceRemover brr = ResourceHelper.getBatchResourceRemover(50);
                     final Iterator<Resource> iter = baseResource.listChildren();
                     while ( iter.hasNext() ) {
                         final Resource rootResource = iter.next();
@@ -333,7 +333,7 @@ public class DistributedEventReceiver
             ResourceResolver resolver = null;
             try {
                 resolver = this.resourceResolverFactory.getAdministrativeResourceResolver(null);
-                final ResourceUtil.BatchResourceRemover brr = ResourceUtil.getBatchResourceRemover(50);
+                final ResourceHelper.BatchResourceRemover brr = ResourceHelper.getBatchResourceRemover(50);
 
                 final Resource baseResource = resolver.getResource(this.ownRootPath);
                 // sanity check - should never be null
diff --git a/src/main/java/org/apache/sling/event/dea/impl/DistributedEventSender.java b/src/main/java/org/apache/sling/event/dea/impl/DistributedEventSender.java
index 95aa021..8bc982f 100644
--- a/src/main/java/org/apache/sling/event/dea/impl/DistributedEventSender.java
+++ b/src/main/java/org/apache/sling/event/dea/impl/DistributedEventSender.java
@@ -69,7 +69,7 @@ public class DistributedEventSender
 
     private final String ownRootPathWithSlash;
 
-    private volatile ServiceRegistration<?> serviceRegistration;
+    private volatile ServiceRegistration serviceRegistration;
 
     public DistributedEventSender(final BundleContext bundleContext,
             final String rootPath,
@@ -92,7 +92,7 @@ public class DistributedEventSender
                 props.put(EventConstants.EVENT_TOPIC, SlingConstants.TOPIC_RESOURCE_ADDED);
                 props.put(EventConstants.EVENT_FILTER, "(path=" + rootPath + "/*)");
 
-                final ServiceRegistration<?> reg =
+                final ServiceRegistration reg =
                         bundleContext.registerService(new String[] {EventHandler.class.getName()},
                         DistributedEventSender.this, props);
 
diff --git a/src/main/java/org/apache/sling/event/dea/impl/ResourceHelper.java b/src/main/java/org/apache/sling/event/dea/impl/ResourceHelper.java
index 0694b74..4020704 100644
--- a/src/main/java/org/apache/sling/event/dea/impl/ResourceHelper.java
+++ b/src/main/java/org/apache/sling/event/dea/impl/ResourceHelper.java
@@ -27,7 +27,10 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.sling.api.resource.PersistenceException;
 import org.apache.sling.api.resource.Resource;
+import org.apache.sling.api.resource.ResourceResolver;
+import org.apache.sling.api.resource.ResourceUtil;
 import org.apache.sling.api.resource.ValueMap;
 
 public abstract class ResourceHelper {
@@ -83,7 +86,7 @@ public abstract class ResourceHelper {
     }
 
     public static ValueMap getValueMap(final Resource resource) throws InstantiationException {
-        final ValueMap vm = resource.getValueMap();
+        final ValueMap vm = ResourceUtil.getValueMap(resource);
         // trigger full loading
         try {
             vm.size();
@@ -93,4 +96,51 @@ public abstract class ResourceHelper {
         }
         return vm;
     }
+
+    /**
+     * A batch resource remover deletes resources in batches. Once the batch
+     * size (threshold) is reached, an intermediate commit is performed. Resource
+     * trees are deleted resource by resource starting with the deepest children first.
+     * Once all resources have been passed to the batch resource remover, a final
+     * commit needs to be called on the resource resolver.
+     */
+    public static class BatchResourceRemover {
+
+        private final int max;
+
+        private int count;
+
+        public BatchResourceRemover(final int batchSize) {
+            this.max = (batchSize < 1 ? 50 : batchSize);
+        }
+
+        public void delete(final Resource rsrc)
+        throws PersistenceException {
+            final ResourceResolver resolver = rsrc.getResourceResolver();
+            for(final Resource child : rsrc.getChildren()) {
+                delete(child);
+            }
+            resolver.delete(rsrc);
+            count++;
+            if ( count >= max ) {
+                resolver.commit();
+                count = 0;
+            }
+        }
+    }
+
+    /**
+     * Create a batch resource remover.
+     * A batch resource remove can be used to delete resources in batches.
+     * Once the passed in threshold of deleted resources is reached, an intermediate
+     * commit is called on the resource resolver. In addition the batch remover
+     * deletes a resource recursively.
+     * Once all resources to delete are passed to the remover, a final commit needs
+     * to be call on the resource resolver.
+     * @param threshold The threshold for the intermediate saves.
+     * @return A new batch resource remover.
+     */
+    public static BatchResourceRemover getBatchResourceRemover(final int threshold) {
+        return new BatchResourceRemover(threshold);
+    }
 }
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 28/29: use Sling Parent 30

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit 81a7f163542a53b533ff1f35b5a980596c011e63
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Mon Mar 6 10:22:30 2017 +0000

    use Sling Parent 30
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1785621 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 0967427..4c6d41f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>29</version>
+        <version>30</version>
         <relativePath />
     </parent>
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 21/29: SLING-5230 : Remove getAdministrativeResourceResolver() usage from org.apache.sling.event.dea

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit 4b5376295195118b2a4c2b2683f1aad80dda1772
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Oct 12 12:30:45 2016 +0000

    SLING-5230 : Remove getAdministrativeResourceResolver() usage from org.apache.sling.event.dea
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1764446 13f79535-47bb-0310-9956-ffa450edef68
---
 .../org/apache/sling/event/dea/impl/DistributedEventReceiver.java   | 6 +++---
 .../org/apache/sling/event/dea/impl/DistributedEventSender.java     | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/main/java/org/apache/sling/event/dea/impl/DistributedEventReceiver.java b/src/main/java/org/apache/sling/event/dea/impl/DistributedEventReceiver.java
index 7635f81..8698b39 100644
--- a/src/main/java/org/apache/sling/event/dea/impl/DistributedEventReceiver.java
+++ b/src/main/java/org/apache/sling/event/dea/impl/DistributedEventReceiver.java
@@ -136,7 +136,7 @@ public class DistributedEventReceiver
                 DistributedEventReceiver.this.serviceRegistration = reg;
 
                 try {
-                    writerResolver = resourceResolverFactory.getAdministrativeResourceResolver(null);
+                    writerResolver = resourceResolverFactory.getServiceResourceResolver(null);
                     ResourceUtil.getOrCreateResource(writerResolver,
                             ownRootPath,
                             DistributedEventAdminImpl.RESOURCE_TYPE_FOLDER,
@@ -296,7 +296,7 @@ public class DistributedEventReceiver
             this.logger.debug("Checking for old instance trees for distributed events.");
             ResourceResolver resolver = null;
             try {
-                resolver = this.resourceResolverFactory.getAdministrativeResourceResolver(null);
+                resolver = this.resourceResolverFactory.getServiceResourceResolver(null);
 
                 final Resource baseResource = resolver.getResource(this.rootPath);
                 // sanity check - should never be null
@@ -332,7 +332,7 @@ public class DistributedEventReceiver
 
             ResourceResolver resolver = null;
             try {
-                resolver = this.resourceResolverFactory.getAdministrativeResourceResolver(null);
+                resolver = this.resourceResolverFactory.getServiceResourceResolver(null);
                 final ResourceHelper.BatchResourceRemover brr = ResourceHelper.getBatchResourceRemover(50);
 
                 final Resource baseResource = resolver.getResource(this.ownRootPath);
diff --git a/src/main/java/org/apache/sling/event/dea/impl/DistributedEventSender.java b/src/main/java/org/apache/sling/event/dea/impl/DistributedEventSender.java
index e277bf9..3159931 100644
--- a/src/main/java/org/apache/sling/event/dea/impl/DistributedEventSender.java
+++ b/src/main/java/org/apache/sling/event/dea/impl/DistributedEventSender.java
@@ -191,7 +191,7 @@ public class DistributedEventSender
             if ( path != null && path.length() > 0 && this.running ) {
                 ResourceResolver resolver = null;
                 try {
-                    resolver = this.resourceResolverFactory.getAdministrativeResourceResolver(null);
+                    resolver = this.resourceResolverFactory.getServiceResourceResolver(null);
                     final Resource eventResource = resolver.getResource(path);
                     if (eventResource == null) {
                         this.logger.warn("runInBackground : resource not found at "+path);

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 20/29: Fix javadoc generation

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit 6e74a9930d9167b4222376955b0569c61bcbad4a
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Sep 22 13:41:38 2016 +0000

    Fix javadoc generation
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1761967 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/pom.xml b/pom.xml
index c2d9718..9b654e4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -49,10 +49,6 @@
                 <artifactId>maven-bundle-plugin</artifactId>
                 <extensions>true</extensions>
             </plugin>
-        </plugins>
-    </build>
-    <reporting>
-        <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-javadoc-plugin</artifactId>
@@ -63,7 +59,7 @@
                 </configuration>
             </plugin>
         </plugins>
-    </reporting>
+    </build>
     <dependencies>
         <dependency>
             <groupId>org.apache.sling</groupId>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 25/29: SLING-6497 Use ServiceUserMapped to ensure presence of service user mapping

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit df5a6450cbc5891372915dda540ec0d2bd82b1c2
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Sat Jan 28 08:23:58 2017 +0000

    SLING-6497 Use ServiceUserMapped to ensure presence of service user mapping
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1780638 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                                             | 6 ++++++
 .../org/apache/sling/event/dea/impl/DistributedEventAdminImpl.java  | 4 ++++
 2 files changed, 10 insertions(+)

diff --git a/pom.xml b/pom.xml
index 88d27e2..dcba8b9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -99,6 +99,12 @@
             <version>2.11.0</version>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.serviceusermapper</artifactId>
+            <version>1.2.0</version>
+            <scope>provided</scope>
+        </dependency>
       <!-- Testing -->
         <dependency>
             <groupId>junit</groupId>
diff --git a/src/main/java/org/apache/sling/event/dea/impl/DistributedEventAdminImpl.java b/src/main/java/org/apache/sling/event/dea/impl/DistributedEventAdminImpl.java
index 27a811c..809b0ba 100644
--- a/src/main/java/org/apache/sling/event/dea/impl/DistributedEventAdminImpl.java
+++ b/src/main/java/org/apache/sling/event/dea/impl/DistributedEventAdminImpl.java
@@ -19,6 +19,7 @@
 package org.apache.sling.event.dea.impl;
 
 import org.apache.sling.api.resource.ResourceResolverFactory;
+import org.apache.sling.serviceusermapping.ServiceUserMapped;
 import org.apache.sling.settings.SlingSettingsService;
 import org.osgi.framework.BundleContext;
 import org.osgi.service.component.annotations.Activate;
@@ -55,6 +56,9 @@ public class DistributedEventAdminImpl {
     @Reference
     private EventAdmin eventAdmin;
 
+    @Reference
+    private ServiceUserMapped serviceUserMapped;
+
     /** Default repository path. */
     public static final String DEFAULT_REPOSITORY_PATH = "/var/eventing/distribution";
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 17/29: Update the main reactor to parent 25

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit 4951e4f4abd3f7665e00d4ed9f7b91aafb1eea3d
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Mon Oct 5 10:03:45 2015 +0000

    Update the main reactor to parent 25
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1706780 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 2dceaba..494ffa6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>24</version>
+        <version>25</version>
         <relativePath />
     </parent>
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-event-dea] 06/29: Use latest parent pom

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit 366a9f528e6e063efbfc2d50f0817ac75894e9a8
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Apr 15 08:04:18 2015 +0000

    Use latest parent pom
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1673674 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 0dd5a31..9e084e2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>19</version>
+        <version>22</version>
         <relativePath>../../../parent/pom.xml</relativePath>
     </parent>
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.