* @param dest Member
*/
public void send(ClusterMessage msg, Member dest);
-
- /**
- * Sends a message to a all members at local cluster domain
- *
- * @param msg ClusterMessage
- */
- public void sendClusterDomain(ClusterMessage msg);
/**
* Returns that cluster has members.
public CatalinaCluster getCluster();
public void setCluster(CatalinaCluster cluster);
-
- /**
- * @return Manager send only to same cluster domain.
- * @since 5.5.10
- */
- public boolean doDomainReplication();
-
- /**
- * @param domainReplication Flag value.
- * @since 5.5.10
- */
- public void setDomainReplication(boolean domainReplication);
public ReplicationStream getReplicationStream(byte[] data) throws IOException;
msg.setAction(SingleSignOnMessage.ADD_SESSION);
- cluster.sendClusterDomain(msg);
+ cluster.send(msg);
if (containerLog.isDebugEnabled())
containerLog.debug("SingleSignOnMessage Send with action "
msg.setAction(SingleSignOnMessage.DEREGISTER_SESSION);
- cluster.sendClusterDomain(msg);
+ cluster.send(msg);
if (containerLog.isDebugEnabled())
containerLog.debug("SingleSignOnMessage Send with action "
+ msg.getAction());
ssoId, null);
msg.setAction(SingleSignOnMessage.LOGOUT_SESSION);
- cluster.sendClusterDomain(msg);
+ cluster.send(msg);
if (containerLog.isDebugEnabled())
containerLog.debug("SingleSignOnMessage Send with action "
+ msg.getAction());
msg.setUsername(username);
msg.setPassword(password);
- cluster.sendClusterDomain(msg);
+ cluster.send(msg);
if (containerLog.isDebugEnabled())
containerLog.debug("SingleSignOnMessage Send with action "
+ msg.getAction());
msg.setUsername(username);
msg.setPassword(password);
- cluster.sendClusterDomain(msg);
+ cluster.send(msg);
if (containerLog.isDebugEnabled())
containerLog.debug("SingleSignOnMessage Send with action "
+ msg.getAction());
msg.setAction(SingleSignOnMessage.REMOVE_SESSION);
- cluster.sendClusterDomain(msg);
+ cluster.send(msg);
if (containerLog.isDebugEnabled())
containerLog.debug("SingleSignOnMessage Send with action "
+ msg.getAction());
public void messageDataReceived(ClusterMessage msg) {
}
- public boolean doDomainReplication() {
- return false;
- }
-
- /**
- * @param sendClusterDomainOnly The sendClusterDomainOnly to set.
- */
- public void setDomainReplication(boolean sendClusterDomainOnly) {
- }
-
public void setExpireSessionsOnShutdown(boolean expireSessionsOnShutdown)
{
mExpireSessionsOnShutdown = expireSessionsOnShutdown;
private volatile boolean stateTransfered = false ;
private int stateTransferTimeout = 60;
private boolean sendAllSessions = true;
- private boolean sendClusterDomainOnly = true ;
private int sendAllSessionsSize = 1000 ;
/**
}
/**
- * @return Returns the sendClusterDomainOnly.
- */
- public boolean doDomainReplication() {
- return sendClusterDomainOnly;
- }
-
- /**
- * @param sendClusterDomainOnly The sendClusterDomainOnly to set.
- */
- public void setDomainReplication(boolean sendClusterDomainOnly) {
- this.sendClusterDomainOnly = sendClusterDomainOnly;
- }
-
- /**
* @return Returns the stateTimestampDrop.
*/
public boolean isStateTimestampDrop() {
*/
protected void send(SessionMessage msg) {
if(cluster != null) {
- if(doDomainReplication())
- cluster.sendClusterDomain(msg);
- else
- cluster.send(msg);
+ cluster.send(msg);
}
}
* requesting node
*/
protected void messageReceived(SessionMessage msg, Member sender) {
- if(doDomainReplication() && !checkSenderDomain(msg,sender)) {
+ if(!checkSenderDomain(msg,sender)) {
return;
}
ClassLoader contextLoader = Thread.currentThread().getContextClassLoader();
result.notifySessionListenersOnReplication = notifySessionListenersOnReplication;
result.stateTransferTimeout = stateTransferTimeout;
result.sendAllSessions = sendAllSessions;
- result.sendClusterDomainOnly = sendClusterDomainOnly ;
result.sendAllSessionsSize = sendAllSessionsSize;
result.sendAllSessionsWaitTime = sendAllSessionsWaitTime ;
result.receiverQueue = receiverQueue ;
CatalinaCluster cluster = dmanager.getCluster();
ClusterMessage msg = dmanager.requestCompleted(expiredId, true);
if (msg != null) {
- if(dmanager.doDomainReplication()) {
- cluster.sendClusterDomain(msg);
- } else {
- cluster.send(msg);
- }
+ cluster.send(msg);
}
}
Context context = request.getContext();
msg.setContextPath(context.getPath());
msg.setHost(context.getParent().getName());
- if(manager.doDomainReplication())
- cluster.sendClusterDomain(msg);
- else
- cluster.send(msg);
+ cluster.send(msg);
}
/**
description="Total number of sessions created by this manager"
type="long"/>
<attribute
- name="sendClusterDomainOnly"
- is="true"
- description="The sendClusterDomainOnly flag send sessions only to members as same cluster domain"
- type="boolean"/>
- <attribute
name="sessionIdLength"
description="The session id length (in bytes) of Sessions created by this Manager"
type="int"/>
protected void send(ClusterManager manager, CatalinaCluster cluster, String sessionId) {
ClusterMessage msg = manager.requestCompleted(sessionId);
if (msg != null) {
- if(manager.doDomainReplication()) {
- cluster.sendClusterDomain(msg);
- } else {
- cluster.send(msg);
- }
+ cluster.send(msg);
if(doStatistics())
nrOfSendRequests++;
}
public void send(ClusterMessage msg) {
send(msg, null);
}
-
- /**
- * send message to all cluster members same cluster domain
- *
- * @see org.apache.catalina.ha.CatalinaCluster#send(org.apache.catalina.ha.ClusterMessage)
- */
- public void sendClusterDomain(ClusterMessage msg) {
- send(msg,null);
- }
-
/**
* send a cluster message to one member
type="org.apache.catalina.ha.ClusterMessage"/>
</operation>
<operation
- name="sendClusterDomain"
- description="send message to all cluster members with same domain"
- impact="ACTION"
- returnType="void">
- <parameter
- name="message"
- description="replication message"
- type="org.apache.catalina.ha.ClusterMessage"/>
- </operation>
- <operation
name="start"
description="Start the cluster"
impact="ACTION"
</update>
</changelog>
</subsection>
+ <subsection name="Cluster">
+ <changelog>
+ <fix>
+ Remove domainReplication attribute from ClusterManager.
+ If you send session to only same domain, use DomainFilterInterceptor.
+ (kfujino)
+ </fix>
+ </changelog>
+ </subsection>
<subsection name="Web applications">
<changelog>
<fix>
</attributes>
</subsection>
+ <subsection name="org.apache.catalina.tribes.group.interceptors.DomainFilterInterceptor Attributes">
+ <attributes>
+ <attribute name="domain" required="true">
+ The logical cluster domain that this Interceptor accepts.
+ Two different type of values are possible:<br/>
+ 1. Regular string values like "staging-domain" or "tomcat-cluster" will be converted into bytes
+ using ISO-8859-1 encoding.<br/>
+ 2. byte array in string form, for example {216,123,12,3}<br/>
+ </attribute>
+ </attributes>
+ </subsection>
<subsection name="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor Attributes">
<attributes>
<attribute name="className" required="true">
</subsection>
<subsection name="org.apache.catalina.ha.session.DeltaManager Attributes">
<attributes>
- <attribute name="domainReplication" required="false">
- Set to true if you wish sessions to be replicated only to members that
- have the same logical domain set. If set to false, session replication
- will ignore the domain setting the
- <code><a href="cluster-membership.html"><Membership></a></code>
- element.
- </attribute>
<attribute name="expireSessionsOnShutdown" required="false">
When a web application is being shutdown, Tomcat issues an expire call
to each session to notify all the listeners. If you wish for all