summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2015-04-16 10:10:42 +0300
committerVaadin Code Review <review@vaadin.com>2015-07-14 11:35:16 +0000
commited02ddb86ea3c59b34a07661fdfd36eae937b060 (patch)
treeec2a332d04e9d7cd53da640a4445d8e1746b2c27
parentdc4946d3c65ff37926b12ed3cd2fe370b99aa445 (diff)
downloadvaadin-framework-ed02ddb86ea3c59b34a07661fdfd36eae937b060.tar.gz
vaadin-framework-ed02ddb86ea3c59b34a07661fdfd36eae937b060.zip
Do not initialize Atmosphere for websocket servlet in Websphere (#16354)
Change-Id: I6f32668d357c2f2af75a2d53de37708f6c449b44
-rw-r--r--server/src/com/vaadin/server/communication/JSR356WebsocketInitializer.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/server/src/com/vaadin/server/communication/JSR356WebsocketInitializer.java b/server/src/com/vaadin/server/communication/JSR356WebsocketInitializer.java
index f36d403dd5..6d2843a4fc 100644
--- a/server/src/com/vaadin/server/communication/JSR356WebsocketInitializer.java
+++ b/server/src/com/vaadin/server/communication/JSR356WebsocketInitializer.java
@@ -181,8 +181,13 @@ public class JSR356WebsocketInitializer implements ServletContextListener {
*/
protected boolean isVaadinServlet(ServletRegistration servletRegistration) {
try {
- Class<?> servletClass = Class.forName(servletRegistration
- .getClassName());
+ String servletClassName = servletRegistration.getClassName();
+ if (servletClassName.equals("com.ibm.ws.wsoc.WsocServlet")) {
+ // Websphere servlet which implements websocket endpoints,
+ // dynamically added
+ return false;
+ }
+ Class<?> servletClass = Class.forName(servletClassName);
return VaadinServlet.class.isAssignableFrom(servletClass);
} catch (Exception e) {
// This will fail in OSGi environments, assume everything is a