Author: markt Date: Fri Sep 19 03:39:02 2008 New Revision: 697040 URL: http://svn.apache.org/viewvc?rev=697040&view=rev Log: Add in startup options to the cluster channel. Document the multicast recovery options
Modified: tomcat/tc6.0.x/trunk/ (props changed) tomcat/tc6.0.x/trunk/STATUS.txt tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml tomcat/tc6.0.x/trunk/webapps/docs/config/cluster-membership.xml tomcat/tc6.0.x/trunk/webapps/docs/config/cluster-sender.xml tomcat/tc6.0.x/trunk/webapps/docs/config/cluster.xml Propchange: tomcat/tc6.0.x/trunk/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Sep 19 03:39:02 2008 @@ -1 +1 @@ -/tomcat/trunk:673796,673820,683982,684001,684081,684234,684269-684270,687503,687645,690781,695053 +/tomcat/trunk:673796,673820,683982,684001,684081,684234,684269-684270,687503,687645,690781,695053,695311 Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=697040&r1=697039&r2=697040&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Sep 19 03:39:02 2008 @@ -42,12 +42,6 @@ and seems impossible to anticipate): https://issues.apache.org/bugzilla/show_bug.cgi?id=36155#c17 -* Add in startup options, so that cluster can be started in TCP mode only, when using static membership - Also document the multicast recovery options - http://svn.apache.org/viewvc?rev=674125&view=rev - +1: fhanik, markt, funkman - -1: - * Fix comet behavior Invoke READ when there is a body and make sure END is called if CometEvent.close is called during an invokation http://svn.apache.org/viewvc?rev=677473&view=rev Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java?rev=697040&r1=697039&r2=697040&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java Fri Sep 19 03:39:02 2008 @@ -178,6 +178,8 @@ private Map properties = new HashMap(); private int channelSendOptions = Channel.SEND_OPTIONS_ASYNCHRONOUS; + + private int channelStartOptions = Channel.DEFAULT; // ------------------------------------------------------------- Properties @@ -666,7 +668,7 @@ registerClusterValve(); channel.addMembershipListener(this); channel.addChannelListener(this); - channel.start(channel.DEFAULT); + channel.start(channelStartOptions); if (clusterDeployer != null) clusterDeployer.start(); this.started = true; // Notify our interested LifecycleListeners @@ -760,7 +762,7 @@ this.managers.clear(); try { if ( clusterDeployer != null ) clusterDeployer.setCluster(null); - channel.stop(Channel.DEFAULT); + channel.stop(channelStartOptions); channel.removeChannelListener(this); channel.removeMembershipListener(this); this.unregisterClusterValve(); @@ -938,4 +940,12 @@ public String getProtocol() { return null; } + + public int getChannelStartOptions() { + return channelStartOptions; + } + + public void setChannelStartOptions(int channelStartOptions) { + this.channelStartOptions = channelStartOptions; + } } Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=697040&r1=697039&r2=697040&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Fri Sep 19 03:39:02 2008 @@ -85,14 +85,26 @@ </fix> </changelog> </subsection> + <subsection name="Cluster"> + <changelog> + <add> + Provide TCP only start-up option when using static membership. (fhanik) + </add> + <add> + Document the multicast recovery options. (fhanik) + </add> + </changelog> + </subsection> </section> <section name="Tomcat 6.0.18 (remm)"> <subsection name="Cataina"> <changelog> - <fix><bug>42727</bug>: Correctly handle request lines that are exact multiples of 4096 in length. - Patch provided by Will Pugh.</fix> <fix> - <bug>42678</bug>: Only ignore docBase it it really is a subdir of + <bug>42727</bug>: Correctly handle request lines that are exact + multiples of 4096 in length. Patch provided by Will Pugh. (markt) + </fix> + <fix> + <bug>42678</bug>: Only ignore docBase if it really is a subdir of appBase. Patch provided by juergen. (markt) </fix> <fix> Modified: tomcat/tc6.0.x/trunk/webapps/docs/config/cluster-membership.xml URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/config/cluster-membership.xml?rev=697040&r1=697039&r2=697040&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/docs/config/cluster-membership.xml (original) +++ tomcat/tc6.0.x/trunk/webapps/docs/config/cluster-membership.xml Fri Sep 19 03:39:02 2008 @@ -125,6 +125,28 @@ If a value smaller or equal to 0 is presented, the code will default this value to frequency </p> </attribute> + <attribute name="recoveryEnabled" required="false"> + <p> + In case of a network failure, Java multicast socket don't transparently fail over, instead the socket will continously + throw IOException upon each receive request. When recoveryEnabled is set to true, this will close the multicast socket + and open a new socket with the same properties as defined above.<br/> + The default is <code>true</code>. <br/> + </p> + </attribute> + <attribute name="recoveryCounter" required="false"> + <p> + When <code>recoveryEnabled==true</code> this value indicates how many times we will try recovery. + The default is <code>10</code>. <br/> + </p> + </attribute> + <attribute name="recoverySleepTime" required="false"> + <p> + When <code>recoveryEnabled==true</code> this value indicates how long time (in milliseconds) + the system will sleep in between recovery attempts, until we either recovered successfully or we have reached the + recoveryCounter limit. + The default is <code>5000</code> (5 seconds). <br/> + </p> + </attribute> </attributes> Modified: tomcat/tc6.0.x/trunk/webapps/docs/config/cluster-sender.xml URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/config/cluster-sender.xml?rev=697040&r1=697039&r2=697040&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/docs/config/cluster-sender.xml (original) +++ tomcat/tc6.0.x/trunk/webapps/docs/config/cluster-sender.xml Fri Sep 19 03:39:02 2008 @@ -90,10 +90,10 @@ The send buffer size on the socket. Default value is <code>43800</code> bytes. </attribute> - <attribute name="direct" required="false"> + <attribute name="directBuffer" required="false"> 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> + Set to true if you want the receiver to use direct bytebuffers when writing data + to the sockets. Default value is <code>false</code> </attribute> <attribute name="keepAliveCount" required="false"> The number of requests that can go through the socket before the socket is closed, and reopened @@ -105,7 +105,10 @@ </attribute> <attribute name="timeout" required="false"> Sets the SO_TIMEOUT option on the socket. The value is in milliseconds and the default value is <code>3000</code> - milliseconds. + milliseconds.(3 seconds) This timeout starts when a message send attempt is starting, until the transfer has been completed. + For the NIO sockets, this will mean, that the caller can guarantee that we will not attempt sending the message + longer than this timeout value. For the blocking IO implementation, this translated directly to the soTimeout.<br/> + A timeout will not spawn a retry attempt, in order to guarantee the return of the application thread. </attribute> <attribute name="maxRetryAttempts" required="false"> How many times do we retry a failed message, that received a IOException at the socket level. Modified: tomcat/tc6.0.x/trunk/webapps/docs/config/cluster.xml URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/config/cluster.xml?rev=697040&r1=697039&r2=697040&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/docs/config/cluster.xml (original) +++ tomcat/tc6.0.x/trunk/webapps/docs/config/cluster.xml Fri Sep 19 03:39:02 2008 @@ -124,6 +124,18 @@ So to use ACK and ASYNC messaging, the flag would be <code>10 (8+2) or 0x000B</code><br/> </p> </attribute> + <attribute name="channelStartOptions" required="false"> + <p>Sets the start and stop flags for the <Channel> object used by the cluster. + The default is <code>Channel.DEFAULT</code> which starts all the channel services, such as + sender, receiver, multicast sender and multicast receiver. + The following flags are available today: + <source> + Channel.DEFAULT = Channel.SND_RX_SEQ (1)| Channel.SND_TX_SEQ (2)| Channel.MBR_RX_SEQ (4)| Channel.MBR_TX_SEQ (8); + </source> + To start a channel without multicasting, you would want to use the value <code>Channel.SND_RX_SEQ | Channel.SND_TX_SEQ</code> + that equals to <code>3</code>. + </p> + </attribute> <attribute name="heartbeatBackgroundEnabled" required="false"> <p>Enable this flag don't forget to disable the channel heartbeat thread. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]