Definition
<path id="catalina_ant">
<fileset dir="${catalina.home}/server/lib">
<include name="catalina-ant.jar"/>
</fileset>
</path>
<typedef
name="jmxEquals"
classname="org.apache.catalina.ant.jmx.JMXAccessorEqualsCondition"
classpathref="catalina_ant"/>
usage: Wait for start backup node
<target name="wait">
<waitfor maxwait="${maxwait}" maxwaitunit="second" timeoutproperty="server.timeout" >
<and>
<socket server="${server.name}" port="${server.port}"/>
<http url="${url}"/>
<jmxEquals
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"
/>
</and>
</waitfor>
<fail if="server.timeout" message="Server ${url} don't answer inside ${maxwait} sec" />
<echo message="Server ${url} alive" />
</target>