Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Auge2016-04-12 03:24:35 +0000
committerRaymond Auge2016-04-12 15:33:16 +0000
commitbe3041a6f69e1780d35e13380f5d1191b16263ef (patch)
treec99c58f63a2cfdc1b265e0904e7a9086dcdc15e1 /bundles
parenta8b08fe3c892821f746ad9db52e754a5cf5f3185 (diff)
downloadrt.equinox.bundles-be3041a6f69e1780d35e13380f5d1191b16263ef.tar.gz
rt.equinox.bundles-be3041a6f69e1780d35e13380f5d1191b16263ef.tar.xz
rt.equinox.bundles-be3041a6f69e1780d35e13380f5d1191b16263ef.zip
Bug 490638 [http whiteboard] Catch exceptions when invoking listener methods too so everything cleans up
Signed-off-by: Juan Gonzalez <juan.gonzalez@liferay.com>
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/servlet/HttpSessionAdaptor.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/servlet/HttpSessionAdaptor.java b/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/servlet/HttpSessionAdaptor.java
index 92cc06d0..81f9a17e 100644
--- a/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/servlet/HttpSessionAdaptor.java
+++ b/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/servlet/HttpSessionAdaptor.java
@@ -219,18 +219,32 @@ public class HttpSessionAdaptor implements HttpSession, Serializable {
public void invalidate() {
HttpSessionEvent httpSessionEvent = new HttpSessionEvent(this);
+
for (HttpSessionListener listener : controller.getEventListeners().get(HttpSessionListener.class)) {
- listener.sessionDestroyed(httpSessionEvent);
+ try {
+ listener.sessionDestroyed(httpSessionEvent);
+ }
+ catch (IllegalStateException ise) {
+ // outer session is already invalidated
+ }
}
+
try {
for (String attribute : getAttributeNames0()) {
removeAttribute(attribute);
}
+ }
+ catch (IllegalStateException ise) {
+ // outer session is already invalidated
+ }
+
+ try {
ParentSessionListener.removeHttpSessionAdaptor(this);
}
catch (IllegalStateException ise) {
// outer session is already invalidated
}
+
controller.removeActiveSession(session);
}

Back to the top