Improve Jackrabbit security
[lgpl/argeo-commons.git] / gis / runtime / org.argeo.gis.geotools / src / main / java / org / argeo / geotools / jcr / GeoJcrIndex.java
index a1175abc72a384daec388dc3618623a7eb6c84a7..75c1b81ad745b30e2e9ddc85ee3fc38393e50653 100644 (file)
@@ -7,6 +7,7 @@ import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
+import java.util.concurrent.Executor;
 
 import javax.jcr.Node;
 import javax.jcr.Property;
@@ -53,7 +54,7 @@ public class GeoJcrIndex implements EventListener, GisNames, GisTypes {
 
        private DataStore dataStore;
        private Session session;
-       private SystemExecutionService systemExecutionService;
+       private Executor systemExecutionService;
 
        /** The key is the workspace */
        private Map<String, FeatureStore<SimpleFeatureType, SimpleFeature>> geoJcrIndexes = Collections
@@ -63,7 +64,7 @@ public class GeoJcrIndex implements EventListener, GisNames, GisTypes {
        private FilterFactory2 ff = new FilterFactoryImpl();
 
        public void init() {
-               systemExecutionService.executeAsSystem(new Runnable() {
+               systemExecutionService.execute(new Runnable() {
                        public void run() {
                                initGeoJcrIndex();
                        }
@@ -102,7 +103,7 @@ public class GeoJcrIndex implements EventListener, GisNames, GisTypes {
                final Set<FeatureId> toRemove = new HashSet<FeatureId>();
 
                // execute with system authentication so that JCR can be read
-               systemExecutionService.executeAsSystem(new Runnable() {
+               systemExecutionService.execute(new Runnable() {
                        public void run() {
                                while (events.hasNext()) {
                                        Event event = events.nextEvent();
@@ -292,7 +293,7 @@ public class GeoJcrIndex implements EventListener, GisNames, GisTypes {
        }
 
        public void setSystemExecutionService(
-                       SystemExecutionService systemExecutionService) {
+                       Executor systemExecutionService) {
                this.systemExecutionService = systemExecutionService;
        }