Latest dependency updates (AspectJ 1.8.1, Reactor 1.1.2, Tomcat 8.0.9, Jackson 2.4.1, JAMon 2.76)

This commit is contained in:
Juergen Hoeller
2014-06-26 12:21:21 +02:00
parent cc917de24d
commit 8ea0d8eea1
2 changed files with 11 additions and 16 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,22 +19,21 @@ package org.springframework.web.socket;
import java.io.File;
import java.io.IOException;
import java.util.EnumSet;
import javax.servlet.DispatcherType;
import javax.servlet.Filter;
import org.apache.catalina.Context;
import org.apache.catalina.connector.Connector;
import org.apache.catalina.startup.Tomcat;
import org.apache.coyote.http11.Http11NioProtocol;
import org.apache.tomcat.util.descriptor.web.ApplicationListener;
import org.apache.tomcat.util.descriptor.web.FilterDef;
import org.apache.tomcat.util.descriptor.web.FilterMap;
import org.apache.tomcat.websocket.server.WsContextListener;
import org.springframework.util.SocketUtils;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.servlet.DispatcherServlet;
import javax.servlet.DispatcherType;
import javax.servlet.Filter;
/**
* Tomcat based {@link WebSocketTestServer}.
*
@@ -42,9 +41,6 @@ import javax.servlet.Filter;
*/
public class TomcatWebSocketTestServer implements WebSocketTestServer {
private static final ApplicationListener WS_APPLICATION_LISTENER =
new ApplicationListener(WsContextListener.class.getName(), false);
private final Tomcat tomcatServer;
private final int port;
@@ -53,7 +49,6 @@ public class TomcatWebSocketTestServer implements WebSocketTestServer {
public TomcatWebSocketTestServer() {
this.port = SocketUtils.findAvailableTcpPort();
Connector connector = new Connector(Http11NioProtocol.class.getName());
@@ -90,7 +85,7 @@ public class TomcatWebSocketTestServer implements WebSocketTestServer {
@Override
public void deployConfig(WebApplicationContext wac, Filter... filters) {
this.context = this.tomcatServer.addContext("", System.getProperty("java.io.tmpdir"));
this.context.addApplicationListener(WS_APPLICATION_LISTENER);
this.context.addApplicationListener(WsContextListener.class.getName());
Tomcat.addServlet(this.context, "dispatcherServlet", new DispatcherServlet(wac)).setAsyncSupported(true);
this.context.addServletMapping("/", "dispatcherServlet");
for (Filter filter : filters) {