1 <html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>The Apache Tomcat Connector - Miscellaneous Documentation - Status Worker Ant Tasks</title><meta name="author" value="Peter Rossbach"><meta name="email" value=""><link href="../../style.css" type="text/css" rel="stylesheet"></head><body bgcolor="#ffffff" text="#000000" link="#525D76" alink="#525D76" vlink="#525D76"><table border="0" width="100%" cellspacing="4"><!--PAGE HEADER--><tr><td colspan="2"><!--TOMCAT LOGO--><a href="http://tomcat.apache.org/"><img src="../../images/tomcat.gif" align="left" alt="Apache Tomcat" border="0"></a><!--APACHE LOGO--><a href="http://www.apache.org/"><img src="http://www.apache.org/images/asf-logo.gif" align="right" alt="Apache Logo" border="0"></a></td></tr><!--HEADER SEPARATOR--><tr><td colspan="2"><hr noshade size="1"></td></tr><tr><!--RIGHT SIDE MAIN BODY--><td width="80%" valign="top" align="left"><table border="0" width="100%" cellspacing="4"><tr><td align="left" valign="top"><h1>The Apache Tomcat Connector - Miscellaneous Documentation</h1><h2>Status Worker Ant Tasks</h2></td><td align="right" valign="top" nowrap="true"><img src="../../images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr></table><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Introduction"><strong>Introduction</strong></a></font></td></tr><tr><td><blockquote>
2 <p>Since version 1.2.19 the JK release contains additional ant tasks.
3 They can be used to manage the JK web server plugins via the special status worker.
5 </blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Manage JK with remote Ant Tasks"><strong>Manage JK with remote Ant Tasks</strong></a></font></td></tr><tr><td><blockquote>
7 <table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Simple antlib integration"><strong>Simple antlib integration</strong></a></font></td></tr><tr><td><blockquote>
9 <div class="example"><pre>
10 <?xml version="1.0" encoding="UTF-8"?>
12 <project name="modjk-status"
13 xmlns:jk="urn:org-apache-jk-status"
14 default="status" basedir=".">
16 <property name="profile" value=""/>
17 <property file="jkstatus${profile}.properties"/>
18 <property file="jkstatus.properties.default"/>
20 <path id="jkstatus.classpath">
21 <fileset dir="${catalina.home}/bin">
22 <include name="commons-logging-api-*.jar"/>
24 <pathelement location="${catalina.home}/server/lib/catalina-ant.jar"/>
25 <pathelement location="../dist/tomcat-jkstatus-ant.jar"/>
26 <pathelement location="${catalina.home}/server/lib/tomcat-util.jar"/>
29 <typedef resource="org/apache/jk/status/antlib.xml"
30 uri="urn:org-apache-jk-status" classpathref="jkstatus.classpath"/>
32 <target name="status" >
33 <jk:status url="${jkstatus.url}"
34 username="${jkstatus.username}"
35 password="${jkstatus.password}"
36 resultproperty="worker"
38 failOnError="off"/>
39 <echoproperties prefix="worker" />
44 </blockquote></td></tr></table>
46 <table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Test Result"><strong>Test Result</strong></a></font></td></tr><tr><td><blockquote>
48 <div class="example"><pre>
49 [echoproperties] #Ant properties
50 [echoproperties] #Sun Dec 10 20:40:21 CET 2006
51 [echoproperties] worker.node01.lbmult=1
52 [echoproperties] worker.loadbalancer.lock=Optimistic
53 [echoproperties] worker.node02.transferred=0
54 [echoproperties] worker.loadbalancer.sticky_session=false
55 [echoproperties] worker.node01.distance=0
56 [echoproperties] worker.node01.client_errors=0
57 [echoproperties] worker.node02.lbmult=1
58 [echoproperties] worker.node01.port=7309
59 [echoproperties] worker.node01.elected=0
60 [echoproperties] worker.loadbalancer.good=2
61 [echoproperties] worker.loadbalancer.method=Sessions
62 [echoproperties] worker.server.port=2090
63 [echoproperties] worker.loadbalancer.map.2.type=Wildchar
64 [echoproperties] worker.node02.route=node02
65 [echoproperties] worker.node01.route=node01
66 [echoproperties] worker.node01.lbvalue=0
67 [echoproperties] worker.node01.lbfactor=1
68 [echoproperties] worker.node01.max_busy=0
69 [echoproperties] worker.node01.busy=0
70 [echoproperties] worker.node01.redirect=
71 [echoproperties] worker.node02.distance=0
72 [echoproperties] worker.loadbalancer.name=loadbalancer
73 [echoproperties] worker.loadbalancer.sticky_session_force=false
74 [echoproperties] worker.node02.state=N/A
75 [echoproperties] worker.node01.state=N/A
76 [echoproperties] worker.node01.transferred=0
77 [echoproperties] worker.loadbalancer.map.length=2
78 [echoproperties] worker.node01.type=ajp13
79 [echoproperties] worker.node01.address=127.0.0.1\:7309
80 [echoproperties] worker.result.type=OK
81 [echoproperties] worker.loadbalancer.member_count=2
82 [echoproperties] worker.loadbalancer.map_count=2
83 [echoproperties] worker.loadbalancer.mtime_to_maintenance_min=12
84 [echoproperties] worker.loadbalancer.mtime_to_maintenance_max=75
85 [echoproperties] worker.node02.lbfactor=1
86 [echoproperties] worker.node02.max_busy=0
87 [echoproperties] worker.jk_version=mod_jk/1.2.21-dev
88 [echoproperties] worker.loadbalancer.bad=0
89 [echoproperties] worker.node02.redirect=
90 [echoproperties] worker.node01.host=localhost
91 [echoproperties] worker.node02.activation=ACT
92 [echoproperties] worker.loadbalancer.map.1.source=JkMount
93 [echoproperties] worker.loadbalancer.retries=2
94 [echoproperties] worker.node02.elected=0
95 [echoproperties] worker.loadbalancer.map.2.source=JkMount
96 [echoproperties] worker.node02.port=7409
97 [echoproperties] worker.loadbalancer.length=2
98 [echoproperties] worker.node02.lbvalue=0
99 [echoproperties] worker.loadbalancer.degraded=0
100 [echoproperties] worker.loadbalancer.map.1.type=Wildchar
101 [echoproperties] worker.loadbalancer.map.2.uri=/myapps*
102 [echoproperties] worker.node02.client_errors=0
103 [echoproperties] worker.length=1
104 [echoproperties] worker.node01.domain=d20
105 [echoproperties] worker.loadbalancer.recover_time=60
106 [echoproperties] worker.server.name=localhost
107 [echoproperties] worker.node02.domain=
108 [echoproperties] worker.result.message=Action finished
109 [echoproperties] worker.node02.busy=0
110 [echoproperties] worker.node01.readed=0
111 [echoproperties] worker.node01.errors=0
112 [echoproperties] worker.node02.address=127.0.0.1\:7409
113 [echoproperties] worker.node02.readed=0
114 [echoproperties] worker.loadbalancer.busy=0
115 [echoproperties] worker.web_server=Apache/2.0.59 (Unix) mod_jk/1.2.21-dev
116 [echoproperties] worker.node02.errors=0
117 [echoproperties] worker.node02.type=ajp13
118 [echoproperties] worker.loadbalancer.map.1.uri=/ClusterTest*
119 [echoproperties] worker.node01.activation=ACT
120 [echoproperties] worker.loadbalancer.max_busy=0
121 [echoproperties] worker.loadbalancer.type=lb
122 [echoproperties] worker.node02.host=localhost
125 </blockquote></td></tr></table>
127 <table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Update Load Balancer"><strong>Update Load Balancer</strong></a></font></td></tr><tr><td><blockquote>
129 <div class="example"><pre>
130 <target name="updatelb" >
131 <jk:updateloadbalancer url="${jkstatus.url}"
132 username="${jkstatus.username}"
133 password="${jkstatus.password}"
134 loadbalancer="loadbalancer"
139 forceStickySession="false"
140 stickySession="false"/>
144 </blockquote></td></tr></table>
146 <table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Update Worker"><strong>Update Worker</strong></a></font></td></tr><tr><td><blockquote>
148 <div class="example"><pre>
149 <target name="updatew" >
150 <jk:updateworker url="${jkstatus.url}"
151 username="${jkstatus.username}"
152 password="${jkstatus.password}"
153 loadbalancer="loadbalancer"
164 </blockquote></td></tr></table>
166 <table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Reset Worker"><strong>Reset Worker</strong></a></font></td></tr><tr><td><blockquote>
168 <div class="example"><pre>
169 <target name="reset" >
170 <jk:reset url="${jkstatus.url}"
171 username="${jkstatus.username}"
172 password="${jkstatus.password}"
173 loadbalancer="loadbalancer"
179 </blockquote></td></tr></table>
181 </blockquote></td></tr></table></td></tr><!--FOOTER SEPARATOR--><tr><td colspan="2"><hr noshade size="1"></td></tr><!--PAGE FOOTER--><tr><td colspan="2"><div align="center"><font color="#525D76" size="-1"><em>
182 Copyright © 1999-2011, Apache Software Foundation
183 </em></font></div></td></tr></table></body></html>