sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r1067911 - /sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/JUnitServlet.java
Date Mon, 07 Feb 2011 10:56:52 GMT
Author: bdelacretaz
Date: Mon Feb  7 10:56:52 2011
New Revision: 1067911

URL: http://svn.apache.org/viewvc?rev=1067911&view=rev
Log:
SLING-1963 - JUnitServlet should be an immediate component

Modified:
    sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/JUnitServlet.java

Modified: sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/JUnitServlet.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/JUnitServlet.java?rev=1067911&r1=1067910&r2=1067911&view=diff
==============================================================================
--- sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/JUnitServlet.java
(original)
+++ sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/JUnitServlet.java
Mon Feb  7 10:56:52 2011
@@ -32,7 +32,7 @@ import javax.servlet.http.HttpServletRes
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Reference;
 import org.apache.felix.scr.annotations.ReferenceCardinality;
-import org.apache.felix.scr.annotations.Service;
+import org.apache.felix.scr.annotations.ReferencePolicy;
 import org.apache.sling.junit.JUnitTestsManager;
 import org.junit.runner.JUnitCore;
 import org.osgi.service.http.HttpService;
@@ -42,8 +42,7 @@ import org.slf4j.LoggerFactory;
 
 /** Simple test runner servlet */
 @SuppressWarnings("serial")
-@Component
-@Service
+@Component(immediate=true)
 public class JUnitServlet extends HttpServlet {
     
     private final Logger log = LoggerFactory.getLogger(getClass());
@@ -56,7 +55,7 @@ public class JUnitServlet extends HttpSe
     @Reference
     private JUnitTestsManager testsManager;
     
-    @Reference(cardinality=ReferenceCardinality.OPTIONAL_UNARY)
+    @Reference(cardinality=ReferenceCardinality.OPTIONAL_UNARY, policy=ReferencePolicy.DYNAMIC)
     private HttpService httpService;
     
     protected void bindHttpService(HttpService h) throws ServletException, NamespaceException
{



Mime
View raw message