resource component start/stop operations
John Sanda
jsanda at redhat.com
Wed Sep 19 10:52:27 UTC 2012
I wasn't clear on the start script. I am doing the same,
ProcessExecution scriptExe = ProcessExecutionUtility.createProcessExecution(startScript);
SystemInfo systemInfo = context.getSystemInformation();
ProcessExecutionResults results = systemInfo.executeProcess(scriptExe);
On Sep 19, 2012, at 4:53 AM, Jiri Kremser <jkremser at redhat.com> wrote:
> Hi,
> When I was adding start / stop operation into a plugin, I was doing similar thing explicitly using ResourceContext.getAvailabilityContext().requestAvailabilityCheck(), after the operation had finished.
>
> However, I was executing both stop and start script with SystemInfo.executeProcess() not with ResourceContext.getNativeProcess().whateverMethod()
>
> JK
>
>
> ----- Original Message -----
> From: "John Sanda" <jsanda at redhat.com>
> To: rhq-devel at lists.fedorahosted.org
> Sent: Tuesday, September 18, 2012 4:59:58 AM
> Subject: resource component start/stop operations
>
> I have implemented start and shutdown operations for a top-level server type. For the shutdown, I am just doing,
>
> ResourceContext.getNativeProcess().kill("KILL")
>
> For the start operation I am invoking a shell script that does the work. Here's my question. When I restart the resource, it will get a new pid. I have been relying on ResourceContext.getNativeProcess().getPid() to get the pid. In a restart situation though, that won't work until discovery has run again. Is there a way to force update the stored ProcessInfo immediately after I execute the resource's start operation?
>
> - John
> _______________________________________________
> rhq-devel mailing list
> rhq-devel at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/rhq-devel
> _______________________________________________
> rhq-devel mailing list
> rhq-devel at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/rhq-devel
More information about the rhq-devel
mailing list