summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2008-03-17 10:44:11 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2008-03-17 10:44:11 +0000
commit6d520300da4aa014b4650a3b928a62c80fa9de01 (patch)
tree814db793d0c08890fad7c346b38f6d2d57a7894c
parent12b62eaf86b764dcc0a312995df84fb5f1fcd5f8 (diff)
downloadATCD-6d520300da4aa014b4650a3b928a62c80fa9de01.tar.gz
Mon Mar 17 10:42:57 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
-rw-r--r--TAO/ChangeLog8
-rw-r--r--TAO/orbsvcs/tests/Notify/Bug_3252_Regression/Bug_3252_Regression.mpc1
-rw-r--r--TAO/orbsvcs/tests/Notify/Bug_3252_Regression/PersistentPoa.cpp106
-rw-r--r--TAO/orbsvcs/tests/Notify/Bug_3252_Regression/PersistentPoa.h46
4 files changed, 8 insertions, 153 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 78a632a73c5..7ea4de837bf 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,11 @@
+Mon Mar 17 10:42:57 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * orbsvcs/tests/Notify/Bug_3252_Regression/Persistent_POA.{h,cpp}:
+ Removed
+
+ * orbsvcstests/Notify/Bug_3252_Regression/Bug_3252_Regression.mpc:
+ Updated
+
Mon Mar 17 09:02:57 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
* orbsvcs/tests/Notify/Bug_3252_Regression/*:
diff --git a/TAO/orbsvcs/tests/Notify/Bug_3252_Regression/Bug_3252_Regression.mpc b/TAO/orbsvcs/tests/Notify/Bug_3252_Regression/Bug_3252_Regression.mpc
index 244c2b4e3dd..8d0ce0c73cb 100644
--- a/TAO/orbsvcs/tests/Notify/Bug_3252_Regression/Bug_3252_Regression.mpc
+++ b/TAO/orbsvcs/tests/Notify/Bug_3252_Regression/Bug_3252_Regression.mpc
@@ -13,6 +13,5 @@ project: portableserver {
dynamicflags += BUG_3252_BUILD_DLL
Source_Files {
DllOrb.cpp
- PersistentPoa.cpp
}
}
diff --git a/TAO/orbsvcs/tests/Notify/Bug_3252_Regression/PersistentPoa.cpp b/TAO/orbsvcs/tests/Notify/Bug_3252_Regression/PersistentPoa.cpp
deleted file mode 100644
index fd530a1687a..00000000000
--- a/TAO/orbsvcs/tests/Notify/Bug_3252_Regression/PersistentPoa.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-// $Id$
-
-#include "ace/Arg_Shifter.h"
-#include "tao/PortableServer/POAManager.h"
-#include "tao/PortableServer/PortableServer.h"
-
-#include "PersistentPoa.h"
-
-
-
-PersistentPoa::PersistentPoa ( )
-{
-} /* end of PersistentPoa::PersistentPoa ( ) */
-
-
-PersistentPoa::~PersistentPoa ( )
- throw ()
-{
-} /* end of PersistentPoa::~PersistentPoa ( ) */
-
-
-int PersistentPoa::init (int argc, char *argv[])
-{
- ACE_Arg_Shifter as(argc, argv);
- m_poaName = std::string(as.get_current());
- as.ignore_arg();
-
- std::string orbName(as.get_current());
- as.ignore_arg();
-
- while(as.is_anything_left())
- {
- as.ignore_arg();
- }
-
- try
- {
- // left out all safety checks
- DllOrb * p_orb = ACE_Dynamic_Service<DllOrb>::instance (orbName.c_str());
- mv_orb = p_orb->orb();
- CORBA::Object_var v_poa = mv_orb->resolve_initial_references("RootPOA");
- mv_rootPOA = PortableServer::POA::_narrow(v_poa.in ());
-
- // Threading policy
- CORBA::Policy_var v_threadingPolicy =
- mv_rootPOA->create_thread_policy(PortableServer::ORB_CTRL_MODEL);
-
- // Lifespan policy
- CORBA::Policy_var v_lifespanPolicy =
- mv_rootPOA->create_lifespan_policy(PortableServer::PERSISTENT);
-
- // ID assignment policy
- CORBA::Policy_var v_idAssignmentPolicy =
- mv_rootPOA->create_id_assignment_policy(PortableServer::USER_ID);
-
- // Policies for the new POA
- CORBA::PolicyList policies(3);
- policies.length (3);
- policies[0] = v_threadingPolicy.in();
- policies[1] = v_lifespanPolicy.in();
- policies[2] = v_idAssignmentPolicy.in();
-
- mv_thisPOA = mv_rootPOA->create_POA(
- m_poaName.c_str(),
- PortableServer::POAManager::_nil(),
- policies
- );
-
- mv_poaManager = mv_thisPOA->the_POAManager();
- mv_poaManager->activate();
- }
- catch(...)
- {
- ACE_DEBUG ((LM_ERROR, ACE_TEXT ("activate failed\n")));
- return -1;
- }
-
- ACE_DEBUG ((LM_ERROR, ACE_TEXT ("POA activated\n")));
-
- return 0;
-} /* end of PersistentPoa::init ( ) */
-
-
-int PersistentPoa::fini (void)
-{
- try
- {
- mv_poaManager->deactivate(1, 1);
- mv_poaManager = PortableServer::POAManager::_nil();
-
- mv_thisPOA->destroy(1, 1);
- mv_thisPOA = PortableServer::POA::_nil();
- }
- catch(...)
- {
- ACE_DEBUG ((LM_ERROR, ACE_TEXT ("deactivate failed\n")));
- return -1;
- }
-
- ACE_DEBUG ((LM_ERROR, ACE_TEXT ("POA deactivated\n")));
-
- return 0;
-} /* end of PersistentPoa::fini ( ) */
-
-
-ACE_FACTORY_DEFINE (bug_3252, PersistentPoa)
diff --git a/TAO/orbsvcs/tests/Notify/Bug_3252_Regression/PersistentPoa.h b/TAO/orbsvcs/tests/Notify/Bug_3252_Regression/PersistentPoa.h
deleted file mode 100644
index 37370b566ff..00000000000
--- a/TAO/orbsvcs/tests/Notify/Bug_3252_Regression/PersistentPoa.h
+++ /dev/null
@@ -1,46 +0,0 @@
-// $Id$
-
-#ifndef bug_3252_PersistentPoa_h
-#define bug_3252_PersistentPoa_h
-
-#include <string>
-
-#include "ace/Service_Object.h"
-#include "tao/ORB.h"
-#include "tao/PortableServer/PortableServer.h"
-
-#include "DllOrb.h"
-#include "bug_3252_export.h"
-
-
-class PersistentPoa
-:
- public ACE_Service_Object
-{
- // public types and methods
- public:
- PersistentPoa ( );
-
- ~PersistentPoa ( )
- throw ();
-
- // protected types and methods
- protected:
- virtual int init (int argc, char *argv[]);
-
- virtual int fini (void);
-
- // private methods and instance variables
- private:
- std::string m_poaName;
- CORBA::ORB_var mv_orb;
- PortableServer::POA_var mv_rootPOA;
- PortableServer::POA_var mv_thisPOA;
- PortableServer::POAManager_var mv_poaManager;
-}; /* end of class PersistentPoa */
-
-
-ACE_FACTORY_DECLARE (bug_3252, PersistentPoa)
-
-
-#endif /* bug_3252_PersistentPoa_h */