bottleneck testcase based on rubbos
[bottlenecks.git] / rubbos / app / tomcat-connectors-1.2.32-src / xdocs / miscellaneous / jkstatustasks.xml
1 <?xml version="1.0"?>
2 <!DOCTYPE document [
3   <!ENTITY project SYSTEM "project.xml">
4 ]>
5 <document url="jkstatustasks.html">
6  
7   &project;
8
9 <copyright>
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
16  
17        http://www.apache.org/licenses/LICENSE-2.0
18  
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.
24 </copyright>
25
26 <properties>
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>
30 </properties>
31
32 <body>
33
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.
37 </p>
38 </section>
39
40 <section name="Manage JK with remote Ant Tasks">
41
42 <subsection name="Simple antlib integration">
43 <p>
44 <source>
45 &lt;?xml version="1.0" encoding="UTF-8"?&gt;
46
47 &lt;project name="modjk-status" 
48          xmlns:jk="urn:org-apache-jk-status"
49          default="status" basedir="."&gt;
50
51         &lt;property name="profile" value=""/&gt;
52         &lt;property file="jkstatus${profile}.properties"/&gt;
53         &lt;property file="jkstatus.properties.default"/&gt;
54
55     &lt;path id="jkstatus.classpath"&gt;
56       &lt;fileset dir="${catalina.home}/bin"&gt;
57           &lt;include name="commons-logging-api-*.jar"/&gt;
58       &lt;/fileset&gt;
59       &lt;pathelement location="${catalina.home}/server/lib/catalina-ant.jar"/&gt;
60       &lt;pathelement location="../dist/tomcat-jkstatus-ant.jar"/&gt;
61       &lt;pathelement location="${catalina.home}/server/lib/tomcat-util.jar"/&gt;
62     &lt;/path&gt;
63
64     &lt;typedef resource="org/apache/jk/status/antlib.xml"       
65            uri="urn:org-apache-jk-status" classpathref="jkstatus.classpath"/&gt; 
66            
67     &lt;target name="status" &gt;       
68             &lt;jk:status url="${jkstatus.url}" 
69                         username="${jkstatus.username}"
70                         password="${jkstatus.password}"
71                         resultproperty="worker"
72                         echo="off"
73                         failOnError="off"/&gt;
74             &lt;echoproperties prefix="worker" /&gt;
75     &lt;/target&gt;
76 &lt;/project&gt;    
77 </source>
78 </p>
79 </subsection>
80
81 <subsection name="Test Result">
82 <p>
83 <source>
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
158 </source>
159 </p>
160 </subsection>
161
162 <subsection name="Update Load Balancer">
163 <p>
164 <source>
165      &lt;target name="updatelb" &gt;       
166             &lt;jk:updateloadbalancer url="${jkstatus.url}" 
167                         username="${jkstatus.username}"
168                         password="${jkstatus.password}"
169                         loadbalancer="loadbalancer"
170                         method="Busyness"
171                         retries="2"
172                         recoverWaitTime="60"
173                         lock="Optimistic"
174                         forceStickySession="false"
175                         stickySession="false"/&gt;
176      &lt;/target&gt;
177 </source>
178 </p>
179 </subsection>
180
181 <subsection name="Update Worker">
182 <p>
183 <source>
184      &lt;target name="updatew" &gt;       
185             &lt;jk:updateworker url="${jkstatus.url}" 
186                         username="${jkstatus.username}"
187                         password="${jkstatus.password}"
188                         loadbalancer="loadbalancer"
189                         worker="node01"
190                         lbfactor="2"
191                         activation="Active"
192                         redirect=""
193                         domain=""
194                         route="node01"
195                         distance="0"/&gt;
196      &lt;/target&gt;
197 </source>
198 </p>
199 </subsection>
200
201 <subsection name="Reset Worker">
202 <p>
203 <source>
204      &lt;target name="reset" &gt;       
205             &lt;jk:reset url="${jkstatus.url}" 
206                         username="${jkstatus.username}"
207                         password="${jkstatus.password}"
208                         loadbalancer="loadbalancer"
209                         worker="node01"
210                         /&gt;
211      &lt;/target&gt;
212 </source>
213 </p>
214 </subsection>
215
216 </section>
217 </body>
218 </document>