3 // Set the ORB pointer.
5 Echo_i::orb (CORBA::ORB_ptr o
)
7 this->orb_
= CORBA::ORB::_duplicate (o
);
10 // Return a list of object references.
12 Echo_i::echo_list (const char *)
21 // Pass ownership to the _var, pitty that ACE_NEW_RETURN cannot
22 // assign to T_vars directly.
28 // Just do something to get a list of object references.
29 list
[CORBA::ULong(0)] =
30 orb_
->resolve_initial_references ("NameService");
32 list
[CORBA::ULong(1)] =
33 orb_
->resolve_initial_references ("NameService");
35 list
[CORBA::ULong(2)] =
36 orb_
->resolve_initial_references ("NameService");
41 // Return the mesg string from the server
44 Echo_i::echo_string (const char *mesg
)
46 // The pointer mesg was NULL, return.
50 CORBA::String_var str
= CORBA::string_dup (mesg
);
52 // if <CORBA::string_dup> returns a 0 pointer, an exception is
56 throw CORBA::NO_MEMORY ();
58 // Got thru! now, make a deep copy of the mesg string and send it
59 // back to the client.
62 // The _retn is used as it allows the conversion of
63 // CORBA::String_var to char* without causing any compiler errors.
66 // Shutdown the server application.
72 ACE_TEXT ("\nThe echo server is shutting down\n")));
74 // Instruct the ORB to shutdown.
75 this->orb_
->shutdown ();