Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.catalina.ant.jmx: Javadoc index of package org.apache.catalina.ant.jmx.


Package Samples:

org.apache.catalina.ant.jmx: This package contains a set of Task implementations for Ant (version 1.6.x or later) that can be used to interact with the Manager application to deploy, undeploy, list, reload, start and stop web applications from a running instance of Tomcat.  

Classes:

JMXAccessorCondition: Definition : <path id="catalina_ant"> <fileset dir="${catalina.home}/server/lib"> <include name="catalina-ant.jar"/> <include name="catalina-ant-jmx.jar"/> </fileset> </path> <typedef name="jmxCondition" classname="org.apache.catalina.ant.jmx.JMXAccessorCondition" classpathref="catalina_ant"/> <taskdef name="jmxOpen" classname="org.apache.catalina.ant.jmx.JMXAccessorTask" classpathref="catalina_ant"/> Usage : Wait for start backup node <target name="wait"> <jmxOpen host="${jmx.host}" port="${jmx.port}" username="${jmx.username}" password="${jmx.password}" /> ...
JMXAccessorInvokeTask: Access JMX JSR 160 MBeans Server. open more then one JSR 160 rmi connection Get/Set Mbeans attributes Call Mbean Operation with arguments Argument values can be converted from string to int,long,float,double,boolean,ObjectName or InetAddress Query Mbeans Show Get, Call, Query result at Ant console log Bind Get, Call, Query result at Ant properties Examples: Get a session attribute hello from session with ref ${sessionid.0} form app Catalina:type=Manager,path=/ClusterTest,host=localhost <jmx:invoke name="Catalina:type=Manager,path=/ClusterTest,host=localhost" operation="getSessionAttribute" resultproperty="hello"> ...
JMXAccessorEqualsCondition: Definition <path id="catalina_ant"> <fileset dir="${catalina.home}/server/lib"> <include name="catalina-ant.jar"/> <include name="catalina-ant-jmx.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" ...
JMXAccessorTask: Access JMX JSR 160 MBeans Server. open more then one JSR 160 rmi connection Get/Set Mbeans attributes Call Mbean Operation with arguments Argument values can be converted from string to int,long,float,double,boolean,ObjectName or InetAddress Query Mbeans Show Get, Call, Query result at Ant console log Bind Get, Call, Query result at Ant properties Examples: open server with reference and autorisation <jmxOpen host="127.0.0.1" port="9014" username="monitorRole" password="mysecret" ref="jmx.myserver" /> All calls after opening with same refid ...
JMXAccessorCreateTask: Create new MBean at JMX JSR 160 MBeans Server. Create Mbeans Create Mbeans with parameter Create remote Mbeans with different classloader Examples: create a new Mbean at jmx.server connection <jmx:create ref="jmx.server" name="Catalina:type=MBeanFactory" className="org.apache.catalina.mbeans.MBeanFactory" classLoader="Catalina:type=ServerClassLoader,name=server"> <Arg value="org.apache.catalina.mbeans.MBeanFactory" /> </jmxCreate/> WARNING Not all Tomcat MBeans can create remotely and autoregister by its parents! Please, use the MBeanFactory operation to generate valves and realms. ...
JMXAccessorSetTask: Access JMX JSR 160 MBeans Server. Get Mbeans attributes Show Get result as Ant console log Bind Get result as Ant properties Examples: Set a Mbean Manager attribute maxActiveSessions. Set this attribute with fresh jmx connection without save reference <jmx:set host="127.0.0.1" port="9014" ref="" name="Catalina:type=Manager,path="/ClusterTest",host=localhost" attribute="maxActiveSessions" value="100" type="int" echo="false"> /> First call to a remote MBeanserver save the JMXConnection a referenz jmx.server These tasks require Ant 1.6 or later interface.
JMXAccessorGetTask: Access JMX JSR 160 MBeans Server. Get Mbeans attributes Show Get result as Ant console log Bind Get result as Ant properties Examples: Get a Mbean IDataSender attribute nrOfRequests and create a new ant property IDataSender.9025.nrOfRequests <jmx:get ref="jmx.server" name="Catalina:type=IDataSender,host=localhost,senderAddress=192.168.1.2,senderPort=9025" attribute="nrOfRequests" resultproperty="IDataSender.9025.nrOfRequests" echo="false"> /> First call to a remote MBeanserver save the JMXConnection a referenz jmx.server These tasks require Ant 1.6 or later interface.
JMXAccessorQueryTask: Query for Mbeans. open no existing JSR 160 rmi jmx connection Get all Mbeans attributes Get only the Query Mbeans ObjectNames Show query result as Ant console log Bind query result as Ant properties Query a list of Mbeans. <jmxQuery host="127.0.0.1" port="9014" name="Catalina:type=Manager,* resultproperty="manager" /> with attribute attributebinding="true" you can get all attributes also from result objects. The poperty manager.lenght show the size of the result and with manager.[0..lenght].name the resulted ObjectNames are saved. These tasks require Ant 1.6 or later interface.
JMXAccessorUnregisterTask: unregister a MBean at JMX JSR 160 MBeans Server. unregister Mbeans Examples: unregister an existing Mbean at jmx.server connection <jmx:unregister ref="jmx.server" name="Catalina:type=MBeanFactory" /> WARNING Not all Tomcat MBeans can successfully unregister remotely. The mbean unregistration don't remove valves, realm, .. from parent class. Please, use the MBeanFactory operation to remove valves and realms. First call to a remote MBeanserver save the JMXConnection a reference jmx.server These tasks require Ant 1.6 or later interface.
Arg

Home | Contact Us | Privacy Policy | Terms of Service