105 lines
		
	
	
		
			12 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
		
		
			
		
	
	
			105 lines
		
	
	
		
			12 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| 
								 | 
							
								<html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Apache Tomcat Configuration Reference - The Cluster Sender object</title><meta name="author" value="Filip Hanik"><meta name="email" value="fhanik@apache.org"></head><body bgcolor="#ffffff" text="#000000" link="#525D76" alink="#525D76" vlink="#525D76"><table border="0" width="100%" cellspacing="0"><!--PAGE HEADER--><tr><td><!--PROJECT LOGO--><a href="http://tomcat.apache.org/"><img src="../../images/tomcat.gif" align="right" alt="
							 | 
						||
| 
								 | 
							
								    The Apache Tomcat Servlet/JSP Container
							 | 
						||
| 
								 | 
							
								  " border="0"></a></td><td><font face="arial,helvetica,sanserif"><h1>Apache Tomcat 6.0</h1></font></td><td><!--APACHE LOGO--><a href="http://www.apache.org/"><img src="../../images/asf-logo.gif" align="right" alt="Apache Logo" border="0"></a></td></tr></table><table border="0" width="100%" cellspacing="4"><!--HEADER SEPARATOR--><tr><td colspan="2"><hr noshade="noshade" size="1"></td></tr><tr><!--RIGHT SIDE MAIN BODY--><td width="80%" valign="top" align="left"><table border="0" width="100%" cellspacing="4"><tr><td align="left" valign="top"><h1>Apache Tomcat Configuration Reference</h1><h2>The Cluster Sender object</h2></td><td align="right" valign="top" nowrap="true"><img src="../../images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Introduction"><strong>Introduction</strong></a></font></td></tr><tr><td><blockquote>
							 | 
						||
| 
								 | 
							
								  <p>
							 | 
						||
| 
								 | 
							
								  The channel sender component is responsible for delivering outgoing cluster messages over the network.
							 | 
						||
| 
								 | 
							
								  In the default implementation, <code>org.apache.catalina.tribes.transport.ReplicationTransmitter</code>,
							 | 
						||
| 
								 | 
							
								  the sender is a fairly empty shell with not much logic around a fairly complex <code><Transport></code>
							 | 
						||
| 
								 | 
							
								  component the implements the actual delivery mechanism.
							 | 
						||
| 
								 | 
							
								  </p>
							 | 
						||
| 
								 | 
							
								</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Concurrent Parallel Delivery"><strong>Concurrent Parallel Delivery</strong></a></font></td></tr><tr><td><blockquote>
							 | 
						||
| 
								 | 
							
								  <p>
							 | 
						||
| 
								 | 
							
								  In the default <code>transport</code> implementation, <code>org.apache.catalina.tribes.transport.nio.PooledParallelSender</code>,
							 | 
						||
| 
								 | 
							
								  Apache Tribes implements what we like to call "Concurrent Parallel Delivery". 
							 | 
						||
| 
								 | 
							
								  This means that we can send a message to more than one destination at the same time(parallel), and
							 | 
						||
| 
								 | 
							
								  deliver two messages to the same destination at the same time(concurrent). Combine these two and we have 
							 | 
						||
| 
								 | 
							
								  "Concurrent Parallel Delivery".
							 | 
						||
| 
								 | 
							
								  </p>
							 | 
						||
| 
								 | 
							
								  <p>
							 | 
						||
| 
								 | 
							
								  When is this useful? The simplest example we can think of is when part of your code is sending a 10MB message,
							 | 
						||
| 
								 | 
							
								  like a war file being deployed, and you need to push through a small 10KB message, say a session being replicated,
							 | 
						||
| 
								 | 
							
								  you don't have to wait for the 10MB message to finish, as a separate thread will push in the small message 
							 | 
						||
| 
								 | 
							
								  transmission at the same time. Currently there is no interrupt, pause or priority mechanism avaiable, but check back soon.
							 | 
						||
| 
								 | 
							
								  </p>
							 | 
						||
| 
								 | 
							
								</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Nested Elements"><strong>Nested Elements</strong></a></font></td></tr><tr><td><blockquote>
							 | 
						||
| 
								 | 
							
								 <p>
							 | 
						||
| 
								 | 
							
								   The nested element <code><Transport></code> is is not required, by encouraged, as this is where
							 | 
						||
| 
								 | 
							
								   you would set all the socket options for the outgoing messages. Please see its attributes below.
							 | 
						||
| 
								 | 
							
								   There are two implementations, in a similar manner to the <a href="cluster-receiver.html">receiver</a>, one is non-blocking
							 | 
						||
| 
								 | 
							
								   based and the other is built using blocking IO. <br>
							 | 
						||
| 
								 | 
							
								   <code>org.apache.catalina.tribes.transport.bio.PooledMultiSender</code> is the blocking implemenation and 
							 | 
						||
| 
								 | 
							
								   <code>org.apache.catalina.tribes.transport.nio.PooledParallelSender</code>.
							 | 
						||
| 
								 | 
							
								   Parallel delivery is not available for the blocking implementation due to the fact that it is blocking a thread on sending data.
							 | 
						||
| 
								 | 
							
								 </p>
							 | 
						||
| 
								 | 
							
								</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Attributes"><strong>Attributes</strong></a></font></td></tr><tr><td><blockquote>
							 | 
						||
| 
								 | 
							
								  <table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Common Sender Attributes"><strong>Common Sender Attributes</strong></a></font></td></tr><tr><td><blockquote>
							 | 
						||
| 
								 | 
							
								    <table border="1" cellpadding="5"><tr><th width="15%" bgcolor="#023264"><font color="#ffffff">Attribute</font></th><th width="85%" bgcolor="#023264"><font color="#ffffff">Description</font></th></tr><tr><td align="left" valign="center"><strong><code>className</code></strong></td><td align="left" valign="center">
							 | 
						||
| 
								 | 
							
								        Required, only available implementation is <code>org.apache.catalina.tribes.transport.ReplicationTransmitter</code>
							 | 
						||
| 
								 | 
							
								      </td></tr></table>
							 | 
						||
| 
								 | 
							
								  </blockquote></td></tr></table>
							 | 
						||
| 
								 | 
							
								  <table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Common Transport Attributes"><strong>Common Transport Attributes</strong></a></font></td></tr><tr><td><blockquote>
							 | 
						||
| 
								 | 
							
								    <table border="1" cellpadding="5"><tr><th width="15%" bgcolor="#023264"><font color="#ffffff">Attribute</font></th><th width="85%" bgcolor="#023264"><font color="#ffffff">Description</font></th></tr><tr><td align="left" valign="center"><strong><code>className</code></strong></td><td align="left" valign="center">
							 | 
						||
| 
								 | 
							
								        Required, an implementation of the <code>org.apache.catalina.tribes.transport.MultiPointSender</code>.<br>
							 | 
						||
| 
								 | 
							
								        Non-blocking implementation is <code>org.apache.catalina.tribes.transport.nio.PooledParallelSender</code><br>
							 | 
						||
| 
								 | 
							
								        Blocking implementation is <code>org.apache.catalina.tribes.transport.bio.PooledMultiSender</code>
							 | 
						||
| 
								 | 
							
								      </td></tr><tr><td align="left" valign="center"><code>rxBufSize</code></td><td align="left" valign="center">
							 | 
						||
| 
								 | 
							
								        The receive buffer size on the socket.
							 | 
						||
| 
								 | 
							
								        Default value is <code>25188</code> bytes.
							 | 
						||
| 
								 | 
							
								      </td></tr><tr><td align="left" valign="center"><code>txBufSize</code></td><td align="left" valign="center">
							 | 
						||
| 
								 | 
							
								       The send buffer size on the socket.
							 | 
						||
| 
								 | 
							
								       Default value is <code>43800</code> bytes.
							 | 
						||
| 
								 | 
							
								      </td></tr><tr><td align="left" valign="center"><code>direct</code></td><td align="left" valign="center">
							 | 
						||
| 
								 | 
							
								       Possible values are <code>true</code> or <code>false</code>. 
							 | 
						||
| 
								 | 
							
								       Set to true if you want the receiver to use direct bytebuffers when reading data
							 | 
						||
| 
								 | 
							
								       from the sockets. Default value is <code>false</code>
							 | 
						||
| 
								 | 
							
								      </td></tr><tr><td align="left" valign="center"><code>keepAliveCount</code></td><td align="left" valign="center">
							 | 
						||
| 
								 | 
							
								       The number of requests that can go through the socket before the socket is closed, and reopened
							 | 
						||
| 
								 | 
							
								       for the next request. The default value is <code>-1</code>, which is unlimited.
							 | 
						||
| 
								 | 
							
								      </td></tr><tr><td align="left" valign="center"><code>keepAliveTime</code></td><td align="left" valign="center">
							 | 
						||
| 
								 | 
							
								       The number of milliseconds a connection is kept open after its been opened.
							 | 
						||
| 
								 | 
							
								       The default value is <code>-1</code>, which is unlimited.
							 | 
						||
| 
								 | 
							
								      </td></tr><tr><td align="left" valign="center"><code>timeout</code></td><td align="left" valign="center">
							 | 
						||
| 
								 | 
							
								        Sets the SO_TIMEOUT option on the socket. The value is in milliseconds and the default value is <code>3000</code> 
							 | 
						||
| 
								 | 
							
								        milliseconds.
							 | 
						||
| 
								 | 
							
								      </td></tr><tr><td align="left" valign="center"><code>maxRetryAttempts</code></td><td align="left" valign="center">
							 | 
						||
| 
								 | 
							
								        How many times do we retry a failed message, that received a IOException at the socket level.
							 | 
						||
| 
								 | 
							
								        The default value is <code>1</code>, meaning we will retry a message that has failed once. 
							 | 
						||
| 
								 | 
							
								        In other words, we will attempt a message send no more than twice. One is the original send, and one is the 
							 | 
						||
| 
								 | 
							
								        <code>maxRetryAttempts</code>.
							 | 
						||
| 
								 | 
							
								      </td></tr><tr><td align="left" valign="center"><code>ooBInline</code></td><td align="left" valign="center">
							 | 
						||
| 
								 | 
							
								        Boolean value for the socket OOBINLINE option. Possible values are <code>true</code> or <code>false</code>.
							 | 
						||
| 
								 | 
							
								      </td></tr><tr><td align="left" valign="center"><code>soKeepAlive</code></td><td align="left" valign="center">
							 | 
						||
| 
								 | 
							
								        Boolean value for the socket SO_KEEPALIVE option. Possible values are <code>true</code> or <code>false</code>.
							 | 
						||
| 
								 | 
							
								      </td></tr><tr><td align="left" valign="center"><code>soLingerOn</code></td><td align="left" valign="center">
							 | 
						||
| 
								 | 
							
								        Boolean value to determine whether to use the SO_LINGER socket option. 
							 | 
						||
| 
								 | 
							
								        Possible values are <code>true</code> or <code>false</code>. Default value is <code>true</code>.
							 | 
						||
| 
								 | 
							
								      </td></tr><tr><td align="left" valign="center"><code>soLingerTime</code></td><td align="left" valign="center">
							 | 
						||
| 
								 | 
							
								        Sets the SO_LINGER socket option time value. The value is in seconds. 
							 | 
						||
| 
								 | 
							
								        The default value is <code>3</code> seconds.
							 | 
						||
| 
								 | 
							
								      </td></tr><tr><td align="left" valign="center"><code>soReuseAddress</code></td><td align="left" valign="center">
							 | 
						||
| 
								 | 
							
								       Boolean value for the socket SO_REUSEADDR option. Possible values are <code>true</code> or <code>false</code>.
							 | 
						||
| 
								 | 
							
								      </td></tr><tr><td align="left" valign="center"><code>soTrafficClass</code></td><td align="left" valign="center">
							 | 
						||
| 
								 | 
							
								       Sets the traffic class level for the socket, the value is between 0 and 255.
							 | 
						||
| 
								 | 
							
								       Default value is <code>int soTrafficClass = 0x04 | 0x08 | 0x010;</code>
							 | 
						||
| 
								 | 
							
								       Different values are defined in <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/net/Socket.html#setTrafficClass(int)">
							 | 
						||
| 
								 | 
							
								       java.net.Socket#setTrafficClass(int)</a>.
							 | 
						||
| 
								 | 
							
								      </td></tr><tr><td align="left" valign="center"><code>tcpNoDelay</code></td><td align="left" valign="center">
							 | 
						||
| 
								 | 
							
								       Boolean value for the socket TCP_NODELAY option. Possible values are <code>true</code> or <code>false</code>.
							 | 
						||
| 
								 | 
							
								       The default value is <code>true</code>
							 | 
						||
| 
								 | 
							
								      </td></tr><tr><td align="left" valign="center"><code>throwOnFailedAck</code></td><td align="left" valign="center">
							 | 
						||
| 
								 | 
							
								       Boolean value, default value is <code>true</code>.
							 | 
						||
| 
								 | 
							
								       If set to true, the sender will throw a <code>org.apache.catalina.tribes.RemoteProcessException</code>
							 | 
						||
| 
								 | 
							
								       when we receive a negative ack from the remote member.
							 | 
						||
| 
								 | 
							
								       Set to false, and Tribes will treat a positive ack the same way as a negative ack, that the message was received.
							 | 
						||
| 
								 | 
							
								      </td></tr></table>
							 | 
						||
| 
								 | 
							
								  </blockquote></td></tr></table>
							 | 
						||
| 
								 | 
							
								  <table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="PooledParallelSender Attributes"><strong>PooledParallelSender Attributes</strong></a></font></td></tr><tr><td><blockquote>
							 | 
						||
| 
								 | 
							
								    <table border="1" cellpadding="5"><tr><th width="15%" bgcolor="#023264"><font color="#ffffff">Attribute</font></th><th width="85%" bgcolor="#023264"><font color="#ffffff">Description</font></th></tr><tr><td align="left" valign="center"><code>poolSize</code></td><td align="left" valign="center">
							 | 
						||
| 
								 | 
							
								        The maximum number of concurrent connections from A to B.
							 | 
						||
| 
								 | 
							
								        The value is based on a per-destination count.
							 | 
						||
| 
								 | 
							
								        The default value is <code>25</code>
							 | 
						||
| 
								 | 
							
								      </td></tr></table>
							 | 
						||
| 
								 | 
							
								  </blockquote></td></tr></table>
							 | 
						||
| 
								 | 
							
								</blockquote></td></tr></table></td></tr><!--FOOTER SEPARATOR--><tr><td colspan="2"><hr noshade="noshade" size="1"></td></tr><!--PAGE FOOTER--><tr><td colspan="2"><div align="center"><font color="#525D76" size="-1"><em>
							 | 
						||
| 
								 | 
							
								        Copyright © 1999-2006, Apache Software Foundation
							 | 
						||
| 
								 | 
							
								        </em></font></div></td></tr></table></body></html>
							 |