summaryrefslogtreecommitdiff
path: root/TAO/examples/POA/DSI/server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/examples/POA/DSI/server.cpp')
-rw-r--r--TAO/examples/POA/DSI/server.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/TAO/examples/POA/DSI/server.cpp b/TAO/examples/POA/DSI/server.cpp
index 33678266e96..f7f099adf60 100644
--- a/TAO/examples/POA/DSI/server.cpp
+++ b/TAO/examples/POA/DSI/server.cpp
@@ -79,12 +79,12 @@ write_iors_to_file (const char *first_ior)
int
main (int argc, char **argv)
{
- ACE_DECLARE_NEW_CORBA_ENV;
+ TAO_ENV_DECLARE_NEW_ENV;
ACE_TRY
{
// Initialize the ORB
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, 0, ACE_TRY_ENV);
+ CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, 0 TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
int result = parse_args (argc, argv);
@@ -93,17 +93,17 @@ main (int argc, char **argv)
// Obtain the RootPOA.
CORBA::Object_var obj =
- orb->resolve_initial_references ("RootPOA",
- ACE_TRY_ENV);
+ orb->resolve_initial_references ("RootPOA"
+ TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Narrow the object reference to a POA reference
- PortableServer::POA_var root_poa = PortableServer::POA::_narrow (obj.in (),
- ACE_TRY_ENV);
+ PortableServer::POA_var root_poa = PortableServer::POA::_narrow (obj.in ()
+ TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_TRY_ENV);
+ root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::PolicyList policies (5);
@@ -111,35 +111,35 @@ main (int argc, char **argv)
// ID Assignment Policy
policies[0] =
- root_poa->create_id_assignment_policy (PortableServer::USER_ID, ACE_TRY_ENV);
+ root_poa->create_id_assignment_policy (PortableServer::USER_ID TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Lifespan Policy
policies[1] =
- root_poa->create_lifespan_policy (PortableServer::PERSISTENT,
- ACE_TRY_ENV);
+ root_poa->create_lifespan_policy (PortableServer::PERSISTENT
+ TAO_ENV_ARG_PARAMETER);
// Request Processing Policy
policies[2] =
- root_poa->create_request_processing_policy (PortableServer::USE_DEFAULT_SERVANT,
- ACE_TRY_ENV);
+ root_poa->create_request_processing_policy (PortableServer::USE_DEFAULT_SERVANT
+ TAO_ENV_ARG_PARAMETER);
// Servant Retention Policy
policies[3] =
- root_poa->create_servant_retention_policy (PortableServer::RETAIN, ACE_TRY_ENV);
+ root_poa->create_servant_retention_policy (PortableServer::RETAIN TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Id Uniqueness Policy
policies[4] =
- root_poa->create_id_uniqueness_policy (PortableServer::MULTIPLE_ID, ACE_TRY_ENV);
+ root_poa->create_id_uniqueness_policy (PortableServer::MULTIPLE_ID TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
ACE_CString name = "firstPOA";
PortableServer::POA_var first_poa = root_poa->create_POA (name.c_str (),
poa_manager.in (),
- policies,
- ACE_TRY_ENV);
+ policies
+ TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
for (CORBA::ULong i = 0;
@@ -147,31 +147,31 @@ main (int argc, char **argv)
++i)
{
CORBA::Policy_ptr policy = policies[i];
- policy->destroy (ACE_TRY_ENV);
+ policy->destroy (TAO_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
}
// Create a Database Agent Implementation object in first_poa
DatabaseImpl::Agent database_agent_impl (orb.in (),
- first_poa.in (),
- ACE_TRY_ENV);
+ first_poa.in ()
+ TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
PortableServer::ObjectId_var database_agent_oid =
PortableServer::string_to_ObjectId ("DatabaseAgent");
first_poa->activate_object_with_id (database_agent_oid.in (),
- &database_agent_impl,
- ACE_TRY_ENV);
+ &database_agent_impl
+ TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var database_agent =
- first_poa->id_to_reference (database_agent_oid.in (), ACE_TRY_ENV);
+ first_poa->id_to_reference (database_agent_oid.in () TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Get the IOR for the "DatabaseAgent" object
CORBA::String_var database_agent_ior =
- orb->object_to_string (database_agent.in (), ACE_TRY_ENV);
+ orb->object_to_string (database_agent.in () TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
ACE_DEBUG ((LM_DEBUG,"%s\n",
@@ -182,11 +182,11 @@ main (int argc, char **argv)
return write_result;
// set the state of the poa_manager to active i.e ready to process requests
- poa_manager->activate (ACE_TRY_ENV);
+ poa_manager->activate (TAO_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
// Run the ORB
- orb->run (ACE_TRY_ENV);
+ orb->run (TAO_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
}
ACE_CATCHANY