JMXAccessorOpenTask – JMX open connection task

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
echo Echo the command usage (for access analysis or debugging) 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.

 

Example to open a new JMX connection

<jmx:open

host=”${jmx.server.name}”

port=”${jmx.server.port}”

/>

 

Example to open a JMX connection from URL, with authorization and store at other reference

<jmx:open

url=”service:jmx:rmi:///jndi/rmi://localhost:9024/jmxrmi”

ref=”jmx.server.9024″

username=”controlRole”

password=”tomcat”

/>

Example to open a JMX connection from URL, with authorization and store at other reference, but only when property jmx.if exists and jmx.unless not exists

<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”

/>

Note: All properties from jmxOpen task also exists at all other tasks and conditions.

Manage Tomcat with JMX remote Ant Tasks
JMXAccessorGetTask: get attribute value Ant task

Get industry recognized certification – Contact us

keyboard_arrow_up
Open chat
Need help?
Hello 👋
Can we help you?