Re: how to know wheter an object is still "alive"
- From: Frank Rehberger <Frank Rehberger xtradyne com>
- To: Marcus Lunzenauer <mlunzena uos de>
- Cc: orbit-list gnome org
- Subject: Re: how to know wheter an object is still "alive"
- Date: Fri, 18 Jun 2004 17:20:23 +0200
Marcus Lunzenauer wrote:
In my application I have have to determine, whether that an object is still "alive" (reachable? active?) but I only have that object's IOR.
I thought that the following code would do this for me, but it does not:
static CORBA_Object
getGovernor(const char *governorIOR, CORBA_Environment * ev){
CORBA_Object cur_gov = CORBA_OBJECT_NIL;
// CHECK: is the current governor still active?
if (governorIOR){
// translate IOR
cur_gov = (CORBA_Object) CORBA_ORB_string_to_object(global_orb, governorIOR, ev);
// that IOR is not translatable
if (ev->_major != CORBA_NO_EXCEPTION){
debug(DEFAULT_DEBUG_FLAGS, "Could not find registered governor.\n");
CORBA_exception_free(ev);
// FIXME: is this needed?
cur_gov = CORBA_OBJECT_NIL;
// DON'T DO ANYTHING; governor is still active
} else {
debug(DEFAULT_DEBUG_FLAGS, "Registered governor still active.\n");
}
}
return cur_gov;
}
please use CORBA_Object operation
CORBA_boolean non_existent = CORBA_Object_non_existent (obj, ev);
This is a very lightweight request that is handled by servers object
container, object/service implementation is not involved.
Following GUI CORBA tool is using this operation to test liveness of
object in servers object container:
http://casa.in-berlin.de/gnome-ior.html
Regards, Frank
--
Frank Rehberger
XTRADYNE Technologies AG
Schoenhauser Allee 6/7
D-10119 Berlin Germany
Phone +49-30-44 03 06-37
Fax +49-30-44 03 06-78
Email Frank Rehberger xtradyne com
WWW www.xtradyne.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]