3 <!ENTITY project SYSTEM "project.xml">
5 <document url="jkstatustasks.html">
10 Licensed to the Apache Software Foundation (ASF) under one or more
11 contributor license agreements. See the NOTICE file distributed with
12 this work for additional information regarding copyright ownership.
13 The ASF licenses this file to You under the Apache License, Version 2.0
14 (the "License"); you may not use this file except in compliance with
15 the License. You may obtain a copy of the License at
17 http://www.apache.org/licenses/LICENSE-2.0
19 Unless required by applicable law or agreed to in writing, software
20 distributed under the License is distributed on an "AS IS" BASIS,
21 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 See the License for the specific language governing permissions and
23 limitations under the License.
27 <title>Status Worker Ant Tasks</title>
28 <author>Peter Rossbach</author>
29 <date>$Date: 2008-03-26 00:47:22 +0100 (Wed, 26 Mar 2008) $</date>
34 <section name="Introduction">
35 <p>Since version 1.2.19 the JK release contains additional ant tasks.
36 They can be used to manage the JK web server plugins via the special status worker.
40 <section name="Manage JK with remote Ant Tasks">
42 <subsection name="Simple antlib integration">
45 <?xml version="1.0" encoding="UTF-8"?>
47 <project name="modjk-status"
48 xmlns:jk="urn:org-apache-jk-status"
49 default="status" basedir=".">
51 <property name="profile" value=""/>
52 <property file="jkstatus${profile}.properties"/>
53 <property file="jkstatus.properties.default"/>
55 <path id="jkstatus.classpath">
56 <fileset dir="${catalina.home}/bin">
57 <include name="commons-logging-api-*.jar"/>
59 <pathelement location="${catalina.home}/server/lib/catalina-ant.jar"/>
60 <pathelement location="../dist/tomcat-jkstatus-ant.jar"/>
61 <pathelement location="${catalina.home}/server/lib/tomcat-util.jar"/>
64 <typedef resource="org/apache/jk/status/antlib.xml"
65 uri="urn:org-apache-jk-status" classpathref="jkstatus.classpath"/>
67 <target name="status" >
68 <jk:status url="${jkstatus.url}"
69 username="${jkstatus.username}"
70 password="${jkstatus.password}"
71 resultproperty="worker"
73 failOnError="off"/>
74 <echoproperties prefix="worker" />
81 <subsection name="Test Result">
84 [echoproperties] #Ant properties
85 [echoproperties] #Sun Dec 10 20:40:21 CET 2006
86 [echoproperties] worker.node01.lbmult=1
87 [echoproperties] worker.loadbalancer.lock=Optimistic
88 [echoproperties] worker.node02.transferred=0
89 [echoproperties] worker.loadbalancer.sticky_session=false
90 [echoproperties] worker.node01.distance=0
91 [echoproperties] worker.node01.client_errors=0
92 [echoproperties] worker.node02.lbmult=1
93 [echoproperties] worker.node01.port=7309
94 [echoproperties] worker.node01.elected=0
95 [echoproperties] worker.loadbalancer.good=2
96 [echoproperties] worker.loadbalancer.method=Sessions
97 [echoproperties] worker.server.port=2090
98 [echoproperties] worker.loadbalancer.map.2.type=Wildchar
99 [echoproperties] worker.node02.route=node02
100 [echoproperties] worker.node01.route=node01
101 [echoproperties] worker.node01.lbvalue=0
102 [echoproperties] worker.node01.lbfactor=1
103 [echoproperties] worker.node01.max_busy=0
104 [echoproperties] worker.node01.busy=0
105 [echoproperties] worker.node01.redirect=
106 [echoproperties] worker.node02.distance=0
107 [echoproperties] worker.loadbalancer.name=loadbalancer
108 [echoproperties] worker.loadbalancer.sticky_session_force=false
109 [echoproperties] worker.node02.state=N/A
110 [echoproperties] worker.node01.state=N/A
111 [echoproperties] worker.node01.transferred=0
112 [echoproperties] worker.loadbalancer.map.length=2
113 [echoproperties] worker.node01.type=ajp13
114 [echoproperties] worker.node01.address=127.0.0.1\:7309
115 [echoproperties] worker.result.type=OK
116 [echoproperties] worker.loadbalancer.member_count=2
117 [echoproperties] worker.loadbalancer.map_count=2
118 [echoproperties] worker.loadbalancer.mtime_to_maintenance_min=12
119 [echoproperties] worker.loadbalancer.mtime_to_maintenance_max=75
120 [echoproperties] worker.node02.lbfactor=1
121 [echoproperties] worker.node02.max_busy=0
122 [echoproperties] worker.jk_version=mod_jk/1.2.21-dev
123 [echoproperties] worker.loadbalancer.bad=0
124 [echoproperties] worker.node02.redirect=
125 [echoproperties] worker.node01.host=localhost
126 [echoproperties] worker.node02.activation=ACT
127 [echoproperties] worker.loadbalancer.map.1.source=JkMount
128 [echoproperties] worker.loadbalancer.retries=2
129 [echoproperties] worker.node02.elected=0
130 [echoproperties] worker.loadbalancer.map.2.source=JkMount
131 [echoproperties] worker.node02.port=7409
132 [echoproperties] worker.loadbalancer.length=2
133 [echoproperties] worker.node02.lbvalue=0
134 [echoproperties] worker.loadbalancer.degraded=0
135 [echoproperties] worker.loadbalancer.map.1.type=Wildchar
136 [echoproperties] worker.loadbalancer.map.2.uri=/myapps*
137 [echoproperties] worker.node02.client_errors=0
138 [echoproperties] worker.length=1
139 [echoproperties] worker.node01.domain=d20
140 [echoproperties] worker.loadbalancer.recover_time=60
141 [echoproperties] worker.server.name=localhost
142 [echoproperties] worker.node02.domain=
143 [echoproperties] worker.result.message=Action finished
144 [echoproperties] worker.node02.busy=0
145 [echoproperties] worker.node01.readed=0
146 [echoproperties] worker.node01.errors=0
147 [echoproperties] worker.node02.address=127.0.0.1\:7409
148 [echoproperties] worker.node02.readed=0
149 [echoproperties] worker.loadbalancer.busy=0
150 [echoproperties] worker.web_server=Apache/2.0.59 (Unix) mod_jk/1.2.21-dev
151 [echoproperties] worker.node02.errors=0
152 [echoproperties] worker.node02.type=ajp13
153 [echoproperties] worker.loadbalancer.map.1.uri=/ClusterTest*
154 [echoproperties] worker.node01.activation=ACT
155 [echoproperties] worker.loadbalancer.max_busy=0
156 [echoproperties] worker.loadbalancer.type=lb
157 [echoproperties] worker.node02.host=localhost
162 <subsection name="Update Load Balancer">
165 <target name="updatelb" >
166 <jk:updateloadbalancer url="${jkstatus.url}"
167 username="${jkstatus.username}"
168 password="${jkstatus.password}"
169 loadbalancer="loadbalancer"
174 forceStickySession="false"
175 stickySession="false"/>
181 <subsection name="Update Worker">
184 <target name="updatew" >
185 <jk:updateworker url="${jkstatus.url}"
186 username="${jkstatus.username}"
187 password="${jkstatus.password}"
188 loadbalancer="loadbalancer"
201 <subsection name="Reset Worker">
204 <target name="reset" >
205 <jk:reset url="${jkstatus.url}"
206 username="${jkstatus.username}"
207 password="${jkstatus.password}"
208 loadbalancer="loadbalancer"