summaryrefslogtreecommitdiff
path: root/TAO/tests/Portable_Interceptors/Collocated/Dynamic
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/Portable_Interceptors/Collocated/Dynamic')
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Dynamic/Client_Task.cpp33
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Dynamic/Client_Task.h3
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Dynamic/Collocated_Test.cpp15
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Dynamic/Echo_Collocated_ORBInitializer.cpp12
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Dynamic/Echo_Collocated_ORBInitializer.h6
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Dynamic/Server_Task.cpp25
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Dynamic/interceptors.cpp28
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Dynamic/interceptors.h26
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Dynamic/test_i.cpp10
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Dynamic/test_i.h6
10 files changed, 58 insertions, 106 deletions
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Client_Task.cpp b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Client_Task.cpp
index f0cd31d306f..12802f28aea 100644
--- a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Client_Task.cpp
+++ b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Client_Task.cpp
@@ -21,14 +21,14 @@ Client_Task::Client_Task (const char *ior,
int
Client_Task::svc (void)
{
- ACE_TRY_NEW_ENV
+ try
{
CORBA::Object_var object =
- corb_->string_to_object (input_ ACE_ENV_ARG_PARAMETER);
+ corb_->string_to_object (input_);
Test_Interceptors::Visual_var server =
- Test_Interceptors::Visual::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
+ Test_Interceptors::Visual::_narrow (object.in ());
if (CORBA::is_nil (server.in ()))
{
@@ -38,17 +38,15 @@ Client_Task::svc (void)
1);
}
- run_test (server.in () ACE_ENV_ARG_PARAMETER);
+ run_test (server.in ());
server->shutdown ();
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in client task:");
+ ex._tao_print_exception ("Exception caught in client task:");
return 1;
}
- ACE_ENDTRY;
return 0;
@@ -56,34 +54,29 @@ Client_Task::svc (void)
void
-Client_Task::run_test (Test_Interceptors::Visual_ptr server
- ACE_ENV_ARG_DECL)
+Client_Task::run_test (Test_Interceptors::Visual_ptr server)
{
- server->normal (10 ACE_ENV_ARG_PARAMETER);
+ server->normal (10);
CORBA::Long one = 1, two = 1;
(void) server->calculate (one,
- two
- ACE_ENV_ARG_PARAMETER);
+ two);
- ACE_TRY
+ try
{
(void) server->user ();
}
- ACE_CATCH (Test_Interceptors::Silly, userex)
+ catch (const Test_Interceptors::Silly& userex)
{
ACE_DEBUG ((LM_DEBUG, "Caught Silly\n"));
}
- ACE_ENDTRY;
- ACE_TRY_EX (SYS)
+ try
{
server->system ();
- ACE_TRY_CHECK_EX (SYS);
}
- ACE_CATCH (CORBA::INV_OBJREF, sysex)
+ catch (const CORBA::INV_OBJREF& sysex)
{
ACE_DEBUG ((LM_DEBUG, "Caught CORBA::INV_OBJREF\n"));
}
- ACE_ENDTRY;
}
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Client_Task.h b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Client_Task.h
index def1f6d2bb4..c986c8b63db 100644
--- a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Client_Task.h
+++ b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Client_Task.h
@@ -27,8 +27,7 @@ public:
/// Thread entry point
int svc (void);
- void run_test (Test_Interceptors::Visual_ptr server
- ACE_ENV_ARG_DECL);
+ void run_test (Test_Interceptors::Visual_ptr server);
private:
const char *input_;
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Collocated_Test.cpp b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Collocated_Test.cpp
index 42262eb0f72..c56bb23e027 100644
--- a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Collocated_Test.cpp
+++ b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Collocated_Test.cpp
@@ -48,8 +48,7 @@ main (int argc, char *argv[])
server_orb.set ("server_orb");
client_orb.set ("client_orb");
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
+ try
{
PortableInterceptor::ORBInitializer_ptr temp_initializer =
PortableInterceptor::ORBInitializer::_nil ();
@@ -60,15 +59,13 @@ main (int argc, char *argv[])
PortableInterceptor::ORBInitializer_var orb_initializer =
temp_initializer;
- PortableInterceptor::register_orb_initializer (orb_initializer.in ()
- ACE_ENV_ARG_PARAMETER);
+ PortableInterceptor::register_orb_initializer (orb_initializer.in ());
ACE_Argv_Type_Converter satc (argc, argv);
CORBA::ORB_var sorb =
CORBA::ORB_init (satc.get_argc (),
satc.get_TCHAR_argv (),
- server_orb.c_str ()
- ACE_ENV_ARG_PARAMETER);
+ server_orb.c_str ());
ACE_Manual_Event me;
Server_Task server_task (output,
@@ -90,8 +87,7 @@ main (int argc, char *argv[])
CORBA::ORB_var corb =
CORBA::ORB_init (catc.get_argc (),
catc.get_TCHAR_argv (),
- client_orb.c_str ()
- ACE_ENV_ARG_PARAMETER);
+ client_orb.c_str ());
Client_Task client_task (input,
corb.in (),
@@ -125,10 +121,9 @@ main (int argc, char *argv[])
" properly\n"));
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
// Ignore exceptions..
}
- ACE_ENDTRY;
return 0;
}
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Echo_Collocated_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Echo_Collocated_ORBInitializer.cpp
index bb9107f608d..40b23b8c661 100644
--- a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Echo_Collocated_ORBInitializer.cpp
+++ b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Echo_Collocated_ORBInitializer.cpp
@@ -9,16 +9,14 @@
void
Echo_Collocated_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
+ PortableInterceptor::ORBInitInfo_ptr)
ACE_THROW_SPEC ((CORBA::SystemException))
{
}
void
Echo_Collocated_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
+ PortableInterceptor::ORBInitInfo_ptr info)
ACE_THROW_SPEC ((CORBA::SystemException))
{
CORBA::String_var orb_id =
@@ -37,8 +35,7 @@ Echo_Collocated_ORBInitializer::post_init (
PortableInterceptor::ClientRequestInterceptor_var
client_interceptor = interceptor;
- info->add_client_request_interceptor (client_interceptor.in ()
- ACE_ENV_ARG_PARAMETER);
+ info->add_client_request_interceptor (client_interceptor.in ());
}
else if (!ACE_OS::strcmp (orb_id.in (), "server_orb"))
{
@@ -53,8 +50,7 @@ Echo_Collocated_ORBInitializer::post_init (
PortableInterceptor::ServerRequestInterceptor_var
server_interceptor = interceptor;
- info->add_server_request_interceptor (server_interceptor.in ()
- ACE_ENV_ARG_PARAMETER);
+ info->add_server_request_interceptor (server_interceptor.in ());
}
else
{
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Echo_Collocated_ORBInitializer.h b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Echo_Collocated_ORBInitializer.h
index 7a18eb9b37a..4865ea54fbe 100644
--- a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Echo_Collocated_ORBInitializer.h
+++ b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Echo_Collocated_ORBInitializer.h
@@ -29,12 +29,10 @@ class Echo_Collocated_ORBInitializer :
{
public:
- virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info)
ACE_THROW_SPEC ((CORBA::SystemException));
- virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info)
ACE_THROW_SPEC ((CORBA::SystemException));
};
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Server_Task.cpp b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Server_Task.cpp
index 32cca3aa9dc..1d1ef6bcbc8 100644
--- a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Server_Task.cpp
+++ b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Server_Task.cpp
@@ -26,11 +26,11 @@ Server_Task::Server_Task (const char *output,
int
Server_Task::svc (void)
{
- ACE_TRY_NEW_ENV
+ try
{
CORBA::Object_var poa_object =
- sorb_->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
+ sorb_->resolve_initial_references ("RootPOA");
if (CORBA::is_nil (poa_object.in ()))
ACE_ERROR_RETURN ((LM_ERROR,
@@ -38,7 +38,7 @@ Server_Task::svc (void)
1);
PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
+ PortableServer::POA::_narrow (poa_object.in ());
PortableServer::POAManager_var poa_manager =
root_poa->the_POAManager ();
@@ -49,19 +49,16 @@ Server_Task::svc (void)
ACE_NEW_RETURN (server_impl, Visual_i (sorb_.in ()), 1);
PortableServer::ObjectId_var id =
- root_poa->activate_object (server_impl
- ACE_ENV_ARG_PARAMETER);
+ root_poa->activate_object (server_impl);
CORBA::Object_var test_obj =
- root_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
+ root_poa->id_to_reference (id.in ());
Test_Interceptors::Visual_var server =
- Test_Interceptors::Visual::_narrow (test_obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ Test_Interceptors::Visual::_narrow (test_obj.in ());
CORBA::String_var ior =
- this->sorb_->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
+ this->sorb_->object_to_string (server.in ());
ACE_DEBUG ((LM_DEBUG, "Test_Interceptors::Visual: <%s>\n", ior.in ()));
@@ -85,15 +82,13 @@ Server_Task::svc (void)
ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
+ root_poa->destroy (1, 1);
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in server task:");
+ ex._tao_print_exception ("Exception caught in server task:");
return 1;
}
- ACE_ENDTRY;
return 0;
}
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/interceptors.cpp b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/interceptors.cpp
index e60a822c7a6..6a3f8ba9884 100644
--- a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/interceptors.cpp
+++ b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/interceptors.cpp
@@ -41,7 +41,6 @@ Echo_Client_Request_Interceptor::destroy (void)
void
Echo_Client_Request_Interceptor::send_poll (
PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED
)
ACE_THROW_SPEC ((CORBA::SystemException))
{
@@ -50,8 +49,7 @@ Echo_Client_Request_Interceptor::send_poll (
void
Echo_Client_Request_Interceptor::send_request (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
+ PortableInterceptor::ClientRequestInfo_ptr ri)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableInterceptor::ForwardRequest))
{
@@ -91,8 +89,7 @@ Echo_Client_Request_Interceptor::send_request (
void
Echo_Client_Request_Interceptor::receive_other (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
+ PortableInterceptor::ClientRequestInfo_ptr ri)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableInterceptor::ForwardRequest))
{
@@ -110,8 +107,7 @@ Echo_Client_Request_Interceptor::receive_other (
void
Echo_Client_Request_Interceptor::receive_reply (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
+ PortableInterceptor::ClientRequestInfo_ptr ri)
ACE_THROW_SPEC ((CORBA::SystemException))
{
client_interceptor_check_++;
@@ -163,8 +159,7 @@ Echo_Client_Request_Interceptor::receive_reply (
void
Echo_Client_Request_Interceptor::receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
+ PortableInterceptor::ClientRequestInfo_ptr ri)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableInterceptor::ForwardRequest))
{
@@ -209,8 +204,7 @@ Echo_Server_Request_Interceptor::destroy (void)
void
Echo_Server_Request_Interceptor::receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
+ PortableInterceptor::ServerRequestInfo_ptr)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableInterceptor::ForwardRequest))
{
@@ -218,8 +212,7 @@ Echo_Server_Request_Interceptor::receive_request_service_contexts (
void
Echo_Server_Request_Interceptor::receive_request (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
+ PortableInterceptor::ServerRequestInfo_ptr ri)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableInterceptor::ForwardRequest))
{
@@ -260,8 +253,7 @@ Echo_Server_Request_Interceptor::receive_request (
void
Echo_Server_Request_Interceptor::send_reply (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
+ PortableInterceptor::ServerRequestInfo_ptr ri)
ACE_THROW_SPEC ((CORBA::SystemException))
{
++server_interceptor_check_;
@@ -311,8 +303,7 @@ Echo_Server_Request_Interceptor::send_reply (
void
Echo_Server_Request_Interceptor::send_exception (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
+ PortableInterceptor::ServerRequestInfo_ptr ri)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableInterceptor::ForwardRequest))
{
@@ -340,8 +331,7 @@ Echo_Server_Request_Interceptor::send_exception (
void
Echo_Server_Request_Interceptor::send_other (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
+ PortableInterceptor::ServerRequestInfo_ptr)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableInterceptor::ForwardRequest))
{
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/interceptors.h b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/interceptors.h
index 133ed9e49be..2655dcf2fde 100644
--- a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/interceptors.h
+++ b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/interceptors.h
@@ -41,31 +41,26 @@ public:
ACE_THROW_SPEC ((CORBA::SystemException));
virtual void send_poll (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ PortableInterceptor::ClientRequestInfo_ptr)
ACE_THROW_SPEC ((CORBA::SystemException));
- virtual void send_request (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ virtual void send_request (PortableInterceptor::ClientRequestInfo_ptr ri)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableInterceptor::ForwardRequest));
virtual void receive_other (
PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
)
ACE_THROW_SPEC ((
CORBA::SystemException,
PortableInterceptor::ForwardRequest
));
- virtual void receive_reply (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ virtual void receive_reply (PortableInterceptor::ClientRequestInfo_ptr ri)
ACE_THROW_SPEC ((CORBA::SystemException));
virtual void receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ PortableInterceptor::ClientRequestInfo_ptr ri)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableInterceptor::ForwardRequest));
@@ -94,30 +89,25 @@ public:
ACE_THROW_SPEC ((CORBA::SystemException));
virtual void receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ PortableInterceptor::ServerRequestInfo_ptr)
ACE_THROW_SPEC ((
CORBA::SystemException,
PortableInterceptor::ForwardRequest
));
- virtual void receive_request (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ virtual void receive_request (PortableInterceptor::ServerRequestInfo_ptr ri)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableInterceptor::ForwardRequest));
- virtual void send_reply (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ virtual void send_reply (PortableInterceptor::ServerRequestInfo_ptr ri)
ACE_THROW_SPEC ((CORBA::SystemException));
- virtual void send_exception (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ virtual void send_exception (PortableInterceptor::ServerRequestInfo_ptr ri)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableInterceptor::ForwardRequest));
virtual void send_other (
PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
)
ACE_THROW_SPEC ((
CORBA::SystemException,
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/test_i.cpp b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/test_i.cpp
index 38c49820914..b95b285602e 100644
--- a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/test_i.cpp
+++ b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/test_i.cpp
@@ -12,8 +12,7 @@ Visual_i::Visual_i (CORBA::ORB_ptr orb)
// ctor
void
-Visual_i::normal (CORBA::Long
- ACE_ENV_ARG_DECL_NOT_USED)
+Visual_i::normal (CORBA::Long)
ACE_THROW_SPEC ((CORBA::SystemException))
{
// ACE_DEBUG ((LM_DEBUG, "Visual::normal called with %d\n", arg));
@@ -21,8 +20,7 @@ Visual_i::normal (CORBA::Long
CORBA::Long
Visual_i::calculate (CORBA::Long one,
- CORBA::Long two
- ACE_ENV_ARG_DECL_NOT_USED)
+ CORBA::Long two)
ACE_THROW_SPEC ((CORBA::SystemException))
{
// ACE_DEBUG ((LM_DEBUG, "Visual::calculate\n"));
@@ -34,7 +32,7 @@ Visual_i::user (void)
ACE_THROW_SPEC ((CORBA::SystemException,Test_Interceptors::Silly))
{
// ACE_DEBUG ((LM_DEBUG, "Visual::user, throwning Silly\n"));
- ACE_THROW (Test_Interceptors::Silly ());
+ throw Test_Interceptors::Silly ();
}
void
@@ -42,7 +40,7 @@ Visual_i::system (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
// ACE_DEBUG ((LM_DEBUG, "Visual::user, throwing INV_OBJREF\n"));
- ACE_THROW (CORBA::INV_OBJREF ());
+ throw CORBA::INV_OBJREF ();
}
void
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/test_i.h b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/test_i.h
index ab24946aa27..841d3ef41df 100644
--- a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/test_i.h
+++ b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/test_i.h
@@ -27,14 +27,12 @@ public:
Visual_i (CORBA::ORB_ptr orb);
// ctor
- void normal (CORBA::Long arg
- ACE_ENV_ARG_DECL_NOT_USED)
+ void normal (CORBA::Long arg)
ACE_THROW_SPEC ((CORBA::SystemException));
CORBA::Long calculate (
CORBA::Long one,
- CORBA::Long two
- ACE_ENV_ARG_DECL_NOT_USED)
+ CORBA::Long two)
ACE_THROW_SPEC ((CORBA::SystemException));
void user (void)