![]() |
![]() |
e-docs > Tuxedo > Administering a Tuxedo Application at Run Time > TP Framework |
Administering a Tuxedo Application at Run Time
|
Synopsis
Creates an object reference. The resulting object reference may be passed to clients who use it to access the object.
C++ Binding
static CORBA::Object_ptr TP::create_object_reference (
const char* interfaceName,
const char* stroid,
CORBA::NVList_ptr criteria);
Arguments
Note: The restriction on the length of the ObjectId has been removed in this release.
Exceptions
The following exceptions can be raised by the create_object_reference() method:
Description
The server application is responsible for invoking the create_object_reference() method. This method creates an object reference. The resulting object reference may be passed to clients who will use it to access the object.
Ordinarily, the server application calls this method in two places:
For examples of how and when to call the create_object_reference() method, see Creating CORBA Server Applications.
Return Value
Example
The following example shows how to use the criteria argument:
CORBA::NVList_ptr criteria;
CORBA::Long branch_id = 7;
CORBA::Long account_id = 10001;
CORBA::Any any_val;
// Create the list and assign to _var to cleanup on exit
CORBA::ORB::create_list (2, criteria);
CORBA::NVList_var criteria_var(criteria);
// Add the BRANCH_ID
any_val <<= branch_id;
criteria->add_value("BRANCH_ID", any_val, 0);
// Add the ACCOUNT_ID
any_val <<= account_id;
criteria->add_value("ACCOUNT_ID", any_val, 0);
// Create the object reference.
TP::create_object_reference ("IDL:BankApp/Teller:1.0",
"Teller_01", criteria);
![]() |
![]() |
![]() |
![]() |
||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |