You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cz...@apache.org on 2015/02/13 18:42:34 UTC

svn commit: r1659624 - in /felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard: ServletContextHelperManager.java WhiteboardHttpService.java

Author: cziegeler
Date: Fri Feb 13 17:42:34 2015
New Revision: 1659624

URL: http://svn.apache.org/r1659624
Log:
Correct tracker registrations

Modified:
    felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/ServletContextHelperManager.java
    felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/WhiteboardHttpService.java

Modified: felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/ServletContextHelperManager.java
URL: http://svn.apache.org/viewvc/felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/ServletContextHelperManager.java?rev=1659624&r1=1659623&r2=1659624&view=diff
==============================================================================
--- felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/ServletContextHelperManager.java (original)
+++ felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/ServletContextHelperManager.java Fri Feb 13 17:42:34 2015
@@ -383,18 +383,21 @@ public final class ServletContextHelperM
         {
             this.httpService.registerResource(handler, (ResourceInfo)info);
         }
+        
         else if ( info instanceof ServletContextAttributeListenerInfo )
         {
             handler.addListener((ServletContextAttributeListenerInfo)info );
         }
-        else if ( info instanceof HttpSessionAttributeListenerInfo )
-        {
-            handler.addListener((HttpSessionAttributeListenerInfo)info );
-        }
+
         else if ( info instanceof HttpSessionListenerInfo )
         {
             handler.addListener((HttpSessionListenerInfo)info );
         }
+        else if ( info instanceof HttpSessionAttributeListenerInfo )
+        {
+            handler.addListener((HttpSessionAttributeListenerInfo)info );
+        }
+
         else if ( info instanceof ServletRequestListenerInfo )
         {
             handler.addListener((ServletRequestListenerInfo)info );
@@ -424,18 +427,21 @@ public final class ServletContextHelperM
         {
             this.httpService.unregisterResource(handler, (ResourceInfo)info);
         }
+        
         else if ( info instanceof ServletContextAttributeListenerInfo )
         {
             handler.removeListener((ServletContextAttributeListenerInfo)info );
         }
-        else if ( info instanceof HttpSessionAttributeListenerInfo )
-        {
-            handler.removeListener((HttpSessionAttributeListenerInfo)info );
-        }
+        
         else if ( info instanceof HttpSessionListenerInfo )
         {
             handler.removeListener((HttpSessionListenerInfo)info );
         }
+        else if ( info instanceof HttpSessionAttributeListenerInfo )
+        {
+            handler.removeListener((HttpSessionAttributeListenerInfo)info );
+        }
+
         else if ( info instanceof ServletRequestListenerInfo )
         {
             handler.removeListener((ServletRequestListenerInfo)info );

Modified: felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/WhiteboardHttpService.java
URL: http://svn.apache.org/viewvc/felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/WhiteboardHttpService.java?rev=1659624&r1=1659623&r2=1659624&view=diff
==============================================================================
--- felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/WhiteboardHttpService.java (original)
+++ felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/WhiteboardHttpService.java Fri Feb 13 17:42:34 2015
@@ -38,6 +38,8 @@ import org.apache.felix.http.base.intern
 import org.apache.felix.http.base.internal.whiteboard.tracker.HttpSessionAttributeListenerTracker;
 import org.apache.felix.http.base.internal.whiteboard.tracker.HttpSessionListenerTracker;
 import org.apache.felix.http.base.internal.whiteboard.tracker.ResourceTracker;
+import org.apache.felix.http.base.internal.whiteboard.tracker.ServletContextAttributeListenerTracker;
+import org.apache.felix.http.base.internal.whiteboard.tracker.ServletContextHelperTracker;
 import org.apache.felix.http.base.internal.whiteboard.tracker.ServletContextListenerTracker;
 import org.apache.felix.http.base.internal.whiteboard.tracker.ServletRequestAttributeListenerTracker;
 import org.apache.felix.http.base.internal.whiteboard.tracker.ServletRequestListenerTracker;
@@ -73,13 +75,18 @@ public final class WhiteboardHttpService
         this.handlerRegistry = handlerRegistry;
         this.bundleContext = bundleContext;
         this.contextManager = new ServletContextHelperManager(bundleContext, context, runtimeRef, this);
+        
         addTracker(new FilterTracker(bundleContext, contextManager));
         addTracker(new ServletTracker(bundleContext, this.contextManager));
         addTracker(new ResourceTracker(bundleContext, this.contextManager));
-        addTracker(new HttpSessionAttributeListenerTracker(bundleContext, this.contextManager));
+
         addTracker(new HttpSessionListenerTracker(bundleContext, this.contextManager));
+        addTracker(new HttpSessionAttributeListenerTracker(bundleContext, this.contextManager));
+
+        addTracker(new ServletContextHelperTracker(bundleContext, this.contextManager));
         addTracker(new ServletContextListenerTracker(bundleContext, this.contextManager));
-        addTracker(new ServletContextListenerTracker(bundleContext, this.contextManager));
+        addTracker(new ServletContextAttributeListenerTracker(bundleContext, this.contextManager));
+        
         addTracker(new ServletRequestListenerTracker(bundleContext, this.contextManager));
         addTracker(new ServletRequestAttributeListenerTracker(bundleContext, this.contextManager));
     }