summaryrefslogtreecommitdiff
path: root/TAO/examples/Buffered_Oneways
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2001-12-08 21:59:30 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2001-12-08 21:59:30 +0000
commit63165b00e2d667e39e15cf084128d94a563d484e (patch)
tree6939cf1ed0a80ce8a3224d33f3d23c0e1b9a517f /TAO/examples/Buffered_Oneways
parent6579bccb3a3f22f882ef908ad5f7e1a65b00b133 (diff)
downloadATCD-63165b00e2d667e39e15cf084128d94a563d484e.tar.gz
Merged corba-env-clean branch.
Diffstat (limited to 'TAO/examples/Buffered_Oneways')
-rw-r--r--TAO/examples/Buffered_Oneways/client.cpp70
-rw-r--r--TAO/examples/Buffered_Oneways/server.cpp28
-rw-r--r--TAO/examples/Buffered_Oneways/test_i.cpp10
-rw-r--r--TAO/examples/Buffered_Oneways/test_i.h6
4 files changed, 57 insertions, 57 deletions
diff --git a/TAO/examples/Buffered_Oneways/client.cpp b/TAO/examples/Buffered_Oneways/client.cpp
index e61f720ac72..dbe248cc7f1 100644
--- a/TAO/examples/Buffered_Oneways/client.cpp
+++ b/TAO/examples/Buffered_Oneways/client.cpp
@@ -115,7 +115,7 @@ parse_args (int argc, char **argv)
int
main (int argc, char **argv)
{
- ACE_DECLARE_NEW_CORBA_ENV;
+ TAO_ENV_DECLARE_NEW_ENV;
ACE_TRY
{
@@ -123,8 +123,8 @@ main (int argc, char **argv)
CORBA::ORB_var orb =
CORBA::ORB_init (argc,
argv,
- 0,
- ACE_TRY_ENV);
+ 0
+ TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Initialize options based on command-line arguments.
@@ -134,24 +134,24 @@ main (int argc, char **argv)
// Get an object reference from the argument string.
CORBA::Object_var base =
- orb->string_to_object (IOR,
- ACE_TRY_ENV);
+ orb->string_to_object (IOR
+ TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Try to narrow the object reference to a <test> reference.
- test_var test_object = test::_narrow (base.in (),
- ACE_TRY_ENV);
+ test_var test_object = test::_narrow (base.in ()
+ TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Obtain PolicyCurrent.
- base = orb->resolve_initial_references ("PolicyCurrent",
- ACE_TRY_ENV);
+ base = orb->resolve_initial_references ("PolicyCurrent"
+ TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Narrow down to correct type.
CORBA::PolicyCurrent_var policy_current =
- CORBA::PolicyCurrent::_narrow (base.in (),
- ACE_TRY_ENV);
+ CORBA::PolicyCurrent::_narrow (base.in ()
+ TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Setup the none sync scope policy, i.e., the ORB will buffer
@@ -169,18 +169,18 @@ main (int argc, char **argv)
// Setup the none sync scope policy.
sync_none_policy_list[0] =
orb->create_policy (Messaging::SYNC_SCOPE_POLICY_TYPE,
- sync_none_any,
- ACE_TRY_ENV);
+ sync_none_any
+ TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Setup the none sync scope.
policy_current->set_policy_overrides (sync_none_policy_list,
- CORBA::ADD_OVERRIDE,
- ACE_TRY_ENV);
+ CORBA::ADD_OVERRIDE
+ TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// We are now done with this policy.
- sync_none_policy_list[0]->destroy (ACE_TRY_ENV);
+ sync_none_policy_list[0]->destroy (TAO_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
// Start off with no constraints.
@@ -225,14 +225,14 @@ main (int argc, char **argv)
// Setup the buffering constraint policy.
buffering_constraint_policy_list[0] =
orb->create_policy (TAO::BUFFERING_CONSTRAINT_POLICY_TYPE,
- buffering_constraint_any,
- ACE_TRY_ENV);
+ buffering_constraint_any
+ TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Setup the constraints.
policy_current->set_policy_overrides (buffering_constraint_policy_list,
- CORBA::ADD_OVERRIDE,
- ACE_TRY_ENV);
+ CORBA::ADD_OVERRIDE
+ TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
//
@@ -258,8 +258,8 @@ main (int argc, char **argv)
// Setup the buffering flush policy.
buffering_flush_policy_list[0] =
orb->create_policy (TAO::BUFFERING_CONSTRAINT_POLICY_TYPE,
- buffering_flush_any,
- ACE_TRY_ENV);
+ buffering_flush_any
+ TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
//
@@ -274,8 +274,8 @@ main (int argc, char **argv)
{
// Setup explicit flushing.
policy_current->set_policy_overrides (buffering_flush_policy_list,
- CORBA::ADD_OVERRIDE,
- ACE_TRY_ENV);
+ CORBA::ADD_OVERRIDE
+ TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
ACE_DEBUG ((LM_DEBUG,
@@ -283,14 +283,14 @@ main (int argc, char **argv)
i));
// Invoke the oneway method.
- test_object->method (i,
- ACE_TRY_ENV);
+ test_object->method (i
+ TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Reset buffering policy.
policy_current->set_policy_overrides (buffering_constraint_policy_list,
- CORBA::ADD_OVERRIDE,
- ACE_TRY_ENV);
+ CORBA::ADD_OVERRIDE
+ TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
}
else
@@ -300,8 +300,8 @@ main (int argc, char **argv)
i));
// Invoke the oneway method.
- test_object->method (i,
- ACE_TRY_ENV);
+ test_object->method (i
+ TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
}
@@ -309,23 +309,23 @@ main (int argc, char **argv)
ACE_Time_Value sleep_interval (0,
interval * 1000);
- orb->run (sleep_interval, ACE_TRY_ENV);
+ orb->run (sleep_interval TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
}
// Shutdown server.
if (shutdown_server)
{
- test_object->shutdown (ACE_TRY_ENV);
+ test_object->shutdown (TAO_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
}
// We are done with the policy.
- buffering_constraint_policy_list[0]->destroy (ACE_TRY_ENV);
+ buffering_constraint_policy_list[0]->destroy (TAO_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
// We are done with the policy.
- buffering_flush_policy_list[0]->destroy (ACE_TRY_ENV);
+ buffering_flush_policy_list[0]->destroy (TAO_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
// Destroy the ORB. On some platforms, e.g., Win32, the socket
@@ -334,7 +334,7 @@ main (int argc, char **argv)
// static destructors to flush the queues, it will be too late.
// Therefore, we use explicit destruction here and flush the
// queues before main() ends.
- orb->destroy (ACE_TRY_ENV);
+ orb->destroy (TAO_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
}
ACE_CATCHANY
diff --git a/TAO/examples/Buffered_Oneways/server.cpp b/TAO/examples/Buffered_Oneways/server.cpp
index 0833f740340..8f57aaac3ea 100644
--- a/TAO/examples/Buffered_Oneways/server.cpp
+++ b/TAO/examples/Buffered_Oneways/server.cpp
@@ -41,22 +41,22 @@ main (int argc, char *argv[])
CORBA::ORB_var orb =
CORBA::ORB_init (argc,
argv,
- "",
- ACE_TRY_ENV);
+ ""
+ TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA",
- ACE_TRY_ENV);
+ orb->resolve_initial_references ("RootPOA"
+ TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in (),
- ACE_TRY_ENV);
+ PortableServer::POA::_narrow (poa_object.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;
if (parse_args (argc, argv) != 0)
@@ -65,12 +65,12 @@ main (int argc, char *argv[])
test_i servant (orb.in ());
test_var server =
- servant._this (ACE_TRY_ENV);
+ servant._this (TAO_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::String_var ior =
- orb->object_to_string (server.in (),
- ACE_TRY_ENV);
+ orb->object_to_string (server.in ()
+ TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
@@ -84,17 +84,17 @@ main (int argc, char *argv[])
ACE_OS::fprintf (output_file, "%s", ior.in ());
ACE_OS::fclose (output_file);
- poa_manager->activate (ACE_TRY_ENV);
+ poa_manager->activate (TAO_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- orb->run (ACE_TRY_ENV);
+ orb->run (TAO_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
root_poa->destroy (1,
- 1,
- ACE_TRY_ENV);
+ 1
+ TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
}
ACE_CATCHANY
diff --git a/TAO/examples/Buffered_Oneways/test_i.cpp b/TAO/examples/Buffered_Oneways/test_i.cpp
index 01d8b0faea7..74b1323a4df 100644
--- a/TAO/examples/Buffered_Oneways/test_i.cpp
+++ b/TAO/examples/Buffered_Oneways/test_i.cpp
@@ -10,8 +10,8 @@ test_i::test_i (CORBA::ORB_ptr orb)
}
void
-test_i::method (CORBA::ULong request_number,
- CORBA::Environment &)
+test_i::method (CORBA::ULong request_number
+ TAO_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException))
{
ACE_DEBUG ((LM_DEBUG,
@@ -20,9 +20,9 @@ test_i::method (CORBA::ULong request_number,
}
void
-test_i::shutdown (CORBA::Environment &ACE_TRY_ENV)
+test_i::shutdown (TAO_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- this->orb_->shutdown (0,
- ACE_TRY_ENV);
+ this->orb_->shutdown (0
+ TAO_ENV_ARG_PARAMETER);
}
diff --git a/TAO/examples/Buffered_Oneways/test_i.h b/TAO/examples/Buffered_Oneways/test_i.h
index c1c8b71f406..cbe1b31e777 100644
--- a/TAO/examples/Buffered_Oneways/test_i.h
+++ b/TAO/examples/Buffered_Oneways/test_i.h
@@ -28,11 +28,11 @@ public:
// ctor.
// = The test interface methods.
- void method (CORBA::ULong request_number,
- CORBA::Environment &)
+ void method (CORBA::ULong request_number
+ TAO_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException));
- void shutdown (CORBA::Environment &)
+ void shutdown (TAO_ENV_SINGLE_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException));
private: