CORBA Programming Reference
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Returns an initial object reference corresponding to an identifier
string.
CORBA::Object_ptr CORBA::resolve_initial_references(
const CORBA::char *identifier);
Returns an initial object reference corresponding to an identifier
string. Valid identifiers are "RootPOA"
and "POACurrent"
.
Note: This function is supported only for a joint client/server.
CORBA::ORB_ptr orb = CORBA::ORB_init(argc, argv);
CORBA::Object_ptr pfobj =
orb->resolve_initial_references("RootPOA");
PortableServer::POA_ptr rootPOA;
rootPOA = PortableServer::POA::narrow(pfobj);
The ORB member functions constitute the programming interface to the Object Request Broker.
The mapping of the ORB member functions to C++ is as follows:
class CORBA
{
class ORB
{
public:
char *object_to_string(Object_ptr);
Object_ptr string_to_object(const char *);
void create_list(Long, NVList_out);
void create_operation_list(operationDef_ptr, NVList_out);
void create_named_value(NamedValue_out);
void create_exception_list(ExceptionList_out);
void create_context_list(ContextList_out);
void get_default_context(Context_out);
void create_environment(Environment_out);
void send_multiple_requests_oneway(const requestSeq&);
void send_multiple_requests_deferred(const requestSeq&);
Boolean poll_next_response();
void get_next_response(Request_out);
Boolean work_pending();
void perform_work();
void create_policy (in PolicyType type, in any val);
// Extension
void destroy();
// Extensions to support sharing context between threads
void Ctx get_ctx() = 0;
void set_ctx(Ctx) = 0;
void clear_ctx() = 0;
// Thread extensions
void inform_thread_exit(TID) = 0;
}; //ORB
}; // CORBA
To support single-threaded ORBs, as well as multithreaded ORBs that run multithread-unaware code, two operations (perform_work
and work_pending
) are included in the ORB interface. These operations can be used by single-threaded and multithreaded applications. An application that is a pure ORB client would not need to use these operations.
To support multithreaded server applications, four operations (get_ctx
, set_ctx
, clear_ctx
, and inform_thread_exit)
are included as extensions to the ORB interface.
![]() ![]() |
![]() |
![]() |