incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1509597 - /sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceListener.java
Date Fri, 02 Aug 2013 10:00:34 GMT
Author: cziegeler
Date: Fri Aug  2 10:00:34 2013
New Revision: 1509597

URL: http://svn.apache.org/r1509597
Log:
SLING-2991 :  Use only a single session in jcr resource listener 

Modified:
    sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceListener.java

Modified: sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceListener.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceListener.java?rev=1509597&r1=1509596&r2=1509597&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceListener.java
(original)
+++ sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceListener.java
Fri Aug  2 10:00:34 2013
@@ -41,6 +41,7 @@ import org.apache.sling.api.resource.Res
 import org.apache.sling.api.resource.ResourceResolver;
 import org.apache.sling.api.resource.ResourceResolverFactory;
 import org.apache.sling.jcr.api.SlingRepository;
+import org.apache.sling.jcr.resource.JcrResourceConstants;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
 import org.osgi.service.event.EventAdmin;
@@ -323,8 +324,10 @@ public class JcrResourceListener impleme
             if ( ref != null ) {
                 final ResourceResolverFactory factory = (ResourceResolverFactory) this.bundleContext.getService(ref);
                 if ( factory != null ) {
+                    final Map<String, Object> authInfo = new HashMap<String, Object>();
+                    authInfo.put(JcrResourceConstants.AUTHENTICATION_INFO_SESSION, this.session);
                     try {
-                        this.resourceResolver = factory.getAdministrativeResourceResolver(null);
+                        this.resourceResolver = factory.getResourceResolver(authInfo);
                         this.resourceResolverFactoryReference = ref;
                     } catch (final LoginException le) {
                         logger.error("Unable to get administrative resource resolver.", le);



Mime
View raw message