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

From version 147.1
edited by Pascal Robert
on 2009/08/10 15:31
Change comment: There is no comment for this version
To version 144.1
edited by Pascal Robert
on 2010/11/25 18:23
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -112,6 +112,60 @@
112 112  
113 113  This feature, from my understanding, allow you to upload new versions of your app, start up the new version and refuse sessions for the instances running on the older version. I don't know how this will work if your new version use migrations to change your schema (eg : old instances might raise exceptions because of database schema changes), so try it out on a test server before and put your results here.
114 114  
115 +=== REST routes ===
116 +
117 +On September 28th 2010, REST routes were added in JavaMonitor. Those routes + the direct actions explained in this document allow you to control almost everything remotely (make sure that your JavaMonitor installation is secure!). As the direct actions, append //?pw=XXXX// to the URLs if JavaMonitor is password protected.
118 +
119 +Examples of REST calls :
120 +
121 +Fetching the details of all applications :
122 +
123 +{{code}}
124 +
125 +curl -X GET http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications.json
126 +
127 +{{/code}}
128 +
129 +Adding a new application :
130 +
131 +{{code}}
132 +
133 +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://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications.json
134 +
135 +{{/code}}
136 +
137 +Adding a new instance :
138 +
139 +{{code}}
140 +
141 +curl -X GET http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/addInstance&host=localhost
142 +
143 +{{/code}}
144 +
145 +Delete an application :
146 +
147 +{{code}}
148 +
149 +curl -X DELETE http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample.json
150 +
151 +{{/code}}
152 +
153 +Delete an instance :
154 +
155 +{{code}}
156 +
157 +curl -X GET http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/deleteInstance?id=1
158 +
159 +{{/code}}
160 +
161 +Adding a new host :
162 +
163 +{{code}}
164 +
165 +curl -X POST -d "{id: 'otherserver.com',type: 'MHost', osType: 'MACOSX',address: '192.168.20.5', name: 'otherserver.com'}" http://127.0.0.1:56789/apps/WebObjects/JavaMonitor.woa/ra/mHosts.json
166 +
167 +{{/code}}
168 +
115 115  === Misc ===
116 116  
117 117  wotaskd and JavaMonitor are now full Wonder applications, and needs Ajax.framework, ERExtensions.framework, ERJars.framework, JavaWOExtensions.framework and JavaMonitor.framework to work correctly. If you get wotaskd.woa and JavaMonitor.woa from the //Wonder-latest-Applications-54// archive, those frameworks are NOT embedded inside wotaskd.woa and JavaMonitor.woa, so either build them from source and embed the frameworks or copy the frameworks into the //appserver// user home (on OS X 10.5, it's in ///var/empty//).
... ... @@ -121,3 +121,9 @@
121 121  {{code}}
122 122  ant deployment.tools -Dwonder.patch=54 -Ddeployment.standalone=true
123 123  {{/code}}
178 +
179 +Please note that you have to build the Wonder before calling //ant deployment.tools//, if you get classpath errors when building the deployment tools, first run:
180 +
181 +{{code}}
182 +ant frameworks
183 +{{/code}}