incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r993282 - 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 Tue, 07 Sep 2010 08:52:53 GMT
Author: fmeschbe
Date: Tue Sep  7 08:52:53 2010
New Revision: 993282

URL: http://svn.apache.org/viewvc?rev=993282&view=rev
Log:
SLING-550 use new SlingRequestProcessor API

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=993282&r1=993281&r2=993282&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/bgservlets/pom.xml (original)
+++ sling/trunk/contrib/extensions/bgservlets/pom.xml Tue Sep  7 08:52:53 2010
@@ -77,7 +77,7 @@
       <groupId>org.apache.felix</groupId>
       <artifactId>org.apache.felix.scr.annotations</artifactId>
       <version>1.2.0</version>
-      <scope>compile</scope>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.sling</groupId>
@@ -88,7 +88,7 @@
     <dependency>
       <groupId>org.apache.sling</groupId>
       <artifactId>org.apache.sling.engine</artifactId>
-      <version>2.0.7-SLING-1603-SNAPSHOT</version>
+      <version>2.1.1-SNAPSHOT</version>
       <scope>provided</scope>
     </dependency>
     <dependency>

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=993282&r1=993281&r2=993282&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
Tue Sep  7 08:52:53 2010
@@ -35,7 +35,7 @@ import org.apache.sling.bgservlets.JobPr
 import org.apache.sling.bgservlets.JobStatus;
 import org.apache.sling.bgservlets.JobStorage;
 import org.apache.sling.bgservlets.RuntimeState;
-import org.apache.sling.engine.SlingServlet;
+import org.apache.sling.engine.SlingRequestProcessor;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -49,20 +49,20 @@ class BackgroundRequestExecutionJob impl
     private final BackgroundHttpServletResponse response;
     private final SuspendableOutputStream stream;
     private final ResourceResolver resourceResolver;
-    private final SlingServlet slingServlet;
+    private final SlingRequestProcessor slingRequestProcessor;
     private final String path;
     private final String streamPath;
     private final Date creationTime;
     private Date estimatedCompletionTime;
     private String progressMessage;
 
-    BackgroundRequestExecutionJob(SlingServlet slingServlet,
+    BackgroundRequestExecutionJob(SlingRequestProcessor slingRequestProcessor,
             JobStorage storage, SlingHttpServletRequest request,
             HttpServletResponse hsr, String[] parametersToRemove)
             throws IOException, LoginException {
         this.request = new BackgroundHttpServletRequest(request,
                 parametersToRemove);
-        this.slingServlet = slingServlet;
+        this.slingRequestProcessor = slingRequestProcessor;
 
         // Provide this as the RuntimeState for the background servlet
         this.request.setAttribute(RuntimeState.class.getName(), this);
@@ -95,7 +95,7 @@ class BackgroundRequestExecutionJob impl
 
     public void run() {
         try {
-            slingServlet.processRequest(request, response, resourceResolver);
+            slingRequestProcessor.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=993282&r1=993281&r2=993282&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
Tue Sep  7 08:52:53 2010
@@ -37,7 +37,7 @@ import org.apache.felix.scr.annotations.
 import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.bgservlets.ExecutionEngine;
 import org.apache.sling.bgservlets.JobStorage;
-import org.apache.sling.engine.SlingServlet;
+import org.apache.sling.engine.SlingRequestProcessor;
 import org.osgi.service.component.ComponentContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -62,7 +62,7 @@ public class BackgroundServletStarterFil
     private ExecutionEngine executionEngine;
 
     @Reference
-    private SlingServlet slingServlet;
+    private SlingRequestProcessor slingRequestProcessor;
 
     @Reference
     private JobStorage jobStorage;
@@ -106,7 +106,7 @@ public class BackgroundServletStarterFil
         if (Boolean.valueOf(bgParam)) {
             try {
                 final BackgroundRequestExecutionJob job = new BackgroundRequestExecutionJob(
-                    slingServlet, jobStorage, slingRequest, response,
+                    slingRequestProcessor, jobStorage, slingRequest, response,
                     new String[] { bgParamName });
                 log.debug("{} parameter true, running request in the background ({})",
                         bgParamName, job);



Mime
View raw message