本文整理汇总了C++中portableserver::POA_var::destroy方法的典型用法代码示例。如果您正苦于以下问题:C++ POA_var::destroy方法的具体用法?C++ POA_var::destroy怎么用?C++ POA_var::destroy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类portableserver::POA_var
的用法示例。
在下文中一共展示了POA_var::destroy方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ACE_TMAIN
int ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
try
{
long retryCount = 0;
const ACE_TCHAR *ior_arg = ACE_TEXT("manager.ior");
CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("r:o:"));
int c;
while ((c = get_opts ()) != -1)
{
switch (c)
{
case 'r':
retryCount = ACE_OS::atoi(get_opts.opt_arg());
break;
case 'o':
ior_arg = get_opts.opt_arg();
break;
case '?':
default:
cout << "Usage: " << argv[0] << " [-r retryCount]"
<< " [-o iorfile]" << endl;
break;
}
}
CORBA::Object_var obj = orb->resolve_initial_references("RootPOA");
PortableServer::POA_var poa = PortableServer::POA::_narrow(obj.in());
PortableServer::POAManager_var mgr = poa->the_POAManager();
Manager_i servant(retryCount);
PortableServer::ObjectId_var oid = poa->activate_object(&servant);
obj = poa->id_to_reference(oid.in());
{
CORBA::String_var ior = orb->object_to_string(obj.in());
ofstream iorFile(ACE_TEXT_ALWAYS_CHAR(ior_arg));
iorFile << ior.in() << endl;
}
cout << "IMR Test Manager activated (servers retry = " << retryCount << ")." << endl;
mgr->activate();
orb->run();
poa->destroy(1, 1);
orb->destroy();
return 0;
}
catch (const CORBA::Exception& ex)
{
cerr << "Manager: " << ex << endl;
}
return 1;
}
示例2:
void
test_i::destroy_poa (void)
{
PortableServer::POA_var poa = this->_default_POA ();
CORBA::Boolean etherealize_objects = 1;
CORBA::Boolean wait_for_completion = 0;
poa->destroy (etherealize_objects,
wait_for_completion);
}
示例3: findPOA
void
ImR_Locator_i::destroy_poa (const ACE_CString &poa_name)
{
PortableServer::POA_var poa = findPOA (poa_name.c_str());
if (! CORBA::is_nil (poa.in ()))
{
bool etherealize = true;
bool wait = false;
poa->destroy (etherealize, wait);
}
}
示例4: ACE_TMAIN
int ACE_TMAIN (int argc, ACE_TCHAR* argv[])
{
try {
// First initialize the ORB, that will remove some arguments...
CORBA::ORB_var orb =
CORBA::ORB_init (argc, argv);
CORBA::Object_var poa_object =
orb->resolve_initial_references ("RootPOA");
PortableServer::POA_var poa =
PortableServer::POA::_narrow (poa_object.in ());
PortableServer::POAManager_var poa_manager =
poa->the_POAManager ();
poa_manager->activate ();
// Create the servant
Quoter_Stock_Factory_i stock_factory_i;
// Activate it to obtain the object reference
Quoter::Stock_Factory_var stock_factory =
stock_factory_i._this ();
// Get the Naming Context reference
CORBA::Object_var naming_context_object =
orb->resolve_initial_references ("NameService");
CosNaming::NamingContext_var naming_context =
CosNaming::NamingContext::_narrow (naming_context_object.in ());
// Create and initialize the name.
CosNaming::Name name (1);
name.length (1);
name[0].id = CORBA::string_dup ("Stock_Factory");
// Bind the object
naming_context->bind (name, stock_factory.in ());
orb->run ();
// Destroy the POA, waiting until the destruction terminates
poa->destroy (1, 1);
orb->destroy ();
}
catch (CORBA::Exception &) {
cerr << "CORBA exception raised!" << endl;
}
return 0;
}
示例5: ACE_TMAIN
int ACE_TMAIN (int argc, ACE_TCHAR* argv[])
{
try {
// First initialize the ORB, that will remove some arguments...
CORBA::ORB_var orb =
CORBA::ORB_init (argc, argv);
CORBA::Object_var poa_object =
orb->resolve_initial_references ("RootPOA");
PortableServer::POA_var poa =
PortableServer::POA::_narrow (poa_object.in ());
PortableServer::POAManager_var poa_manager =
poa->the_POAManager ();
poa_manager->activate ();
CORBA::Object_var naming_context_object =
orb->resolve_initial_references ("NameService");
CosNaming::NamingContext_var naming_context =
CosNaming::NamingContext::_narrow (naming_context_object.in ());
CosNaming::Name name (1);
name.length (1);
name[0].id = CORBA::string_dup ("CosEventService");
CORBA::Object_var ec_object =
naming_context->resolve (name);
// Now downcast the object reference to the appropriate type
CosEventChannelAdmin::EventChannel_var ec =
CosEventChannelAdmin::EventChannel::_narrow (ec_object.in ());
Stock_Consumer stock_consumer_i;
stock_consumer_i.connect (ec.in ());
orb->run ();
stock_consumer_i.disconnect ();
poa->destroy (1, 1);
orb->destroy ();
}
catch (CORBA::Exception &) {
cerr << "CORBA exception raised!" << endl;
}
return 0;
}
示例6: catch
int
ACE_TMAIN(int argc, ACE_TCHAR *argv[])
{
try
{
CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
if (parse_args (argc, argv) != 0)
return 1;
MessageFactory::register_new_factory(* orb.in());
CORBA::Object_var obj = orb->resolve_initial_references("RootPOA");
PortableServer::POA_var poa = PortableServer::POA::_narrow(obj.in());
PortableServer::POAManager_var poaman = poa->the_POAManager();
PortableServer::Servant_var<Messenger_i> svt = new Messenger_i;
PortableServer::ObjectId_var id = poa->activate_object(svt.in());
obj = poa->id_to_reference(id.in());
CORBA::String_var ior = orb->object_to_string(obj.in());
write_ior(ior.in());
std::cout << "Starting server." << std::endl;
poaman->activate();
orb->run();
poa->destroy(true, true);
orb->destroy();
}
catch (const CORBA::Exception& ex)
{
ex._tao_print_exception ("Exception caught:");
return 1;
}
return 0;
}
示例7: catch
int
ACE_TMAIN(int argc, ACE_TCHAR *argv[])
{
TAO_EC_Default_Factory::init_svcs ();
try
{
// ORB initialization boiler plate...
CORBA::ORB_var orb =
CORBA::ORB_init (argc, argv);
CORBA::Object_var object =
orb->resolve_initial_references ("RootPOA");
PortableServer::POA_var poa =
PortableServer::POA::_narrow (object.in ());
PortableServer::POAManager_var poa_manager =
poa->the_POAManager ();
poa_manager->activate ();
// ****************************************************************
run_test (poa.in (), 0);
run_test (poa.in (), 1);
// ****************************************************************
poa->destroy (1, 1);
orb->destroy ();
}
catch (const CORBA::Exception& ex)
{
ex._tao_print_exception ("Service");
return 1;
}
return 0;
}
示例8: ACE_TMAIN
int ACE_TMAIN (int argc, ACE_TCHAR* argv[])
{
try {
// First initialize the ORB, that will remove some arguments...
CORBA::ORB_var orb =
CORBA::ORB_init (argc, argv);
CORBA::Object_var poa_object =
orb->resolve_initial_references ("RootPOA");
PortableServer::POA_var poa =
PortableServer::POA::_narrow (poa_object.in ());
PortableServer::POAManager_var poa_manager =
poa->the_POAManager ();
poa_manager->activate ();
// Create the servant
Quoter_Stock_Factory_i stock_factory_i;
// Activate it to obtain the object reference
Quoter::Stock_Factory_var stock_factory =
stock_factory_i._this ();
// Put the object reference as an IOR string
CORBA::String_var ior = orb->object_to_string (stock_factory.in ());
// Print it out!
cout << ior.in () << endl;
orb->run ();
// Destroy the POA, waiting until the destruction terminates
poa->destroy (1, 1);
orb->destroy ();
}
catch (CORBA::Exception &) {
cerr << "CORBA exception raised!" << endl;
}
return 0;
}
示例9: ACE_TMAIN
int ACE_TMAIN (int argc, ACE_TCHAR* argv[])
{
try
{
// First initialize the ORB, that will remove some arguments...
CORBA::ORB_var orb =
CORBA::ORB_init (argc, argv);
if (argc < 2)
{
ACE_DEBUG ((LM_DEBUG, "\nUsage:\n %s [NAME to insert in Naming Service]\n", argv[0]));
return -1;
}
// Get a reference to the RootPOA
CORBA::Object_var poa_object =
orb->resolve_initial_references ("RootPOA");
// narrow down to the correct reference
PortableServer::POA_var poa =
PortableServer::POA::_narrow (poa_object.in ());
// Set a POA Manager
PortableServer::POAManager_var poa_manager =
poa->the_POAManager ();
// Activate the POA Manager
poa_manager->activate ();
// Create the servant
corbaloc_Status_i status_i;
status_i.set_name (ACE_TEXT_ALWAYS_CHAR (argv[1]));
// Activate it to obtain the reference
PortableServer::ObjectId_var id =
poa->activate_object (&status_i);
CORBA::Object_var object = poa->id_to_reference (id.in ());
corbaloc::Status_var status =
corbaloc::Status::_narrow (object.in ());
// Get a reference to Naming Context
CORBA::Object_var naming_context_object =
orb->resolve_initial_references ("NameService");
// Narrow down the reference
CosNaming::NamingContext_var naming_context =
CosNaming::NamingContext::_narrow (naming_context_object.in ());
// Bind Iterator_Factory to the Naming Context
CosNaming::Name name (1);
name.length (1);
name[0].id = CORBA::string_dup (ACE_TEXT_ALWAYS_CHAR (argv[1]));
naming_context->rebind (name, status.in ());
// Run the orb
orb->run ();
// Destroy the POA, waiting until the destruction terminates
poa->destroy (1, 1);
orb->destroy ();
}
catch (const CORBA::SystemException& ex){
ex._tao_print_exception ("CORBA exception raised! ");
}
catch (const CORBA::Exception& ex){
ex._tao_print_exception ("Exception caught in server");
}
return 0;
}
示例10: owner_transfer
//.........这里部分代码省略.........
if (CORBA::is_nil (iortable.in ()))
{
ORBSVCS_ERROR_RETURN ((LM_ERROR,
"(%P|%t) TAO_MonitorManager: Unable to "
"resolve the IORTable\n"),
1);
}
iortable->bind(ACE_TEXT_ALWAYS_CHAR(mc_orb_name_.c_str()), ior.in ());
if (this->use_name_svc_)
{
TAO_Naming_Client nc;
nc.init (this->orb_.in ());
CosNaming::Name name (1);
name.length (1);
name[0].id = CORBA::string_dup (ACE_TEXT_ALWAYS_CHAR(mc_orb_name_.c_str()));
nc->rebind (name, monitor.in ());
}
if (this->ior_output_.length () > 0)
{
FILE* fp = ACE_OS::fopen (this->ior_output_.c_str (), "w");
if (fp == 0)
{
ORBSVCS_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("(%P|%t) TAO_MonitorManager: "
ACE_TEXT ("Unable to write to %s\n")),
this->ior_output_.c_str ()),
1);
}
else
{
ACE_OS::fprintf (fp, "%s", ior.in ());
ACE_OS::fclose (fp);
}
}
}
// R1: race condition (partially fixed):
// TAO_MonitorManager::fini() is called directly after
// TAO_MonitorManager::run(), the shutdown call on the ORB could
// happen but the ORB::run() loop won't exit.
startup_barrier_.wait ();
this->orb_->run ();
ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, guard, this->mutex_, -1);
// Destroy the POA and ORB
if (!CORBA::is_nil (poa.in ()))
{
poa->destroy (true, true);
}
this->orb_->destroy ();
// Set to nil to avoid double shutdown in TAO_MonitorManager::fini()
this->orb_ = CORBA::ORB::_nil ();
}
catch (const CORBA::Exception& ex)
{
if (!CORBA::is_nil (this->orb_.in ()))
{
try
{
this->orb_->shutdown ();
}
catch (...)
{
}
this->orb_ = CORBA::ORB::_nil ();
}
ex._tao_print_exception ("Caught in "
"TAO_MonitorManager::ORBTask::svc");
}
catch (...)
{
if (!CORBA::is_nil (this->orb_.in ()))
{
try
{
this->orb_->shutdown ();
}
catch (...)
{
}
this->orb_ = CORBA::ORB::_nil ();
}
ORBSVCS_ERROR ((LM_ERROR,
"Unexpected exception type caught "
"in TAO_MonitorManager::ORBTask::svc"));
}
return 0;
}
示例11: worker
int
ACE_TMAIN(int argc, ACE_TCHAR *argv[])
{
try
{
CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
if (parse_args (argc, argv) != 0)
{
return 1;
}
CORBA::Object_var object =
orb->resolve_initial_references ("RootPOA");
ORB_Task worker (orb.in ());
worker.activate (THR_NEW_LWP | THR_JOINABLE,
1);
PortableServer::POA_var rootPOA =
PortableServer::POA::_narrow (object.in ());
PortableServer::POAManager_var poa_manager =
rootPOA->the_POAManager ();
CORBA::PolicyList policies (5);
policies.length (5);
// Lifespan policy
policies[0] =
rootPOA->create_lifespan_policy (PortableServer::PERSISTENT);
// Servant Retention Policy
policies[1] =
rootPOA->create_servant_retention_policy (PortableServer::RETAIN );
// ID Assignment Policy
policies[2] =
rootPOA->create_id_assignment_policy (PortableServer::USER_ID );
// Request Processing Policy
policies[3] =
rootPOA->create_request_processing_policy (PortableServer::USE_ACTIVE_OBJECT_MAP_ONLY );
// Threading policy
policies[4] =
rootPOA->create_thread_policy (PortableServer::ORB_CTRL_MODEL);
if (server_notify_delay > 0)
{
ACE_OS::sleep (server_notify_delay);
ACE_DEBUG ((LM_DEBUG, "(%P|%t)ServerB Now register with IMR \n"));
}
PortableServer::POA_var poa_a = rootPOA->create_POA ("poaB",
poa_manager.in (),
policies
);
for (CORBA::ULong i = 0;
i < policies.length ();
++i)
{
CORBA::Policy_ptr policy = policies[i];
policy->destroy ();
}
Test_Dummy_i* dummy = new Test_Dummy_i();
PortableServer::ObjectId_var oid =
PortableServer::string_to_ObjectId ("Server_B");
poa_a->activate_object_with_id (oid.in (), dummy);
CORBA::Object_var dummy_obj = poa_a->id_to_reference(oid.in());
CORBA::String_var ior =
orb->object_to_string (dummy_obj.in ());
poa_manager->activate ();
// Output the IOR to the <ior_output_file>
FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
ior_output_file),
1);
ACE_OS::fprintf (output_file, "%s", ior.in ());
ACE_OS::fclose (output_file);
worker.wait ();
rootPOA->destroy (1, 1);
orb->destroy ();
}
catch (const CORBA::Exception &ex)
{
ex._tao_print_exception ("Exception caught by serverB:");
return 1;
}
return 0;
}
示例12: ACE_TMAIN
int ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
try
{
//init the orb
CORBA::ORB_var orb=CORBA::ORB_init(argc, argv);
//get the root poa
CORBA::Object_var poa_object = orb->resolve_initial_references ("RootPOA");
PortableServer::POA_var poa = PortableServer::POA::_narrow (poa_object.in ());
PortableServer::POAManager_var poa_manager = poa->the_POAManager ();
if (parse_args (argc, argv) != 0)
return 1;
poa_manager->activate ();
// Get a reference to the IOR Table
CORBA::Object_var tobj = orb->resolve_initial_references("IORTable");
IORTable::Table_var table = IORTable::Table::_narrow(tobj.in());
//get an object id for the name
PortableServer::ObjectId_var oid =
PortableServer::string_to_ObjectId ("Messenger");
//activate the object for the given id
Messenger_i messenger (orb.in ());
poa->activate_object_with_id(oid.in (), &messenger);
CORBA::Object_var messenger_obj = poa->id_to_reference (oid.in ());
//bind the ior string to the name
CORBA::String_var messenger_ior_string = orb->object_to_string(messenger_obj.in());
table->bind("Messenger", messenger_ior_string.in());
// Output the IOR to the <ior_output_file>
FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s\n",
ior_output_file),
1);
ACE_OS::fprintf (output_file, "%s", messenger_ior_string.in ());
ACE_OS::fclose (output_file);
orb->run ();
ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
poa->destroy (1, 1);
orb->destroy ();
}
catch (const CORBA::Exception& ex)
{
ex._tao_print_exception ("Exception caught:");
return 1;
}
return 0;
}
示例13: policies
int
ACE_TMAIN(int argc, ACE_TCHAR *argv[])
{
try
{
CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
if (parse_args (argc, argv) != 0)
return 1;
CORBA::Object_var poa_object = orb->resolve_initial_references ("RootPOA");
PortableServer::POA_var rootPOA = PortableServer::POA::_narrow (poa_object.in ());
PortableServer::POAManager_var poa_manager = rootPOA->the_POAManager ();
// Policies for the firstPOA to be created.
CORBA::PolicyList policies (5);
policies.length (5);
// Lifespan policy
policies[0] =
rootPOA->create_lifespan_policy (PortableServer::PERSISTENT );
// Servant Retention Policy
policies[1] =
rootPOA->create_servant_retention_policy (PortableServer::RETAIN );
// ID Assignment Policy
policies[2] =
rootPOA->create_id_assignment_policy (PortableServer::USER_ID );
// Request Processing Policy
policies[3] =
rootPOA->create_request_processing_policy (PortableServer::USE_ACTIVE_OBJECT_MAP_ONLY );
// Threading policy
policies[4] =
rootPOA->create_thread_policy (PortableServer::ORB_CTRL_MODEL );
PortableServer::POA_var demoPOA
= rootPOA->create_POA ("HelloWorldServer",
poa_manager.in (),
policies
);
for (CORBA::ULong i = 0;
i < policies.length ();
++i)
{
CORBA::Policy_ptr policy = policies[i];
policy->destroy ();
}
// Create object for shutdown commanded by client.
{
// create the object
Demo_HelloWorld_i * hello = new Demo_HelloWorld_i(orb.in());
// Get the Object ID.
PortableServer::ObjectId_var oid = PortableServer::string_to_ObjectId ("shutdown");
demoPOA->activate_object_with_id (oid.in (), hello);
// Create an object reference.
CORBA::Object_var myhello = demoPOA->id_to_reference(oid.in());
// Put the object reference as an IOR string
ofstream out(ACE_TEXT_ALWAYS_CHAR (shutdown_ior_output_file));
CORBA::String_var ior = orb->object_to_string (myhello.in ());
out << ior.in();
// save the reference into a file
out.close();
}
// Create object to handle client sayHello requests.
{
// create the object
Demo_HelloWorld_i * hello = new Demo_HelloWorld_i(orb.in());
// Get the Object ID.
PortableServer::ObjectId_var oid = PortableServer::string_to_ObjectId ("hello");
demoPOA->activate_object_with_id (oid.in (), hello);
// Create an object reference.
CORBA::Object_var myhello = demoPOA->id_to_reference(oid.in());
// Put the object reference as an IOR string
ofstream out(ACE_TEXT_ALWAYS_CHAR (ior_output_file));
CORBA::String_var ior = orb->object_to_string (myhello.in ());
out << ior.in();
// save the reference into a file
out.close();
}
//////////////////////////////////////////////////////////////////////////////////////////////////
poa_manager->activate ();
std::cout << ior_output_file << " is ready " << std::endl;
//.........这里部分代码省略.........
示例14: self_manage
int
ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
try
{
// Initialize orb
CORBA::ORB_var orb =
CORBA::ORB_init (argc, argv);
// Get reference to Root POA.
CORBA::Object_var obj =
orb->resolve_initial_references ("RootPOA");
PortableServer::POA_var rootpoa =
PortableServer::POA::_narrow (obj.in ());
// Activate POA manager
PortableServer::POAManager_var mgr =
rootpoa->the_POAManager ();
mgr->activate ();
PortableServer::POA_var poa;
TAO::Utils::PolicyList_Destroyer PolicyList (3);
PolicyList.length (3);
PolicyList [0] =
rootpoa->create_lifespan_policy (PortableServer::PERSISTENT);
PolicyList [1] =
rootpoa->create_id_assignment_policy (PortableServer::USER_ID);
CORBA::Any CallbackPolicy;
CallbackPolicy <<= BiDirPolicy::BOTH;
const char* sServerPoaName = "TelemetryServer";
PolicyList [2] =
orb->create_policy (BiDirPolicy::BIDIRECTIONAL_POLICY_TYPE,
CallbackPolicy);
poa = rootpoa->create_POA (sServerPoaName,
mgr.in(),
PolicyList);
PortableServer::ObjectId_var ServerId =
PortableServer::string_to_ObjectId ("TimeServer");
// Create an object
Time_impl *time_servant = new Time_impl;
PortableServer::ServantBase_var self_manage (time_servant);
poa->activate_object_with_id (ServerId.in (),
time_servant);
// Get a reference after activating the object
CORBA::Object_var object = poa->id_to_reference (ServerId.in ());
TimeModule::Time_var tm = TimeModule::Time::_narrow (object.in ());
// Get reference to initial naming context
CORBA::Object_var name_obj =
orb->resolve_initial_references ("NameService");
CosNaming::NamingContext_var inc =
CosNaming::NamingContext::_narrow (name_obj.in ());
if (CORBA::is_nil (inc.in ()))
{
ACE_ERROR ((LM_ERROR,
"(%P|%t) Error fetching naming context\n"));
}
CosNaming::Name service_name;
service_name.length(1);
service_name[0].id =
CORBA::string_dup ("Time");
inc->rebind (service_name,
tm.in ());
// Run the event loop for fun
ACE_Time_Value tv (3, 0);
// Accept requests
orb->run (&tv);
rootpoa->destroy (0 , 0);
orb->destroy ();
}
catch (const CORBA::Exception& ex)
{
ex._tao_print_exception ("Caught an exception\n");
return -1;
}
return 0;
//.........这里部分代码省略.........
示例15: INTERNAL
int
Server_i::init (int &argc,
ACE_TCHAR **argv)
{
this->argc_ = argc;
this->argv_ = argv;
try
{
// First initialize the ORB, that will remove some arguments...
this->orb_ =
CORBA::ORB_init (this->argc_, this->argv_);
// Get a reference to the RootPOA.
CORBA::Object_var poa_object =
this->orb_->resolve_initial_references ("RootPOA");
// Narrow down to the correct reference.
PortableServer::POA_var poa =
PortableServer::POA::_narrow (poa_object.in ());
// Set a POA Manager.
PortableServer::POAManager_var poa_manager =
poa->the_POAManager ();
// Activate the POA Manager.
poa_manager->activate ();
CORBA::String_var ior;
// Create the servant
MCast_Server_i server_i;
// Activate it to obtain the reference
MCast::Server_var mcast_server =
server_i._this ();
CORBA::Object_var table_object =
this->orb_->resolve_initial_references ("IORTable");
IORTable::Table_var adapter =
IORTable::Table::_narrow (table_object.in ());
if (CORBA::is_nil (adapter.in ()))
{
ACE_ERROR ((LM_ERROR, "Nil IORTable\n"));
}
else
{
ior =
this->orb_->object_to_string (mcast_server.in ());
adapter->bind ("MCASTServer", ior.in ());
}
// Enable such that the server can listen for multicast requests
// at the specified address.
if (this->enable_multicast (ior.in ()) != 0)
{
ACE_ERROR ((LM_ERROR,
"ERROR: Unable to enable multicast "
"on specified address.\n"));
throw CORBA::INTERNAL ();
}
// Run the ORB
this->orb_->run ();
//Destroy the POA, waiting until the destruction terminates.
poa->destroy (1, 1);
this->orb_->destroy ();
}
catch (const CORBA::Exception& ex)
{
ex._tao_print_exception ("client");
return 1;
}
return 0;
}