resource component start/stop operations

John Sanda jsanda at redhat.com
Tue Sep 18 02:59:58 UTC 2012


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


More information about the rhq-devel mailing list