Last modified by Pascal Robert on 2023/08/10 22:21

From version 166.1
edited by John Huss
on 2011/06/28 20:24
Change comment: clarified bounce behavior
To version 173.1
edited by David Avendasora
on 2013/04/18 02:05
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.johnthuss
1 +XWiki.avendasora
Content
... ... @@ -12,12 +12,12 @@
12 12  
13 13  === Where To Get Them ===
14 14  
15 -You can either download them pre-built from [[Wonder's Hudson build server>>http://webobjects.mdimension.com/hudson/job/Wonder54/lastSuccessfulBuild/artifact/dist/]] or build them from the source code.
15 +You can either download them pre-built from [[Wonder's Jenkins build server>>http://jenkins.wocommunity.org/job/Wonder/lastSuccessfulBuild/]] or build them from the source code.
16 16  
17 -To build them from the [[Wonder source code>>WONDER:Getting the Wonder Source Code]], simply run the following command from the Wonder directory at the root of the Wonder source.
17 +To build them from the [[Wonder source code>>Getting the Wonder Source Code]], simply run the following command from the Wonder directory at the root of the Wonder source.
18 18  
19 19  {{code}}
20 -ant frameworks deployment.tools -Dwonder.patch=54 -Ddeployment.standalone=true
20 +ant frameworks deployment.tools -Ddeployment.standalone=true
21 21  {{/code}}
22 22  
23 23  {{info title="What this command does:"}}
... ... @@ -25,7 +25,6 @@
25 25  * *ant*: calls Apache Ant. It is assumed that you have this already installed.
26 26  * *frameworks*: tells Ant to build the "frameworks" target. This may not be needed if you already have Wonder built and installed in a location Ant can find automatically.
27 27  * *deployment.tools*: tells Ant to build the "deployment.tools" target. This is the target that builds both wotaskd.woa and JavaMonitor.woa. You absolutely need this one.
28 -* *\-Dwonder.patch=54*: tells Wonder to build for WebObjects version 5.4. You need this if you are building against Wonder Trunk. Some branches don't need it, but it doesn't hurt either.
29 29  * *\-Ddeployment.standalone=true*: argument will embed the required Wonder and WebObjects frameworks in built applications. You need this to ensure that the required frameworks are embedded in the built applications.
30 30  
31 31  {{/info}}
... ... @@ -103,12 +103,20 @@
103 103  
104 104  {{/code}}
105 105  
106 -If JavaMonitor is configured with a password, and I hope you do, pass //pw=monitorpassword// as a argument to the query :
105 +{{info}}
107 107  
108 -##[[http://monitorhost:port/cgi-bin/WebObjects/JavaMonitor.woa/wa/statistics?pw=monitorpassword]]##
107 +If JavaMonitor is configured with a password, and I hope you do, pass _pw=monitorpassword_ as a argument to the query :
109 109  
110 -==== Direct Actions for Management Tasks ====
109 +{code}
110 +http://monitorhost:port/cgi-bin/WebObjects/JavaMonitor.woa/wa/statistics?pw=monitorpassword
111 111  
112 +wget http://monitorhost:56789/cgi-bin/WebObjects/JavaMonitor.woa/admin/stop?type=app&name=InstanceName&pw=yourPassword
113 +{code}
114 +
115 +{{/info}}
116 +
117 +==== Direct Actions in JavaMonitor for Management Tasks ====
118 +
112 112  You can do most of the standard management tasks you'd normally do in JavaMonitor's web UI by calling standard WebObjects Direct Actions. Instead of using the ##/wa/## request handler though, these management tasks use a new ##/admin/## request handler. These Direct Actions can be very useful, especially if you need to restart instances or other do tasks from the command line, from within Ant or other build or deployment systems.
113 113  
114 114  List of available direct actions :
... ... @@ -147,9 +147,9 @@
147 147  ##turnRefuseNewSessionsOn?##{{{}{*}type=ins&name=*{}}}{{color value="maroon"}}{{{}{*}AppName{*}{}}}{{/color}}{{{}*\-*{}}}{{color value="maroon"}}{{{}{*}InstanceNumber{*}{}}}{{/color}}
148 148  
149 149  * {{{*}turnRefuseNewSessionsOff{*}}} : Returns {{{*}OK{*}}} after turning off "Refuse new sessions" as specified
150 -##turnRefuseNewSessionsOn?##{{{}{*}type=all{*}}}
151 -##turnRefuseNewSessionsOn?##{{{}{*}type=app&name=*{}}}{{color value="maroon"}}{{{}{*}AppName{*}{}}}{{/color}}
152 -##turnRefuseNewSessionsOn?##{{{}{*}type=ins&name=*{}}}{{color value="maroon"}}{{{}{*}AppName{*}{}}}{{/color}}{{{}*\-*{}}}{{color value="maroon"}}{{{}{*}InstanceNumber{*}{}}}{{/color}}
157 +##turnRefuseNewSessionsOff?##{{{}{*}type=all{*}}}
158 +##turnRefuseNewSessionsOff?##{{{}{*}type=app&name=*{}}}{{color value="maroon"}}{{{}{*}AppName{*}{}}}{{/color}}
159 +##turnRefuseNewSessionsOff?##{{{}{*}type=ins&name=*{}}}{{color value="maroon"}}{{{}{*}AppName{*}{}}}{{/color}}{{{}*\-*{}}}{{color value="maroon"}}{{{}{*}InstanceNumber{*}{}}}{{/color}}
153 153  
154 154  * {{{*}turnAutoRecoverOn{*}}} : Returns {{{*}OK{*}}} after turning on "Auto Recover" as specified
155 155  ##turnAutoRecoverOn?##{{{}{*}type=all{*}}}
... ... @@ -185,9 +185,9 @@
185 185  To get details about instance **1** of the **AjaxExample** application:
186 186  ##[[http://monitorhost:port/cgi-bin/WebObjects/JavaMonitor.woa/admin/info?type=ins&name=AjaxExample-1]]##
187 187  
188 -==== Remote Control via REST Routes ====
195 +==== Remote Control via REST Routes (for JavaMonitor) ====
189 189  
190 -If the control offered by the Direct Actions isn't enough, JavaMonitor allows additional control via [[REST>>WONDER:ERRest Framework]] calls. Between the two methods (Direct Actions, REST) you have almost full remote-control of JavaMonitor. Just make sure that your JavaMonitor installation is secure Just like with Direct Actions, you need to append ##?pw=XXXX## to the URLs if your JavaMonitor is password protected.
197 +If the control offered by the Direct Actions isn't enough, JavaMonitor allows additional control via [[REST>>ERRest Framework]] calls. Between the two methods (Direct Actions, REST) you have almost full remote-control of JavaMonitor. Just make sure that your JavaMonitor installation is secure Just like with Direct Actions, you need to append ##?pw=XXXX## to the URLs if your JavaMonitor is password protected.
191 191  
192 192  Examples of REST calls :
193 193  
... ... @@ -235,6 +235,154 @@
235 235  
236 236  Note that before configuring the site you must first add a host. If you attempt to configure the site prior to adding a host you will get an InvalidStateException.
237 237  
245 +==== Remote Control via REST Routes (for wotaskd) ====
246 +
247 +Starting on August 10th 2012, wotaskd also have REST routes. By using them, you can do most of the tasks using REST and you might not even need JavaMonitor. Just like the JavaMonitor REST and Direct Actions, you need to append ##?pw=XXXX## to the URLs if wotaskd is password protected.
248 +
249 +{{code title="Fetching Details for All Applications"}}
250 +
251 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications.json
252 +
253 +{{/code}}
254 +
255 +{{code title="Adding a New Application"}}
256 +
257 +curl -X POST -d "{id: 'AjaxExample',type: 'MApplication', name: 'AjaxExample',unixOutputPath: '/opt/Local/Library/WebObjects/Logs', unixPath: '/opt/Local/Library/WebObjects/Applications/AjaxExample.woa/AjaxExample'}" http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications.json
258 +
259 +{{/code}}
260 +
261 +{{code title="Delete an Application"}}
262 +
263 +curl -X DELETE http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample.json
264 +
265 +{{/code}}
266 +
267 +{{code title="Adding a New Instance"}}
268 +
269 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/addInstance&host=localhost
270 +
271 +{{/code}}
272 +
273 +{{code title="Delete an Instance"}}
274 +
275 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/deleteInstance?id=1
276 +
277 +{{/code}}
278 +
279 +{{code title="Configuring the Site"}}
280 +
281 +curl -X PUT -d "{woAdaptor:'www.mydomain.com'}" http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mSiteConfig.json
282 +
283 +{{/code}}
284 +
285 +{{code title="Starting all applications"}}
286 +
287 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/start
288 +
289 +{{/code}}
290 +
291 +{{code title="Starting a specific application (AjaxExample in this example)"}}
292 +
293 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/start
294 +
295 +{{/code}}
296 +
297 +{{code title="Starting a specific instance of an application (instance 1 of AjaxExample in this example)"}}
298 +
299 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/start?id=1
300 +
301 +{{/code}}
302 +
303 +{{code title="Stopping all applications"}}
304 +
305 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/stop
306 +
307 +{{/code}}
308 +
309 +{{code title="Stopping a specific application (AjaxExample in this example)"}}
310 +
311 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/stop
312 +
313 +{{/code}}
314 +
315 +{{code title="Stopping a specific instance of an application (instance 1 of AjaxExample in this example)"}}
316 +
317 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/stop?id=1
318 +
319 +{{/code}}
320 +
321 +{{code title="Force quit all applications"}}
322 +
323 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/forceQuit
324 +
325 +{{/code}}
326 +
327 +{{code title="Force quit a specific application (AjaxExample in this example)"}}
328 +
329 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/forceQuit
330 +
331 +{{/code}}
332 +
333 +{{code title="Force quit a specific instance of an application (instance 1 of AjaxExample in this example)"}}
334 +
335 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/forceQuit?id=1
336 +
337 +{{/code}}
338 +
339 +{{code title="Information about all applications"}}
340 +
341 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/info
342 +
343 +{{/code}}
344 +
345 +{{code title="Information about a specific application (AjaxExample in this example)"}}
346 +
347 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/info
348 +
349 +{{/code}}
350 +
351 +{{code title="Information about a specific instance of an application (instance 1 of AjaxExample in this example)"}}
352 +
353 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/info?id=1
354 +
355 +{{/code}}
356 +
357 +{{code title="Check if all applications are running"}}
358 +
359 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/isRunning
360 +
361 +{{/code}}
362 +
363 +{{code title="Check if a specific application is running (AjaxExample in this example)"}}
364 +
365 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/isRunning
366 +
367 +{{/code}}
368 +
369 +{{code title="Check if a specific instance of an application is running (instance 1 of AjaxExample in this example)"}}
370 +
371 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/isRunning?id=1
372 +
373 +{{/code}}
374 +
375 +{{code title="Check if all applications are stopped"}}
376 +
377 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/isStopped
378 +
379 +{{/code}}
380 +
381 +{{code title="Check if a specific application is stopped (AjaxExample in this example)"}}
382 +
383 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/isStopped
384 +
385 +{{/code}}
386 +
387 +{{code title="Check if a specific instance of an application is stopped (instance 1 of AjaxExample in this example)"}}
388 +
389 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/isStopped?id=1
390 +
391 +{{/code}}
392 +
238 238  === Troubleshooting ===
239 239  
240 -If JavaMonitor won't start up check the [[troubleshooting deployment>>WO:Troubleshooting Deployment]] section. In particular pay attention to the [[WOTaskd Didn't Start>>WO:Troubleshooting Deployment]] Q&A.
395 +If JavaMonitor won't start up check the [[troubleshooting deployment>>Troubleshooting Deployment]] section. In particular pay attention to the [[WOTaskd Didn't Start>>Troubleshooting Deployment]] Q&A.