incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r965487 - in /sling/trunk/contrib/extensions/bgservlets: pom.xml src/main/java/org/apache/sling/bgservlets/impl/BackgroundRequestExecutionJob.java src/main/java/org/apache/sling/bgservlets/impl/BackgroundServletStarterFilter.java
Date Mon, 19 Jul 2010 13:58:36 GMT
Author: bdelacretaz
Date: Mon Jul 19 13:58:36 2010
New Revision: 965487

URL: http://svn.apache.org/viewvc?rev=965487&view=rev
Log:
SLING-550 - adapt to changed SLING-1603 patch

Modified:
    sling/trunk/contrib/extensions/bgservlets/pom.xml
    sling/trunk/contrib/extensions/bgservlets/src/main/java/org/apache/sling/bgservlets/impl/BackgroundRequestExecutionJob.java
    sling/trunk/contrib/extensions/bgservlets/src/main/java/org/apache/sling/bgservlets/impl/BackgroundServletStarterFilter.java

Modified: sling/trunk/contrib/extensions/bgservlets/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/bgservlets/pom.xml?rev=965487&r1=965486&r2=965487&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/bgservlets/pom.xml (original)
+++ sling/trunk/contrib/extensions/bgservlets/pom.xml Mon Jul 19 13:58:36 2010
@@ -86,6 +86,12 @@
     </dependency>
     <dependency>
       <groupId>org.apache.sling</groupId>
+      <artifactId>org.apache.sling.engine</artifactId>
+      <version>2.0.7-SNAPSHOT</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.sling</groupId>
       <artifactId>org.apache.sling.commons.auth</artifactId>
       <version>0.9.0-SNAPSHOT</version>
       <scope>provided</scope>

Modified: sling/trunk/contrib/extensions/bgservlets/src/main/java/org/apache/sling/bgservlets/impl/BackgroundRequestExecutionJob.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/bgservlets/src/main/java/org/apache/sling/bgservlets/impl/BackgroundRequestExecutionJob.java?rev=965487&r1=965486&r2=965487&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/bgservlets/src/main/java/org/apache/sling/bgservlets/impl/BackgroundRequestExecutionJob.java
(original)
+++ sling/trunk/contrib/extensions/bgservlets/src/main/java/org/apache/sling/bgservlets/impl/BackgroundRequestExecutionJob.java
Mon Jul 19 13:58:36 2010
@@ -28,10 +28,9 @@ import javax.servlet.http.HttpServletRes
 import org.apache.sling.api.resource.LoginException;
 import org.apache.sling.api.resource.ResourceResolver;
 import org.apache.sling.api.resource.ResourceResolverFactory;
-import org.apache.sling.api.servlets.SlingServlet;
 import org.apache.sling.bgservlets.JobStatus;
-import org.apache.sling.commons.auth.impl.SlingAuthenticator;
 import org.apache.sling.commons.auth.spi.AuthenticationInfo;
+import org.apache.sling.engine.SlingServlet;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -43,6 +42,7 @@ class BackgroundRequestExecutionJob impl
 	private final HttpServletRequest request;
 	private final BackgroundHttpServletResponse response;
 	private final SuspendableOutputStream stream;
+	private final ResourceResolver resourceResolver;
 	private final SlingServlet slingServlet;
 	private final String path;
 	
@@ -59,8 +59,7 @@ class BackgroundRequestExecutionJob impl
 		if(aa == null) {
 			throw new IllegalArgumentException("Missing AuthenticationInfo attribute");
 		}
-		final ResourceResolver rr = rrf.getResourceResolver(aa);
-		this.request.setAttribute(SlingAuthenticator.REQUEST_ATTRIBUTE_RESOLVER, rr);
+		resourceResolver = rrf.getResourceResolver(aa);
 		
 		// TODO write output to the Sling repository. For now: just a temp file
 		final File output = File.createTempFile(getClass().getSimpleName(), ".data");
@@ -76,7 +75,7 @@ class BackgroundRequestExecutionJob impl
 	
 	public void run() {
 		try {
-			slingServlet.processRequest(request, response);
+			slingServlet.processRequest(request, response, resourceResolver);
 		} catch(Exception e) {
 			// TODO report errors in the background job's output
 			log.error("Exception in background request processing", e);

Modified: sling/trunk/contrib/extensions/bgservlets/src/main/java/org/apache/sling/bgservlets/impl/BackgroundServletStarterFilter.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/bgservlets/src/main/java/org/apache/sling/bgservlets/impl/BackgroundServletStarterFilter.java?rev=965487&r1=965486&r2=965487&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/bgservlets/src/main/java/org/apache/sling/bgservlets/impl/BackgroundServletStarterFilter.java
(original)
+++ sling/trunk/contrib/extensions/bgservlets/src/main/java/org/apache/sling/bgservlets/impl/BackgroundServletStarterFilter.java
Mon Jul 19 13:58:36 2010
@@ -36,8 +36,8 @@ import org.apache.felix.scr.annotations.
 import org.apache.felix.scr.annotations.Service;
 import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.api.resource.ResourceResolverFactory;
-import org.apache.sling.api.servlets.SlingServlet;
 import org.apache.sling.bgservlets.ExecutionEngine;
+import org.apache.sling.engine.SlingServlet;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 



Mime
View raw message