The following is an example of a "restart" control service one might expect to find on a WebLogic managed server. It is implemented by calling a control on the admin server to "stop" the managed server, and then making a call on the local machine to start the server.
The "adminHostName" variable is evaluated on the current host of the caller (which is assumed to be the vhost containing the managed server). The domainName variable is evaluated on the retargeted host (which is assumed to be the vhost containing the admin server). The ADMIN_SERVER component is also resolved on the retargeted host.
<control name="restart"> <varList> <var name="adminHostName" default=":[target:adminHostName]"/> </varList> <retarget host=":[adminHostName]"> <varList> <var name="domainName" default=":[target:domainName]"/> </varList> <call blockName="stopServer"> <argList serverName=":[serverName]" domainName=":[domainName]"/> <installedComponent name="ADMIN_SERVER"/> </call> </retarget> <call blockName="start"/> </control> |