Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Auge2019-02-28 09:07:49 -0500
committerRaymond Auge2019-03-23 12:16:44 -0400
commit3a9adc44c41e1bdea79c4bd99e4002776e1f254d (patch)
tree915404e176ef639ed4e73b8d195ae3a6b8c46c10
parentb0cb83df0ddb7b055f01117c365f8f537743193d (diff)
downloadrt.equinox.bundles-3a9adc44c41e1bdea79c4bd99e4002776e1f254d.tar.gz
rt.equinox.bundles-3a9adc44c41e1bdea79c4bd99e4002776e1f254d.tar.xz
rt.equinox.bundles-3a9adc44c41e1bdea79c4bd99e4002776e1f254d.zip
Bug 545134 - [http whiteboard] equinox.http.servlet throws superfluous exceptions during cleanup
Signed-off-by: Raymond Auge <raymond.auge@liferay.com> Change-Id: Ib5ec566ba46ba178ddd25d25578659f0be984447
-rw-r--r--bundles/org.eclipse.equinox.http.servlet/META-INF/MANIFEST.MF2
-rw-r--r--bundles/org.eclipse.equinox.http.servlet/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/context/ContextController.java40
-rw-r--r--bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/registration/EndpointRegistration.java6
-rw-r--r--bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/registration/FilterRegistration.java6
-rw-r--r--bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/registration/ListenerRegistration.java6
6 files changed, 25 insertions, 37 deletions
diff --git a/bundles/org.eclipse.equinox.http.servlet/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.http.servlet/META-INF/MANIFEST.MF
index 1c894a96..de34d92b 100644
--- a/bundles/org.eclipse.equinox.http.servlet/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.http.servlet/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %bundleName
Bundle-Vendor: %providerName
Bundle-SymbolicName: org.eclipse.equinox.http.servlet
-Bundle-Version: 1.6.0.qualifier
+Bundle-Version: 1.6.100.qualifier
Bundle-Activator: org.eclipse.equinox.http.servlet.internal.Activator
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
diff --git a/bundles/org.eclipse.equinox.http.servlet/pom.xml b/bundles/org.eclipse.equinox.http.servlet/pom.xml
index 48ec1db9..5fb58b8d 100644
--- a/bundles/org.eclipse.equinox.http.servlet/pom.xml
+++ b/bundles/org.eclipse.equinox.http.servlet/pom.xml
@@ -20,6 +20,6 @@
</parent>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.http.servlet</artifactId>
- <version>1.6.0-SNAPSHOT</version>
+ <version>1.6.100-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/context/ContextController.java b/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/context/ContextController.java
index 2a2f4046..5620a6a1 100644
--- a/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/context/ContextController.java
+++ b/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/context/ContextController.java
@@ -602,19 +602,27 @@ public class ContextController {
shutdown = true;
}
+ public void createContextAttributes() {
+ getProxyContext().createContextAttributes(this);
+ }
+
+ public void destroyContextAttributes() {
+ if (shutdown) {
+ return;
+ }
+
+ proxyContext.destroyContextAttributes(this);
+ }
+
public boolean isLegacyContext() {
return serviceReference.getProperty(HTTP_SERVICE_CONTEXT_PROPERTY) != null;
}
public String getContextName() {
- checkShutdown();
-
return contextName;
}
public String getContextPath() {
- checkShutdown();
-
return contextPath;
}
@@ -769,26 +777,18 @@ public class ContextController {
}
public Map<String, HttpSessionAdaptor> getActiveSessions() {
- checkShutdown();
-
return activeSessions;
}
public Set<EndpointRegistration<?>> getEndpointRegistrations() {
- checkShutdown();
-
return endpointRegistrations;
}
public EventListeners getEventListeners() {
- checkShutdown();
-
return eventListeners;
}
public Set<FilterRegistration> getFilterRegistrations() {
- checkShutdown();
-
return filterRegistrations;
}
@@ -824,8 +824,6 @@ public class ContextController {
}
public HttpServiceRuntimeImpl getHttpServiceRuntime() {
- checkShutdown();
-
return httpServiceRuntime;
}
@@ -834,29 +832,21 @@ public class ContextController {
}
public Set<ListenerRegistration> getListenerRegistrations() {
- checkShutdown();
-
return listenerRegistrations;
}
public ProxyContext getProxyContext() {
- checkShutdown();
-
return proxyContext;
}
public long getServiceId() {
- checkShutdown();
-
return contextServiceId;
}
public synchronized ServletContextDTO getServletContextDTO(){
- checkShutdown();
-
ServletContextDTO servletContextDTO = new ServletContextDTO();
- ServletContext servletContext = getProxyContext().getServletContext();
+ ServletContext servletContext = proxyContext.getServletContext();
servletContextDTO.attributes = getDTOAttributes(servletContext);
servletContextDTO.contextPath = getContextPath();
@@ -1253,6 +1243,10 @@ public class ContextController {
}
public void fireSessionIdChanged(String oldSessionId) {
+ if (shutdown) {
+ return;
+ }
+
ServletContext servletContext = proxyContext.getServletContext();
if ((servletContext.getMajorVersion() <= 3) && (servletContext.getMinorVersion() < 1)) {
return;
diff --git a/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/registration/EndpointRegistration.java b/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/registration/EndpointRegistration.java
index 52044f97..6393e50e 100644
--- a/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/registration/EndpointRegistration.java
+++ b/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/registration/EndpointRegistration.java
@@ -162,13 +162,11 @@ public abstract class EndpointRegistration<D extends DTO>
}
private void createContextAttributes() {
- contextController.getProxyContext().createContextAttributes(
- contextController);
+ contextController.createContextAttributes();
}
private void destroyContextAttributes() {
- contextController.getProxyContext().destroyContextAttributes(
- contextController);
+ contextController.destroyContextAttributes();
}
@Override
diff --git a/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/registration/FilterRegistration.java b/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/registration/FilterRegistration.java
index 6c84a459..434ba452 100644
--- a/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/registration/FilterRegistration.java
+++ b/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/registration/FilterRegistration.java
@@ -188,13 +188,11 @@ public class FilterRegistration
}
private void createContextAttributes() {
- contextController.getProxyContext().createContextAttributes(
- contextController);
+ contextController.createContextAttributes();
}
private void destroyContextAttributes() {
- contextController.getProxyContext().destroyContextAttributes(
- contextController);
+ contextController.destroyContextAttributes();
}
protected boolean isPathWildcardMatch(String pattern, String path) {
diff --git a/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/registration/ListenerRegistration.java b/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/registration/ListenerRegistration.java
index 5e4321e6..a8da0978 100644
--- a/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/registration/ListenerRegistration.java
+++ b/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/registration/ListenerRegistration.java
@@ -122,13 +122,11 @@ public class ListenerRegistration extends Registration<EventListener, ListenerDT
}
private void createContextAttributes() {
- contextController.getProxyContext().createContextAttributes(
- contextController);
+ contextController.createContextAttributes();
}
private void destroyContextAttributes() {
- contextController.getProxyContext().destroyContextAttributes(
- contextController);
+ contextController.destroyContextAttributes();
}
ClassLoader getClassLoader() {

Back to the top