11 Echo_i::~Echo_i (void)
15 // Set the ORB pointer.
18 Echo_i::orb (CORBA::ORB_ptr o
)
20 this->orb_
= CORBA::ORB::_duplicate (o
);
23 // Return a list of object references.
26 Echo_i::echo_list (const char *)
35 // Pass ownership to the _var, pitty that ACE_NEW_RETURN cannot
36 // assign to T_vars directly.
42 // Just do something to get a list of object references.
43 list
[CORBA::ULong(0)] =
44 orb_
->resolve_initial_references ("NameService");
46 list
[CORBA::ULong(1)] =
47 orb_
->resolve_initial_references ("NameService");;
49 list
[CORBA::ULong(2)] =
50 orb_
->resolve_initial_references ("NameService");
55 // Return the mesg string from the server
58 Echo_i::echo_string (const char *mesg
)
60 // The pointer mesg was NULL, return.
64 CORBA::String_var str
= CORBA::string_dup (mesg
);
66 // if <CORBA::string_dup> returns a 0 pointer, an exception is
70 throw CORBA::NO_MEMORY ();
72 // Got thru! now, make a deep copy of the mesg string and send it
73 // back to the client.
76 // The _retn is used as it allows the conversion of
77 // CORBA::String_var to char* without causing any compiler errors.
80 // Shutdown the server application.
83 Echo_i::shutdown (void)
86 ACE_TEXT ("\nThe echo server is shutting down\n")));
88 // Instruct the ORB to shutdown.
89 this->orb_
->shutdown ();