413568 Made AJP worker name generic

This commit is contained in:
Greg Wilkins 2013-08-08 12:05:24 +10:00
parent 95416bce76
commit a719418990
3 changed files with 1 additions and 118 deletions

View File

@ -548,31 +548,13 @@ public class MongoSessionIdManager extends AbstractSessionIdManager
synchronized (_sessionsIds)
{
_sessionsIds.remove(oldClusterId);//remove the old one from the list
/* ------------------------------------------------------------ */
// TODO not sure if this is correct
public String getClusterId(String nodeId)
{
int dot=nodeId.lastIndexOf('.');
return (dot>0)?nodeId.substring(0,dot):nodeId;
}
/* ------------------------------------------------------------ */
// TODO not sure if this is correct
public String getNodeId(String clusterId, HttpServletRequest request)
{
if (_workerName!=null)
return clusterId+'.'+_workerName;
return clusterId;
}
_sessionsIds.add(newClusterId); //add in the new session id to the list
//tell all contexts to update the id
Handler[] contexts = _server.getChildHandlersByClass(ContextHandler.class);
for (int i=0; contexts!=null && i<contexts.length; i++)
{
SessionHandler sessionHandler = (SessionHandler)((ContextHandler)contexts[i]).getChildHandlerByClass(SessionHandler.class);
SessionHandler sessionHandler = ((ContextHandler)contexts[i]).getChildHandlerByClass(SessionHandler.class);
if (sessionHandler != null)
{
SessionManager manager = sessionHandler.getSessionManager();

View File

@ -1,76 +0,0 @@
//
// ========================================================================
// Copyright (c) 1995-2013 Mort Bay Consulting Pty. Ltd.
// ------------------------------------------------------------------------
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v1.0
// and Apache License v2.0 which accompanies this distribution.
//
// The Eclipse Public License is available at
// http://www.eclipse.org/legal/epl-v10.html
//
// The Apache License v2.0 is available at
// http://www.opensource.org/licenses/apache2.0.php
//
// You may elect to redistribute this code under either of these licenses.
// ========================================================================
//
package org.eclipse.jetty.plus.servlet;
import org.eclipse.jetty.plus.annotation.InjectionCollection;
import org.eclipse.jetty.plus.annotation.LifeCycleCallbackCollection;
/**
* ServletHandler
*
*
*/
public class ServletHandler extends org.eclipse.jetty.servlet.ServletHandler
{
private InjectionCollection _injections = null;
private LifeCycleCallbackCollection _callbacks = null;
/**
* @return the callbacks
*/
public LifeCycleCallbackCollection getCallbacks()
{
return _callbacks;
}
/**
* @param callbacks the callbacks to set
*/
public void setCallbacks(LifeCycleCallbackCollection callbacks)
{
this._callbacks = callbacks;
}
/**
* @return the injections
*/
public InjectionCollection getInjections()
{
return _injections;
}
/**
* @param injections the injections to set
*/
public void setInjections(InjectionCollection injections)
{
this._injections = injections;
}
}

View File

@ -1,23 +0,0 @@
//
// ========================================================================
// Copyright (c) 1995-2013 Mort Bay Consulting Pty. Ltd.
// ------------------------------------------------------------------------
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v1.0
// and Apache License v2.0 which accompanies this distribution.
//
// The Eclipse Public License is available at
// http://www.eclipse.org/legal/epl-v10.html
//
// The Apache License v2.0 is available at
// http://www.opensource.org/licenses/apache2.0.php
//
// You may elect to redistribute this code under either of these licenses.
// ========================================================================
//
/**
* Jetty Plus : Servlet Handler for Limited Additional JEE support
*/
package org.eclipse.jetty.plus.servlet;