List of Attributes
Attribute | Description | Default value |
url | Set JMX connection URL – service:jmx:rmi:///jndi/rmi://localhost:8050/jmxrmi | |
host | Set the host, shortcut the very long URL syntax. | localhost |
port | Set the remote connection port | 8050 |
username | remote JMX connection user name. | |
password | remote JMX connection password. | |
ref | Name of the internal connection reference. With this attribute you can configure more the one connection inside the same Ant project. | jmx.server |
name | Full qualified JMX ObjectName — Catalina:type=Server | |
echo | Echo condition usage (access and result) | false |
if | Only execute if a property of the given name exists in the current project. | |
unless | Only execute if a property of the given name not exists in the current project. | |
value (requiered) | Second arg for operation | |
type | Value type to express operation (support long and double) | long |
operation | express one
== equals != not equals greater than (>) >= greater than or equals (>=) < lesser than (<) <= lesser than or equals (<=) |
== |
Wait for server connection and that cluster backup node is accessable
<target name=”wait”>
<waitfor maxwait=”${maxwait}” maxwaitunit=”second” timeoutproperty=”server.timeout” >
<and>
<socket server=”${server.name}” port=”${server.port}”/>
<http url=”${url}”/>
<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”
/>
</and>
</waitfor>
<fail if=”server.timeout” message=”Server ${url} don’t answer inside ${maxwait} sec” />
<echo message=”Server ${url} alive” />
</target>