Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.equinox.http.registry/META-INF/MANIFEST.MF2
-rw-r--r--bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/HttpRegistryManager.java20
2 files changed, 17 insertions, 5 deletions
diff --git a/bundles/org.eclipse.equinox.http.registry/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.http.registry/META-INF/MANIFEST.MF
index 42408ad23..ea5ceb9f1 100644
--- a/bundles/org.eclipse.equinox.http.registry/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.http.registry/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %bundleName
Bundle-SymbolicName: org.eclipse.equinox.http.registry;singleton:=true
-Bundle-Version: 1.1.200.qualifier
+Bundle-Version: 1.1.300.qualifier
Bundle-Activator: org.eclipse.equinox.http.registry.internal.Activator
Bundle-Localization: plugin
Require-Bundle: org.eclipse.equinox.common,
diff --git a/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/HttpRegistryManager.java b/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/HttpRegistryManager.java
index 0266209c3..0349ffc9d 100644
--- a/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/HttpRegistryManager.java
+++ b/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/HttpRegistryManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -292,13 +292,25 @@ public class HttpRegistryManager {
HttpContext context = getHttpContext(contribution.httpContextId, contribution.contributor);
if (context == null)
return false;
+
+ Method registerFilterMethod = null;
try {
- Method registerFilterMethod = httpService.getClass().getMethod("registerFilter", new Class[] {String.class, Filter.class, Dictionary.class, HttpContext.class}); //$NON-NLS-1$
+ // First, try the Equinox http service method
+ registerFilterMethod = httpService.getClass().getMethod("registerFilter", new Class[] {String.class, Filter.class, Dictionary.class, HttpContext.class}); //$NON-NLS-1$
registerFilterMethod.invoke(httpService, new Object[] {contribution.alias, contribution.filter, contribution.initparams, context});
return true;
- } catch (NoSuchMethodException t) {
+ } catch (NoSuchMethodException e) {
+ // Give the pax-web HttpService impl a try
+ try {
+ registerFilterMethod = httpService.getClass().getMethod("registerFilter", new Class[] {Filter.class, String[].class, String[].class, Dictionary.class, HttpContext.class}); //$NON-NLS-1$
+ registerFilterMethod.invoke(httpService, new Object[] {contribution.filter, new String[] {contribution.alias}, null, contribution.initparams, context});
+ return true;
+ } catch (Throwable t) {
+ // TODO: should log this
+ // for now ignore
+ }
// TODO: should log this
- // for now ignore
+ e.printStackTrace();
} catch (Throwable t) {
// TODO: should log this
t.printStackTrace();

Back to the top