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

From version 159.1
edited by simon
on 2010/12/01 07:53
Change comment: There is no comment for this version
To version 174.1
edited by Pascal Robert
on 2012/08/10 06:41
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.simon
1 +XWiki.probert
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:Download Wonder Source, Build, Install and Upgrade]], 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}}
... ... @@ -45,13 +45,14 @@
45 45  
46 46  ==== Simplified/Automated Bouncing ====
47 47  
48 -In the "list instances" page, you get a "Bounce" action link. This action only work if you have at least one active instance and one inactive. What it does is :
47 +In the "list instances" page, you get a "Bounce" action link. This action only work if you have at least one active instance and one inactive instance (only one inactive instance takes part in the bounce). What it does is :
49 49  
50 -* Find the inactive (i.e., not started) instance and start it
49 +* Find one inactive (i.e., not started) instance and start it
51 51  * Find the active instances (minus the one started in the previous step) and enable "Refuse New Session"
52 -* Bounce the active instances when the minimum session count is reached
51 +* Stop the active instances that are refusing new sessions when the minimum session count is reached
52 +* Restart all but one of the instances that were just stopped and turn on "Auto-Recover"
53 53  
54 -This feature, from Pascal's understanding, allows you to upload new versions of your application, start up the new version and refuse sessions for the instances running on the older version.
54 +This feature, from Pascal's understanding, allows you to upload new versions of your application, start up the new version and refuse sessions for the instances running on the older version.  This is designed to work so that you always have just **one** inactive instance that is only used while the bounce is performed.  While waiting for the existing sessions to end you will have only one instance of your app accepting new sessions; you need to determine if this is acceptable for your app or not.
55 55  
56 56  {{warning title="Database Changes"}}
57 57  
... ... @@ -102,12 +102,20 @@
102 102  
103 103  {{/code}}
104 104  
105 -If JavaMonitor is configured with a password, and I hope you do, pass //pw=monitorpassword// as a argument to the query :
105 +{{info}}
106 106  
107 -##[[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 :
108 108  
109 -==== Direct Actions for Management Tasks ====
109 +{code}
110 +http://monitorhost:port/cgi-bin/WebObjects/JavaMonitor.woa/wa/statistics?pw=monitorpassword
110 110  
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 +
111 111  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.
112 112  
113 113  List of available direct actions :
... ... @@ -184,9 +184,9 @@
184 184  To get details about instance **1** of the **AjaxExample** application:
185 185  ##[[http://monitorhost:port/cgi-bin/WebObjects/JavaMonitor.woa/admin/info?type=ins&name=AjaxExample-1]]##
186 186  
187 -==== Remote Control via REST Routes ====
195 +==== Remote Control via REST Routes (for JavaMonitor) ====
188 188  
189 -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.
190 190  
191 191  Examples of REST calls :
192 192  
... ... @@ -234,6 +234,154 @@
234 234  
235 235  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.
236 236  
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 +
237 237  === Troubleshooting ===
238 238  
239 -If JavaMonitor did not start on your fresh install of WebObjects, check out the WOTaskd Didn't Start question in the troubleshooting section.
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.