resource component start/stop operations

Jiri Kremser jkremser at redhat.com
Wed Sep 19 08:53:40 UTC 2012


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


More information about the rhq-devel mailing list