This commit is contained in:
2024-11-30 19:03:49 +08:00
commit 1e6763c160
3806 changed files with 737676 additions and 0 deletions

View File

@@ -0,0 +1,265 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.catalina.ha.session;
import java.util.HashSet;
import java.util.Set;
import org.apache.catalina.DistributedManager;
import org.apache.catalina.LifecycleException;
import org.apache.catalina.LifecycleState;
import org.apache.catalina.Session;
import org.apache.catalina.ha.ClusterManager;
import org.apache.catalina.ha.ClusterMessage;
import org.apache.catalina.tribes.Channel;
import org.apache.catalina.tribes.tipis.AbstractReplicatedMap.MapOwner;
import org.apache.catalina.tribes.tipis.LazyReplicatedMap;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.res.StringManager;
/**
*@version 1.0
*/
public class BackupManager extends ClusterManagerBase
implements MapOwner, DistributedManager {
private final Log log = LogFactory.getLog(BackupManager.class); // must not be static
/**
* The string manager for this package.
*/
protected static final StringManager sm = StringManager.getManager(BackupManager.class);
protected static final long DEFAULT_REPL_TIMEOUT = 15000;//15 seconds
/**
* The name of this manager
*/
protected String name;
/**
* Flag for how this map sends messages.
*/
private int mapSendOptions = Channel.SEND_OPTIONS_SYNCHRONIZED_ACK|Channel.SEND_OPTIONS_USE_ACK;
/**
* Timeout for RPC messages.
*/
private long rpcTimeout = DEFAULT_REPL_TIMEOUT;
/**
* Flag for whether to terminate this map that failed to start.
*/
private boolean terminateOnStartFailure = false;
/**
* The timeout for a ping message in replication map.
*/
private long accessTimeout = 5000;
/**
* Constructor, just calls super()
*
*/
public BackupManager() {
super();
}
//******************************************************************************/
// ClusterManager Interface
//******************************************************************************/
@Override
public void messageDataReceived(ClusterMessage msg) {
}
@Override
public ClusterMessage requestCompleted(String sessionId) {
if (!getState().isAvailable()) return null;
LazyReplicatedMap<String,Session> map =
(LazyReplicatedMap<String,Session>)sessions;
map.replicate(sessionId,false);
return null;
}
//=========================================================================
// OVERRIDE THESE METHODS TO IMPLEMENT THE REPLICATION
//=========================================================================
@Override
public void objectMadePrimary(Object key, Object value) {
if (value instanceof DeltaSession) {
DeltaSession session = (DeltaSession)value;
synchronized (session) {
session.access();
session.setPrimarySession(true);
session.endAccess();
}
}
}
@Override
public Session createEmptySession() {
return new DeltaSession(this);
}
@Override
public String getName() {
return this.name;
}
/**
* Start this component and implement the requirements
* of {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
*
* Starts the cluster communication channel, this will connect with the
* other nodes in the cluster, and request the current session state to be
* transferred to this node.
*
* @exception LifecycleException if this component detects a fatal error
* that prevents this component from being used
*/
@Override
protected synchronized void startInternal() throws LifecycleException {
super.startInternal();
try {
if (cluster == null) throw new LifecycleException(sm.getString("backupManager.noCluster", getName()));
LazyReplicatedMap<String,Session> map = new LazyReplicatedMap<>(
this, cluster.getChannel(), rpcTimeout, getMapName(),
getClassLoaders(), terminateOnStartFailure);
map.setChannelSendOptions(mapSendOptions);
map.setAccessTimeout(accessTimeout);
this.sessions = map;
} catch ( Exception x ) {
log.error(sm.getString("backupManager.startUnable", getName()),x);
throw new LifecycleException(sm.getString("backupManager.startFailed", getName()),x);
}
setState(LifecycleState.STARTING);
}
public String getMapName() {
String name = cluster.getManagerName(getName(),this)+"-"+"map";
if ( log.isDebugEnabled() ) log.debug("Backup manager, Setting map name to:"+name);
return name;
}
/**
* Stop this component and implement the requirements
* of {@link org.apache.catalina.util.LifecycleBase#stopInternal()}.
*
* This will disconnect the cluster communication channel and stop the
* listener thread.
*
* @exception LifecycleException if this component detects a fatal error
* that prevents this component from being used
*/
@Override
protected synchronized void stopInternal() throws LifecycleException {
if (log.isDebugEnabled())
log.debug(sm.getString("backupManager.stopped", getName()));
setState(LifecycleState.STOPPING);
if (sessions instanceof LazyReplicatedMap) {
LazyReplicatedMap<String,Session> map =
(LazyReplicatedMap<String,Session>)sessions;
map.breakdown();
}
super.stopInternal();
}
@Override
public void setName(String name) {
this.name = name;
}
public void setMapSendOptions(int mapSendOptions) {
this.mapSendOptions = mapSendOptions;
}
public int getMapSendOptions() {
return mapSendOptions;
}
public void setRpcTimeout(long rpcTimeout) {
this.rpcTimeout = rpcTimeout;
}
public long getRpcTimeout() {
return rpcTimeout;
}
public void setTerminateOnStartFailure(boolean terminateOnStartFailure) {
this.terminateOnStartFailure = terminateOnStartFailure;
}
public boolean isTerminateOnStartFailure() {
return terminateOnStartFailure;
}
public long getAccessTimeout() {
return accessTimeout;
}
public void setAccessTimeout(long accessTimeout) {
this.accessTimeout = accessTimeout;
}
@Override
public String[] getInvalidatedSessions() {
return new String[0];
}
@Override
public ClusterManager cloneFromTemplate() {
BackupManager result = new BackupManager();
clone(result);
result.mapSendOptions = mapSendOptions;
result.rpcTimeout = rpcTimeout;
result.terminateOnStartFailure = terminateOnStartFailure;
result.accessTimeout = accessTimeout;
return result;
}
@Override
public int getActiveSessionsFull() {
LazyReplicatedMap<String,Session> map =
(LazyReplicatedMap<String,Session>)sessions;
return map.sizeFull();
}
@Override
public Set<String> getSessionIdsFull() {
Set<String> sessionIds = new HashSet<>();
LazyReplicatedMap<String,Session> map =
(LazyReplicatedMap<String,Session>)sessions;
for (String id : map.keySetFull()) {
sessionIds.add(id);
}
return sessionIds;
}
}

View File

@@ -0,0 +1,220 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.catalina.ha.session;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import org.apache.catalina.Cluster;
import org.apache.catalina.Context;
import org.apache.catalina.LifecycleException;
import org.apache.catalina.Loader;
import org.apache.catalina.SessionIdGenerator;
import org.apache.catalina.Valve;
import org.apache.catalina.ha.CatalinaCluster;
import org.apache.catalina.ha.ClusterManager;
import org.apache.catalina.ha.tcp.ReplicationValve;
import org.apache.catalina.session.ManagerBase;
import org.apache.catalina.tribes.io.ReplicationStream;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.collections.SynchronizedStack;
public abstract class ClusterManagerBase extends ManagerBase implements ClusterManager {
private final Log log = LogFactory.getLog(ClusterManagerBase.class); // must not be static
/**
* A reference to the cluster
*/
protected CatalinaCluster cluster = null;
/**
* Should listeners be notified?
*/
private boolean notifyListenersOnReplication = true;
/**
* cached replication valve cluster container!
*/
private volatile ReplicationValve replicationValve = null ;
/**
* send all actions of session attributes.
*/
private boolean recordAllActions = false;
private SynchronizedStack<DeltaRequest> deltaRequestPool = new SynchronizedStack<>();
protected SynchronizedStack<DeltaRequest> getDeltaRequestPool() {
return deltaRequestPool;
}
@Override
public CatalinaCluster getCluster() {
return cluster;
}
@Override
public void setCluster(CatalinaCluster cluster) {
this.cluster = cluster;
}
@Override
public boolean isNotifyListenersOnReplication() {
return notifyListenersOnReplication;
}
public void setNotifyListenersOnReplication(boolean notifyListenersOnReplication) {
this.notifyListenersOnReplication = notifyListenersOnReplication;
}
public boolean isRecordAllActions() {
return recordAllActions;
}
public void setRecordAllActions(boolean recordAllActions) {
this.recordAllActions = recordAllActions;
}
public static ClassLoader[] getClassLoaders(Context context) {
ClassLoader tccl = Thread.currentThread().getContextClassLoader();
Loader loader = context.getLoader();
ClassLoader classLoader = null;
if (loader != null) {
classLoader = loader.getClassLoader();
}
if (classLoader == null) {
classLoader = tccl;
}
if (classLoader == tccl) {
return new ClassLoader[] {classLoader};
} else {
return new ClassLoader[] {classLoader, tccl};
}
}
public ClassLoader[] getClassLoaders() {
return getClassLoaders(getContext());
}
@Override
public ReplicationStream getReplicationStream(byte[] data) throws IOException {
return getReplicationStream(data,0,data.length);
}
@Override
public ReplicationStream getReplicationStream(byte[] data, int offset, int length) throws IOException {
ByteArrayInputStream fis = new ByteArrayInputStream(data, offset, length);
return new ReplicationStream(fis, getClassLoaders());
}
// ---------------------------------------------------- persistence handler
/**
* {@link org.apache.catalina.Manager} implementations that also implement
* {@link ClusterManager} do not support local session persistence.
*/
@Override
public void load() {
// NOOP
}
/**
* {@link org.apache.catalina.Manager} implementations that also implement
* {@link ClusterManager} do not support local session persistence.
*/
@Override
public void unload() {
// NOOP
}
protected void clone(ClusterManagerBase copy) {
copy.setName("Clone-from-" + getName());
copy.setMaxActiveSessions(getMaxActiveSessions());
copy.setProcessExpiresFrequency(getProcessExpiresFrequency());
copy.setNotifyListenersOnReplication(isNotifyListenersOnReplication());
copy.setSessionAttributeNameFilter(getSessionAttributeNameFilter());
copy.setSessionAttributeValueClassNameFilter(getSessionAttributeValueClassNameFilter());
copy.setWarnOnSessionAttributeFilterFailure(getWarnOnSessionAttributeFilterFailure());
copy.setSecureRandomClass(getSecureRandomClass());
copy.setSecureRandomProvider(getSecureRandomProvider());
copy.setSecureRandomAlgorithm(getSecureRandomAlgorithm());
if (getSessionIdGenerator() != null) {
try {
SessionIdGenerator copyIdGenerator = sessionIdGeneratorClass.getConstructor().newInstance();
copyIdGenerator.setSessionIdLength(getSessionIdGenerator().getSessionIdLength());
copyIdGenerator.setJvmRoute(getSessionIdGenerator().getJvmRoute());
copy.setSessionIdGenerator(copyIdGenerator);
} catch (ReflectiveOperationException e) {
// Ignore
}
}
copy.setRecordAllActions(isRecordAllActions());
}
/**
* Register cross context session at replication valve thread local
* @param session cross context session
*/
protected void registerSessionAtReplicationValve(DeltaSession session) {
if(replicationValve == null) {
CatalinaCluster cluster = getCluster() ;
if(cluster != null) {
Valve[] valves = cluster.getValves();
if(valves != null && valves.length > 0) {
for(int i=0; replicationValve == null && i < valves.length ; i++ ){
if(valves[i] instanceof ReplicationValve) replicationValve =
(ReplicationValve)valves[i] ;
}//for
if(replicationValve == null && log.isDebugEnabled()) {
log.debug("no ReplicationValve found for CrossContext Support");
}//endif
}//end if
}//endif
}//end if
if(replicationValve != null) {
replicationValve.registerReplicationSession(session);
}
}
@Override
protected void startInternal() throws LifecycleException {
super.startInternal();
if (getCluster() == null) {
Cluster cluster = getContext().getCluster();
if (cluster instanceof CatalinaCluster) {
setCluster((CatalinaCluster)cluster);
}
}
if (cluster != null) cluster.registerManager(this);
}
@Override
protected void stopInternal() throws LifecycleException {
if (cluster != null) cluster.removeManager(this);
replicationValve = null;
super.stopInternal();
}
}

View File

@@ -0,0 +1,109 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.catalina.ha.session;
import java.util.Map;
import org.apache.catalina.ha.ClusterListener;
import org.apache.catalina.ha.ClusterManager;
import org.apache.catalina.ha.ClusterMessage;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.res.StringManager;
/**
* Receive replicated SessionMessage form other cluster node.
* @author Peter Rossbach
*/
public class ClusterSessionListener extends ClusterListener {
private static final Log log =
LogFactory.getLog(ClusterSessionListener.class);
private static final StringManager sm = StringManager.getManager(ClusterSessionListener.class);
//--Constructor---------------------------------------------
public ClusterSessionListener() {
// NO-OP
}
//--Logic---------------------------------------------------
/**
* Callback from the cluster, when a message is received, The cluster will
* broadcast it invoking the messageReceived on the receiver.
*
* @param myobj
* ClusterMessage - the message received from the cluster
*/
@Override
public void messageReceived(ClusterMessage myobj) {
if (myobj instanceof SessionMessage) {
SessionMessage msg = (SessionMessage) myobj;
String ctxname = msg.getContextName();
//check if the message is a EVT_GET_ALL_SESSIONS,
//if so, wait until we are fully started up
Map<String,ClusterManager> managers = cluster.getManagers() ;
if (ctxname == null) {
for (Map.Entry<String, ClusterManager> entry :
managers.entrySet()) {
if (entry.getValue() != null)
entry.getValue().messageDataReceived(msg);
else {
//this happens a lot before the system has started
// up
if (log.isDebugEnabled())
log.debug(sm.getString("clusterSessionListener.noManager", entry.getKey()));
}
}
} else {
ClusterManager mgr = managers.get(ctxname);
if (mgr != null) {
mgr.messageDataReceived(msg);
} else {
if (log.isWarnEnabled())
log.warn(sm.getString("clusterSessionListener.noManager", ctxname));
// A no context manager message is replied in order to avoid
// timeout of GET_ALL_SESSIONS sync phase.
if (msg.getEventType() == SessionMessage.EVT_GET_ALL_SESSIONS) {
SessionMessage replymsg = new SessionMessageImpl(ctxname,
SessionMessage.EVT_ALL_SESSION_NOCONTEXTMANAGER,
null, "NO-CONTEXT-MANAGER","NO-CONTEXT-MANAGER-" + ctxname);
cluster.send(replymsg, msg.getAddress());
}
}
}
}
}
/**
* Accept only SessionMessage
*
* @param msg
* ClusterMessage
* @return boolean - returns true to indicate that messageReceived should be
* invoked. If false is returned, the messageReceived method will
* not be invoked.
*/
@Override
public boolean accept(ClusterMessage msg) {
return msg instanceof SessionMessage;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,413 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.catalina.ha.session;
/**
* This class is used to track the series of actions that happens when
* a request is executed. These actions will then translate into invocations of methods
* on the actual session.
* This class is NOT thread safe. One DeltaRequest per session
* @version 1.0
*/
import java.io.ByteArrayOutputStream;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.security.Principal;
import java.util.LinkedList;
import org.apache.catalina.SessionListener;
import org.apache.catalina.realm.GenericPrincipal;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.res.StringManager;
public class DeltaRequest implements Externalizable {
public static final Log log = LogFactory.getLog(DeltaRequest.class);
/**
* The string manager for this package.
*/
protected static final StringManager sm = StringManager.getManager(DeltaRequest.class);
public static final int TYPE_ATTRIBUTE = 0;
public static final int TYPE_PRINCIPAL = 1;
public static final int TYPE_ISNEW = 2;
public static final int TYPE_MAXINTERVAL = 3;
public static final int TYPE_AUTHTYPE = 4;
public static final int TYPE_LISTENER = 5;
public static final int ACTION_SET = 0;
public static final int ACTION_REMOVE = 1;
public static final String NAME_PRINCIPAL = "__SET__PRINCIPAL__";
public static final String NAME_MAXINTERVAL = "__SET__MAXINTERVAL__";
public static final String NAME_ISNEW = "__SET__ISNEW__";
public static final String NAME_AUTHTYPE = "__SET__AUTHTYPE__";
public static final String NAME_LISTENER = "__SET__LISTENER__";
private String sessionId;
private LinkedList<AttributeInfo> actions = new LinkedList<>();
private final LinkedList<AttributeInfo> actionPool = new LinkedList<>();
private boolean recordAllActions = false;
public DeltaRequest() {
}
public DeltaRequest(String sessionId, boolean recordAllActions) {
this.recordAllActions=recordAllActions;
if(sessionId != null)
setSessionId(sessionId);
}
public void setAttribute(String name, Object value) {
int action = (value==null)?ACTION_REMOVE:ACTION_SET;
addAction(TYPE_ATTRIBUTE,action,name,value);
}
public void removeAttribute(String name) {
addAction(TYPE_ATTRIBUTE, ACTION_REMOVE, name, null);
}
public void setMaxInactiveInterval(int interval) {
addAction(TYPE_MAXINTERVAL, ACTION_SET, NAME_MAXINTERVAL, Integer.valueOf(interval));
}
/**
* Only support principals from type {@link GenericPrincipal GenericPrincipal}
* @param p Session principal
* @see GenericPrincipal
*/
public void setPrincipal(Principal p) {
int action = (p==null)?ACTION_REMOVE:ACTION_SET;
GenericPrincipal gp = null;
if (p != null) {
if (p instanceof GenericPrincipal) {
gp = (GenericPrincipal) p;
if(log.isDebugEnabled())
log.debug(sm.getString("deltaRequest.showPrincipal", p.getName() , getSessionId()));
} else
log.error(sm.getString("deltaRequest.wrongPrincipalClass",p.getClass().getName()));
}
addAction(TYPE_PRINCIPAL, action, NAME_PRINCIPAL, gp);
}
public void setNew(boolean n) {
int action = ACTION_SET;
addAction(TYPE_ISNEW,action,NAME_ISNEW,Boolean.valueOf(n));
}
public void setAuthType(String authType) {
int action = (authType==null)?ACTION_REMOVE:ACTION_SET;
addAction(TYPE_AUTHTYPE,action,NAME_AUTHTYPE, authType);
}
public void addSessionListener(SessionListener listener) {
addAction(TYPE_LISTENER, ACTION_SET, NAME_LISTENER ,listener);
}
public void removeSessionListener(SessionListener listener) {
addAction(TYPE_LISTENER, ACTION_REMOVE, NAME_LISTENER ,listener);
}
protected void addAction(int type,
int action,
String name,
Object value) {
AttributeInfo info = null;
if ( this.actionPool.size() > 0 ) {
try {
info = actionPool.removeFirst();
}catch ( Exception x ) {
log.error(sm.getString("deltaRequest.removeUnable"),x);
info = new AttributeInfo(type, action, name, value);
}
info.init(type,action,name,value);
} else {
info = new AttributeInfo(type, action, name, value);
}
//if we have already done something to this attribute, make sure
//we don't send multiple actions across the wire
if ( !recordAllActions) {
try {
actions.remove(info);
} catch (java.util.NoSuchElementException x) {
//do nothing, we wanted to remove it anyway
}
}
//add the action
actions.addLast(info);
}
public void execute(DeltaSession session, boolean notifyListeners) {
if ( !this.sessionId.equals( session.getId() ) )
throw new java.lang.IllegalArgumentException(sm.getString("deltaRequest.ssid.mismatch"));
session.access();
for ( int i=0; i<actions.size(); i++ ) {
AttributeInfo info = actions.get(i);
switch ( info.getType() ) {
case TYPE_ATTRIBUTE:
if ( info.getAction() == ACTION_SET ) {
if ( log.isTraceEnabled() ) log.trace("Session.setAttribute('"+info.getName()+"', '"+info.getValue()+"')");
session.setAttribute(info.getName(), info.getValue(),notifyListeners,false);
} else {
if ( log.isTraceEnabled() ) log.trace("Session.removeAttribute('"+info.getName()+"')");
session.removeAttribute(info.getName(),notifyListeners,false);
}
break;
case TYPE_ISNEW:
if ( log.isTraceEnabled() ) log.trace("Session.setNew('"+info.getValue()+"')");
session.setNew(((Boolean)info.getValue()).booleanValue(),false);
break;
case TYPE_MAXINTERVAL:
if ( log.isTraceEnabled() ) log.trace("Session.setMaxInactiveInterval('"+info.getValue()+"')");
session.setMaxInactiveInterval(((Integer)info.getValue()).intValue(),false);
break;
case TYPE_PRINCIPAL:
Principal p = null;
if (info.getAction() == ACTION_SET) {
p = (Principal) info.getValue();
}
session.setPrincipal(p,false);
break;
case TYPE_AUTHTYPE:
String authType = null;
if ( info.getAction() == ACTION_SET ) {
authType = (String)info.getValue();
}
session.setAuthType(authType,false);
break;
case TYPE_LISTENER:
SessionListener listener = (SessionListener) info.getValue();
if (info.getAction() == ACTION_SET) {
session.addSessionListener(listener,false);
} else {
session.removeSessionListener(listener,false);
}
break;
default :
throw new java.lang.IllegalArgumentException(sm.getString("deltaRequest.invalidAttributeInfoType", info));
}//switch
}//for
session.endAccess();
reset();
}
public void reset() {
while ( actions.size() > 0 ) {
try {
AttributeInfo info = actions.removeFirst();
info.recycle();
actionPool.addLast(info);
}catch ( Exception x ) {
log.error(sm.getString("deltaRequest.removeUnable"),x);
}
}
actions.clear();
}
public String getSessionId() {
return sessionId;
}
public void setSessionId(String sessionId) {
this.sessionId = sessionId;
if ( sessionId == null ) {
new Exception(sm.getString("deltaRequest.ssid.null")).fillInStackTrace().printStackTrace();
}
}
public int getSize() {
return actions.size();
}
public void clear() {
actions.clear();
actionPool.clear();
}
@Override
public void readExternal(java.io.ObjectInput in) throws IOException,ClassNotFoundException {
//sessionId - String
//recordAll - boolean
//size - int
//AttributeInfo - in an array
reset();
sessionId = in.readUTF();
recordAllActions = in.readBoolean();
int cnt = in.readInt();
if (actions == null)
actions = new LinkedList<>();
else
actions.clear();
for (int i = 0; i < cnt; i++) {
AttributeInfo info = null;
if (this.actionPool.size() > 0) {
try {
info = actionPool.removeFirst();
} catch ( Exception x ) {
log.error(sm.getString("deltaRequest.removeUnable"),x);
info = new AttributeInfo();
}
}
else {
info = new AttributeInfo();
}
info.readExternal(in);
actions.addLast(info);
}//for
}
@Override
public void writeExternal(java.io.ObjectOutput out ) throws java.io.IOException {
//sessionId - String
//recordAll - boolean
//size - int
//AttributeInfo - in an array
out.writeUTF(getSessionId());
out.writeBoolean(recordAllActions);
out.writeInt(getSize());
for ( int i=0; i<getSize(); i++ ) {
AttributeInfo info = actions.get(i);
info.writeExternal(out);
}
}
/**
* serialize DeltaRequest
* @see DeltaRequest#writeExternal(java.io.ObjectOutput)
*
* @return serialized delta request
* @throws IOException IO error serializing
*/
protected byte[] serialize() throws IOException {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(bos);
writeExternal(oos);
oos.flush();
oos.close();
return bos.toByteArray();
}
private static class AttributeInfo implements java.io.Externalizable {
private String name = null;
private Object value = null;
private int action;
private int type;
public AttributeInfo() {
this(-1, -1, null, null);
}
public AttributeInfo(int type,
int action,
String name,
Object value) {
super();
init(type,action,name,value);
}
public void init(int type,
int action,
String name,
Object value) {
this.name = name;
this.value = value;
this.action = action;
this.type = type;
}
public int getType() {
return type;
}
public int getAction() {
return action;
}
public Object getValue() {
return value;
}
@Override
public int hashCode() {
return name.hashCode();
}
public String getName() {
return name;
}
public void recycle() {
name = null;
value = null;
type=-1;
action=-1;
}
@Override
public boolean equals(Object o) {
if ( ! (o instanceof AttributeInfo ) ) return false;
AttributeInfo other = (AttributeInfo)o;
return other.getName().equals(this.getName());
}
@Override
public void readExternal(java.io.ObjectInput in ) throws IOException,ClassNotFoundException {
//type - int
//action - int
//name - String
//hasvalue - boolean
//value - object
type = in.readInt();
action = in.readInt();
name = in.readUTF();
boolean hasValue = in.readBoolean();
if ( hasValue ) value = in.readObject();
}
@Override
public void writeExternal(java.io.ObjectOutput out) throws IOException {
//type - int
//action - int
//name - String
//hasvalue - boolean
//value - object
out.writeInt(getType());
out.writeInt(getAction());
out.writeUTF(getName());
out.writeBoolean(getValue()!=null);
if (getValue()!=null) out.writeObject(getValue());
}
@Override
public String toString() {
StringBuilder buf = new StringBuilder("AttributeInfo[type=");
buf.append(getType()).append(", action=").append(getAction());
buf.append(", name=").append(getName()).append(", value=").append(getValue());
buf.append(", addr=").append(super.toString()).append("]");
return buf.toString();
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,408 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.catalina.ha.session;
import java.io.IOException;
import javax.servlet.ServletException;
import org.apache.catalina.Cluster;
import org.apache.catalina.LifecycleException;
import org.apache.catalina.Manager;
import org.apache.catalina.Session;
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
import org.apache.catalina.ha.CatalinaCluster;
import org.apache.catalina.ha.ClusterManager;
import org.apache.catalina.ha.ClusterValve;
import org.apache.catalina.session.ManagerBase;
import org.apache.catalina.session.PersistentManager;
import org.apache.catalina.valves.ValveBase;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.res.StringManager;
/**
* Valve to handle Tomcat jvmRoute takeover using mod_jk module after node
* failure. After a node crashes, subsequent requests go to other cluster nodes.
* That incurs a drop in performance. When this Valve is enabled on a backup
* node and sees a request, which was intended for another (thus failed) node,
* it will rewrite the cookie jsessionid information to use the route to this
* backup cluster node, that answered the request. After the response is
* delivered to the client, all subsequent client requests will go directly to
* the backup node. The change of sessionid is also sent to all other cluster
* nodes. After all that, the session stickiness will work directly to the
* backup node and the traffic will not go back to the failed node after it is
* restarted!
*
* <p>
* Add this Valve to your cluster definition at conf/server.xml .
*
* <pre>
* &lt;Cluster&gt;
* &lt;Valve className=&quot;org.apache.catalina.ha.session.JvmRouteBinderValve&quot; /&gt;
* &lt;/Cluster&gt;
* </pre>
*
* <em>A Trick:</em><br>
* You can enable this mod_jk turnover mode via JMX before you drop a node to
* all backup nodes! Set enable true on all JvmRouteBinderValve backups, disable
* worker at mod_jk and then drop node and restart it! Then enable mod_jk worker
* and disable JvmRouteBinderValves again. This use case means that only
* requested sessions are migrated.
*
* @author Peter Rossbach
*/
public class JvmRouteBinderValve extends ValveBase implements ClusterValve {
/*--Static Variables----------------------------------------*/
public static final Log log = LogFactory.getLog(JvmRouteBinderValve.class);
//------------------------------------------------------ Constructor
public JvmRouteBinderValve() {
super(true);
}
/*--Instance Variables--------------------------------------*/
/**
* the cluster
*/
protected CatalinaCluster cluster;
/**
* The string manager for this package.
*/
protected static final StringManager sm = StringManager.getManager(JvmRouteBinderValve.class);
/**
* enabled this component
*/
protected boolean enabled = true;
/**
* number of session that no at this tomcat instance hosted
*/
protected long numberOfSessions = 0;
protected String sessionIdAttribute = "org.apache.catalina.ha.session.JvmRouteOrignalSessionID";
/*--Logic---------------------------------------------------*/
/**
* set session id attribute to failed node for request.
*
* @return Returns the sessionIdAttribute.
*/
public String getSessionIdAttribute() {
return sessionIdAttribute;
}
/**
* get name of failed request session attribute
*
* @param sessionIdAttribute
* The sessionIdAttribute to set.
*/
public void setSessionIdAttribute(String sessionIdAttribute) {
this.sessionIdAttribute = sessionIdAttribute;
}
/**
* @return Returns the number of migrated sessions.
*/
public long getNumberOfSessions() {
return numberOfSessions;
}
/**
* @return Returns the enabled.
*/
public boolean getEnabled() {
return enabled;
}
/**
* @param enabled
* The enabled to set.
*/
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
/**
* Detect possible the JVMRoute change at cluster backup node..
*
* @param request
* tomcat request being processed
* @param response
* tomcat response being processed
* @exception IOException
* if an input/output error has occurred
* @exception ServletException
* if a servlet error has occurred
*/
@Override
public void invoke(Request request, Response response) throws IOException,
ServletException {
if (getEnabled() &&
request.getContext() != null &&
request.getContext().getDistributable() &&
!request.isAsyncDispatching()) {
// valve cluster can access manager - other cluster handle turnover
// at host level - hopefully!
Manager manager = request.getContext().getManager();
if (manager != null && (
(manager instanceof ClusterManager
&& getCluster() != null
&& getCluster().getManager(((ClusterManager)manager).getName()) != null)
||
(manager instanceof PersistentManager))) {
handlePossibleTurnover(request);
}
}
// Pass this request on to the next valve in our pipeline
getNext().invoke(request, response);
}
/**
* handle possible session turn over.
*
* @see JvmRouteBinderValve#handleJvmRoute(Request, String, String)
* @param request current request
*/
protected void handlePossibleTurnover(Request request) {
String sessionID = request.getRequestedSessionId() ;
if (sessionID != null) {
long t1 = System.currentTimeMillis();
String jvmRoute = getLocalJvmRoute(request);
if (jvmRoute == null) {
if (log.isDebugEnabled()) {
log.debug(sm.getString("jvmRoute.missingJvmRouteAttribute"));
}
return;
}
handleJvmRoute( request, sessionID, jvmRoute);
if (log.isDebugEnabled()) {
long t2 = System.currentTimeMillis();
long time = t2 - t1;
log.debug(sm.getString("jvmRoute.turnoverInfo", Long.valueOf(time)));
}
}
}
/**
* get jvmroute from engine
*
* @param request current request
* @return return jvmRoute from ManagerBase or null
*/
protected String getLocalJvmRoute(Request request) {
Manager manager = getManager(request);
if(manager instanceof ManagerBase) {
return ((ManagerBase) manager).getJvmRoute();
}
return null ;
}
/**
* get ClusterManager
*
* @param request current request
* @return manager or null
*/
protected Manager getManager(Request request) {
Manager manager = request.getContext().getManager();
if (log.isDebugEnabled()) {
if(manager != null) {
log.debug(sm.getString("jvmRoute.foundManager", manager, request.getContext().getName()));
} else {
log.debug(sm.getString("jvmRoute.notFoundManager", request.getContext().getName()));
}
}
return manager;
}
/**
* @return Returns the cluster.
*/
@Override
public CatalinaCluster getCluster() {
return cluster;
}
/**
* @param cluster The cluster to set.
*/
@Override
public void setCluster(CatalinaCluster cluster) {
this.cluster = cluster;
}
/**
* Handle jvmRoute stickiness after tomcat instance failed. After this
* correction a new Cookie send to client with new jvmRoute and the
* SessionID change propagate to the other cluster nodes.
*
* @param request current request
* @param sessionId
* request SessionID from Cookie
* @param localJvmRoute
* local jvmRoute
*/
protected void handleJvmRoute(
Request request, String sessionId, String localJvmRoute) {
// get requested jvmRoute.
String requestJvmRoute = null;
int index = sessionId.indexOf('.');
if (index > 0) {
requestJvmRoute = sessionId
.substring(index + 1, sessionId.length());
}
if (requestJvmRoute != null && !requestJvmRoute.equals(localJvmRoute)) {
if (log.isDebugEnabled()) {
log.debug(sm.getString("jvmRoute.failover", requestJvmRoute,
localJvmRoute, sessionId));
}
Session catalinaSession = null;
try {
catalinaSession = getManager(request).findSession(sessionId);
} catch (IOException e) {
// Hups!
}
String id = sessionId.substring(0, index);
String newSessionID = id + "." + localJvmRoute;
// OK - turnover the session and inform other cluster nodes
if (catalinaSession != null) {
changeSessionID(request, sessionId, newSessionID,
catalinaSession);
numberOfSessions++;
} else {
try {
catalinaSession = getManager(request).findSession(newSessionID);
} catch (IOException e) {
// Hups!
}
if (catalinaSession != null) {
// session is rewrite at other request, rewrite this also
changeRequestSessionID(request, sessionId, newSessionID);
} else {
if (log.isDebugEnabled()) {
log.debug(sm.getString("jvmRoute.cannotFindSession",sessionId));
}
}
}
}
}
/**
* change session id and send to all cluster nodes
*
* @param request current request
* @param sessionId
* original session id
* @param newSessionID
* new session id for node migration
* @param catalinaSession
* current session with original session id
*/
protected void changeSessionID(Request request, String sessionId,
String newSessionID, Session catalinaSession) {
fireLifecycleEvent("Before session migration", catalinaSession);
catalinaSession.getManager().changeSessionId(catalinaSession, newSessionID);
changeRequestSessionID(request, sessionId, newSessionID);
fireLifecycleEvent("After session migration", catalinaSession);
if (log.isDebugEnabled()) {
log.debug(sm.getString("jvmRoute.changeSession", sessionId,
newSessionID));
}
}
/**
* Change Request Session id
* @param request current request
* @param sessionId
* original session id
* @param newSessionID
* new session id for node migration
*/
protected void changeRequestSessionID(Request request, String sessionId, String newSessionID) {
request.changeSessionId(newSessionID);
// set original sessionid at request, to allow application detect the
// change
if (sessionIdAttribute != null && !"".equals(sessionIdAttribute)) {
if (log.isDebugEnabled()) {
log.debug(sm.getString("jvmRoute.set.orignalsessionid",sessionIdAttribute,sessionId));
}
request.setAttribute(sessionIdAttribute, sessionId);
}
}
/**
* Start this component and implement the requirements
* of {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
*
* @exception LifecycleException if this component detects a fatal error
* that prevents this component from being used
*/
@Override
protected synchronized void startInternal() throws LifecycleException {
if (cluster == null) {
Cluster containerCluster = getContainer().getCluster();
if (containerCluster instanceof CatalinaCluster) {
setCluster((CatalinaCluster)containerCluster);
}
}
if (log.isInfoEnabled()) {
log.info(sm.getString("jvmRoute.valve.started"));
if (cluster == null) {
log.info(sm.getString("jvmRoute.noCluster"));
}
}
super.startInternal();
}
/**
* Stop this component and implement the requirements
* of {@link org.apache.catalina.util.LifecycleBase#stopInternal()}.
*
* @exception LifecycleException if this component detects a fatal error
* that prevents this component from being used
*/
@Override
protected synchronized void stopInternal() throws LifecycleException {
super.stopInternal();
cluster = null;
numberOfSessions = 0;
if (log.isInfoEnabled()) {
log.info(sm.getString("jvmRoute.valve.stopped"));
}
}
}

View File

@@ -0,0 +1,90 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
backupManager.noCluster=no cluster associated with this context: [{0}]
backupManager.startFailed=Failed to start BackupManager: [{0}]
backupManager.startUnable=Unable to start BackupManager: [{0}]
backupManager.stopped=Manager [{0}] is stopping
clusterSessionListener.noManager=Context manager doesn''t exist:[{0}]
deltaManager.createMessage.access=Manager [{0}]: create session access message for session [{1}]
deltaManager.createMessage.accessChangePrimary=Manager [{0}]: create change primary node message for session [{1}]
deltaManager.createMessage.allSessionData=Manager [{0}] sent all session data.
deltaManager.createMessage.allSessionTransfered=Manager [{0}] sent all session data transferred
deltaManager.createMessage.delta=Manager [{0}]: create delta request message for session [{1}]
deltaManager.createMessage.expire=Manager [{0}]: create session expire message for session [{1}]
deltaManager.createMessage.unableCreateDeltaRequest=Unable to serialize delta request for sessionid [{0}]
deltaManager.createSession.newSession=Created a new DeltaSession with Id [{0}] Total count=[{1}]
deltaManager.dropMessage=Manager [{0}]: Drop message [{1}] inside GET_ALL_SESSIONS sync phase start date [{2}] message date [{3}]
deltaManager.expireSessions=Manager [{0}] expiring sessions upon shutdown
deltaManager.foundMasterMember=Found for context [{0}] the replication master member [{1}]
deltaManager.loading.cnfe=ClassNotFoundException while loading persisted sessions: [{0}]
deltaManager.loading.existing.session=overload existing session [{0}]
deltaManager.loading.ioe=IOException while loading persisted sessions: [{0}]
deltaManager.managerLoad=Exception loading sessions from persistent storage
deltaManager.noCluster=Starting... no cluster associated with this context: [{0}]
deltaManager.noContextManager=Manager [{0}]: In reply to the ''Get all session data'' message sent at [{1}], a ''No matching context manager'' message was received after [{2}] ms.
deltaManager.noMasterMember=Starting... with no other member for context [{0}] at domain [{1}]
deltaManager.noMembers=Manager [{0}]: skipping state transfer. No members active in cluster group.
deltaManager.noSessionState=Manager [{0}]: No session state sent at [{1}] received, timing out after [{2}] ms.
deltaManager.receiveMessage.accessed=Manager [{0}]: received session accessed message for session [{1}]
deltaManager.receiveMessage.allSessionDataAfter=Manager [{0}]: all session state deserialized
deltaManager.receiveMessage.allSessionDataBegin=Manager [{0}]: received all session state data
deltaManager.receiveMessage.createNewSession=Manager [{0}]: received session created message for session [{1}]
deltaManager.receiveMessage.delta=Manager [{0}]: received session delta message for session [{1}]
deltaManager.receiveMessage.delta.unknown=Manager [{0}]: received session delta for unknown session [{1}]
deltaManager.receiveMessage.error=Manager [{0}]: Unable to receive message through TCP channel
deltaManager.receiveMessage.eventType=Manager [{0}]: Received SessionMessage of type=[{1}] from [{2}]
deltaManager.receiveMessage.expired=Manager [{0}]: received session expired message for session [{1}]
deltaManager.receiveMessage.noContextManager=Manager [{0}] received from node [{1}:{2}] no context manager.
deltaManager.receiveMessage.transfercomplete=Manager [{0}] received from node [{1}:{2}] session state transfered.
deltaManager.receiveMessage.unloadingAfter=Manager [{0}]: unloading sessions complete
deltaManager.receiveMessage.unloadingBegin=Manager [{0}]: start unloading sessions
deltaManager.registerCluster=Register manager [{0}] to cluster element [{1}] with name [{2}]
deltaManager.sendMessage.newSession=Manager [{0}] send new session [{1}]
deltaManager.sessionReceived=Manager [{0}]; session state sent at [{1}] received in [{2}] ms.
deltaManager.startClustering=Starting clustering manager at [{0}]
deltaManager.stopped=Manager [{0}] is stopping
deltaManager.unableSerializeSessionID=Unable to serialize sessionID [{0}]
deltaManager.unloading.ioe=IOException while saving persisted sessions: [{0}]
deltaManager.waitForSessionState=Manager [{0}], requesting session state from [{1}]. This operation will timeout if no session state has been received within [{2}] seconds.
deltaRequest.invalidAttributeInfoType=Invalid attribute info type=[{0}]
deltaRequest.removeUnable=Unable to remove element:
deltaRequest.showPrincipal=Principal [{0}] is set to session [{1}]
deltaRequest.ssid.mismatch=Session id mismatch, not executing the delta request
deltaRequest.ssid.null=Session Id is null for setSessionId
deltaRequest.wrongPrincipalClass=ClusterManager only support GenericPrincipal. Your realm used principal class [{0}].
deltaSession.notifying=Notifying cluster of session expiration: primary=[{0}], sessionId [{1}]
deltaSession.readSession=readObject() loading session [{0}]
deltaSession.writeSession=writeObject() storing session [{0}]
jvmRoute.cannotFindSession=Cannot find session [{0}]
jvmRoute.changeSession=Changed session from [{0}] to [{1}]
jvmRoute.failover=Detected a failover with different jvmRoute - orginal route: [{0}] new one: [{1}] at session id [{2}]
jvmRoute.foundManager=Found Cluster Manager [{0}] at [{1}]
jvmRoute.missingJvmRouteAttribute=No engine jvmRoute attribute configured!
jvmRoute.noCluster=The JvmRouterBinderValve is configured, but clustering is not being used. Fail over will still work, providing a PersistentManager is used.
jvmRoute.notFoundManager=Not found Cluster Manager at [{0}]
jvmRoute.set.orignalsessionid=Set Orginal Session id at request attribute [{0}] value: [{1}]
jvmRoute.turnoverInfo=Turnover Check time [{0}] msec
jvmRoute.valve.started=JvmRouteBinderValve started
jvmRoute.valve.stopped=JvmRouteBinderValve stopped
standardSession.notSerializable=Cannot serialize session attribute [{0}] for session [{1}]
standardSession.removeAttribute.ise=removeAttribute: Session already invalidated
standardSession.setAttribute.namenull=setAttribute: name parameter cannot be null

View File

@@ -0,0 +1,26 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
deltaManager.foundMasterMember=Für den Kontext [{0}] wurde der Replikationsmaster [{1}] gefunden
deltaManager.noContextManager=Manager [{0}]: Als Antwort auf eine um [{1}] gesendete "Hole alle Sitzungsdaten"-Nachricht, wurde nach [{2}] ms eine "Kein passender Context-Manager"-Nachricht empfangen.
deltaManager.receiveMessage.allSessionDataBegin=Manager [{0}]: alle Sitzungsdaten empfangen
deltaManager.receiveMessage.delta.unknown=Manager [{0}]: Habe Session-Delta für unbekannte Session [{1}] empfangen
deltaManager.receiveMessage.unloadingBegin=Manager [{0}]: Beginne die Sessions zu entladen
deltaManager.unloading.ioe=IOExceptio während des Speichers der Persisted Sessions: [{0}]
deltaRequest.removeUnable=Kann Element nicht entfernen:
deltaRequest.wrongPrincipalClass=Der ClusterManager unterstützt nur GenericPrincipal. Ihr Realm benutzt die Principal Klasse [{0}].
jvmRoute.valve.started=JvmRouteBinderValve gestartet

View File

@@ -0,0 +1,81 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
backupManager.startUnable=Imposible de iniciar BackupManager: [{0}]\n
deltaManager.createMessage.access=Gestor [{0}]: creado mensaje de sesión [{1}] acceso.
deltaManager.createMessage.accessChangePrimary=Gestor [{0}]: creado mensaje de sesión [{1}] acceso para cambiar el primario.
deltaManager.createMessage.allSessionData=Gestor [{0}] envía todos los datos de sesión.
deltaManager.createMessage.allSessionTransfered=Gestor [{0}] envía todos los datos de sesión transferidos
deltaManager.createMessage.delta=Gestor [{0}]: crea mensaje de sesión [{1}] de requerimiento delta.
deltaManager.createMessage.expire=Gestor [{0}]: crea mensaje de sesión [{1}] de expiración.
deltaManager.createMessage.unableCreateDeltaRequest=No puedo serializar requerimiento delta para la id de sesión [{0}]
deltaManager.createSession.newSession=Creada una DeltaSession con Id [{0}] Total contador=[{1}]
deltaManager.dropMessage=Gestor [{0}]: Quita mensaje [{1}] dentro de fase sincronizada GET_ALL_SESSIONS fecha inicio [{2}] fecha mensaje [{3}]
deltaManager.expireSessions=Gestor [{0}] expirando sesiones al apagar
deltaManager.foundMasterMember=Hallado para contexto [{0}] el miembro maestro de réplica [{1}]
deltaManager.loading.cnfe=ClassNotFoundException al cargar sesiones persistentes: [{0}]
deltaManager.loading.existing.session=sobrecarga en sesión existente [{0}]
deltaManager.loading.ioe=IOException al cargar sesiones persistentes: [{0}]
deltaManager.managerLoad=Excepción cargando sesiones desde almacenaje persistente
deltaManager.noCluster=Arrancando... no hay clúster asociado con este contexto: [{0}]
deltaManager.noContextManager=Manejador [{0}]: En respuesta al mensaje ''Tomar todos los datos de sesión (Get all session data)'' enviado a [{1}], recibión el mensaje ''El manejador no machea con ningún contexto (No matching context manager)'' luego de [{2}] ms.\n
deltaManager.noMasterMember=Arrancando... sin otro miembro para el contexto [{0}] en dominio [{1}]
deltaManager.noMembers=Gestor [{0}]: saltando estado de transferencia. No hay miembros activos en grupo de clúster.
deltaManager.noSessionState=Gestor [{0}]: No se ha recibido estado de sesión a las [{1}], agotando tiempo tras [{2}] ms.
deltaManager.receiveMessage.accessed=Gestor [{0}]: accedida sesión [{1}] recibida.
deltaManager.receiveMessage.allSessionDataAfter=Gestor [{0}]: estado de sesión deserializado
deltaManager.receiveMessage.allSessionDataBegin=Gestor [{0}]: recibidos datos de estado de sesión
deltaManager.receiveMessage.createNewSession=Gestor [{0}]: creada sesión [{1}] recibida.
deltaManager.receiveMessage.delta=Gestor [{0}]: delta sesión [{1}] recibida.
deltaManager.receiveMessage.delta.unknown=Manejador [{0}]: recibió una diferencia de sesión para una sesión desconocida [{1}]
deltaManager.receiveMessage.error=Gestor [{0}]: No puedo recibir mensaje a través del canal TCP
deltaManager.receiveMessage.eventType=Gestor [{0}]: recibido SessionMessage de tipo=[{1}] desde [{2}]
deltaManager.receiveMessage.expired=Gestor [{0}]: expirada sesión [{1}] recibida.
deltaManager.receiveMessage.transfercomplete=Gestor [{0}] recibido desde nodo [{1}:{2}] estado de sesión transferido.
deltaManager.receiveMessage.unloadingAfter=Gestor [{0}]: completada la descarga de sesiones
deltaManager.receiveMessage.unloadingBegin=Gestor [{0}]: iniciada descarga de sesiones
deltaManager.registerCluster=Registrar gestor [{0}] a elemento de clúster [{1}] con nombre [{2}]
deltaManager.sendMessage.newSession=El gestor [{0}] envía nueva sesión [{1}]
deltaManager.sessionReceived=Gestor [{0}]; estado de sesión enviado a las [{1}] recibido en [{2}] ms.
deltaManager.startClustering=Iniciando gestor de clúster a las [{0}]
deltaManager.stopped=El gestor [{0}] se está parando
deltaManager.unableSerializeSessionID=No puedo seriallizar la ID de sesión [{0}]
deltaManager.unloading.ioe=IOException al grabar sesiones persistentes: [{0}]
deltaManager.waitForSessionState=Gestor [{0}], requiriendo estado de sesión desde [{1}]. Esta operación se agotará si no se recibe estado de sesión dentro de [{2}] segundos.
deltaRequest.removeUnable=Imposible eliminar elemento:
deltaRequest.showPrincipal=El Principal [{0}] está puesto a sesión [{1}]
deltaRequest.wrongPrincipalClass=DeltaManager sólo soporta GenericPrincipal. Tu reino utilizó clase principal [{0}].
deltaSession.notifying=Notificando clúster de expiración primaria=[{0}] sessionId [{1}]
deltaSession.readSession=readObject() cargando sesión [{0}]
deltaSession.writeSession=writeObject() guardando sesión [{0}]
jvmRoute.cannotFindSession=No puedo hallar sesión [{0}]
jvmRoute.changeSession=Cambiada sesión desde [{0}] a [{1}]
jvmRoute.failover=Detectada una caída con diferente jvmRoute - ruta original: [{0}] nueva: [{1}] en id de sesión [{2}]
jvmRoute.foundManager=Hallado Clúster DeltaManager [{0}] en [{1}]
jvmRoute.missingJvmRouteAttribute=¡No se ha configurado atributo de motor jvmRoute!
jvmRoute.noCluster=La válvula JvmRouterBinderValve se encuentra configurada, pero no se usa el clúster. Aún funcionará la tolerancia a fallos, siempre que se esté usando PersistentManager.
jvmRoute.notFoundManager=No hallado Clúster DeltaManager [{0}] en [{1}]
jvmRoute.set.orignalsessionid=Puesta id Orginal de Sesión en atributo de requerimiento [{0}] valor: [{1}]
jvmRoute.turnoverInfo=Ajustado tiempo de Chequeo a [{0}] mseg
jvmRoute.valve.started=JvmRouteBinderValve arrancada
jvmRoute.valve.stopped=JvmRouteBinderValve parada
standardSession.notSerializable=No puedo serializar atributo de sesión [{0}] para sesión [{1}]
standardSession.removeAttribute.ise=removeAttribute: Sesión ya invalidada
standardSession.setAttribute.namenull=setAttribute: parámetro de nombre no puede ser nulo

View File

@@ -0,0 +1,90 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
backupManager.noCluster=pas de groupe (cluster) associé à ce contexte: [{0}]
backupManager.startFailed=Impossible de démarrer le BackupManager: [{0}]
backupManager.startUnable=Impossible de démarrer le BackupManager: [{0}]
backupManager.stopped=Le gestionnaire de session [{0}] s''est arrêté
clusterSessionListener.noManager=Le gestionnaire de session du contexte n''existe pas: [{0}]
deltaManager.createMessage.access=Gestionnaire de session [{0}]: création du message de session [{1}] d''accès
deltaManager.createMessage.accessChangePrimary=Gestionnaire de session [{0}] : création du message de session [{1}] accès pour changer le primaire
deltaManager.createMessage.allSessionData=Gestionnaire de session [{0}] envoyé toutes les données de session
deltaManager.createMessage.allSessionTransfered=Gestionnaire de session [{0}] envoi du message signalant le transfert de toutes les données de session
deltaManager.createMessage.delta=Gestionnaire de session [{0}]: création du message [{0}] de requête delta
deltaManager.createMessage.expire=Gestionnaire de session [{0}]: création du message [{1}] d''expiration de session
deltaManager.createMessage.unableCreateDeltaRequest=Impossible de sérialiser la requête delta pour l''id de session [{0}]
deltaManager.createSession.newSession=Crée une DeltaSession avec Id [{0}] Nombre total=[{1}]
deltaManager.dropMessage=Gestionnaire de session [{0}] : Abandon du message [{1}] dans GET_ALL_SESSIONS début de la phase de sync [{2}] date du message [{3}]
deltaManager.expireSessions=Gestionnaire de session [{0}] expiration des sessions lors de l''arrêt
deltaManager.foundMasterMember=Le membre maître [{1}] a été trouvé pour la réplication du contexte [{0}]
deltaManager.loading.cnfe=Exception ClassNotFoundException lors du chargement des sessions persistantes : [{0}]
deltaManager.loading.existing.session=la session existante [{0}] est surchargée
deltaManager.loading.ioe=IOException lors du chargement des session persistées: [{0}]
deltaManager.managerLoad=Exception lors du chargement des sessions depuis le stockage persistant
deltaManager.noCluster=Démarrage, pas de cluster associé à ce contexte [{0}]
deltaManager.noContextManager=Gestionnaire de session [{0}]: En réponse à l''envoi d''un message demandant toutes les données des sessions à [{0}], un message indiquant l''absence d''un gestionnaire de sessions correspondant à été reçu au bout de [{2}] ms
deltaManager.noMasterMember=Démarrage sans autre membre pour le contexte [{0}] du domaine [{1}]
deltaManager.noMembers=Gestionnaire de session [{0}] : pas de transfert d''état, il n''y a pas de membres actifs dans le cluster
deltaManager.noSessionState=Gestionnaire de session [{0}] : pas de statut de session envoyé à [{1}] reçu, délai d''attente maximum de [{2}] ms.
deltaManager.receiveMessage.accessed=Gestionnaire de session [{0}] : reçu un accès à la session [{1}]
deltaManager.receiveMessage.allSessionDataAfter=Gestionnaire de session [{0}] : l''état de la session a été désérialisé
deltaManager.receiveMessage.allSessionDataBegin=Gestionnaire de session [{0}] : : reçu les données d''état des sessions
deltaManager.receiveMessage.createNewSession=Gestionnaire de session [{0}] : reçu la création de la session [{1}]
deltaManager.receiveMessage.delta=Gestionnaire de session [{0}] : reçu le delta de session [{1}]
deltaManager.receiveMessage.delta.unknown=Gestionnaire de session [{0}] : reçu un delta pour une session inconnue [{1}]
deltaManager.receiveMessage.error=Gestionnaire de session [{0}] : impossible de recevoir un message par le canal TCP
deltaManager.receiveMessage.eventType=Gestionnaire de session [{0}] : recu un SessionMessage de type=[{1}] de [{2}]
deltaManager.receiveMessage.expired=Gestionnaire de session [{0}] : reçu l''expiration de la session [{1}]
deltaManager.receiveMessage.noContextManager=Gestionnaire de session [{0}] a reçu d''un nœud [{1}:{2}] sans gestionnaire de contexte
deltaManager.receiveMessage.transfercomplete=Gestionnaire de session [{0}] reçu du nœud [{1}:{2}] l''état de la session a été transféré
deltaManager.receiveMessage.unloadingAfter=Gestionnaire de session [{0}] : fin du déchargement des sessions
deltaManager.receiveMessage.unloadingBegin=Gestionnaire de session [{0}] : début du déchargement des sessions
deltaManager.registerCluster=Enregistrement du gestionnaire [{0}] dans l''élément du cluster [{1}] avec le nom [{2}]
deltaManager.sendMessage.newSession=Gestionnaire de session [{0}] : envoi de la nouvelle session [{1}]
deltaManager.sessionReceived=Gestionnaire de session [{0}]: l''état de session envoyé à [{0}] a été reçu en [{2}] ms
deltaManager.startClustering=Démarrage du gestionnaire du cluster à [{0}]
deltaManager.stopped=Le gestionnaire de session [{0}] s''arrête
deltaManager.unableSerializeSessionID=Impossible de sérialiser le sessionID [{0}]
deltaManager.unloading.ioe=IOException lors de la sauvegarde des sessions persistantes: [{0}]
deltaManager.waitForSessionState=Gestionnaire de session [{0}], demande de l''état de session depuis [{1}], cette opération fera un timeout si l''état de la session n''a pas été reçu en moins de [{2}] secondes
deltaRequest.invalidAttributeInfoType=Info d''attribut invalide = [{0}]
deltaRequest.removeUnable=N'a pas pu enlever l'élément:
deltaRequest.showPrincipal=Le principal [{0}] est associé à la session [{1}]
deltaRequest.ssid.mismatch=L'id de session ne correspond pas, la requête delta ne sera pas exécutée
deltaRequest.ssid.null=L'id de session est null pour setSessionId
deltaRequest.wrongPrincipalClass=Un ClusterManager n''accepte que des GenericPrincipal. Votre realm a utilisé la classe de "principal" [{0}]
deltaSession.notifying=Notification du cluster de l''expiration de la session: primaire=[{0}] sessionId [{1}]
deltaSession.readSession=readObject() charge la session [{0}]
deltaSession.writeSession=writeObject() stocke la session [{0}]
jvmRoute.cannotFindSession=Impossible de trouver la session [{0}]
jvmRoute.changeSession=Changé la session de [{0}] vers [{1}]
jvmRoute.failover=Un changement de serveur a été détecté avec une jvmRoute différente, route originale: [{0}] nouvelle: [{1}] pour l''id de session [{2}]
jvmRoute.foundManager=Trouvé le gestionnaire de session du cluster [{0}] à [{1}]
jvmRoute.missingJvmRouteAttribute=Pas d'attribut jvmRoute configuré sur le moteur
jvmRoute.noCluster=La JvmRouterBinderValve est configurée mais le cluster n'est pas activé, la bascule vers un autre serveur fonctionnera tout de même à condition qu'un PersistentManager soit utilisé
jvmRoute.notFoundManager=Gestionnaire de cluster ("Cluster Manager") non trouvé à [{0}]
jvmRoute.set.orignalsessionid=Fixe l''id de session d''origine dans l''attribut de requête [{0}] valeur: [{1}]
jvmRoute.turnoverInfo=Temps de vérification de turnover [{0}] ms
jvmRoute.valve.started=La JvmRouteBinderValve a démarrée
jvmRoute.valve.stopped=JvmRouteBinderValve s'est arrêté
standardSession.notSerializable=Impossible de sérialiser l''attribut de session [{0}] pour la session [{1}]
standardSession.removeAttribute.ise=removeAttribute : session déjà invalidée
standardSession.setAttribute.namenull=setAttribute: le paramètre nom ne peut pas être null

View File

@@ -0,0 +1,90 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
backupManager.noCluster=コンテキスト: [{0}]にクラスターが関連付けられていません。
backupManager.startFailed=BackupManager: [{0}]の起動に失敗しました。
backupManager.startUnable=BackupManager を開始できません。: [{0}]
backupManager.stopped=Manager [{0}] を停止します。
clusterSessionListener.noManager=Context Managerが存在しません。
deltaManager.createMessage.access=Manager [{0}]: セッション [{1}] へのアクセスメッセージを作成します。
deltaManager.createMessage.accessChangePrimary=Manager[{0}]: セッション [{1}] でプライマリノード変更メッセージを作成しました。
deltaManager.createMessage.allSessionData=Manager [{0}] はすべてのセッションデータを送信しました。
deltaManager.createMessage.allSessionTransfered=Manager [{0}]はすべてのセッションデータ転送を送信しました。
deltaManager.createMessage.delta=Manager [{0}]:セッション[{1}]のデルタリクエストメッセージを作成します
deltaManager.createMessage.expire=Manager [{0}]:セッション[{1}]のセッションの期限切れメッセージを作成します。
deltaManager.createMessage.unableCreateDeltaRequest=セッションID [{0}]のDeltaRequestシリアライズできません。
deltaManager.createSession.newSession=DeltaSession (ID は [{0}]) を作成しました。総数は [{1}] です。
deltaManager.dropMessage=Manager [{0}]GET_ALL_SESSIONS同期フェーズの開始日[{2}] メッセージの日付[{3}]内のメッセージ[{1}]をドロップします。
deltaManager.expireSessions=シャットダウン時にManager[{0}]はセッションを満了します。
deltaManager.foundMasterMember=コンテキスト [{0}] のレプリケーションマスターメンバー [{1}] を発見しました。
deltaManager.loading.cnfe=永続セッションのロード中にClassNotFoundExceptionが発生しました[{0}]
deltaManager.loading.existing.session=既存セッション[{0}]のオーバーロード
deltaManager.loading.ioe=永続化セッションの読み込み中に IOException が発生しました: [{0}]
deltaManager.managerLoad=永続化ストレージからセッションの読み込み中に例外が発生しました。
deltaManager.noCluster=Starting ...このコンテキスト[{0}]に関連付けられたクラスタはありません。
deltaManager.noContextManager=マネージャ[{0}][{2}] msで[{1}]でNo Context Managerの送信が受信されました
deltaManager.noMasterMember=ドメイン[{1}]のコンテキスト[{0}]に他のメンバーがいない状態で開始しています。
deltaManager.noMembers=Manager [{0}]:状態転送をスキップします。 クラスタグループ内でアクティブなメンバーはいません。
deltaManager.noSessionState=Manager [{0}][{1}]で送信されたセッション状態はありませんでした。[{2}] ms後にタイムアウトしました。
deltaManager.receiveMessage.accessed=Manager [{0}]:セッション[{1}]のセッションアクセスメッセージを受信しました。
deltaManager.receiveMessage.allSessionDataAfter=Manager[{0}]: 全てのセッション状態をデシリアライズしました。
deltaManager.receiveMessage.allSessionDataBegin=Manager[{0}]:すべてのセッション状態データを受信しました。
deltaManager.receiveMessage.createNewSession=Manager [{0}]:セッション[{1}]のセッション作成メッセージを受信しました。
deltaManager.receiveMessage.delta=Manager [{0}]:セッション[{1}]のセッションデルタメッセージを受信しました。
deltaManager.receiveMessage.delta.unknown=マネージャ[{0}]:未知のセッション[{1}]デルタを受信しました。
deltaManager.receiveMessage.error=Manager [{0}]: TCP チャンネルからメッセージを受信できません。
deltaManager.receiveMessage.eventType=Manager[{0}]: [{2}] からセッションメッセージ [{1}] を受信しました。
deltaManager.receiveMessage.expired=Manager[{0}]:セッション[{1}]のセッションの期限切れメッセージを受信しました。
deltaManager.receiveMessage.noContextManager=Manager [{0}]はノード[{1}{2}]からコンテキストマネージャ無しメッセージを受信しました。
deltaManager.receiveMessage.transfercomplete=Manager [{0}]はノード[{1}{2}]からセッション状態が転送を受信しました。
deltaManager.receiveMessage.unloadingAfter=Manager[{0}]:セッションのアンロードが完了しました。
deltaManager.receiveMessage.unloadingBegin=Manager [{0}]:セッションのアンロードを開始します
deltaManager.registerCluster=マネージャー [{0}] をクラスターの構成要素 [{1}] に名前 [{2}] で登録しました。
deltaManager.sendMessage.newSession=Manager[{0}]が新しいセッションを送信します。[{1}]
deltaManager.sessionReceived=Manager [{0}]; [{2}] msで受信した[{1}]で送信されたセッション状態。
deltaManager.startClustering=[{0}]でクラスタリングマネージャを開始しています。
deltaManager.stopped=マネージャ[{0}]が停止しています
deltaManager.unableSerializeSessionID=セッション ID [{0}] をシリアライズできません。
deltaManager.unloading.ioe=永続セッションを保存中のIOException[{0}]
deltaManager.waitForSessionState=Manager[{0}]、[{1}]からのセッション状態を要求しています。 [{2}]秒以内にセッション状態が受信されなかった場合、この操作はタイムアウトになります。
deltaRequest.invalidAttributeInfoType=無効な属性情報タイプ= [{0}]
deltaRequest.removeUnable=要素を削除できません。
deltaRequest.showPrincipal=プリンシパル [{0}]はセッション [{1}]に設定されています
deltaRequest.ssid.mismatch=セッションIDが一致しません。デルタリクエストが実行されていません。
deltaRequest.ssid.null=setSessionId に指定したセッション ID が null です。
deltaRequest.wrongPrincipalClass=ClusterManagerはGenericPrincipalのみをサポートします。 あなたのRealmはプリンシパルクラス[{0}]を使用しました。
deltaSession.notifying=クラスタにセッションの有効期限を通知するprimary = [{0}]、sessionId [{1}]
deltaSession.readSession=readObject() はセッション [{0}] を読み込みました。
deltaSession.writeSession=writeObject() によりセッション [{0}] を格納しました。
jvmRoute.cannotFindSession=セッション [{0}] がありません。
jvmRoute.changeSession=セッションを [{0}] から [{1}] へ変更しました。
jvmRoute.failover=他の jvmRoute へのフェールオーバーを検出しました。元のルートは [{0}]、新しいルートは [{1}]、セッション ID は [{2}] です。
jvmRoute.foundManager=コンテキスト [{1}] のCluster Manager [{0}] を発見しました。
jvmRoute.missingJvmRouteAttribute=jvmRoute 属性にエンジンが指定されていません。
jvmRoute.noCluster=JvmRouterBinderValveは設定されていますが、クラスタリングは使用されていません。 PersistentManagerが使用されている場合、フェールオーバーは引き続き機能します。
jvmRoute.notFoundManager=[{0}]でCluster Managerが見つかりません。
jvmRoute.set.orignalsessionid=オリジナルSession idをリクエスト属性[{0}]の値:[{1}]で設定します。
jvmRoute.turnoverInfo=折り返しの所要時間は [{0}] ミリ秒でした。
jvmRoute.valve.started=JvmRouteBinderValve が起動しました。
jvmRoute.valve.stopped=JvmRouteBinderValve が停止しました。
standardSession.notSerializable=セッション[{1}]のセッション属性[{0}]をシリアライズできません。
standardSession.removeAttribute.ise=removeAttribute: Session already invalidated
standardSession.setAttribute.namenull=setAttributenameパラメータをnullにすることはできません。

View File

@@ -0,0 +1,90 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
backupManager.noCluster=이 컨텍스트 [{0}]와(과) 연관된 클러스터가 없습니다.
backupManager.startFailed=백업매니저 [{0}]을(를) 시작하지 못했습니다.
backupManager.startUnable=BackupManager를 시작할 수 없습니다: [{0}]
backupManager.stopped=매니저 [{0}]이(가) 중지되고 있습니다.
clusterSessionListener.noManager=컨텍스트 매니저가 존재하지 않습니다: [{0}]
deltaManager.createMessage.access=매니저 [{0}]: 세션(ID: [{1}])을 위한 세션 접근 메시지를 생성합니다.
deltaManager.createMessage.accessChangePrimary=매니저 [{0}]: 세션(ID: [{1}])을 위해 Primary 노드 변경 메시지를 생성합니다.
deltaManager.createMessage.allSessionData=매니저 [{0}]이(가) 모든 세션 데이터를 전송했습니다.
deltaManager.createMessage.allSessionTransfered=매니저 [{0}]이(가), 모든 세션 데이터 전송 완료 메시지를 보냈습니다.
deltaManager.createMessage.delta=매니저 [{0}]: 세션(ID: [{1}])을 위한 델타 요청 메시지를 생성합니다.
deltaManager.createMessage.expire=매니저 [{0}]: 세션(ID: [{1}])을 위한 세션 만료 메시지를 생성합니다.
deltaManager.createMessage.unableCreateDeltaRequest=세션 ID [{0}]을(를) 위한 델타 요청을 직렬화할 수 없습니다.
deltaManager.createSession.newSession=ID가 [{0}]인 DeltaSession을 생성했습니다. 총 개수=[{1}]
deltaManager.dropMessage=매니저 [{0}]: GET_ALL_SESSIONS 동기화 국면 내에서, 메시지 [{1}]을(를) 무시합니다. 시작 시간: [{2}], 메시지의 타임스탬프: [{3}]
deltaManager.expireSessions=매니저 [{0}]이(가) 셧다운 시에 세션들을 만료시킵니다.
deltaManager.foundMasterMember=컨텍스트 [{0}]을(를) 위한 복제 마스터 멤버 [{1}]을(를) 찾았습니다.
deltaManager.loading.cnfe=저장된 세션들을 로드하는 중 ClassNotFoundException 발생: [{0}]
deltaManager.loading.existing.session=기존 세션 [{0}]을(를) 오버로드합니다.
deltaManager.loading.ioe=저장된 세션들을 로드하는 중 IOException 발생: [{0}]
deltaManager.managerLoad=저장소로부터 세션들을 로드하는 중 예외 발생
deltaManager.noCluster=시작 중... 이 컨텍스트와 연관된 클러스터가 없습니다: [{0}]
deltaManager.noContextManager=매니저 [{0}]: [{1}]에서 전송되었던 ''Get all session data'' 메시지에 응답하여, ''No matching context manager'' 메시지를 [{2}] 밀리초 후에 받았습니다.
deltaManager.noMasterMember=시작 중... 도메인 [{1}]에 컨텍스트 [{0}]을(를) 위한 다른 멤버들은 없는 상태입니다.
deltaManager.noMembers=매니저 [{0}]: 상태 이전 작업을 건너뜁니다. 클러스터 그룹 내에 활성화된 멤버가 없습니다.
deltaManager.noSessionState=매니저 [{0}]: [{1}]에서 보낸 세션 상태 메시지를 받지 못했습니다. [{2}] 밀리초 이후 제한 시간 초과되었습니다.
deltaManager.receiveMessage.accessed=매니저 [{0}]: 세션(ID: [{1}])을 위한 세션 접근 메시지를 받았습니다.
deltaManager.receiveMessage.allSessionDataAfter=매니저 [{0}]: 모든 세션 상태가 역직렬화되었습니다.
deltaManager.receiveMessage.allSessionDataBegin=매니저 [{0}]: 모든 세션 상태 데이터를 받았습니다.
deltaManager.receiveMessage.createNewSession=매니저 [{0}]: 세션 [{1}]을(를) 위한 세션 생성됨 메시지를 수신했습니다.
deltaManager.receiveMessage.delta=매니저 [{0}]: 세션(ID: [{1}])을 위한 세션 델타 메시지를 받았습니다.
deltaManager.receiveMessage.delta.unknown=매니저 [{0}]: 알 수 없는 세션 [{1}]을(를) 위한 세션 델타를 받았습니다.
deltaManager.receiveMessage.error=매니저 [{0}]: TCP 채널을 통해 메시지를 받을 수 없습니다.
deltaManager.receiveMessage.eventType=매니저 [{0}]: 타입이 [{1}]인 SessionMessage를 [{2}](으)로부터 받았습니다.
deltaManager.receiveMessage.expired=매니저 [{0}]: 세션 [{1}]을(를) 위한 세션 만료 메시지를 받았습니다.
deltaManager.receiveMessage.noContextManager=매니저 [{0}]이(가) 노드 [{1}:{2}](으)로부터 no context manager 메시지를 받았습니다.
deltaManager.receiveMessage.transfercomplete=매니저 [{0}]이(가) 노드 [{1}:{2}](으)로부터, 세션 상태 이전 완료 메시지를 받았습니다.
deltaManager.receiveMessage.unloadingAfter=매니저 [{0}]: 세션들을 언로드하는 작업이 완료되었습니다.
deltaManager.receiveMessage.unloadingBegin=매니저 [{0}]: 세션들에 대해 언로드를 시작합니다.
deltaManager.registerCluster=매니저 [{0}]을(를), [{2}](이)라는 이름의 클러스터 엘리먼트 [{1}](으)로 등록합니다.
deltaManager.sendMessage.newSession=매니저 [{0}]이(가) 새로운 세션 [{1}]을(를) 전송합니다.
deltaManager.sessionReceived=매니저 [{0}]; [{1}]에서 전송된 세션 상태를 [{2}] 밀리초 이내에 받음
deltaManager.startClustering=[{0}]에서 클러스터 매니저를 시작합니다.
deltaManager.stopped=매니저 [{0}]이(가) 중지됩니다.
deltaManager.unableSerializeSessionID=세션 ID [{0}]을(를) 직렬화할 수 없습니다.
deltaManager.unloading.ioe=세션들을 저장하는 중 IOException 발생: [{0}]
deltaManager.waitForSessionState=매니저 [{0}]: [{1}](으)로부터 세션 상태를 요청합니다. 만일 [{2}]초 이내에 세션 상태를 받지 못하면, 이 오퍼레이션은 제한 시간 초과 처리될 것입니다.
deltaRequest.invalidAttributeInfoType=유효하지 않은 AttributeInfo 타입=[{0}]
deltaRequest.removeUnable=클러스터 엘리먼트를 제거할 수 없습니다:
deltaRequest.showPrincipal=Principal [{0}]이(가) 세션 [{1}]에 설정되었습니다.
deltaRequest.ssid.mismatch=세션 ID가 일치하지 않아, 델타 요청을 실행하지 않습니다.
deltaRequest.ssid.null=setSessionId를 위한 세션 ID가 널입니다.
deltaRequest.wrongPrincipalClass=ClusterManager는 오직 GenericPrincipal만을 지원합니다. 사용된 realm은 principal 클래스 [{0}]을(를) 사용했습니다.
deltaSession.notifying=클러스터에 세션 만료를 통지합니다: primary여부: [{0}], 세션ID: [{1}]
deltaSession.readSession=readObject()가 세션 [{0}]을(를) 로드합니다.
deltaSession.writeSession=writeObject()가 세션 [{0}]을(를) 저장합니다.
jvmRoute.cannotFindSession=세션 [{0}]을(를) 찾을 수 없습니다.
jvmRoute.changeSession=세션을 [{0}]에서 [{1}](으)로 변경했습니다.
jvmRoute.failover=다른 jvmRoute로 Failover를 탐지했습니다. 원래의 라우트: [{0}], 새로운 라우트: [{1}]. 세션 ID: [{2}]
jvmRoute.foundManager=[{1}]에서 클러스터 매니저 [{0}]을(를) 찾았습니다.
jvmRoute.missingJvmRouteAttribute=엔진의 jvmRoute 속성이 설정되지 않았습니다!
jvmRoute.noCluster=JvmRouterBinderValve가 설정되었지만, 클러스터링이 사용되고 있지 않습니다. PersistentManager가 사용되는 경우, Fail over는 여전히 정상 동작할 것입니다.
jvmRoute.notFoundManager=[{0}]에서 클러스터 매니저를 찾을 수 없습니다.
jvmRoute.set.orignalsessionid=요청의 속성 [{0}]에 원래의 세션 ID를 설정합니다: [{1}]
jvmRoute.turnoverInfo=Failover를 위한 jvmRoute 교체 수행 시간: [{0}] 밀리초
jvmRoute.valve.started=JvmRouteBinderValve가 시작됐습니다.
jvmRoute.valve.stopped=JvmRouteBinderValve가 중지되었습니다.
standardSession.notSerializable=세션 [{1}]을 위한 세션 속성 [{0}]을(를) 직렬화할 수 없습니다.
standardSession.removeAttribute.ise=removeAttribute: 세션이 이미 무효화되었습니다.
standardSession.setAttribute.namenull=setAttribute: name 파라미터는 널일 수 없습니다.

View File

@@ -0,0 +1,55 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
backupManager.noCluster=没有与此上下文关联的集群:[{0}]
backupManager.startFailed=启动BackupManager: [{0}]失败
backupManager.startUnable=无法启动BackupManager: [{0}]
backupManager.stopped=管理者[{0}]正在停止。
deltaManager.createMessage.access=管理器[{0}]:创建会话为会话[{1}]存取消息
deltaManager.createMessage.delta=管理器[{0}] ):为会话[{1}]创建增量请求消息
deltaManager.createMessage.expire=管理器[{0}] (:为会话[{1}]创建会话过期消息
deltaManager.createSession.newSession=用id[{0}]创建一个扩展会话(DeltaSession),总数为 [{1}]
deltaManager.foundMasterMember=复制主master 成员在上下文中被发现.\n
deltaManager.loading.cnfe=加载持久化会话 [{0}] 时出现ClassNotFoundException
deltaManager.loading.ioe=加载持久 session 时出现 IOException[{0}]
deltaManager.managerLoad=从永久存储加载会话时发生异常
deltaManager.noContextManager=管理器[{0}]:回复[{1}]发送的“获取所有会话数据”消息,在[{2}] ms后收到“无匹配的上下文管理器”消息
deltaManager.noSessionState=管理者[{0}]:没有收到[{1}]发送的会话状态,在[{2}]毫秒之后超时。
deltaManager.receiveMessage.accessed=管理器[{0}]:接收会话为会话[{1}]存取消息
deltaManager.receiveMessage.allSessionDataAfter=Manager [{0}]: session 状态反序列化
deltaManager.receiveMessage.allSessionDataBegin=管理者[{0}]:接收到所有会话数据状态
deltaManager.receiveMessage.delta.unknown=管理器[{0}]:未知会话的接收会话增量[{1}]
deltaManager.receiveMessage.expired=管理器[{0}]: 接收到的会话 [{1}] 已过期。
deltaManager.receiveMessage.unloadingBegin=管理器[{0}]: 开始卸载会话
deltaManager.registerCluster=将管理器[{0}]注册到名为[{2}]的集群元素[{1}]
deltaManager.sendMessage.newSession=\ 管理器 [{0}] 发送新的会话 [{1}]
deltaManager.sessionReceived=管理器[{0}];在[{1}]发送的会话状态在[{2}]毫秒内收到。
deltaManager.unableSerializeSessionID=无法序列化会话ID [{0}]
deltaManager.unloading.ioe=当保存永久回话:[{0}] 时,抛出 IOException
deltaRequest.removeUnable=不能移除元素
deltaRequest.showPrincipal=Principal [{0}] 和session [{1}]产生关联。
deltaRequest.wrongPrincipalClass=ClusterManager仅支持GenericPrincipal。 你的Realm使用的Principal类为[{0}]。
deltaSession.writeSession=writeObject()存储会话[{0}]
jvmRoute.changeSession=会话从[{0}]切换到[{1}]
jvmRoute.missingJvmRouteAttribute=没有配置引擎jvmRoute属性
jvmRoute.notFoundManager=没有在 [{0}] 找到Cluster Manager
jvmRoute.set.orignalsessionid=在请求属性[{0}]值:[{1}]处设置原始会话ID
jvmRoute.valve.started=JvmRouteBinderValve 启动
standardSession.setAttribute.namenull=setAttribute:名称属性不能为空

View File

@@ -0,0 +1,29 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.catalina.ha.session;
import java.io.Serializable;
import org.apache.catalina.SessionListener;
/**
* This is a marker interface used to indicate an implementation of
* {@link SessionListener} that should be replicated with the session across the
* cluster.
*/
public interface ReplicatedSessionListener extends SessionListener, Serializable {
}

View File

@@ -0,0 +1,110 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.catalina.ha.session;
import org.apache.catalina.ha.ClusterMessage;
/**
*
* <B>Class Description:</B><BR>
* The SessionMessage class is a class that is used when a session has been
* created, modified, expired in a Tomcat cluster node.<BR>
*
* The following events are currently available:
* <ul>
* <li><pre>public static final int EVT_SESSION_CREATED</pre><li>
* <li><pre>public static final int EVT_SESSION_EXPIRED</pre><li>
* <li><pre>public static final int EVT_SESSION_ACCESSED</pre><li>
* <li><pre>public static final int EVT_GET_ALL_SESSIONS</pre><li>
* <li><pre>public static final int EVT_SESSION_DELTA</pre><li>
* <li><pre>public static final int EVT_ALL_SESSION_DATA</pre><li>
* <li><pre>public static final int EVT_ALL_SESSION_TRANSFERCOMPLETE</pre><li>
* <li><pre>public static final int EVT_CHANGE_SESSION_ID</pre><li>
* <li><pre>public static final int EVT_ALL_SESSION_NOCONTEXTMANAGER</pre><li>
* </ul>
*
*/
public interface SessionMessage extends ClusterMessage {
/**
* Event type used when a session has been created on a node
*/
public static final int EVT_SESSION_CREATED = 1;
/**
* Event type used when a session has expired
*/
public static final int EVT_SESSION_EXPIRED = 2;
/**
* Event type used when a session has been accessed (ie, last access time
* has been updated. This is used so that the replicated sessions will not expire
* on the network
*/
public static final int EVT_SESSION_ACCESSED = 3;
/**
* Event type used when a server comes online for the first time.
* The first thing the newly started server wants to do is to grab the
* all the sessions from one of the nodes and keep the same state in there
*/
public static final int EVT_GET_ALL_SESSIONS = 4;
/**
* Event type used when an attribute has been added to a session,
* the attribute will be sent to all the other nodes in the cluster
*/
public static final int EVT_SESSION_DELTA = 13;
/**
* When a session state is transferred, this is the event.
*/
public static final int EVT_ALL_SESSION_DATA = 12;
/**
* When a session state is complete transferred, this is the event.
*/
public static final int EVT_ALL_SESSION_TRANSFERCOMPLETE = 14;
/**
* Event type used when a sessionID has been changed.
*/
public static final int EVT_CHANGE_SESSION_ID = 15;
/**
* Event type used when context manager doesn't exist.
* This is used when the manager which send a session state does not exist.
*/
public static final int EVT_ALL_SESSION_NOCONTEXTMANAGER = 16;
public String getContextName();
public String getEventTypeString();
/**
* returns the event type
* @return one of the event types EVT_XXXX
*/
public int getEventType();
/**
* @return the serialized data for the session
*/
public byte[] getSession();
/**
* @return the session ID for the session
*/
public String getSessionID();
}//SessionMessage

View File

@@ -0,0 +1,168 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.catalina.ha.session;
import org.apache.catalina.ha.ClusterMessageBase;
/**
* Session cluster message
*
* @author Peter Rossbach
*/
public class SessionMessageImpl extends ClusterMessageBase implements SessionMessage {
private static final long serialVersionUID = 2L;
/*
* Private serializable variables to keep the messages state
*/
private final int mEvtType;
private final byte[] mSession;
private final String mSessionID;
private final String mContextName;
private long serializationTimestamp;
private boolean timestampSet = false ;
private String uniqueId;
private SessionMessageImpl( String contextName,
int eventtype,
byte[] session,
String sessionID)
{
mEvtType = eventtype;
mSession = session;
mSessionID = sessionID;
mContextName = contextName;
uniqueId = sessionID;
}
/**
* Creates a session message. Depending on what event type you want this
* message to represent, you populate the different parameters in the constructor<BR>
* The following rules apply dependent on what event type argument you use:<BR>
* <B>EVT_SESSION_CREATED</B><BR>
* The parameters: session, sessionID must be set.<BR>
* <B>EVT_SESSION_EXPIRED</B><BR>
* The parameters: sessionID must be set.<BR>
* <B>EVT_SESSION_ACCESSED</B><BR>
* The parameters: sessionID must be set.<BR>
* <B>EVT_GET_ALL_SESSIONS</B><BR>
* get all sessions from from one of the nodes.<BR>
* <B>EVT_SESSION_DELTA</B><BR>
* Send attribute delta (add,update,remove attribute or principal, ...).<BR>
* <B>EVT_ALL_SESSION_DATA</B><BR>
* Send complete serializes session list<BR>
* <B>EVT_ALL_SESSION_TRANSFERCOMPLETE</B><BR>
* send that all session state information are transferred
* after GET_ALL_SESSION received from this sender.<BR>
* <B>EVT_CHANGE_SESSION_ID</B><BR>
* send original sessionID and new sessionID.<BR>
* <B>EVT_ALL_SESSION_NOCONTEXTMANAGER</B><BR>
* send that context manager does not exist
* after GET_ALL_SESSION received from this sender.<BR>
* @param contextName - the name of the context (application
* @param eventtype - one of the 8 event type defined in this class
* @param session - the serialized byte array of the session itself
* @param sessionID - the id that identifies this session
* @param uniqueID - the id that identifies this message
*/
public SessionMessageImpl( String contextName,
int eventtype,
byte[] session,
String sessionID,
String uniqueID)
{
this(contextName,eventtype,session,sessionID);
uniqueId = uniqueID;
}
/**
* returns the event type
* @return one of the event types EVT_XXXX
*/
@Override
public int getEventType() { return mEvtType; }
/**
* @return the serialized data for the session
*/
@Override
public byte[] getSession() { return mSession;}
/**
* @return the session ID for the session
*/
@Override
public String getSessionID(){ return mSessionID; }
/**
* set message send time but only the first setting works (one shot)
*/
@Override
public void setTimestamp(long time) {
synchronized(this) {
if(!timestampSet) {
serializationTimestamp=time;
timestampSet = true ;
}
}
}
@Override
public long getTimestamp() { return serializationTimestamp;}
/**
* clear text event type name (for logging purpose only)
* @return the event type in a string representation, useful for debugging
*/
@Override
public String getEventTypeString()
{
switch (mEvtType)
{
case EVT_SESSION_CREATED : return "SESSION-MODIFIED";
case EVT_SESSION_EXPIRED : return "SESSION-EXPIRED";
case EVT_SESSION_ACCESSED : return "SESSION-ACCESSED";
case EVT_GET_ALL_SESSIONS : return "SESSION-GET-ALL";
case EVT_SESSION_DELTA : return "SESSION-DELTA";
case EVT_ALL_SESSION_DATA : return "ALL-SESSION-DATA";
case EVT_ALL_SESSION_TRANSFERCOMPLETE : return "SESSION-STATE-TRANSFERRED";
case EVT_CHANGE_SESSION_ID : return "SESSION-ID-CHANGED";
case EVT_ALL_SESSION_NOCONTEXTMANAGER : return "NO-CONTEXT-MANAGER";
default : return "UNKNOWN-EVENT-TYPE";
}
}
@Override
public String getContextName() {
return mContextName;
}
@Override
public String getUniqueId() {
return uniqueId;
}
@Override
public String toString() {
return getEventTypeString() + "#" + getContextName() + "#" + getSessionID() ;
}
}

View File

@@ -0,0 +1,629 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE mbeans-descriptors PUBLIC
"-//Apache Software Foundation//DTD Model MBeans Configuration File"
"http://jakarta.apache.org/commons/dtds/mbeans-descriptors.dtd">
<mbeans-descriptors>
<mbean
name="JvmRouteBinderValve"
description="mod_jk jvmRoute jsessionid cookie backup correction"
domain="Catalina"
group="Valve"
type="org.apache.catalina.ha.session.JvmRouteBinderValve">
<attribute
name="asyncSupported"
description="Does this valve support async reporting? "
is="true"
type="boolean"/>
<attribute
name="className"
description="Fully qualified class name of the managed object"
type="java.lang.String"
writeable="false"/>
<attribute
name="enabled"
description="enable a jvm Route check"
type="boolean"/>
<attribute
name="numberOfSessions"
description="number of jvmRoute session corrections"
type="long"
writeable="false"/>
<attribute
name="sessionIdAttribute"
description="Name of attribute with sessionid value before turnover a session"
type="java.lang.String"/>
<attribute name="stateName"
description="The name of the LifecycleState that this component is currently in"
type="java.lang.String"
writeable="false"/>
<operation
name="start"
description="Stops the Cluster JvmRouteBinderValve"
impact="ACTION"
returnType="void"/>
<operation
name="stop"
description="Stops the Cluster JvmRouteBinderValve"
impact="ACTION"
returnType="void"/>
</mbean>
<mbean
name="DeltaManager"
description="Cluster Manager implementation of the Manager interface"
domain="Catalina"
group="Manager"
type="org.apache.catalina.ha.session.DeltaManager">
<attribute
name="activeSessions"
description="Number of active sessions at this moment"
type="int"
writeable="false"/>
<attribute
name="className"
description="Fully qualified class name of the managed object"
type="java.lang.String"
writeable="false"/>
<attribute
name="counterNoStateTransfered"
description="Count the failed session transfers noStateTransfered"
type="int"
writeable="false"/>
<attribute
name="counterReceive_EVT_GET_ALL_SESSIONS"
description="Count receive EVT_GET_ALL_SESSIONS messages"
type="long"
writeable="false"/>
<attribute
name="counterReceive_EVT_ALL_SESSION_DATA"
description="Count receive EVT_ALL_SESSION_DATA messages"
type="long"
writeable="false"/>
<attribute
name="counterReceive_EVT_SESSION_CREATED"
description="Count receive EVT_SESSION_CREATED messages"
type="long"
writeable="false"/>
<attribute
name="counterReceive_EVT_SESSION_DELTA"
description="Count receive EVT_SESSION_DELTA messages"
type="long"
writeable="false"/>
<attribute
name="counterReceive_EVT_SESSION_ACCESSED"
description="Count receive EVT_SESSION_ACCESSED messages"
type="long"
writeable="false"/>
<attribute
name="counterReceive_EVT_SESSION_EXPIRED"
description="Count receive EVT_SESSION_EXPIRED messages"
type="long"
writeable="false"/>
<attribute
name="counterReceive_EVT_ALL_SESSION_TRANSFERCOMPLETE"
description="Count receive EVT_ALL_SESSION_TRANSFERCOMPLETE messages"
type="long"
writeable="false"/>
<attribute
name="counterReceive_EVT_CHANGE_SESSION_ID"
description="Count receive EVT_CHANGE_SESSION_ID messages"
type="long"
writeable="false"/>
<attribute
name="counterReceive_EVT_ALL_SESSION_NOCONTEXTMANAGER"
description="Count receive EVT_ALL_SESSION_NOCONTEXTMANAGER messages"
type="long"
writeable="false"/>
<attribute
name="counterSend_EVT_GET_ALL_SESSIONS"
description="Count send EVT_GET_ALL_SESSIONS messages"
type="long"
writeable="false"/>
<attribute
name="counterSend_EVT_ALL_SESSION_DATA"
description="Count send EVT_ALL_SESSION_DATA messages"
type="long"
writeable="false"/>
<attribute
name="counterSend_EVT_SESSION_CREATED"
description="Count send EVT_SESSION_CREATED messages"
type="long"
writeable="false"/>
<attribute
name="counterSend_EVT_SESSION_DELTA"
description="Count send EVT_SESSION_DELTA messages"
type="long"
writeable="false"/>
<attribute
name="counterSend_EVT_SESSION_ACCESSED"
description="Count send EVT_SESSION_ACCESSED messages"
type="long"
writeable="false"/>
<attribute
name="counterSend_EVT_SESSION_EXPIRED"
description="Count send EVT_SESSION_EXPIRED messages"
type="long"
writeable="false"/>
<attribute
name="counterSend_EVT_ALL_SESSION_TRANSFERCOMPLETE"
description="Count send EVT_ALL_SESSION_TRANSFERCOMPLETE messages"
type="long"
writeable="false"/>
<attribute
name="counterSend_EVT_CHANGE_SESSION_ID"
description="Count send EVT_CHANGE_SESSION_ID messages"
type="long"
writeable="false"/>
<attribute
name="duplicates"
description="Number of duplicated session ids generated"
type="int"/>
<attribute
name="expiredSessions"
description="Number of sessions that expired ( doesn't include explicit invalidations )"
type="long"/>
<attribute
name="expireSessionsOnShutdown"
is="true"
description="expire all sessions cluster wide as one node goes down"
type="boolean"/>
<attribute
name="invalidatedSessions"
description="describe version"
type="[Ljava.lang.String;"
writeable="false"/>
<attribute
name="maxActive"
description="Maximum number of active sessions so far"
type="int"/>
<attribute
name="maxActiveSessions"
description="The maximum number of active Sessions allowed, or -1 for no limit"
type="int"/>
<attribute
name="name"
description="The descriptive name of this Manager implementation (for logging)"
type="java.lang.String"
writeable="false"/>
<attribute
name="notifyListenersOnReplication"
is="true"
description="Send session attribute change events on backup nodes"
type="boolean"/>
<attribute
name="notifySessionListenersOnReplication"
is="true"
description="Send session start/stop events on backup nodes"
type="boolean"/>
<attribute
name="notifyContainerListenersOnReplication"
is="true"
description="Send container events on backup nodes"
type="boolean"/>
<attribute
name="processExpiresFrequency"
description="The frequency of the manager checks (expiration and passivation)"
type="int"/>
<attribute
name="processingTime"
description="Time spent doing housekeeping and expiration"
type="long"/>
<attribute
name="sendAllSessions"
is="true"
description="Send all sessions at one big block"
type="boolean"/>
<attribute
name="sendAllSessionsSize"
description="session block size when sendAllSessions=false (default=1000)"
type="int"/>
<attribute
name="sendAllSessionsWaitTime"
description="wait time between send session block (default 2 sec)"
type="int"/>
<attribute
name="sessionAverageAliveTime"
description="Average time an expired session had been alive"
type="int"/>
<attribute
name="sessionCounter"
description="Total number of sessions created by this manager"
type="long"/>
<attribute
name="sessionMaxAliveTime"
description="Longest time an expired session had been alive"
type="int"/>
<attribute
name="sessionReplaceCounter"
description="Total number of replaced sessions that load from external nodes"
type="long"
writeable="false"/>
<attribute name="stateName"
description="The name of the LifecycleState that this component is currently in"
type="java.lang.String"
writeable="false"/>
<attribute
name="stateTransfered"
description="Is session state transferred complete? "
type="boolean"/>
<attribute
name="stateTransferTimeout"
description="state transfer timeout in sec"
type="int"/>
<attribute
name="receivedQueueSize"
description="length of receive queue size when session received from other node"
type="int"
writeable="false"/>
<attribute
name="rejectedSessions"
description="Number of sessions we rejected due to maxActive being reached"
type="int"
writeable="false"/>
<attribute
name="noContextManagerReceived"
is="true"
description="Is no context manager message received? "
type="boolean"/>
<attribute
name="secureRandomAlgorithm"
description="The secure random number generator algorithm name"
type="java.lang.String"/>
<attribute
name="secureRandomClass"
description="The secure random number generator class name"
type="java.lang.String"/>
<attribute
name="secureRandomProvider"
description="The secure random number generator provider name"
type="java.lang.String"/>
<attribute
name="stateTimestampDrop"
is="true"
description="All session messages before state transfer message creation are dropped."
type="boolean"/>
<attribute
name="recordAllActions"
is="true"
description="Flag whether send all actions for session across Tomcat cluster nodes."
type="boolean"/>
<attribute
name="sessionAttributeNameFilter"
description="The string pattern used for including session attributes in replication. Null means all attributes are included."
type="java.lang.String"/>
<attribute
name="sessionAttributeValueClassNameFilter"
description="The regular expression used to filter session attributes based on the implementation class of the value. The regular expression is anchored and must match the fully qualified class name."
type="java.lang.String"/>
<attribute
name="warnOnSessionAttributeFilterFailure"
description="Should a WARN level log message be generated if a session attribute fails to match sessionAttributeNameFilter or sessionAttributeClassNameFilter?"
type="boolean"/>
<operation
name="expireSession"
description="Expired the given session"
impact="ACTION"
returnType="void">
<parameter
name="sessionId"
description="The session id for the session to be expired"
type="java.lang.String"/>
</operation>
<operation
name="expireAllLocalSessions"
description="expire all active local sessions and replicate the invalid sessions"
impact="ACTION"
returnType="void"/>
<operation
name="findSession"
description="Return the active Session, associated with this Manager, with the specified session id (if any)"
impact="ACTION"
returnType="org.apache.catalina.Session">
<parameter
name="id"
description="The session id for the session to be returned"
type="java.lang.String"/>
</operation>
<operation
name="findSessions"
description="Return the set of active Sessions associated with this Manager."
impact="ACTION"
returnType="[Lorg.apache.catalina.Session;">
</operation>
<operation
name="getAllClusterSessions"
description="send to oldest cluster member that this node need all cluster sessions (resync member)"
impact="ACTION"
returnType="void"/>
<operation
name="getCreationTime"
description="Return the creation time for this session"
impact="ACTION"
returnType="java.lang.String">
<parameter
name="sessionId"
description="The session id for the session "
type="java.lang.String"/>
</operation>
<operation
name="getLastAccessedTime"
description="Get the last access time. This one gets updated whenever a request finishes. "
impact="ACTION"
returnType="java.lang.String">
<parameter
name="sessionId"
description="Id of the session"
type="java.lang.String"/>
</operation>
<operation
name="getSessionAttribute"
description="Return a session attribute"
impact="ACTION"
returnType="java.lang.String">
<parameter
name="sessionId"
description="Id of the session"
type="java.lang.String"/>
<parameter
name="key"
description="key of the attribute"
type="java.lang.String"/>
</operation>
<operation
name="getThisAccessedTime"
description="Get the last access time. This one gets updated whenever a request starts. "
impact="ACTION"
returnType="java.lang.String">
<parameter
name="sessionId"
description="Id of the session"
type="java.lang.String"/>
</operation>
<operation
name="listSessionIds"
description="Return the list of active primary session ids"
impact="ACTION"
returnType="java.lang.String"/>
<operation
name="processExpires"
description="Invalidate all sessions that have expired.s"
impact="ACTION"
returnType="void"/>
<operation
name="resetStatistics"
description="Reset all statistics"
impact="ACTION"
returnType="void"/>
</mbean>
<mbean
name="BackupManager"
description="Cluster Manager implementation of the Manager interface"
domain="Catalina"
group="Manager"
type="org.apache.catalina.ha.session.BackupManager">
<attribute
name="activeSessions"
description="Number of active primary sessions at this moment"
type="int"
writeable="false"/>
<attribute
name="activeSessionsFull"
description="Number of active sessions at this moment"
type="int"
writeable="false"/>
<attribute
name="className"
description="Fully qualified class name of the managed object"
type="java.lang.String"
writeable="false"/>
<attribute
name="duplicates"
description="Number of duplicated session ids generated"
type="int"/>
<attribute
name="expiredSessions"
description="Number of sessions that expired ( doesn't include explicit invalidations )"
type="long"/>
<attribute
name="invalidatedSessions"
description="Get the list of invalidated session."
type="[Ljava.lang.String;"/>
<attribute
name="mapName"
description="mapName"
type="java.lang.String"
writeable="false"/>
<attribute
name="mapSendOptions"
description="mapSendOptions"
type="int"
writeable="false"/>
<attribute
name="maxActive"
description="Maximum number of active sessions so far"
type="int"/>
<attribute
name="maxActiveSessions"
description="The maximum number of active Sessions allowed, or -1 for no limit"
type="int"/>
<attribute
name="name"
description="The name of component. "
type="java.lang.String"/>
<attribute
name="notifyListenersOnReplication"
is="true"
description="Send session attribute change events on backup nodes"
type="boolean"/>
<attribute
name="processExpiresFrequency"
description="The frequency of the manager checks (expiration and passivation)"
type="int"/>
<attribute
name="processingTime"
description="Time spent doing housekeeping and expiration"
type="long"/>
<attribute
name="sessionAverageAliveTime"
description="Average time an expired session had been alive"
type="int"/>
<attribute
name="sessionCounter"
description="Total number of sessions created by this manager"
type="long"/>
<attribute
name="sessionMaxAliveTime"
description="Longest time an expired session had been alive"
type="int"/>
<attribute name="stateName"
description="The name of the LifecycleState that this component is currently in"
type="java.lang.String"
writeable="false"/>
<attribute
name="rejectedSessions"
description="Number of sessions we rejected due to maxActive being reached"
type="int"/>
<attribute
name="rpcTimeout"
description="Timeout for RPC messages, how long we will wait for a reply"
type="long"/>
<attribute
name="terminateOnStartFailure"
description="Flag for whether to terminate this map that failed to start."
is="true"
type="boolean"/>
<attribute
name="secureRandomAlgorithm"
description="The secure random number generator algorithm name"
type="java.lang.String"/>
<attribute
name="secureRandomClass"
description="The secure random number generator class name"
type="java.lang.String"/>
<attribute
name="secureRandomProvider"
description="The secure random number generator provider name"
type="java.lang.String"/>
<attribute
name="recordAllActions"
is="true"
description="Flag whether send all actions for session across Tomcat cluster nodes."
type="boolean"/>
<attribute
name="sessionAttributeNameFilter"
description="The string pattern used for including session attributes in replication. Null means all attributes are included."
type="java.lang.String"/>
<attribute
name="sessionAttributeValueClassNameFilter"
description="The regular expression used to filter session attributes based on the implementation class of the value. The regular expression is anchored and must match the fully qualified class name."
type="java.lang.String"/>
<attribute
name="warnOnSessionAttributeFilterFailure"
description="Should a WARN level log message be generated if a session attribute fails to match sessionAttributeNameFilter or sessionAttributeClassNameFilter?"
type="boolean"/>
<attribute
name="accessTimeout"
description="The timeout for a ping message in replication map."
type="long"/>
<operation
name="expireSession"
description="Expired the given session"
impact="ACTION"
returnType="void">
<parameter
name="sessionId"
description="The session id for the session to be expired"
type="java.lang.String"/>
</operation>
<operation
name="findSession"
description="Return the active Session, associated with this Manager, with the specified session id (if any)"
impact="ACTION"
returnType="org.apache.catalina.Session">
<parameter
name="id"
description="The session id for the session to be returned"
type="java.lang.String"/>
</operation>
<operation
name="findSessions"
description="Return the set of active Sessions associated with this Manager."
impact="ACTION"
returnType="[Lorg.apache.catalina.Session;">
</operation>
<operation
name="getCreationTime"
description="Return the creation time for this session"
impact="ACTION"
returnType="java.lang.String">
<parameter
name="sessionId"
description="The session id for the session "
type="java.lang.String"/>
</operation>
<operation
name="getLastAccessedTime"
description="Get the last access time. This one gets updated whenever a request finishes. "
impact="ACTION"
returnType="java.lang.String">
<parameter
name="sessionId"
description="Id of the session"
type="java.lang.String"/>
</operation>
<operation
name="getSessionAttribute"
description="Return a session attribute"
impact="ACTION"
returnType="java.lang.String">
<parameter
name="sessionId"
description="Id of the session"
type="java.lang.String"/>
<parameter
name="key"
description="key of the attribute"
type="java.lang.String"/>
</operation>
<operation
name="getThisAccessedTime"
description="Get the last access time. This one gets updated whenever a request starts. "
impact="ACTION"
returnType="java.lang.String">
<parameter
name="sessionId"
description="Id of the session"
type="java.lang.String"/>
</operation>
<operation
name="listSessionIds"
description="Return the list of active primary session ids"
impact="ACTION"
returnType="java.lang.String"/>
<operation
name="getSessionIdsFull"
description="Returns the list of all sessions IDS (primary, backup and proxy)."
impact="ACTION"
returnType="java.util.Set"/>
<operation
name="processExpires"
description="Invalidate all sessions that have expired.s"
impact="ACTION"
returnType="void"/>
</mbean>
</mbeans-descriptors>