summaryrefslogtreecommitdiff
path: root/TAO/tests/Portable_Interceptors
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/Portable_Interceptors')
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_1559/client.cpp2
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_1559/server.cpp2
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_1559/server_interceptor.cpp2
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_1559/server_interceptor.h2
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_2133/client.cpp8
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_2510_Regression/client.cpp2
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_2510_Regression/server.cpp2
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_3079/Server_ORBInitializer.cpp3
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_3079/client.cpp2
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_3080/client.cpp2
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Dynamic/Collocated_Test.cpp1
-rw-r--r--TAO/tests/Portable_Interceptors/Dynamic/client.cpp2
-rw-r--r--TAO/tests/Portable_Interceptors/Dynamic/server.cpp2
-rw-r--r--TAO/tests/Portable_Interceptors/ForwardRequest/client.cpp2
-rw-r--r--TAO/tests/Portable_Interceptors/IORInterceptor/client.cpp2
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Collocated_Test.cpp2
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/client_main.cpp2
-rw-r--r--TAO/tests/Portable_Interceptors/Redirection/Server_ORBInitializer.cpp3
-rw-r--r--TAO/tests/Portable_Interceptors/Redirection/client.cpp2
-rw-r--r--TAO/tests/Portable_Interceptors/Register_Initial_References/Server_ORBInitializer.cpp7
-rw-r--r--TAO/tests/Portable_Interceptors/Register_Initial_References/server.cpp13
-rw-r--r--TAO/tests/Portable_Interceptors/Service_Context_Manipulation/client.cpp2
-rw-r--r--TAO/tests/Portable_Interceptors/Service_Context_Manipulation/server.cpp2
23 files changed, 59 insertions, 10 deletions
diff --git a/TAO/tests/Portable_Interceptors/Bug_1559/client.cpp b/TAO/tests/Portable_Interceptors/Bug_1559/client.cpp
index aa45de26dcc..c7f335decc8 100644
--- a/TAO/tests/Portable_Interceptors/Bug_1559/client.cpp
+++ b/TAO/tests/Portable_Interceptors/Bug_1559/client.cpp
@@ -104,6 +104,8 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
run_test (server.in ());
server->shutdown ();
+
+ orb->destroy ();
}
catch (const CORBA::Exception& ex)
{
diff --git a/TAO/tests/Portable_Interceptors/Bug_1559/server.cpp b/TAO/tests/Portable_Interceptors/Bug_1559/server.cpp
index 2c0d6403599..ad934d1d728 100644
--- a/TAO/tests/Portable_Interceptors/Bug_1559/server.cpp
+++ b/TAO/tests/Portable_Interceptors/Bug_1559/server.cpp
@@ -131,6 +131,8 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
root_poa->destroy (1, 1);
+
+ orb->destroy ();
}
catch (const CORBA::Exception& ex)
{
diff --git a/TAO/tests/Portable_Interceptors/Bug_1559/server_interceptor.cpp b/TAO/tests/Portable_Interceptors/Bug_1559/server_interceptor.cpp
index 93af466a1c0..dff89a0c69e 100644
--- a/TAO/tests/Portable_Interceptors/Bug_1559/server_interceptor.cpp
+++ b/TAO/tests/Portable_Interceptors/Bug_1559/server_interceptor.cpp
@@ -87,7 +87,7 @@ Echo_Server_Request_Interceptor::receive_request_service_contexts (
if (ACE_OS::strcmp (buf, request_msg) == 0)
{
ACE_DEBUG ((LM_DEBUG, "Sending LOCATION_FORWARD\n"));
- throw PortableInterceptor::ForwardRequest (this->forward_location_);
+ throw PortableInterceptor::ForwardRequest (this->forward_location_.in ());
}
else if (ACE_OS::strcmp (buf, forward_msg) == 0)
{
diff --git a/TAO/tests/Portable_Interceptors/Bug_1559/server_interceptor.h b/TAO/tests/Portable_Interceptors/Bug_1559/server_interceptor.h
index 91e2d900864..33cd057ed2a 100644
--- a/TAO/tests/Portable_Interceptors/Bug_1559/server_interceptor.h
+++ b/TAO/tests/Portable_Interceptors/Bug_1559/server_interceptor.h
@@ -53,7 +53,7 @@ public:
private:
const char *myname_;
- CORBA::Object_ptr forward_location_;
+ CORBA::Object_var forward_location_;
};
#if defined(_MSC_VER)
diff --git a/TAO/tests/Portable_Interceptors/Bug_2133/client.cpp b/TAO/tests/Portable_Interceptors/Bug_2133/client.cpp
index 1da90efa1cc..d75ca74b237 100644
--- a/TAO/tests/Portable_Interceptors/Bug_2133/client.cpp
+++ b/TAO/tests/Portable_Interceptors/Bug_2133/client.cpp
@@ -40,6 +40,8 @@ parse_args (int argc, ACE_TCHAR *argv[])
int
ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ CORBA::ORB_var orb;
+
try
{
PortableInterceptor::ORBInitializer_ptr temp_orb_initializer =
@@ -55,7 +57,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
PortableInterceptor::register_orb_initializer (orb_initializer.in ());
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
+ orb = CORBA::ORB_init (argc, argv);
if (parse_args (argc, argv) != 0)
return 1;
@@ -82,9 +84,13 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
ACE_ERROR_RETURN ((LM_DEBUG,
"Error - the remote call succeeded which is bloody miraculous given that no server is running !!\n"),
1);
+
+ orb->destroy ();
}
catch (const CORBA::Exception&)
{
+ orb->destroy ();
+
if (ClientRequest_Interceptor::success_flag_)
{
ACE_DEBUG ((LM_DEBUG, "Success - the server was unreachable and PI receive_exception was invoked.\n"));
diff --git a/TAO/tests/Portable_Interceptors/Bug_2510_Regression/client.cpp b/TAO/tests/Portable_Interceptors/Bug_2510_Regression/client.cpp
index c93387bb632..71f8f39bd63 100644
--- a/TAO/tests/Portable_Interceptors/Bug_2510_Regression/client.cpp
+++ b/TAO/tests/Portable_Interceptors/Bug_2510_Regression/client.cpp
@@ -100,6 +100,8 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
ACE_Thread::join (threadHandle);
server->shutdown ();
+
+ orb->destroy ();
}
catch (const CORBA::Exception& ex)
diff --git a/TAO/tests/Portable_Interceptors/Bug_2510_Regression/server.cpp b/TAO/tests/Portable_Interceptors/Bug_2510_Regression/server.cpp
index 9dd16ff99d7..2ee6f70d78a 100644
--- a/TAO/tests/Portable_Interceptors/Bug_2510_Regression/server.cpp
+++ b/TAO/tests/Portable_Interceptors/Bug_2510_Regression/server.cpp
@@ -110,6 +110,8 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
root_poa->destroy (1, 1);
+
+ orb->destroy ();
}
catch (const CORBA::Exception& ex)
{
diff --git a/TAO/tests/Portable_Interceptors/Bug_3079/Server_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/Bug_3079/Server_ORBInitializer.cpp
index da369749751..33fb284f0c2 100644
--- a/TAO/tests/Portable_Interceptors/Bug_3079/Server_ORBInitializer.cpp
+++ b/TAO/tests/Portable_Interceptors/Bug_3079/Server_ORBInitializer.cpp
@@ -34,6 +34,9 @@ Server_ORBInitializer::post_init (
ENOMEM),
CORBA::COMPLETED_NO));
+ PortableInterceptor::ServerRequestInterceptor_var
+ server_interceptor = interceptor;
+
info->add_server_request_interceptor (interceptor);
}
diff --git a/TAO/tests/Portable_Interceptors/Bug_3079/client.cpp b/TAO/tests/Portable_Interceptors/Bug_3079/client.cpp
index 4b7d9a3b65e..7a89cf657e4 100644
--- a/TAO/tests/Portable_Interceptors/Bug_3079/client.cpp
+++ b/TAO/tests/Portable_Interceptors/Bug_3079/client.cpp
@@ -104,6 +104,8 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
}
server->shutdown ();
+
+ orb->destroy ();
}
catch (const CORBA::Exception& ex)
{
diff --git a/TAO/tests/Portable_Interceptors/Bug_3080/client.cpp b/TAO/tests/Portable_Interceptors/Bug_3080/client.cpp
index 051ec8de805..c6ed9e61acf 100644
--- a/TAO/tests/Portable_Interceptors/Bug_3080/client.cpp
+++ b/TAO/tests/Portable_Interceptors/Bug_3080/client.cpp
@@ -104,6 +104,8 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
1);
}
#endif /* TAO_HAS_INTERCEPTORS == 1 */
+
+ orb->destroy ();
}
catch (const CORBA::Exception& ex)
{
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Collocated_Test.cpp b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Collocated_Test.cpp
index 48882e04720..45692c0f273 100644
--- a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Collocated_Test.cpp
+++ b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Collocated_Test.cpp
@@ -120,6 +120,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
"(%P|%t) ERROR:Client Interceptors not called"
" properly\n"));
+ corb->destroy ();
}
catch (const CORBA::Exception&)
{
diff --git a/TAO/tests/Portable_Interceptors/Dynamic/client.cpp b/TAO/tests/Portable_Interceptors/Dynamic/client.cpp
index ab68b954615..00965c0617f 100644
--- a/TAO/tests/Portable_Interceptors/Dynamic/client.cpp
+++ b/TAO/tests/Portable_Interceptors/Dynamic/client.cpp
@@ -125,6 +125,8 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
run_test (server.in ());
server->shutdown ();
+
+ orb->destroy ();
}
catch (const CORBA::Exception& ex)
{
diff --git a/TAO/tests/Portable_Interceptors/Dynamic/server.cpp b/TAO/tests/Portable_Interceptors/Dynamic/server.cpp
index fe1285c5162..b06e09a630f 100644
--- a/TAO/tests/Portable_Interceptors/Dynamic/server.cpp
+++ b/TAO/tests/Portable_Interceptors/Dynamic/server.cpp
@@ -112,6 +112,8 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
root_poa->destroy (1, 1);
+
+ orb->destroy ();
}
catch (const CORBA::Exception& ex)
{
diff --git a/TAO/tests/Portable_Interceptors/ForwardRequest/client.cpp b/TAO/tests/Portable_Interceptors/ForwardRequest/client.cpp
index 11c70f59631..67cb50aa9c3 100644
--- a/TAO/tests/Portable_Interceptors/ForwardRequest/client.cpp
+++ b/TAO/tests/Portable_Interceptors/ForwardRequest/client.cpp
@@ -136,6 +136,8 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
}
server->shutdown ();
+
+ orb->destroy ();
}
catch (const CORBA::Exception& ex)
{
diff --git a/TAO/tests/Portable_Interceptors/IORInterceptor/client.cpp b/TAO/tests/Portable_Interceptors/IORInterceptor/client.cpp
index e662312423c..3d9a5422dd9 100644
--- a/TAO/tests/Portable_Interceptors/IORInterceptor/client.cpp
+++ b/TAO/tests/Portable_Interceptors/IORInterceptor/client.cpp
@@ -75,6 +75,8 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
}
server->shutdown ();
+
+ orb->destroy ();
}
catch (const CORBA::Exception& ex)
{
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Collocated_Test.cpp b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Collocated_Test.cpp
index 8f90b86c2f0..01e78ae2b96 100644
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Collocated_Test.cpp
+++ b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Collocated_Test.cpp
@@ -206,6 +206,8 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
{
return 1;
}
+
+ corb->destroy ();
}
catch (const CORBA::Exception&)
{
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/client_main.cpp b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/client_main.cpp
index 83088e5deb6..cab19179fe0 100644
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/client_main.cpp
+++ b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/client_main.cpp
@@ -119,6 +119,8 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
number_called, expected_interceptor_check));
return 1;
}
+
+ orb->destroy ();
}
catch (const CORBA::Exception&)
{
diff --git a/TAO/tests/Portable_Interceptors/Redirection/Server_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/Redirection/Server_ORBInitializer.cpp
index da369749751..33fb284f0c2 100644
--- a/TAO/tests/Portable_Interceptors/Redirection/Server_ORBInitializer.cpp
+++ b/TAO/tests/Portable_Interceptors/Redirection/Server_ORBInitializer.cpp
@@ -34,6 +34,9 @@ Server_ORBInitializer::post_init (
ENOMEM),
CORBA::COMPLETED_NO));
+ PortableInterceptor::ServerRequestInterceptor_var
+ server_interceptor = interceptor;
+
info->add_server_request_interceptor (interceptor);
}
diff --git a/TAO/tests/Portable_Interceptors/Redirection/client.cpp b/TAO/tests/Portable_Interceptors/Redirection/client.cpp
index 0825bae9023..0c591bae70d 100644
--- a/TAO/tests/Portable_Interceptors/Redirection/client.cpp
+++ b/TAO/tests/Portable_Interceptors/Redirection/client.cpp
@@ -100,6 +100,8 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
}
server->shutdown ();
+
+ orb->destroy ();
}
catch (const CORBA::Exception& ex)
{
diff --git a/TAO/tests/Portable_Interceptors/Register_Initial_References/Server_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/Register_Initial_References/Server_ORBInitializer.cpp
index 1e3d3682b0c..529c994c465 100644
--- a/TAO/tests/Portable_Interceptors/Register_Initial_References/Server_ORBInitializer.cpp
+++ b/TAO/tests/Portable_Interceptors/Register_Initial_References/Server_ORBInitializer.cpp
@@ -23,18 +23,19 @@ Server_ORBInitializer::pre_init (
POA_TestModule::test* test = 0;
ACE_NEW (test,
test_i);
+ PortableServer::ServantBase_var safe (test);
- CORBA::Object_ptr object = test->_this ();
+ CORBA::Object_var object = test->_this ();
orbinitinfo->register_initial_reference ("MyService",
- object);
+ object.in ());
bool invalid_name = false;
try
{
// Registering with an empty string should give an exception
orbinitinfo->register_initial_reference ("",
- object);
+ object.in ());
}
catch (const PortableInterceptor::ORBInitInfo::InvalidName&)
{
diff --git a/TAO/tests/Portable_Interceptors/Register_Initial_References/server.cpp b/TAO/tests/Portable_Interceptors/Register_Initial_References/server.cpp
index ad99e8ca34f..98853ebc269 100644
--- a/TAO/tests/Portable_Interceptors/Register_Initial_References/server.cpp
+++ b/TAO/tests/Portable_Interceptors/Register_Initial_References/server.cpp
@@ -16,18 +16,19 @@ int test_orb (CORBA::ORB_ptr orb)
POA_TestModule::test* test = 0;
ACE_NEW_RETURN (test,
test_i, 1);
+ PortableServer::ServantBase_var safe (test);
- CORBA::Object_ptr object = test->_this ();
+ CORBA::Object_var object = test->_this ();
orb->register_initial_reference ("ORBMyService",
- object);
+ object.in ());
bool invalid_name = false;
try
{
// Registering with an empty string should give an exception
orb->register_initial_reference ("",
- object);
+ object.in ());
}
catch (const CORBA::ORB::InvalidName&)
{
@@ -49,7 +50,7 @@ int test_orb (CORBA::ORB_ptr orb)
{
// Registering with an duplicate string should give an exception
orb->register_initial_reference ("ORBMyService",
- object);
+ object.in ());
}
catch (const CORBA::ORB::InvalidName&)
{
@@ -118,6 +119,10 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
CORBA::ORB_var second_orb =
CORBA::ORB_init (argc, argv, "SecondORB");
+
+ second_orb->destroy ();
+
+ orb->destroy ();
}
catch (const CORBA::Exception& ex)
{
diff --git a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/client.cpp b/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/client.cpp
index f44e09e9bfe..9f6fb5660ef 100644
--- a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/client.cpp
+++ b/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/client.cpp
@@ -105,6 +105,8 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
run_test (server.in ());
server->shutdown ();
+
+ orb->destroy ();
}
catch (const CORBA::Exception& ex)
{
diff --git a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/server.cpp b/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/server.cpp
index 6af4f37250e..f22ac303516 100644
--- a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/server.cpp
+++ b/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/server.cpp
@@ -112,6 +112,8 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
root_poa->destroy (1, 1);
+
+ orb->destroy ();
}
catch (const CORBA::Exception& ex)
{