felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1679549 - in /felix/trunk/http/whiteboard: ./ src/main/java/org/apache/felix/http/whiteboard/internal/tracker/
Date Fri, 15 May 2015 11:50:07 GMT
Author: cziegeler
Date: Fri May 15 11:50:06 2015
New Revision: 1679549

URL: http://svn.apache.org/r1679549
Log:
FELIX-4796 : Log deprecation warning if Felix whiteboard is used

Modified:
    felix/trunk/http/whiteboard/pom.xml
    felix/trunk/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/tracker/FilterTracker.java
    felix/trunk/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/tracker/HttpContextTracker.java
    felix/trunk/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/tracker/ServletTracker.java

Modified: felix/trunk/http/whiteboard/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/http/whiteboard/pom.xml?rev=1679549&r1=1679548&r2=1679549&view=diff
==============================================================================
--- felix/trunk/http/whiteboard/pom.xml (original)
+++ felix/trunk/http/whiteboard/pom.xml Fri May 15 11:50:06 2015
@@ -28,7 +28,7 @@
 
     <name>Apache Felix Http Whiteboard</name>
     <artifactId>org.apache.felix.http.whiteboard</artifactId>
-    <version>3.0.0-SNAPSHOT</version>
+    <version>2.3.3-SNAPSHOT</version>
     <packaging>jar</packaging>
 
     <scm>

Modified: felix/trunk/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/tracker/FilterTracker.java
URL: http://svn.apache.org/viewvc/felix/trunk/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/tracker/FilterTracker.java?rev=1679549&r1=1679548&r2=1679549&view=diff
==============================================================================
--- felix/trunk/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/tracker/FilterTracker.java
(original)
+++ felix/trunk/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/tracker/FilterTracker.java
Fri May 15 11:50:06 2015
@@ -18,6 +18,7 @@ package org.apache.felix.http.whiteboard
 
 import javax.servlet.Filter;
 
+import org.apache.felix.http.base.internal.logger.SystemLogger;
 import org.apache.felix.http.whiteboard.HttpWhiteboardConstants;
 import org.apache.felix.http.whiteboard.internal.manager.ExtenderManager;
 import org.osgi.framework.BundleContext;
@@ -53,6 +54,10 @@ public final class FilterTracker
     @Override
     protected void added(Filter service, ServiceReference ref)
     {
+        SystemLogger.warning("Deprecation warning: " +
+                "Filter registered through Apache Felix whiteboard service: " + ref +
+                ". Please change your code to the OSGi Whiteboard Service.", null);
+
         this.manager.add(service, ref);
     }
 

Modified: felix/trunk/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/tracker/HttpContextTracker.java
URL: http://svn.apache.org/viewvc/felix/trunk/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/tracker/HttpContextTracker.java?rev=1679549&r1=1679548&r2=1679549&view=diff
==============================================================================
--- felix/trunk/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/tracker/HttpContextTracker.java
(original)
+++ felix/trunk/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/tracker/HttpContextTracker.java
Fri May 15 11:50:06 2015
@@ -16,10 +16,11 @@
  */
 package org.apache.felix.http.whiteboard.internal.tracker;
 
+import org.apache.felix.http.base.internal.logger.SystemLogger;
+import org.apache.felix.http.whiteboard.internal.manager.ExtenderManager;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
 import org.osgi.service.http.HttpContext;
-import org.apache.felix.http.whiteboard.internal.manager.ExtenderManager;
 
 public final class HttpContextTracker
     extends AbstractTracker<HttpContext>
@@ -32,17 +33,24 @@ public final class HttpContextTracker
         this.manager = manager;
     }
 
+    @Override
     protected void added(HttpContext service, ServiceReference ref)
     {
+        SystemLogger.warning("Deprecation warning: " +
+                "HttpContext registered through Apache Felix whiteboard service: " + ref
+
+                ". Please change your code to the OSGi Whiteboard Service.", null);
+
         this.manager.add(service, ref);
     }
 
+    @Override
     protected void modified(HttpContext service, ServiceReference ref)
     {
         removed(service, ref);
         added(service, ref);
     }
 
+    @Override
     protected void removed(HttpContext service, ServiceReference ref)
     {
         this.manager.remove(service);

Modified: felix/trunk/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/tracker/ServletTracker.java
URL: http://svn.apache.org/viewvc/felix/trunk/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/tracker/ServletTracker.java?rev=1679549&r1=1679548&r2=1679549&view=diff
==============================================================================
--- felix/trunk/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/tracker/ServletTracker.java
(original)
+++ felix/trunk/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/tracker/ServletTracker.java
Fri May 15 11:50:06 2015
@@ -18,6 +18,7 @@ package org.apache.felix.http.whiteboard
 
 import javax.servlet.Servlet;
 
+import org.apache.felix.http.base.internal.logger.SystemLogger;
 import org.apache.felix.http.whiteboard.HttpWhiteboardConstants;
 import org.apache.felix.http.whiteboard.internal.manager.ExtenderManager;
 import org.osgi.framework.BundleContext;
@@ -53,6 +54,9 @@ public final class ServletTracker
     @Override
     protected void added(Servlet service, ServiceReference ref)
     {
+        SystemLogger.warning("Deprecation warning: " +
+                "Servlet registered through Apache Felix whiteboard service: " + ref +
+                ". Please change your code to the OSGi Whiteboard Service.", null);
         this.manager.add(service, ref);
     }
 



Mime
View raw message