X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=gis%2Fruntime%2Forg.argeo.gis.geotools%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fgeotools%2Fjcr%2FGeoJcrIndex.java;fp=gis%2Fruntime%2Forg.argeo.gis.geotools%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fgeotools%2Fjcr%2FGeoJcrIndex.java;h=7e4f28702cf726e9ab7ee9a39b11420b9d80d7c0;hb=78a52c7ee4e476b3fe366346ed26315f7237a6bb;hp=b384eb3b69b0cdaabb085e7d01212a3c1a00139e;hpb=2f75ff792fb0a36b57fed447b685363bc64addbb;p=lgpl%2Fargeo-commons.git diff --git a/gis/runtime/org.argeo.gis.geotools/src/main/java/org/argeo/geotools/jcr/GeoJcrIndex.java b/gis/runtime/org.argeo.gis.geotools/src/main/java/org/argeo/geotools/jcr/GeoJcrIndex.java index b384eb3b6..7e4f28702 100644 --- a/gis/runtime/org.argeo.gis.geotools/src/main/java/org/argeo/geotools/jcr/GeoJcrIndex.java +++ b/gis/runtime/org.argeo.gis.geotools/src/main/java/org/argeo/geotools/jcr/GeoJcrIndex.java @@ -62,12 +62,16 @@ public class GeoJcrIndex implements EventListener, GisNames, GisTypes { // TODO: use common factory finder? private FilterFactory2 ff = new FilterFactoryImpl(); + /** Expects to execute with system authentication */ public void init() { - systemExecutionService.execute(new Runnable() { - public void run() { - initGeoJcrIndex(); - } - }); + if (systemExecutionService != null)// legacy + systemExecutionService.execute(new Runnable() { + public void run() { + initGeoJcrIndex(); + } + }); + else + initGeoJcrIndex(); } protected void initGeoJcrIndex() { @@ -291,8 +295,7 @@ public class GeoJcrIndex implements EventListener, GisNames, GisTypes { this.session = session; } - public void setSystemExecutionService( - Executor systemExecutionService) { + public void setSystemExecutionService(Executor systemExecutionService) { this.systemExecutionService = systemExecutionService; }