summaryrefslogtreecommitdiff
path: root/TAO/examples/POA/On_Demand_Activation/server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/examples/POA/On_Demand_Activation/server.cpp')
-rw-r--r--TAO/examples/POA/On_Demand_Activation/server.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/TAO/examples/POA/On_Demand_Activation/server.cpp b/TAO/examples/POA/On_Demand_Activation/server.cpp
index 5dd24227734..31488ddea2f 100644
--- a/TAO/examples/POA/On_Demand_Activation/server.cpp
+++ b/TAO/examples/POA/On_Demand_Activation/server.cpp
@@ -112,11 +112,9 @@ main (int argc, char **argv)
if (result != 0)
return result;
- // Obtain the RootPOA.
+ // Get an Object reference to RootPOA.
CORBA::Object_var obj =
- orb->resolve_initial_references ("RootPOA",
- ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ orb->resolve_initial_references ("RootPOA");
// Narrow the Object reference to a POA reference
PortableServer::POA_var root_poa =
@@ -266,8 +264,8 @@ main (int argc, char **argv)
ACE_TRY_CHECK;
// Run the ORB.
- orb->run (ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ if (orb->run () == -1)
+ ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "CORBA::ORB::run"), -1);
}
ACE_CATCHANY
{