server.addConnector(connector);
server.start();
if (_port == 0) {
setPort(connector.getLocalPort());
}
final Context servletContext = context.getServletContext();
final WebApplicationContext springContext = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext);
final Map<String, ConnectionManager> cmMap = springContext.getBeansOfType(ConnectionManager.class);
if (cmMap.size() == 1) {
WebPushServletContextUtils.setConnectionManager(servletContext, cmMap.values().iterator().next());
}