Author: kkolinko
Date: Tue Apr  9 15:06:15 2013
New Revision: 1466068

URL: http://svn.apache.org/r1466068
Log:
CTR: docs
"Monitoring and Managing Tomcat"
Reduced indents and wrapped the text in several places. The document was 
unreadable due to horizontal scrolling.

Modified:
    tomcat/tc6.0.x/trunk/webapps/docs/monitoring.xml

Modified: tomcat/tc6.0.x/trunk/webapps/docs/monitoring.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/monitoring.xml?rev=1466068&r1=1466067&r2=1466068&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/monitoring.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/monitoring.xml Tue Apr  9 15:06:15 2013
@@ -106,103 +106,109 @@ controlRole tomcat
    <p>To simplify JMX usage with Ant 1.6.x, a set of tasks is provided that may
    be used with antlib.</p>   
    <p><b>antlib</b>: Copy your catalina-ant.jar from $CATALINA_HOME/lib to 
$ANT_HOME/lib.</p>
-   <p>The following example shows the JMX Accessor usage:</p>
+   <p>The following example shows the JMX Accessor usage:<br/>
+   <em>Note:</em> The <code>name</code> attribute value was wrapped here to be
+   more readable. It has to be all on the same line, without spaces.</p>
    <table border="1">
-   <tr><td><p><pre>
-&lt;project name="Catalina Ant JMX" 
-        xmlns:jmx="antlib:org.apache.catalina.ant.jmx" 
-        default="state"
-        basedir="."&gt;
-    &lt;property name="jmx.server.name" value="localhost" /&gt;
-    &lt;property name="jmx.server.port" value="9012" /&gt;
-    &lt;property name="cluster.server.address" value="192.168.1.75" /&gt;
-    &lt;property name="cluster.server.port" value="9025" /&gt;
- 
-    &lt;target name="state" description="Show JMX Cluster state"&gt;
-        &lt;jmx:open
-            host="${jmx.server.name}"
-            port="${jmx.server.port}"
-            username="controlRole"
-            password="tomcat"/&gt;
-        &lt;jmx:get
-            
name="Catalina:type=IDataSender,host=localhost,senderAddress=${cluster.server.address},senderPort=${cluster.server.port}"
 
-            attribute="connected"
-            resultproperty="IDataSender.backup.connected"
-            echo="false"
-        /&gt;
-       &lt;jmx:get
-            name="Catalina:type=ClusterSender,host=localhost" 
-            attribute="senderObjectNames"
-            resultproperty="senderObjectNames"
-            echo="false"
-        /&gt;
-        &lt;!-- get current maxActiveSession from ClusterTest application
-             echo it to Ant output and store at 
-             property 
&lt;em&gt;clustertest.maxActiveSessions.orginal&lt;/em&gt;
-        --&gt;
-       &lt;jmx:get
-            name="Catalina:type=Manager,path=/ClusterTest,host=localhost" 
-            attribute="maxActiveSessions"
-            resultproperty="clustertest.maxActiveSessions.orginal"
-            echo="true"
-        /&gt;
-        &lt;!-- set maxActiveSession to 100
-        --&gt;
-        &lt;jmx:set
-            name="Catalina:type=Manager,path=/ClusterTest,host=localhost" 
-            attribute="maxActiveSessions"
-            value="100"
-            type="int"
-        /&gt;
-        &lt;!-- get all sessions and split result as delimiter 
&lt;em&gt;SPACE&lt;/em&gt; for easy
-             access all session ids directly with Ant property sessions.[0..n].
-        --&gt;
-        &lt;jmx:invoke
-            name="Catalina:type=Manager,path=/ClusterTest,host=localhost" 
-            operation="listSessionIds"
-            resultproperty="sessions"
-            echo="false"
-            delimiter=" "
-        /&gt;
-        &lt;!-- Access session attribute &lt;em&gt;Hello&lt;/em&gt; from first 
session.
-        --&gt;
-        &lt;jmx:invoke
-            name="Catalina:type=Manager,path=/ClusterTest,host=localhost" 
-            operation="getSessionAttribute"
-            resultproperty="Hello"
-            echo="false"
-        &gt;
-          &lt;arg value="${sessions.0}"/&gt;
-          &lt;arg value="Hello"/&gt;
-        &lt;/jmx:invoke&gt; 
-        &lt;!-- Query for all application manager.of the server from all hosts
-             and bind all attributes from all found manager MBeans.
-        --&gt;
-        &lt;jmx:query
-            name="Catalina:type=Manager,*" 
-            resultproperty="manager"
-            echo="true"
-            attributebinding="true"
-        /&gt;
-        &lt;!-- echo the create properties --&gt;
-        &lt;echo&gt;
-           senderObjectNames: ${senderObjectNames.0}
-           IDataSender.backup.connected: ${IDataSender.backup.connected}
-           session: ${sessions.0}
-           manager.length: ${manager.length}
-           manager.0.name: ${manager.0.name}
-           manager.1.name: ${manager.1.name}
-           hello: ${Hello}
-           manager.ClusterTest.0.name: ${manager.ClusterTest.0.name}
-           manager.ClusterTest.0.activeSessions: 
${manager.ClusterTest.0.activeSessions}
-           manager.ClusterTest.0.counterSend_EVT_SESSION_EXPIRED: 
${manager.ClusterTest.0.counterSend_EVT_SESSION_EXPIRED}
-           manager.ClusterTest.0.counterSend_EVT_GET_ALL_SESSIONS: 
${manager.ClusterTest.0.counterSend_EVT_GET_ALL_SESSIONS}
-        &lt;/echo&gt;   
+   <tr><td><pre>
+&lt;project name="Catalina Ant JMX"
+      xmlns:jmx="antlib:org.apache.catalina.ant.jmx"
+      default="state"
+      basedir="."&gt;
+  &lt;property name="jmx.server.name" value="localhost" /&gt;
+  &lt;property name="jmx.server.port" value="9012" /&gt;
+  &lt;property name="cluster.server.address" value="192.168.1.75" /&gt;
+  &lt;property name="cluster.server.port" value="9025" /&gt;
+
+  &lt;target name="state" description="Show JMX Cluster state"&gt;
+    &lt;jmx:open
+      host="${jmx.server.name}"
+      port="${jmx.server.port}"
+      username="controlRole"
+      password="tomcat"/&gt;
+    &lt;jmx:get
+      name=
+"Catalina:type=IDataSender,host=localhost,
+senderAddress=${cluster.server.address},senderPort=${cluster.server.port}"
+      attribute="connected"
+      resultproperty="IDataSender.backup.connected"
+      echo="false"
+    /&gt;
+    &lt;jmx:get
+      name="Catalina:type=ClusterSender,host=localhost"
+      attribute="senderObjectNames"
+      resultproperty="senderObjectNames"
+      echo="false"
+    /&gt;
+    &lt;!-- get current maxActiveSession from ClusterTest application
+       echo it to Ant output and store at
+       property &lt;em&gt;clustertest.maxActiveSessions.orginal&lt;/em&gt;
+    --&gt;
+    &lt;jmx:get
+      name="Catalina:type=Manager,path=/ClusterTest,host=localhost"
+      attribute="maxActiveSessions"
+      resultproperty="clustertest.maxActiveSessions.orginal"
+      echo="true"
+    /&gt;
+    &lt;!-- set maxActiveSession to 100
+    --&gt;
+    &lt;jmx:set
+      name="Catalina:type=Manager,path=/ClusterTest,host=localhost"
+      attribute="maxActiveSessions"
+      value="100"
+      type="int"
+    /&gt;
+    &lt;!-- get all sessions and split result as delimiter 
&lt;em&gt;SPACE&lt;/em&gt; for easy
+       access all session ids directly with Ant property sessions.[0..n].
+    --&gt;
+    &lt;jmx:invoke
+      name="Catalina:type=Manager,path=/ClusterTest,host=localhost"
+      operation="listSessionIds"
+      resultproperty="sessions"
+      echo="false"
+      delimiter=" "
+    /&gt;
+    &lt;!-- Access session attribute &lt;em&gt;Hello&lt;/em&gt; from first 
session.
+    --&gt;
+    &lt;jmx:invoke
+      name="Catalina:type=Manager,path=/ClusterTest,host=localhost"
+      operation="getSessionAttribute"
+      resultproperty="Hello"
+      echo="false"
+    &gt;
+      &lt;arg value="${sessions.0}"/&gt;
+      &lt;arg value="Hello"/&gt;
+    &lt;/jmx:invoke&gt;
+    &lt;!-- Query for all application manager.of the server from all hosts
+       and bind all attributes from all found manager MBeans.
+    --&gt;
+    &lt;jmx:query
+      name="Catalina:type=Manager,*"
+      resultproperty="manager"
+      echo="true"
+      attributebinding="true"
+    /&gt;
+    &lt;!-- echo the create properties --&gt;
+&lt;echo&gt;
+senderObjectNames: ${senderObjectNames.0}
+IDataSender.backup.connected: ${IDataSender.backup.connected}
+session: ${sessions.0}
+manager.length: ${manager.length}
+manager.0.name: ${manager.0.name}
+manager.1.name: ${manager.1.name}
+hello: ${Hello}
+manager.ClusterTest.0.name: ${manager.ClusterTest.0.name}
+manager.ClusterTest.0.activeSessions: ${manager.ClusterTest.0.activeSessions}
+manager.ClusterTest.0.counterSend_EVT_SESSION_EXPIRED:
+ ${manager.ClusterTest.0.counterSend_EVT_SESSION_EXPIRED}
+manager.ClusterTest.0.counterSend_EVT_GET_ALL_SESSIONS:
+ ${manager.ClusterTest.0.counterSend_EVT_GET_ALL_SESSIONS}
+&lt;/echo&gt;
+
+  &lt;/target&gt;
 
-    &lt;/target&gt;
- 
 &lt;/project&gt;
-   </pre></p>
+</pre>
    </td></tr>
 </table>
    <p><b>import:</b> Import the JMX Accessor Project with 
@@ -295,22 +301,22 @@ List of Attributes<br/>
 <p>
 Example to open a new JMX connection<br/>
 <source>
-    &lt;jmx:open
-            host="${jmx.server.name}"
-            port="${jmx.server.port}"
-    /&gt;
+  &lt;jmx:open
+    host="${jmx.server.name}"
+    port="${jmx.server.port}"
+  /&gt;
 </source>
 </p>  
 <p>
 Example to open a JMX connection from URL, with authorization and 
 store at other reference <br/>
 <source>
-    &lt;jmx:open
-            url="service:jmx:rmi:///jndi/rmi://localhost:9024/jmxrmi"
-            ref="jmx.server.9024"
-            username="controlRole"
-            password="tomcat"    
-    /&gt;
+  &lt;jmx:open
+    url="service:jmx:rmi:///jndi/rmi://localhost:9024/jmxrmi"
+    ref="jmx.server.9024"
+    username="controlRole"
+    password="tomcat"
+  /&gt;
 </source>
 </p>  
 
@@ -319,14 +325,14 @@ Example to open a JMX connection from UR
 store at other reference, but only when property <em>jmx.if</em> exists and 
 <em>jmx.unless</em> not exists<br/>
 <source>
-    &lt;jmx:open
-            url="service:jmx:rmi:///jndi/rmi://localhost:9024/jmxrmi"
-            ref="jmx.server.9024"
-            username="controlRole"
-            password="tomcat"    
-            if="jmx.if"    
-            unless="jmx.unless"    
-    /&gt;
+  &lt;jmx:open
+    url="service:jmx:rmi:///jndi/rmi://localhost:9024/jmxrmi"
+    ref="jmx.server.9024"
+    username="controlRole"
+    password="tomcat"
+    if="jmx.if"
+    unless="jmx.unless"
+  /&gt;
 </source>
 </p> 
 <p><b>Note</b>: All properties from <em>jmxOpen</em> task also exists at all 
@@ -405,44 +411,49 @@ List of Attributes<br/>
 <p>
 Example to get remote MBean attribute from default JMX connection <br/>
 <source>
-    &lt;jmx:get
-        name="Catalina:type=Manager,path=/servlets-examples,host=localhost" 
-        attribute="maxActiveSessions"
-        resultproperty="servlets-examples.maxActiveSessions"
-    /&gt;
+  &lt;jmx:get
+    name="Catalina:type=Manager,path=/servlets-examples,host=localhost"
+    attribute="maxActiveSessions"
+    resultproperty="servlets-examples.maxActiveSessions"
+  /&gt;
 </source>
 </p>  
 <p>
 Example to get and result array and split it at separate properties<br/>
 <source>
-    &lt;jmx:get
-        name="Catalina:type=ClusterSender,host=localhost" 
-        attribute="senderObjectNames"
-        resultproperty="senderObjectNames"
-    /&gt;
+  &lt;jmx:get
+    name="Catalina:type=ClusterSender,host=localhost"
+    attribute="senderObjectNames"
+    resultproperty="senderObjectNames"
+  /&gt;
 </source>
 Access the senderObjectNames properties with:
 <source>
-    ${senderObjectNames.length} give the number of returned sender list.
-    ${senderObjectNames.[0..N]} found all sender object names
+  ${senderObjectNames.length} give the number of returned sender list.
+  ${senderObjectNames.[0..N]} found all sender object names
 </source>
 </p>  
 
 <p>
-Example to get IDataSender attribute connected only when cluster is configured.
+Example to get IDataSender attribute connected only when cluster is 
configured.<br/>
+<em>Note:</em> The <code>name</code> attribute value was wrapped here to be
+more readable. It has to be all on the same line, without spaces.
+</p>
 <source>
-&lt;jmx:query
+  &lt;jmx:query
     failonerror="false"
     name="Catalina:type=Cluster,host=${tomcat.application.host}"
     resultproperty="cluster"
-/&gt;
-&lt;jmx:get
-    
name="Catalina:type=IDataSender,host=${tomcat.application.host},senderAddress=${cluster.backup.address},senderPort=${cluster.backup.port}"
 
+  /&gt;
+  &lt;jmx:get
+    name=
+"Catalina:type=IDataSender,host=${tomcat.application.host},
+senderAddress=${cluster.backup.address},senderPort=${cluster.backup.port}"
     attribute="connected"
     resultproperty="datasender.connected"
     if="cluster.0.name" /&gt;
 </source>
-</p>  
+
 
 </section>
 
@@ -507,12 +518,12 @@ List of Attributes<br/>
 <p>
 Example to set remote MBean attribute value<br/>
 <source>
-    &lt;jmx:set
-        name="Catalina:type=Manager,path=/servlets-examples,host=localhost" 
-        attribute="maxActiveSessions"
-        value="500"
-        type="int"
-    /&gt;
+  &lt;jmx:set
+    name="Catalina:type=Manager,path=/servlets-examples,host=localhost"
+    attribute="maxActiveSessions"
+    value="500"
+    type="int"
+  /&gt;
 </source>
 </p>  
 
@@ -589,9 +600,9 @@ List of Attributes<br/>
 <p>
 stop an application <br/>
 <source>
-    &lt;jmx:invoke
-        name="Catalina:type=Manager,path=/servlets-examples,host=localhost" 
-        operation="stop"/&gt;
+  &lt;jmx:invoke
+    name="Catalina:type=Manager,path=/servlets-examples,host=localhost"
+    operation="stop"/&gt;
 </source>
 Now you can find the sessionid at <em>${sessions.[0..N}</em> properties and 
access the count
 with ${sessions.length} property.
@@ -599,12 +610,12 @@ with ${sessions.length} property.
 <p>
 Example to get all sessionids <br/>
 <source>
-    &lt;jmx:invoke
-        name="Catalina:type=Manager,path=/servlets-examples,host=localhost" 
-        operation="listSessionIds"
-        resultproperty="sessions"
-        delimiter=" "        
-    /&gt;
+  &lt;jmx:invoke
+    name="Catalina:type=Manager,path=/servlets-examples,host=localhost"
+    operation="listSessionIds"
+    resultproperty="sessions"
+    delimiter=" "
+  /&gt;
 </source>
 Now you can find the sessionid at <em>${sessions.[0..N}</em> properties and 
access the count
 with ${sessions.length} property.
@@ -612,20 +623,20 @@ with ${sessions.length} property.
 <p>
 Example to get remote MBean session attribute from session ${sessionid.0}<br/>
 <source>
-    &lt;jmx:invoke
-        name="Catalina:type=Manager,path=/ClusterTest,host=localhost" 
-        operation="getSessionAttribute"
-        resultproperty="hello"&gt;
-         &lt;arg value="${sessionid.0}"/&gt;
-         &lt;arg value="Hello" /&gt;
- &lt;/jmx:invoke&gt;
+  &lt;jmx:invoke
+    name="Catalina:type=Manager,path=/ClusterTest,host=localhost"
+    operation="getSessionAttribute"
+    resultproperty="hello"&gt;
+     &lt;arg value="${sessionid.0}"/&gt;
+     &lt;arg value="Hello" /&gt;
+  &lt;/jmx:invoke&gt;
 </source>
 </p>
 <p>
 Example to create a new access logger valve at vhost <em>localhost</em>
 <source>
  &lt;jmx:invoke
-         name="Catalina:type=MBeanFactory" 
+         name="Catalina:type=MBeanFactory"
          operation="createAccessLoggerValve"
          resultproperty="accessLoggerObjectName"
  &gt;
@@ -709,8 +720,8 @@ List of Attributes<br/>
 Get all Manager ObjectNames from all services and Hosts <br/>
 <source>
   &lt;jmx:query
-           name="Catalina:type=Manager,* 
-           resultproperty="manager" /&gt;
+    name="Catalina:type=Manager,*
+    resultproperty="manager" /&gt;
 </source>
 Now you can find the Session Manager at <em>${manager.[0..N].name}</em> 
 properties and access the result object counter with ${manager.length} 
property.
@@ -719,9 +730,9 @@ properties and access the result object 
 Example to get the Manager from <em>servlet-examples</em> application an bind 
all MBean properties<br/>
 <source>
   &lt;jmx:query
-           name="Catalina:type=Manager,path=/servlet-examples,host=localhost*" 
-           attributebinding="true"
-           resultproperty="manager.servletExamples" /&gt;
+    name="Catalina:type=Manager,path=/servlet-examples,host=localhost*"
+    attributebinding="true"
+    resultproperty="manager.servletExamples" /&gt;
 </source>
 Now you can find the manager at <em>${manager.servletExamples.0.name}</em> 
property
 and can access all properties from this manager with 
<em>${manager.servletExamples.0.[manager attribute names]</em>}.
@@ -731,7 +742,7 @@ The result object counter from MBeans is
 <p>
 Example to get all MBeans from a server and store inside an external XML 
property file<br/>
 <source>
-&lt;project name="jmx.query"         
+&lt;project name="jmx.query"
             xmlns:jmx="antlib:org.apache.catalina.ant.jmx"
             default="query-all" basedir="."&gt;
 &lt;property name="jmx.host" value="localhost"/&gt;
@@ -740,27 +751,27 @@ Example to get all MBeans from a server 
 &lt;property name="jmx.password" value="tomcat"/&gt;
 
 &lt;target name="query-all" description="Query all MBeans of a server"&gt;
-&lt;!-- Configure connection --&gt;
-&lt;jmx:open 
+  &lt;!-- Configure connection --&gt;
+  &lt;jmx:open
     host="${jmx.host}"
     port="${jmx.port}"
     ref="jmx.server"
     username="${jmx.username}"
     password="${jmx.password}"/&gt;
-&lt;!-- Query MBean list --&gt;
-&lt;jmx:query 
+  &lt;!-- Query MBean list --&gt;
+  &lt;jmx:query
     name="*:*"
     resultproperty="mbeans"
     attributebinding="false"/&gt;
-    
-&lt;echoproperties
+
+  &lt;echoproperties
     destfile="mbeans.properties"
     prefix="mbeans."
     format="xml"/&gt;
-    
-&lt;!-- Print results --&gt;
-&lt;echo
-    message="Number of MBeans in server ${jmx.host}:${jmx.port} is 
${mbeans.length}"/&gt;
+
+  &lt;!-- Print results --&gt;
+  &lt;echo message=
+    "Number of MBeans in server ${jmx.host}:${jmx.port} is 
${mbeans.length}"/&gt;
 &lt;/target&gt;
 &lt;/project&gt;
 </source>
@@ -825,13 +836,13 @@ List of Attributes<br/>
 <p>
 Example to create remote MBean<br/>
 <source>
-    &lt;jmx:create
-             ref="${jmx.reference}"
-             name="Catalina:type=MBeanFactory"
-             className="org.apache.commons.modeler.BaseModelMBean"
-             classLoader="Catalina:type=ServerClassLoader,name=server"&gt;     
        
-             &lt;Arg value="org.apache.catalina.mbeans.MBeanFactory" /&gt;
-    &lt;/jmx:create&gt; 
+  &lt;jmx:create
+    ref="${jmx.reference}"
+    name="Catalina:type=MBeanFactory"
+    className="org.apache.commons.modeler.BaseModelMBean"
+    classLoader="Catalina:type=ServerClassLoader,name=server"&gt;
+    &lt;arg value="org.apache.catalina.mbeans.MBeanFactory" /&gt;
+  &lt;/jmx:create&gt;
 </source>
 </p>  
 <p>
@@ -883,9 +894,9 @@ List of Attributes<br/>
 <p>
 Example to unregister remote MBean<br/>
 <source>
-    &lt;jmx:unregister
-        name="Catalina:type=MBeanFactory" 
-    /&gt;
+  &lt;jmx:unregister
+    name="Catalina:type=MBeanFactory"
+  /&gt;
 </source>
 </p>  
 <p>
@@ -1015,26 +1026,27 @@ List of Attributes<br/>
 <p>
 Wait for server connection and that cluster backup node is accessable<br/>
 <source>
-      &lt;target name="wait"&gt;
-         &lt;waitfor maxwait="${maxwait}" maxwaitunit="second" 
timeoutproperty="server.timeout" &gt;
-            &lt;and&gt;
-                &lt;socket server="${server.name}" port="${server.port}"/&gt;
-                &lt;http url="${url}"/&gt;
-                &lt;jmx:condition
-                    operation="==" 
-                    host="localhost" 
-                    port="9014"
-                    username="controlRole"
-                    password="tomcat"
-                    
name="Catalina:type=IDataSender,host=localhost,senderAddress=192.168.111.1,senderPort=9025"
-                    attribute="connected"
-                    value="true"
-                /&gt;
-            &lt;/and&gt;
-        &lt;/waitfor&gt;
-        &lt;fail if="server.timeout" message="Server ${url} don't answer 
inside ${maxwait} sec" /&gt;
-        &lt;echo message="Server ${url} alive" /&gt;
-    &lt;/target&gt;
+&lt;target name="wait"&gt;
+   &lt;waitfor maxwait="${maxwait}" maxwaitunit="second" 
timeoutproperty="server.timeout" &gt;
+     &lt;and&gt;
+       &lt;socket server="${server.name}" port="${server.port}"/&gt;
+       &lt;http url="${url}"/&gt;
+       &lt;jmx:condition
+         operation="=="
+         host="localhost"
+         port="9014"
+         username="controlRole"
+         password="tomcat"
+         name=
+"Catalina:type=IDataSender,host=localhost,senderAddress=192.168.111.1,senderPort=9025"
+         attribute="connected"
+         value="true"
+       /&gt;
+    &lt;/and&gt;
+  &lt;/waitfor&gt;
+  &lt;fail if="server.timeout" message="Server ${url} don't answer inside 
${maxwait} sec" /&gt;
+  &lt;echo message="Server ${url} alive" /&gt;
+&lt;/target&gt;
 </source>
 </p>  
 
@@ -1117,25 +1129,26 @@ List of Attributes<br/>
 <p>
 Wait for server connection and that cluster backup node is accessible<br/>
 <source>
-      &lt;target name="wait"&gt;
-         &lt;waitfor maxwait="${maxwait}" maxwaitunit="second" 
timeoutproperty="server.timeout" &gt;
-            &lt;and&gt;
-                &lt;socket server="${server.name}" port="${server.port}"/&gt;
-                &lt;http url="${url}"/&gt;
-                &lt;jmx:equals 
-                    host="localhost" 
-                    port="9014"
-                    username="controlRole"
-                    password="tomcat"
-                    
name="Catalina:type=IDataSender,host=localhost,senderAddress=192.168.111.1,senderPort=9025"
-                    attribute="connected"
-                    value="true"
-                /&gt;
-            &lt;/and&gt;
-        &lt;/waitfor&gt;
-        &lt;fail if="server.timeout" message="Server ${url} don't answer 
inside ${maxwait} sec" /&gt;
-        &lt;echo message="Server ${url} alive" /&gt;
-    &lt;/target&gt;
+&lt;target name="wait"&gt;
+  &lt;waitfor maxwait="${maxwait}" maxwaitunit="second" 
timeoutproperty="server.timeout" &gt;
+    &lt;and&gt;
+      &lt;socket server="${server.name}" port="${server.port}"/&gt;
+      &lt;http url="${url}"/&gt;
+      &lt;jmx:equals
+        host="localhost"
+        port="9014"
+        username="controlRole"
+        password="tomcat"
+        name=
+"Catalina:type=IDataSender,host=localhost,senderAddress=192.168.111.1,senderPort=9025"
+        attribute="connected"
+        value="true"
+      /&gt;
+    &lt;/and&gt;
+  &lt;/waitfor&gt;
+  &lt;fail if="server.timeout" message="Server ${url} don't answer inside 
${maxwait} sec" /&gt;
+  &lt;echo message="Server ${url} alive" /&gt;
+&lt;/target&gt;
 </source>
 </p>  
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to