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

Quick Search    Search Deep

org.apache.catalina.ant.jmx.* (10)

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


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.
BaseRedirectorHelperTask: Abstract base class to add output redirection support for Catalina Ant tasks. These tasks require Ant 1.5 or later. WARNING: due to depends chain, Ant could call a Task more than once and this can affect the output redirection when configured. If you are collecting the output in a property, it will collect the output of only the first run, since Ant properties are immutable and once created they cannot be changed. If you are collecting output in a file the file will be overwritten with the output of the last run, unless you set append="true", in which case each run will append it's output to the ...
AbstractCatalinaTask: Abstract base class for Ant tasks that interact with the Manager web application for dynamically deploying and undeploying applications. These tasks require Ant 1.4 or later.
JMXQueryTask: Ant task that implements the JMX Query command ( /jmxproxy/?qry ) supported by the Tomcat manager application.
JMXSetTask: Ant task that implements the JMX Set command ( /jmxproxy/?set ) supported by the Tomcat manager application.
JMXGetTask: Ant task that implements the JMX Get command ( /jmxproxy/?get ) supported by the Tomcat manager application.
JKStatusUpdateTask: Ant task that implements the /status command, supported by the mod_jk status (1.2.9) application.
ResourcesTask: Ant task that implements the /resources command, supported by the Tomcat manager application.
ServerinfoTask: Ant task that implements the /serverinfo command supported by the Tomcat manager application.
UndeployTask: Ant task that implements the /undeploy command, supported by the Tomcat manager application.
InstallTask: Ant task that implements the /install command, supported by the Tomcat manager application.
SessionsTask: Ant task that implements the /sessions command supported by the Tomcat manager application.
DeployTask: Ant task that implements the /deploy command, supported by the Tomcat manager application.
ReloadTask: Ant task that implements the /reload command, supported by the Tomcat manager application.
RemoveTask: Ant task that implements the /remove command, supported by the Tomcat manager application.
RolesTask: Ant task that implements the /roles command, supported by the Tomcat manager application.
StartTask: Ant task that implements the /start command, supported by the Tomcat manager application.

Home | Contact Us | Privacy Policy | Terms of Service