summaryrefslogtreecommitdiff
path: root/TAO/tests/POA/Destruction/Destruction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/POA/Destruction/Destruction.cpp')
-rw-r--r--TAO/tests/POA/Destruction/Destruction.cpp93
1 files changed, 0 insertions, 93 deletions
diff --git a/TAO/tests/POA/Destruction/Destruction.cpp b/TAO/tests/POA/Destruction/Destruction.cpp
deleted file mode 100644
index 13f0d2c34b0..00000000000
--- a/TAO/tests/POA/Destruction/Destruction.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-// $Id$
-
-//========================================================================
-//
-// = LIBRARY
-// TAO/tests/POA/Destruction
-//
-// = FILENAME
-// Destruction.cpp
-//
-// = DESCRIPTION
-// This program tests the destruction of a POA while there is an
-// upcall in progress.
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-//=========================================================================
-
-#include "testS.h"
-
-class test_i : public POA_test
-{
-public:
- void destroy_poa (CORBA::Environment &ACE_TRY_ENV)
- ACE_THROW_SPEC ((CORBA::SystemException));
-};
-
-void
-test_i::destroy_poa (CORBA::Environment &ACE_TRY_ENV)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- PortableServer::POA_var poa = this->_default_POA (ACE_TRY_ENV);
- ACE_CHECK;
-
- CORBA::Boolean etherealize_objects = 1;
- CORBA::Boolean wait_for_completion = 0;
- poa->destroy (etherealize_objects,
- wait_for_completion,
- ACE_TRY_ENV);
- ACE_CHECK;
-}
-
-int
-main (int argc, char **argv)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- // Initialize the ORB first.
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- 0,
- ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
- // Obtain the RootPOA.
- CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA",
- ACE_TRY_ENV);
-
- // Get the POA_var object from Object_var.
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (obj.in (),
- ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
- // Get the POAManager of the RootPOA.
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
- test_i servant;
-
- test_var test_object = servant._this (ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
- test_object->destroy_poa (ACE_TRY_ENV);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- return -1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}