summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormcorino <mcorino@users.noreply.github.com>2011-11-01 11:00:10 +0000
committermcorino <mcorino@users.noreply.github.com>2011-11-01 11:00:10 +0000
commit6cc1b5e54165f5c9dfae465ed84e853ddc8e91ee (patch)
tree11ff1ff6daaed0a4383e2103a7435aab8e115ab7
parent801908ae33d63641d9e3648c6fcb01482764b3a8 (diff)
downloadATCD-6cc1b5e54165f5c9dfae465ed84e853ddc8e91ee.tar.gz
Thu Nov 01 10:54:13 UTC 2011 Martin Corino <mcorino@remedy.nl>
Merged changes from Remedy SA work branch.
-rw-r--r--CIAO/ChangeLog116
-rw-r--r--CIAO/MPC/config/ciao_extension_container.mpb3
-rw-r--r--CIAO/MPC/config/ciao_extension_container_stub.mpb2
-rw-r--r--CIAO/MPC/config/ciao_port_activator_stub.mpb7
-rw-r--r--CIAO/MPC/config/ciao_servant.mpb2
-rw-r--r--CIAO/MPC/config/ciao_servant_activator.mpb7
-rw-r--r--CIAO/MPC/config/ciao_servant_activator_stub.mpb7
-rw-r--r--CIAO/MPC/config/ciao_session_container.mpb4
-rw-r--r--CIAO/MPC/config/ciao_session_container_stub.mpb2
-rw-r--r--CIAO/bin/ciao_tests.lst1
-rw-r--r--CIAO/ciao/Containers/CIAO_Servant_Activator.idl24
-rw-r--r--CIAO/ciao/Containers/CIAO_Servant_Activator.mpc54
-rw-r--r--CIAO/ciao/Containers/Container_Base.idl3
-rw-r--r--CIAO/ciao/Containers/Container_Base_T.cpp34
-rw-r--r--CIAO/ciao/Containers/Container_Base_T.h8
-rw-r--r--CIAO/ciao/Containers/Containers.mpc3
-rw-r--r--CIAO/ciao/Containers/Extension/Extension_Container.h2
-rw-r--r--CIAO/ciao/Containers/Extension/Extension_Container.mpc5
-rw-r--r--CIAO/ciao/Containers/Servant_Activator.cpp174
-rw-r--r--CIAO/ciao/Containers/Servant_Activator.h98
-rw-r--r--CIAO/ciao/Containers/Session/Session_Container.mpc9
-rw-r--r--CIAO/ciao/Servants/CIAO_Port_Activator.idl39
-rw-r--r--CIAO/ciao/Servants/Connector_Servant_Impl_Base.cpp9
-rw-r--r--CIAO/ciao/Servants/Port_Activator.cpp37
-rw-r--r--CIAO/ciao/Servants/Port_Activator.h84
-rw-r--r--CIAO/ciao/Servants/Port_Activator_T.cpp82
-rw-r--r--CIAO/ciao/Servants/Port_Activator_T.h83
-rw-r--r--CIAO/ciao/Servants/Servant_Impl_Base.cpp8
-rw-r--r--CIAO/ciao/Servants/Servants.mpc39
-rw-r--r--CIAO/tests/Collocation/Coll_Base/Base.idl3
-rw-r--r--CIAO/tests/Collocation/Coll_Base/Base.mpc12
-rw-r--r--CIAO/tests/Collocation/README25
-rw-r--r--CIAO/tests/Collocation/Receiver/Receiver.idl6
-rw-r--r--CIAO/tests/Collocation/Receiver/Receiver.mpc12
-rw-r--r--CIAO/tests/Collocation/Receiver/Receiver_exec.cpp40
-rw-r--r--CIAO/tests/Collocation/Receiver/Receiver_exec.h7
-rw-r--r--CIAO/tests/Collocation/Sender/Sender.idl3
-rw-r--r--CIAO/tests/Collocation/Sender/Sender.mpc12
-rw-r--r--CIAO/tests/Collocation/Sender/Sender_exec.cpp85
-rw-r--r--CIAO/tests/Collocation/Sender/Sender_exec.h9
-rw-r--r--CIAO/tests/Collocation/descriptors/PlanAllOnMore.cdp252
-rw-r--r--CIAO/tests/Collocation/descriptors/PlanAllOnOne.cdp12
-rw-r--r--CIAO/tests/Collocation/descriptors/PlanAllOnOneBest.cdp244
-rw-r--r--CIAO/tests/Collocation/descriptors/PlanAllOnOneNo.cdp244
-rw-r--r--CIAO/tests/Collocation/descriptors/PlanAllOnOneNoTP.cdp244
-rwxr-xr-xCIAO/tests/Collocation/descriptors/run_test.pl218
-rw-r--r--TAO/ChangeLog27
-rw-r--r--TAO/TAO_IDL/be/be_codegen.cpp12
-rw-r--r--TAO/TAO_IDL/be/be_visitor_component/servant_svs.cpp151
49 files changed, 1491 insertions, 1073 deletions
diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog
index eee0d6da1dc..c1c68addc98 100644
--- a/CIAO/ChangeLog
+++ b/CIAO/ChangeLog
@@ -1,3 +1,119 @@
+Thu Nov 01 10:54:13 UTC 2011 Martin Corino <mcorino@remedy.nl>
+
+ Merged changes from Remedy SA work branch.
+
+ === start changelog ===
+
+ Tue Nov 01 08:41:15 UTC 2011 Marijke Hengstmengel <mhengstmengel@remedy.nl>
+ * tests/Collocation/Sender/Sender_exec.cpp:
+ Add define in test in case of CIAO not build with
+ ccm_direct_colloation.
+
+ Mon Oct 31 13:55:15 UTC 2011 Marijke Hengstmengel <mhengstmengel@remedy.nl>
+ * ciao/Containers/Container_Base.idl:
+ * ciao/Containers/Container_Base_T.h:
+ * ciao/Containers/Container_Base_T.cpp:
+ * ciao/Servants/Extension/Extension_Container.h:
+ * ciao/Servants/Connector_Servant_Impl_Base.cpp:
+ * ciao/Servants/Servant_Impl_Base.cpp:
+ * ciao/Servants/Servants.mpc:
+ Removed already disabled lines with servant- and portactivators
+
+ * ciao/Containers/CIAO_Servant_Activator.idl:
+ * ciao/Containers/CIAO_Servant_Activator.mpc:
+ * ciao/Containers/Servant_Activator.h:
+ * ciao/Containers/Servant_Activator.cpp:
+ * ciao/Servants/Port_Activator_T.cpp:
+ * ciao/Servants/Port_Activator_T.h:
+ * ciao/Servants/CIAO_Port_Activator.idl:
+ * ciao/Servants/Port_Activator.h:
+ * ciao/Servants/Port_Activator.cpp:
+ * MPC/config/ciao_port_activator_stub.mpb:
+ * MPC/config/ciao_servant_activator_stub.mpb:
+ * MPC/config/ciao_servant_activator.mpb:
+
+ Deleted this files.
+
+
+
+ Mon Oct 31 13:30:15 UTC 2011 Marijke Hengstmengel <mhengstmengel@remedy.nl>
+ * tests/Collocation/README:
+ Explanation of the test
+
+ Mon Oct 31 13:19:15 UTC 2011 Marijke Hengstmengel <mhengstmengel@remedy.nl>
+ * tests/Collocation/Coll_Base/Base.idl:
+ * tests/Collocation/Coll_Base/Base.mpc:
+ * tests/Collocation/Receiver/Receiver.idl:
+ * tests/Collocation/Receiver/Receiver_exec.h:
+ * tests/Collocation/Receiver/Receiver_exec.cpp:
+ * tests/Collocation/Sender/Sender.idl:
+ * tests/Collocation/Sender/Sender_exec.h:
+ * tests/Collocation/Sender/Sender_exec.cpp:
+ * tests/Collocation/descriptors/PlanAllOnOne.cdp:
+ * tests/Collocation/descriptors/run_test.pl:
+ Expanded test. Use different CollocationStrategies via
+ attributes in deploymentplans.
+
+ Tue Oct 27 07:16:24 UTC 2011 Marijke Hengstmengel <mhengstmengel@remedy.nl>
+
+ * ciao/Containers/Extension/Extension_Containers.mpc:
+ Remove ciao_port_activator_stub and cia_servant_activator_stub
+ * ciao/Servants/Servant_Impl_Base.cpp:
+ Committed the right file now.
+
+ Wed Oct 26 12:018:24 UTC 2011 Marijke Hengstmengel <mhengstmengel@remedy.nl>
+
+ * ciao/Containers/Session/Session_Containers.mpc:
+ Remove ciao_port_activator_stub and cia_servant_activator_stub
+
+ Wed Oct 26 07:28:24 UTC 2011 Marijke Hengstmengel <mhengstmengel@remedy.nl>
+
+ * ciao/Containers/Containers.mpc:
+ Remove ciao_port_activator_stub and cia_servant_activator_stub
+
+
+ Wed Oct 26 07:28:24 UTC 2011 Marijke Hengstmengel <mhengstmengel@remedy.nl>
+
+ * MPC/config/ciao_extension_container.mpb:
+ * MPC/config/ciao_extension_container_stub.mpb:
+ * MPC/config/ciao_servant.mpb:
+ * MPC/config/ciao_session_container.mpb:
+ * MPC/config/ciao_session_container_stub.mpb:
+ * ciao/Containers/Containers.mpc:
+ * ciao/Containers/Extension/Extension_Container.mpc:
+ * ciao/Containers/Session/Session_Container.mpc:
+ Remove ciao_port_activator_stub and cia_servant_activator_stub
+
+ * ciao/Containers/CIAO_Servant_Activator.idl:
+ * ciao/Containers/CIAO_Servant_Activator.mpc:
+ * ciao/Containers/Servant_Activator.h:
+ * ciao/Containers/Servant_Activator.cpp:
+ * ciao/Servants/Port_Activator_T.cpp:
+ * ciao/Servants/CIAO_Port_Activator.idl:
+ Deactivate content. Later on if build successfull delete files
+
+ * ciao/Containers/Container_Base.idl:
+ * ciao/Containers/Container_Base_T.h:
+ * ciao/Containers/Container_Base_T.cpp:
+ * ciao/Servants/Connector_Servant_Impl_Base.cpp:
+ * ciao/Servants/Servant_Impl_Base.cpp:
+ * ciao/Servants/Servants.mpc:
+ Disable Servant_Activator and Port_Activator functionality,
+ Later on if build successfull delete lines
+
+ * tests/Collocation/Coll_Base/Base.mpc:
+ * tests/Collocation/Receiver/Receiver.mpc:
+ * tests/Collocation/Sender/Sender.mpc:
+ Remove avoids_no_events and -GD (already global defined)
+
+ * tests/Collocation/descriptors/run_test.pl:
+ Disable debug logs
+
+ * bin/ciao_tests.lst:
+ Add CIAO/tests/Collocation
+
+ === end changelog ===
+
Sun Oct 30 22:39:45 UTC 2011 William R. Otte <wotte@dre.vanderbilt.edu>
* ciao/Deployment/Interceptors/Deployment_Interceptors.h:
diff --git a/CIAO/MPC/config/ciao_extension_container.mpb b/CIAO/MPC/config/ciao_extension_container.mpb
index 9deacd8a8b0..c1e5910b870 100644
--- a/CIAO/MPC/config/ciao_extension_container.mpb
+++ b/CIAO/MPC/config/ciao_extension_container.mpb
@@ -2,8 +2,7 @@
// $Id$
project : utils, ciao_servant, \
- ciao_port_activator_stub, ciao_servant_activator_stub, \
- ciao_extension_container_stub {
+ ciao_extension_container_stub, ccm_direct_collocation {
libs += CIAO_Extension_Container
after += CIAO_Extension_Container
}
diff --git a/CIAO/MPC/config/ciao_extension_container_stub.mpb b/CIAO/MPC/config/ciao_extension_container_stub.mpb
index 28b1fa64649..e25b0cc567d 100644
--- a/CIAO/MPC/config/ciao_extension_container_stub.mpb
+++ b/CIAO/MPC/config/ciao_extension_container_stub.mpb
@@ -1,7 +1,7 @@
// -*- MPC -*-
// $Id$
-project : ciao_port_activator_stub, ciao_servant_activator_stub, ciao_container_base_stub {
+project : ciao_container_base_stub, ccm_direct_collocation {
libs += CIAO_Extension_Container_stub
after += CIAO_Extension_Container_stub
}
diff --git a/CIAO/MPC/config/ciao_port_activator_stub.mpb b/CIAO/MPC/config/ciao_port_activator_stub.mpb
deleted file mode 100644
index 1a38e34dc93..00000000000
--- a/CIAO/MPC/config/ciao_port_activator_stub.mpb
+++ /dev/null
@@ -1,7 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project : portableserver {
- after += CIAO_Port_Activator_stub
- libs += CIAO_Port_Activator_stub
-}
diff --git a/CIAO/MPC/config/ciao_servant.mpb b/CIAO/MPC/config/ciao_servant.mpb
index fd4c7cee9c2..cbe22739e64 100644
--- a/CIAO/MPC/config/ciao_servant.mpb
+++ b/CIAO/MPC/config/ciao_servant.mpb
@@ -1,7 +1,7 @@
// -*- MPC -*-
//$Id$
-project : ciao_logger, ciao_port_activator_stub, ciao_servant_activator_stub, \
+project : ciao_logger, \
ccm_svnt, taoidldefaults, portableserver, ccm_cookie, ccm_session_stub, \
ciao_session_container_stub, ccm_direct_collocation {
after += CIAO_Servant_Impl
diff --git a/CIAO/MPC/config/ciao_servant_activator.mpb b/CIAO/MPC/config/ciao_servant_activator.mpb
deleted file mode 100644
index c4b6973aae1..00000000000
--- a/CIAO/MPC/config/ciao_servant_activator.mpb
+++ /dev/null
@@ -1,7 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project : portableserver, ciao_port_activator_stub, ciao_servant_activator_stub, avoids_minimum_corba, ciao_logger {
- libs += CIAO_Servant_Activator_impl
- after += CIAO_Servant_Activator_impl
-}
diff --git a/CIAO/MPC/config/ciao_servant_activator_stub.mpb b/CIAO/MPC/config/ciao_servant_activator_stub.mpb
deleted file mode 100644
index 1a21a98b816..00000000000
--- a/CIAO/MPC/config/ciao_servant_activator_stub.mpb
+++ /dev/null
@@ -1,7 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project : portableserver, avoids_minimum_corba, ccm_direct_collocation {
- after += CIAO_Servant_Activator_stub
- libs += CIAO_Servant_Activator_stub
-}
diff --git a/CIAO/MPC/config/ciao_session_container.mpb b/CIAO/MPC/config/ciao_session_container.mpb
index 132aaa38639..42a3d796e0d 100644
--- a/CIAO/MPC/config/ciao_session_container.mpb
+++ b/CIAO/MPC/config/ciao_session_container.mpb
@@ -1,8 +1,8 @@
// -*- MPC -*-
// $Id$
-project : utils, ciao_servant, ciao_port_activator_stub, \
- ciao_servant_activator_stub, ciao_session_container_stub {
+project : utils, ciao_servant, \
+ ciao_session_container_stub, ccm_direct_collocation {
libs += CIAO_Session_Container
after += CIAO_Session_Container
}
diff --git a/CIAO/MPC/config/ciao_session_container_stub.mpb b/CIAO/MPC/config/ciao_session_container_stub.mpb
index 966a3d8016e..fa55f49da47 100644
--- a/CIAO/MPC/config/ciao_session_container_stub.mpb
+++ b/CIAO/MPC/config/ciao_session_container_stub.mpb
@@ -1,7 +1,7 @@
// -*- MPC -*-
// $Id$
-project : ciao_port_activator_stub, ciao_servant_activator_stub, ciao_container_base_stub {
+project : ciao_container_base_stub, ccm_direct_collocation {
libs += CIAO_Session_Container_stub
after += CIAO_Session_Container_stub
}
diff --git a/CIAO/bin/ciao_tests.lst b/CIAO/bin/ciao_tests.lst
index 5c7224551f1..933415ed8a9 100644
--- a/CIAO/bin/ciao_tests.lst
+++ b/CIAO/bin/ciao_tests.lst
@@ -18,6 +18,7 @@ TAO/CIAO/examples/Null_Component_Glfa/descriptors/run_test.pl: !STATIC !MINIMUM
TAO/CIAO/examples/Hello/descriptors/run_test_without_ns.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST !LabVIEW_RT !WinCE !CCM_NOEVENT
TAO/CIAO/examples/Display/descriptors/run_all_in_one.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST !LabVIEW_RT !WinCE !CCM_NOEVENT
TAO/CIAO/tutorials/Quoter/Simple/descriptors/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST !LabVIEW_RT !WinCE !CCM_NOEVENT
+TAO/CIAO/tests/Collocation/descriptors/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST
TAO/CIAO/tests/Bug_3834_Regression/descriptors/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST !LabVIEW_RT !WinCE
TAO/CIAO/tests/Bug_3834_Regression/descriptors/run_test_without_ns.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST !LabVIEW_RT !WinCE
TAO/CIAO/tests/IDL3/Events/Any/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ACE_FOR_TAO !ST !LabVIEW_RT !WinCE !CCM_NOEVENT
diff --git a/CIAO/ciao/Containers/CIAO_Servant_Activator.idl b/CIAO/ciao/Containers/CIAO_Servant_Activator.idl
deleted file mode 100644
index 6e725b5821c..00000000000
--- a/CIAO/ciao/Containers/CIAO_Servant_Activator.idl
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * @file CIAO_Servant_Activator.idl
- * @author William R. Otte <wotte@dre.vanderbilt.edu>
- * $Id$
- * Local interface extensions for the CIAO servant activator.
- */
-
-#ifndef CIAO_SERVANT_ACTIVATOR_IDL
-#define CIAO_SERVANT_ACTIVATOR_IDL
-
-#include "tao/PortableServer/ServantActivator.pidl"
-#include "ciao/Servants/CIAO_Port_Activator.idl"
-
-module CIAO
-{
- local interface Servant_Activator : PortableServer::ServantActivator
- {
- boolean update_port_activator (in PortableServer::ObjectId oid);
-
- boolean register_port_activator (in Port_Activator pa);
- };
-};
-
-#endif
diff --git a/CIAO/ciao/Containers/CIAO_Servant_Activator.mpc b/CIAO/ciao/Containers/CIAO_Servant_Activator.mpc
deleted file mode 100644
index 23f0c670b2c..00000000000
--- a/CIAO/ciao/Containers/CIAO_Servant_Activator.mpc
+++ /dev/null
@@ -1,54 +0,0 @@
-// $Id$
-
-project(CIAO_Servant_Activator_stub_idl) : install, ciaoidldefaults {
- custom_only = 1
- idlflags += -Wb,stub_export_include=CIAO_Servant_Activator_stub_export.h \
- -Wb,stub_export_macro=CIAO_SERVANT_ACTIVATOR_STUB_Export \
- -Wb,skel_export_include=CIAO_Servant_Activator_export.h \
- -Wb,skel_export_macro=CIAO_SERVANT_ACTIVATOR_Export \
- -SS -Sci -Gxhst -Gxhsk
- IDL_Files {
- CIAO_Servant_Activator.idl
- }
- specific {
- install_dir = ciao/Containers
- }
-}
-
-project(CIAO_Servant_Activator_stub) : install, ciao_lib, ciao_port_activator_stub, avoids_minimum_corba, ciao_logger {
- after += CIAO_Servant_Activator_stub_idl
- dynamicflags += CIAO_SERVANT_ACTIVATOR_STUB_BUILD_DLL
-
- IDL_Files {
- }
- Source_Files {
- CIAO_Servant_ActivatorC.cpp
- }
- Header_Files {
- CIAO_Servant_Activator_stub_export.h
- CIAO_Servant_ActivatorC.h
- CIAO_Servant_ActivatorS.h
- }
- specific {
- install_dir = ciao/Containers
- }
-}
-
-project(CIAO_Servant_Activator_impl) : install, ciao_lib, portableserver, ciao_servant_activator_stub, ciao_port_activator_stub, avoids_minimum_corba, ciao_logger {
- after += CIAO_Servant_Activator_stub_idl
- dynamicflags += CIAO_SERVANT_ACTIVATOR_BUILD_DLL
-
- IDL_Files {
- }
- Source_Files {
- Servant_Activator.cpp
- }
- Header_Files {
- CIAO_Servant_Activator_export.h
- Servant_Activator.h
- }
- specific {
- install_dir = ciao/Containers
- }
-}
-
diff --git a/CIAO/ciao/Containers/Container_Base.idl b/CIAO/ciao/Containers/Container_Base.idl
index a97f59cbdd8..7795456c6c4 100644
--- a/CIAO/ciao/Containers/Container_Base.idl
+++ b/CIAO/ciao/Containers/Container_Base.idl
@@ -11,7 +11,6 @@
#include "ccm/CCM_Base.idl"
#include "ccm/CCM_StandardConfigurator.idl"
#include "ccm/CCM_CCMException.idl"
-#include "ciao/Containers/CIAO_Servant_Activator.idl"
#include "ciao/Base/CIAO_Exceptions.idl"
#include "ccm/CCM_Exceptions.idl"
#include "ccm/CCM_Navigation.idl"
@@ -122,8 +121,6 @@ module CIAO
in Container_Types::OA_Type type,
out PortableServer::ObjectId oid);
- Servant_Activator ports_servant_activator ();
-
Object generate_reference (in string obj_id,
in string repo_id,
in Container_Types::OA_Type type);
diff --git a/CIAO/ciao/Containers/Container_Base_T.cpp b/CIAO/ciao/Containers/Container_Base_T.cpp
index 81d912fe430..fae1812ae4f 100644
--- a/CIAO/ciao/Containers/Container_Base_T.cpp
+++ b/CIAO/ciao/Containers/Container_Base_T.cpp
@@ -5,7 +5,6 @@
#include "ciao/Logger/Log_Macros.h"
#include "tao/Utils/PolicyList_Destroyer.h"
-#include "ciao/Containers/Servant_Activator.h"
#include "ciao/Servants/Connector_Servant_Impl_Base.h"
#include "ciao/Base/CIAO_ExceptionsC.h"
@@ -17,8 +16,8 @@ namespace CIAO
Container_i<BASE>::Container_i (CORBA::ORB_ptr o,
PortableServer::POA_ptr root_poa)
: orb_ (::CORBA::ORB::_duplicate (o)),
- root_poa_ (::PortableServer::POA::_duplicate (root_poa)),
- sa_ (0)
+ root_poa_ (::PortableServer::POA::_duplicate (root_poa))
+ //, sa_ (0)
{
}
@@ -31,7 +30,6 @@ namespace CIAO
void
Container_i<BASE>::fini (void)
{
- this->sa_ = ::CIAO::Servant_Activator::_nil ();
::PortableServer::POA_var comp_poa_safe = this->component_poa_._retn ();
@@ -758,32 +756,19 @@ namespace CIAO
PortableServer::POAManager_var poa_manager = root->the_POAManager ();
- TAO::Utils::PolicyList_Destroyer policies (3);
- policies.length (3);
+ TAO::Utils::PolicyList_Destroyer policies (2);
+ policies.length (2);
policies[0] =
root->create_id_assignment_policy (PortableServer::USER_ID);
-
- // Servant Manager Policy
- policies[1] =
- root->create_request_processing_policy (PortableServer::USE_SERVANT_MANAGER);
-
// Servant Retention Policy
- policies[2] =
+ policies[1] =
root->create_servant_retention_policy (PortableServer::RETAIN);
this->facet_cons_poa_ =
root->create_POA (name,
poa_manager.in (),
policies);
-
- Servant_Activator_i *sa = 0;
- ACE_NEW_THROW_EX (sa,
- Servant_Activator_i (this->orb_.in ()),
- CORBA::NO_MEMORY ());
- this->sa_ = sa;
-
- this->facet_cons_poa_->set_servant_manager (this->sa_.in ());
}
template <typename BASE>
@@ -1062,13 +1047,6 @@ namespace CIAO
}
template <typename BASE>
- ::CIAO::Servant_Activator_ptr
- Container_i<BASE>::ports_servant_activator (void)
- {
- return Servant_Activator::_duplicate(this->sa_.in ());
- }
-
- template <typename BASE>
CORBA::Object_ptr
Container_i<BASE>::generate_reference (const char *obj_id,
const char *repo_id,
@@ -1085,7 +1063,7 @@ namespace CIAO
}
else
{
- poa_safe = PortableServer::POA::_duplicate(this->facet_cons_poa_.in ());
+ poa_safe = PortableServer::POA::_duplicate(this->facet_cons_poa_.in ());
}
PortableServer::ObjectId_var oid =
diff --git a/CIAO/ciao/Containers/Container_Base_T.h b/CIAO/ciao/Containers/Container_Base_T.h
index 008522be09d..3e7e7db766d 100644
--- a/CIAO/ciao/Containers/Container_Base_T.h
+++ b/CIAO/ciao/Containers/Container_Base_T.h
@@ -111,10 +111,6 @@ namespace CIAO
Container_Types::OA_Type type,
PortableServer::ObjectId_out oid);
- /// Return the servant activator factory that activates the
- /// servants for facets and consumers.
- virtual ::CIAO::Servant_Activator_ptr ports_servant_activator (void);
-
virtual CORBA::Object_ptr get_objref (PortableServer::Servant p);
/// Analog of the POA method that creates an object reference from
@@ -147,10 +143,6 @@ namespace CIAO
*/
PortableServer::POA_var facet_cons_poa_;
- /// The servant activator factory used to activate facets and
- /// consumer servants.
- Servant_Activator_var sa_;
-
/// Uninstall a servant for component or home.
void uninstall (CORBA::Object_ptr objref, Container_Types::OA_Type t);
diff --git a/CIAO/ciao/Containers/Containers.mpc b/CIAO/ciao/Containers/Containers.mpc
index 6c360184f16..727f1aeb249 100644
--- a/CIAO/ciao/Containers/Containers.mpc
+++ b/CIAO/ciao/Containers/Containers.mpc
@@ -14,8 +14,7 @@ project(CIAO_Container_Base_idl) : install, taoidldefaults {
install_dir = ciao/Containers
}
}
-
-project(CIAO_Container_Base_stub) : install, ciao_lib, ccm_svnt, ciao_servant_activator_stub, ciao_port_activator_stub {
+project(CIAO_Container_Base_stub) : install, ciao_lib, ccm_svnt {
after += CIAO_Container_Base_idl
dynamicflags += CIAO_CONTAINER_BASE_BUILD_DLL
diff --git a/CIAO/ciao/Containers/Extension/Extension_Container.h b/CIAO/ciao/Containers/Extension/Extension_Container.h
index 8b8ca2f4591..ef7589ab505 100644
--- a/CIAO/ciao/Containers/Extension/Extension_Container.h
+++ b/CIAO/ciao/Containers/Extension/Extension_Container.h
@@ -38,8 +38,6 @@ namespace CIAO
class ServerContainerInterceptorRegistration_Impl;
class StubContainerInterceptorRegistration_Impl;
- class Servant_Activator;
-
typedef ::Components::HomeExecutorBase_ptr (*HomeFactory) (void);
typedef ::PortableServer::Servant (*HomeServantFactory) (::Components::HomeExecutorBase_ptr p,
::CIAO::Extension_Container_ptr c,
diff --git a/CIAO/ciao/Containers/Extension/Extension_Container.mpc b/CIAO/ciao/Containers/Extension/Extension_Container.mpc
index 8aa548c955d..b73ee9e63a5 100644
--- a/CIAO/ciao/Containers/Extension/Extension_Container.mpc
+++ b/CIAO/ciao/Containers/Extension/Extension_Container.mpc
@@ -17,7 +17,7 @@ project(CIAO_Extension_Container_idl) : install, ciaoidldefaults {
}
project(CIAO_Extension_Container_stub) : install, ccm_stub, ciao_lib, ciao_container_base_stub, utils, ciao_base, \
- ciao_servant_activator_stub {
+ {
after += CIAO_Extension_Container_idl
dynamicflags += EXTENSION_CONTAINER_STUB_BUILD_DLL
@@ -37,9 +37,8 @@ project(CIAO_Extension_Container_stub) : install, ccm_stub, ciao_lib, ciao_conta
install_dir = ciao/Containers/Extension
}
}
-
project(CIAO_Extension_Container) : install, ccm_svnt, ciao_lib, ciao_extension_container_stub, utils, \
- ciao_base, ciao_servant_activator, \
+ ciao_base, \
ciao_servant, ccm_extension_stub, portableserver {
after += CIAO_Extension_Container_idl
dynamicflags += EXTENSION_CONTAINER_BUILD_DLL
diff --git a/CIAO/ciao/Containers/Servant_Activator.cpp b/CIAO/ciao/Containers/Servant_Activator.cpp
deleted file mode 100644
index 4b37f61cb06..00000000000
--- a/CIAO/ciao/Containers/Servant_Activator.cpp
+++ /dev/null
@@ -1,174 +0,0 @@
-// $Id$
-
-#include "Servant_Activator.h"
-#include "ciao/Logger/Log_Macros.h"
-#include "tao/PortableServer/PortableServer_Functions.h"
-
-namespace CIAO
-{
- Servant_Activator_i::Servant_Activator_i (CORBA::ORB_ptr o)
- : orb_ (CORBA::ORB::_duplicate (o)),
- slot_index_ (0)
- {
- }
-
- Servant_Activator_i::~Servant_Activator_i (void)
- {
- CIAO_TRACE ("Servant_Activator_i::~Servant_Activator_i");
- }
-
- bool
- Servant_Activator_i::update_port_activator (
- const PortableServer::ObjectId &oid)
- {
- CIAO_TRACE ("Servant_Activator_i::update_port_activator");
-
- CORBA::String_var str =
- PortableServer::ObjectId_to_string (oid);
- {
- ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX,
- guard,
- this->mutex_,
- CORBA::NO_RESOURCES ());
-
- CIAO_DEBUG (6, (LM_INFO, CLINFO
- "Servant_Activator_i::update_port_activator - "
- "Attempting to update port name [%C]\n",
- str.in ()));
-
- Port_Activators::iterator pa_iter = this->pa_.find (str.in ());
-
- if (pa_iter != this->pa_.end ())
- {
- this->pa_.erase (pa_iter);
- }
- else
- {
- return false;
- }
- }
-
- return true;
- }
-
- PortableServer::Servant
- Servant_Activator_i::incarnate (const PortableServer::ObjectId &oid,
- PortableServer::POA_ptr)
- {
- CIAO_TRACE ("Servant_Activator_i::incarnate");
-
- CORBA::String_var str =
- PortableServer::ObjectId_to_string (oid);
-
- CIAO_DEBUG (6, (LM_INFO, CLINFO
- "Servant_Activator_i::incarnate - "
- "Attempting to activate port name [%C]\n",
- str.in ()));
-
- Port_Activators::iterator pa_iter;
-
- {
- ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX,
- guard,
- this->mutex_,
- CORBA::NO_RESOURCES ());
-
- pa_iter = this->pa_.find (str.in ());
- }
-
- if (pa_iter == this->pa_.end ())
- {
- CIAO_ERROR (1, (LM_ERROR, CLINFO "Servant_Activator_i::incarnate - "
- "Unable to find suitable port activator for ObjectID %C\n",
- str.in ()));
- throw CORBA::OBJECT_NOT_EXIST ();
- }
-
- if (CORBA::is_nil (pa_iter->second.in ()))
- {
- CIAO_ERROR (1, (LM_ERROR, CLINFO "Servant_Activator_i::incarnate - "
- "Port Activator for ObjectId %C was nil!\n",
- str.in ()));
- throw CORBA::OBJECT_NOT_EXIST ();
- }
-
- CIAO_DEBUG (6, (LM_INFO, CLINFO
- "Servant_Activator_i::incarnate - Activating Port %C\n",
- str.in ()));
-
- return pa_iter->second->activate (oid);
- }
-
- void
- Servant_Activator_i::etherealize (
- const PortableServer::ObjectId &oid,
- PortableServer::POA_ptr ,
- PortableServer::Servant servant,
- CORBA::Boolean ,
- CORBA::Boolean remaining_activations)
- {
- CORBA::String_var str =
- PortableServer::ObjectId_to_string (oid);
-
- CIAO_DEBUG (9, (LM_TRACE, CLINFO "Servant_Activator_i::etherealize - "
- "Attempting to etherealize servant with object ID %C\n",
- str.in ()));
-
- Port_Activators::iterator pa_iter;
-
- {
- ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX,
- guard,
- this->mutex_,
- CORBA::NO_RESOURCES ());
-
- pa_iter = this->pa_.find (str.in ());
- }
-
- if (pa_iter == this->pa_.end ())
- {
- CIAO_ERROR (1, (LM_ERROR, CLINFO "Servant_Activator_i::etherealize - "
- "Unable to find suitable port activator for ObjectID %C\n",
- str.in ()));
- throw CORBA::OBJECT_NOT_EXIST ();
- }
-
- if (CORBA::is_nil (pa_iter->second.in ()))
- {
- CIAO_ERROR (1, (LM_ERROR, CLINFO "Servant_Activator_i::etherealize - "
- "Port Activator for ObjectId %C was nil!\n",
- str.in ()));
- throw CORBA::OBJECT_NOT_EXIST ();
- }
-
- pa_iter->second->deactivate (servant, remaining_activations);
- }
-
- bool
- Servant_Activator_i::register_port_activator (Port_Activator_ptr pa)
- {
- ACE_GUARD_RETURN (TAO_SYNCH_MUTEX,
- guard,
- this->mutex_,
- false);
- ::CORBA::String_var safe_oid (pa->oid ());
- ::CORBA::String_var safe_name (pa->name ());
- CIAO_DEBUG (6, (LM_INFO, CLINFO "Servant_Activator_i::register_port_activator - "
- "Registering a port activator for port [%C] with ObjectID [%C]\n",
- safe_name.in (), safe_oid. in ()));
-
- try
- {
- this->pa_ [safe_oid.in ()] = Port_Activator::_duplicate (pa);
- }
- catch (...)
- {
- CIAO_ERROR (1, (LM_ERROR, CLINFO "Servant_Activator_i::register_port_activator - "
- "Unable to register a port activator for port [%C] with ObjectID [%C]\n",
- pa->name (), pa->oid ()));
- return false;
- }
-
- return true;
- }
-}
diff --git a/CIAO/ciao/Containers/Servant_Activator.h b/CIAO/ciao/Containers/Servant_Activator.h
deleted file mode 100644
index 51be9f118ae..00000000000
--- a/CIAO/ciao/Containers/Servant_Activator.h
+++ /dev/null
@@ -1,98 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Servant_Activator.h
- *
- * $Id$
- *
- * @authors Balachandran Natarajan <bala@dre.vanderbilt.edu>
- */
-//=============================================================================
-
-#ifndef CIAO_SERVANT_ACTIVATOR_H
-#define CIAO_SERVANT_ACTIVATOR_H
-
-#include /**/ "ace/pre.h"
-
-#include "CIAO_Servant_Activator_export.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/PortableServer/ServantActivatorC.h"
-#include "tao/LocalObject.h"
-#include "ciao/Containers/CIAO_Servant_ActivatorC.h"
-
-#include <map>
-#include <string>
-
-namespace CIAO
-{
- class Port_Activator;
-
- /**
- * @class Servant_Activator
- *
- * @brief Activator that is registered with the POA for facet and
- * consumer servants.
- *
- * This class acts like a factory in some sense. This factory is
- * registered with the POA with RETAIN policy. When the factory gets
- * a call back as part of the upcall, this factory looks at the
- * list of port activators registered, uses the OID to pick the
- * right one (yes a linear algorithm is used), calls activate () on
- * it which returns the servant for *that* port.
- */
- class CIAO_SERVANT_ACTIVATOR_Export Servant_Activator_i
- : public virtual ::CIAO::Servant_Activator,
- public virtual ::CORBA::LocalObject
- {
- public:
- Servant_Activator_i (CORBA::ORB_ptr o);
-
- virtual ~Servant_Activator_i (void);
-
- virtual ::CORBA::Boolean update_port_activator (
- const ::PortableServer::ObjectId &oid);
-
- virtual ::CORBA::Boolean register_port_activator (
- ::CIAO::Port_Activator_ptr pa);
-
- /// Template methods overridden to get callbacks.
- /**
- * If you would like to know the details of the following two
- * methods, please PortableServer documentation. This is probably
- * not the place to document what these mean.
- */
- virtual PortableServer::Servant incarnate (
- const PortableServer::ObjectId &oid,
- PortableServer::POA_ptr poa);
-
- virtual void etherealize (const PortableServer::ObjectId &oid,
- PortableServer::POA_ptr adapter,
- PortableServer::Servant servant,
- CORBA::Boolean cleanup_in_progress,
- CORBA::Boolean remaining_activations);
-
- private:
- /// Pointer to our ORB
- CORBA::ORB_var orb_;
-
- typedef std::map <std::string, Port_Activator_var> Port_Activators;
-
- /// Array of port activators
- Port_Activators pa_;
-
- /// Running index of the slot that has been just filled in.
- size_t slot_index_;
-
- /// Mutex that synchronizes access to the array.
- TAO_SYNCH_MUTEX mutex_;
- };
-}
-
-#include /**/ "ace/post.h"
-
-#endif /*CIAO_SERVANT_ACTIVATOR_H*/
diff --git a/CIAO/ciao/Containers/Session/Session_Container.mpc b/CIAO/ciao/Containers/Session/Session_Container.mpc
index 45e500e93e7..9180d8d26bb 100644
--- a/CIAO/ciao/Containers/Session/Session_Container.mpc
+++ b/CIAO/ciao/Containers/Session/Session_Container.mpc
@@ -15,9 +15,9 @@ project(CIAO_Session_Container_idl) : install, ciaoidldefaults {
install_dir = ciao/Containers/Session
}
}
-
-project(CIAO_Session_Container_stub) : install, ccm_stub, ciao_lib, ciao_container_base_stub, utils, ciao_base, \
- ciao_servant_activator_stub {
+project(CIAO_Session_Container_stub) : install, ccm_stub, ciao_lib, ciao_container_base_stub, utils, \
+ ciao_base {
+
after += CIAO_Session_Container_idl
dynamicflags += SESSION_CONTAINER_STUB_BUILD_DLL
@@ -39,7 +39,8 @@ project(CIAO_Session_Container_stub) : install, ccm_stub, ciao_lib, ciao_contain
}
project(CIAO_Session_Container) : install, ccm_svnt, ciao_lib, utils, ciao_base, \
- ciao_servant_activator, ciao_servant, ciao_session_container_stub {
+ ciao_servant, ciao_session_container_stub {
+
after += CIAO_Session_Container_idl
dynamicflags += SESSION_CONTAINER_BUILD_DLL
diff --git a/CIAO/ciao/Servants/CIAO_Port_Activator.idl b/CIAO/ciao/Servants/CIAO_Port_Activator.idl
deleted file mode 100644
index 9d26f768260..00000000000
--- a/CIAO/ciao/Servants/CIAO_Port_Activator.idl
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * @file CIAO_Port_Activator.idl
- * @author Wiliam R. Otte <wotte@dre.vanderbilt.edu
- * $Id$
- * Local interface describing servant activators for component ports.
- */
-
-#ifndef CIAO_PORT_ACTIVATOR_IDL_
-#define CIAO_PORT_ACTIVATOR_IDL_
-
-#include "tao/PortableServer/ServantActivator.pidl"
-
-module CIAO
-{
- module Port_Activator_Types
- {
- enum Type
- {
- FACET,
- SINK
- };
- };
-
- local interface Port_Activator
- {
- /// OID of port this activator encapsulates
- attribute string oid;
-
- /// Name of the port
- readonly attribute string name;
-
- PortableServer::Servant activate (in PortableServer::ObjectId oid);
-
- void deactivate (in PortableServer::Servant servant,
- in boolean remaining_activations);
- };
-};
-
-#endif
diff --git a/CIAO/ciao/Servants/Connector_Servant_Impl_Base.cpp b/CIAO/ciao/Servants/Connector_Servant_Impl_Base.cpp
index aa2b5772680..9f7ad54e96e 100644
--- a/CIAO/ciao/Servants/Connector_Servant_Impl_Base.cpp
+++ b/CIAO/ciao/Servants/Connector_Servant_Impl_Base.cpp
@@ -3,7 +3,6 @@
#include "Connector_Servant_Impl_Base.h"
#include "StandardConfigurator_Impl.h"
#include "ciao/Logger/Log_Macros.h"
-#include "ciao/Containers/CIAO_Servant_ActivatorC.h"
namespace CIAO
{
@@ -51,14 +50,6 @@ namespace CIAO
port_poa->reference_to_id (iter->second);
port_poa->deactivate_object (facet_id);
-
- CIAO::Servant_Activator_var sa =
- cnt_safe->ports_servant_activator ();
-
- if (!CORBA::is_nil (sa.in ()))
- {
- sa->update_port_activator (facet_id.in ());
- }
}
}
diff --git a/CIAO/ciao/Servants/Port_Activator.cpp b/CIAO/ciao/Servants/Port_Activator.cpp
deleted file mode 100644
index cad8d4d8761..00000000000
--- a/CIAO/ciao/Servants/Port_Activator.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-// $Id$
-
-#include "Port_Activator.h"
-
-namespace CIAO
-{
- Port_Activator_i::Port_Activator_i (const char *oid,
- const char *name,
- Port_Activator_Types::Type t)
- : oid_ (oid),
- name_ (name),
- t_ (t)
- {
- }
-
- Port_Activator_i::~Port_Activator_i (void)
- {
- }
-
- char*
- Port_Activator_i::oid (void)
- {
- return CORBA::string_dup(this->oid_.in ());
- }
-
- void
- Port_Activator_i::oid (const char* oid)
- {
- this->oid_ = oid;
- }
-
- char*
- Port_Activator_i::name (void)
- {
- return CORBA::string_dup(this->name_.in ());
- }
-}
diff --git a/CIAO/ciao/Servants/Port_Activator.h b/CIAO/ciao/Servants/Port_Activator.h
deleted file mode 100644
index ee8454eb402..00000000000
--- a/CIAO/ciao/Servants/Port_Activator.h
+++ /dev/null
@@ -1,84 +0,0 @@
-// -*- C++ -*-
-//=============================================================================
-/**
- * @file Port_Activator.h
- *
- * $Id$
- *
- * @authors Bala Natarajan <bala@dre.vanderbilt.edu>
- */
-//=============================================================================
-
-#ifndef CIAO_PORT_ACTIVATOR_H
-#define CIAO_PORT_ACTIVATOR_H
-
-#include /**/ "ace/pre.h"
-
-#include "CIAO_Servant_Impl_export.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/PortableServer/PortableServer.h"
-#include "ciao/Servants/CIAO_Port_ActivatorC.h"
-
-namespace CIAO
-{
- /**
- * @class Port_Activator_i
- *
- * @brief Base class for port activations
- *
- * This is a ABC for the Port_Activator_T <> template class where
- * the bulk of the work is done. This class is simply a place holder
- * so that we could use the pointer to this class to achieve
- * polymorphism for facet and consumer servant activations.
- *
- */
- class CIAO_Servant_Impl_Export Port_Activator_i :
- public virtual Port_Activator
- {
- public:
- Port_Activator_i (const char *oid,
- const char *name,
- Port_Activator_Types::Type t);
-
- virtual ~Port_Activator_i (void);
-
- /// Return the oid of port that this activator encapsulates.
- virtual char* oid (void);
-
- /// Set the oid
- virtual void oid (const char* oid);
-
- /// Return the oid of port that this activator encapsulates.
- virtual char* name (void);
-
- /// Activate the servant responsible for this port.
- /**
- * There are intentionally no throw specifications. It is the
- * caller's responsibility to handle CORBA and C++
- * specifications.
- */
- virtual PortableServer::Servant activate (
- const PortableServer::ObjectId &oid) = 0;
-
- virtual void deactivate (::PortableServer::Servant servant,
- CORBA::Boolean remaining_activations) = 0;
-
- protected:
- /// The object ID that is used to activate the servant within the POA.
- CORBA::String_var oid_;
-
- /// Name of the port
- CORBA::String_var name_;
-
- /// What type of port is it, a consumer or facet.
- Port_Activator_Types::Type const t_;
- };
-}
-
-#include /**/ "ace/post.h"
-
-#endif /*CIAO_PORT_ACTIVATOR_H*/
diff --git a/CIAO/ciao/Servants/Port_Activator_T.cpp b/CIAO/ciao/Servants/Port_Activator_T.cpp
deleted file mode 100644
index 4aef5bb4a5d..00000000000
--- a/CIAO/ciao/Servants/Port_Activator_T.cpp
+++ /dev/null
@@ -1,82 +0,0 @@
-// $Id$
-
-#ifndef CIAO_PORT_ACTIVATOR_T_CPP
-#define CIAO_PORT_ACTIVATOR_T_CPP
-
-#include "Port_Activator_T.h"
-#include "tao/CORBA_String.h"
-
-#include "ace/OS_NS_string.h"
-
-namespace CIAO
-{
- template <typename SERV,
- typename EXEC,
- typename CONTEXT,
- typename COMP_SERV>
- Port_Activator_T<SERV, EXEC, CONTEXT, COMP_SERV>::Port_Activator_T (
- const char *oid,
- const char *name,
- Port_Activator_Types::Type t,
- typename EXEC::_ptr_type e,
- typename CONTEXT::_ptr_type c,
- COMP_SERV *cc)
- : Port_Activator_i (oid, name, t)
- , executor_ (EXEC::_duplicate (e))
- , context_ (CONTEXT::_duplicate (c))
- , comp_serv_ (cc)
- {
- }
-
- template <typename SERV,
- typename EXEC,
- typename CONTEXT,
- typename COMP_SERV>
- void
- Port_Activator_T<SERV, EXEC, CONTEXT, COMP_SERV>::deactivate (
- PortableServer::Servant servant, CORBA::Boolean)
- {
- SERVANT *s = dynamic_cast<SERVANT *> (servant);
- if (s)
- {
- s->_remove_ref ();
- }
- }
-
- template <typename SERV,
- typename EXEC,
- typename CONTEXT,
- typename COMP_SERV>
- PortableServer::Servant
- Port_Activator_T<SERV, EXEC, CONTEXT, COMP_SERV>::activate (
- const PortableServer::ObjectId &oid)
- {
- CORBA::String_var str = PortableServer::ObjectId_to_string (oid);
-
- // An additional check, may not be necessary. Being on the safe
- // side.
- if (ACE_OS::strcmp (this->oid_.in (), str.in ()) == 0)
- {
- if (this->t_ == Port_Activator_Types::FACET && ::CORBA::is_nil (this->executor_.in ()))
- {
- ::CORBA::Object_var tmp =
- this->comp_serv_->get_facet_executor (this->name_.in ());
-
- this->executor_ = EXEC::_narrow (tmp.in ());
- }
-
- SERVANT *s = 0;
-
- ACE_NEW_THROW_EX (s,
- SERVANT (this->executor_.in (),
- this->context_.in ()),
- ::CORBA::NO_MEMORY ());
-
- return s;
- }
-
- throw ::CORBA::OBJECT_NOT_EXIST ();
- }
-}
-
-#endif /*SERVANT_ACTIVATOR_T_CPP*/
diff --git a/CIAO/ciao/Servants/Port_Activator_T.h b/CIAO/ciao/Servants/Port_Activator_T.h
deleted file mode 100644
index 3c7bdf0eba8..00000000000
--- a/CIAO/ciao/Servants/Port_Activator_T.h
+++ /dev/null
@@ -1,83 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Port_Activator_T.h
- *
- * $Id$
- *
- * @authors Bala Natarajan <bala@dre.vanderbilt.edu>
- */
-//=============================================================================
-
-#ifndef CIAO_PORT_ACTIVATOR_T_H
-#define CIAO_PORT_ACTIVATOR_T_H
-#include /**/ "ace/pre.h"
-
-#include "ciao/Servants/Port_Activator.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-
-namespace CIAO
-{
- /**
- * @class Port_Activator_T
- *
- * @brief
- * Concrete class that implements the strategy for creating
- * the right type of servant for the ports in question.
- *
- * This class is parametrized by the servant type for the port, the
- * executor type for the port, the context for the component and the
- * component servant which instantiated this class within the
- * container.
- */
- template <typename SERV,
- typename EXEC,
- typename CONTEXT,
- typename COMP_SERV>
- class Port_Activator_T : public virtual Port_Activator_i
- {
- public:
- typedef SERV SERVANT;
-
- Port_Activator_T (const char *oid,
- const char *name,
- Port_Activator_Types::Type t,
- typename EXEC::_ptr_type e,
- typename CONTEXT::_ptr_type c,
- COMP_SERV *cs);
-
- /// Template method from the base class, please see the base class
- /// documentation for details.
- virtual PortableServer::Servant activate (
- const PortableServer::ObjectId &oid);
-
- virtual void deactivate (
- PortableServer::Servant servant, CORBA::Boolean remaining_activations);
-
- private:
- /// The executor
- typename EXEC::_var_type executor_;
-
- /// Context classes
- typename CONTEXT::_var_type context_;
-
- /// Component servant which created @c this
- COMP_SERV *comp_serv_;
- };
-}
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "Port_Activator_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Port_Activator_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include /**/ "ace/post.h"
-#endif /*CIAO_SERVANT_ACTIVATOR_T_H*/
diff --git a/CIAO/ciao/Servants/Servant_Impl_Base.cpp b/CIAO/ciao/Servants/Servant_Impl_Base.cpp
index 35c45e44fee..a44783626e7 100644
--- a/CIAO/ciao/Servants/Servant_Impl_Base.cpp
+++ b/CIAO/ciao/Servants/Servant_Impl_Base.cpp
@@ -39,14 +39,6 @@ namespace CIAO
port_poa->reference_to_id (iter->second);
port_poa->deactivate_object (cons_id);
-
- CIAO::Servant_Activator_var sa =
- cnt_safe->ports_servant_activator ();
-
- if (!CORBA::is_nil (sa.in ()))
- {
- sa->update_port_activator (cons_id.in ());
- }
}
}
catch (const CORBA::Exception& ex)
diff --git a/CIAO/ciao/Servants/Servants.mpc b/CIAO/ciao/Servants/Servants.mpc
index 98072f55d0a..e21497a8422 100644
--- a/CIAO/ciao/Servants/Servants.mpc
+++ b/CIAO/ciao/Servants/Servants.mpc
@@ -1,36 +1,4 @@
-// $Id$
-project(CIAO_Port_Activator_stub_idl) : install, ciaoidldefaults {
- custom_only = 1
- idlflags += -Wb,stub_export_include=CIAO_Port_Activator_export.h \
- -Wb,stub_export_macro=CIAO_PORT_ACTIVATOR_Export \
- -SS -Sci -Gxhst
- IDL_Files {
- CIAO_Port_Activator.idl
- }
-
- specific {
- install_dir = ciao/Servants
- }
-}
-
-project(CIAO_Port_Activator_stub) : install, portableserver, ciao_lib {
- dynamicflags += CIAO_PORT_ACTIVATOR_BUILD_DLL
- after += CIAO_Port_Activator_stub_idl
- IDL_Files {
- }
- Source_Files {
- CIAO_Port_ActivatorC.cpp
- }
- Header_Files {
- CIAO_Port_ActivatorC.h
- CIAO_Port_ActivatorS.h
- }
- specific {
- install_dir = ciao/Servants
- }
-}
-
-project(CIAO_Servant_Impl) : install, ciao_servant_activator_stub, ciao_port_activator_stub, ciao_container_base_stub, ccm_svnt, ccm_session_stub, ciao_output, ciao_logger {
+project(CIAO_Servant_Impl) : install, ciao_container_base_stub, ccm_svnt, ccm_session_stub, ciao_output, ciao_logger, ccm_direct_collocation {
dynamicflags += CIAO_SERVANT_IMPL_BUILD_DLL
IDL_Files {
}
@@ -40,14 +8,12 @@ project(CIAO_Servant_Impl) : install, ciao_servant_activator_stub, ciao_port_act
Home_Servant_Impl_Base.cpp
Servant_Impl_Base.cpp
StandardConfigurator_Impl.cpp
- Port_Activator.cpp
}
Template_Files {
Home_Servant_Impl_T.cpp
Connector_Servant_Impl_Utils_T.cpp
Servant_Impl_Utils_T.cpp
- Port_Activator_T.cpp
}
Header_Files {
@@ -57,9 +23,6 @@ project(CIAO_Servant_Impl) : install, ciao_servant_activator_stub, ciao_port_act
Home_Servant_Impl_T.h
Servant_Impl_Base.h
StandardConfigurator_Impl.h
- Port_Activator.h
- Port_Activator_T.h
- CIAO_Port_Activator_export.h
}
specific {
diff --git a/CIAO/tests/Collocation/Coll_Base/Base.idl b/CIAO/tests/Collocation/Coll_Base/Base.idl
index 8633db8c001..d1ba48ad9f3 100644
--- a/CIAO/tests/Collocation/Coll_Base/Base.idl
+++ b/CIAO/tests/Collocation/Coll_Base/Base.idl
@@ -12,8 +12,7 @@ struct pointer_id
// Interfaces for communication between Sender and Receiver
interface Hello {
- //string say_hello ();
- void set_point(in pointer_id p);
+ void set_point(in pointer_id p, in string strategy);
};
diff --git a/CIAO/tests/Collocation/Coll_Base/Base.mpc b/CIAO/tests/Collocation/Coll_Base/Base.mpc
index 8c2f2d3b3a6..71e624a9d43 100644
--- a/CIAO/tests/Collocation/Coll_Base/Base.mpc
+++ b/CIAO/tests/Collocation/Coll_Base/Base.mpc
@@ -1,21 +1,21 @@
// $Id$
// This file is generated with "generate_component_mpc.pl -n -e -I .. -l ../lib -o ../lib Base"
-project(CollBase_idl_gen) : componentidldefaults, avoids_ccm_noevent {
+project(CollBase_idl_gen) : componentidldefaults {
custom_only = 1
idlflags += -Wb,stub_export_macro=BASE_STUB_Export \
-Wb,stub_export_include=CollBase_stub_export.h \
-Wb,skel_export_macro=BASE_SKEL_Export \
-Wb,skel_export_include=CollBase_skel_export.h \
- -Gxhex -Gxhsk -Gxhst -Gex -Gd -I ..
+ -Gxhex -Gxhsk -Gxhst -Gex -Sp -I ..
IDL_Files {
Base.idl
}
}
-project(CollBase_lem_gen) : ciaoidldefaults, avoids_ccm_noevent {
+project(CollBase_lem_gen) : ciaoidldefaults {
after += CollBase_idl_gen
custom_only = 1
idlflags += -Wb,stub_export_macro=BASE_LEM_STUB_Export \
@@ -27,7 +27,7 @@ project(CollBase_lem_gen) : ciaoidldefaults, avoids_ccm_noevent {
}
}
-project(CollBase_lem_stub) : ccm_svnt, avoids_ccm_noevent {
+project(CollBase_lem_stub) : ccm_svnt {
after += CollBase_lem_gen CollBase_stub
libs += CollBase_stub
includes += ..
@@ -53,7 +53,7 @@ project(CollBase_lem_stub) : ccm_svnt, avoids_ccm_noevent {
}
}
-project(CollBase_stub) : ccm_stub, avoids_ccm_noevent {
+project(CollBase_stub) : ccm_stub {
after += CollBase_idl_gen
libs +=
includes += ..
@@ -80,7 +80,7 @@ project(CollBase_stub) : ccm_stub, avoids_ccm_noevent {
}
-project(CollBase_skel) : ciao_executor, avoids_ccm_noevent {
+project(CollBase_skel) : ciao_executor {
after += CollBase_stub CollBase_lem_stub
sharedname = CollBase_skel
libs += CollBase_stub
diff --git a/CIAO/tests/Collocation/README b/CIAO/tests/Collocation/README
new file mode 100644
index 00000000000..9448e5facfc
--- /dev/null
+++ b/CIAO/tests/Collocation/README
@@ -0,0 +1,25 @@
+// $Id$
+
+This test is used to test collocation.
+
+CIAO has to be build with ccm_direct_collocation=1
+
+In order to make sure that indeed direct collocation is used, the test self
+is build with -Sp (see Base.mpc),so collocation thru_poa is disabled.
+
+The test runs with different CollocationStrategies, defined in the deploymentplans:
+- PlanAllOnOneNoTP ( Sender and Receiver same process) with -ORBCollocationStrategy thru_poa:
+ because thru_poa is disabled, we expect an internal exception.
+- PlanAllOnOne ( Sender and Receiver same process) with -ORBCollocationStrategy direct:
+ we expect collocation and because thru_poa is disabled, this must be direct collocation.
+- PlanAllOnOneBest ( Sender and Receiver same process) with -ORBCollocationStrategy best:
+ we expect collocation and because thru_poa is disabled, this must be direct collocation.
+- PlanAllOnOneNo ( Sender and Receiver same process) with -ORBCollocation no:
+ we expect no collocation.
+
+- PlanAllOnOneMore ( Sender and Receiver different process) with -ORBCollocationStrategy direct:
+ we expect no collocation, but a remote strategy because the Sender and Receiver are not in the same process.
+
+
+
+
diff --git a/CIAO/tests/Collocation/Receiver/Receiver.idl b/CIAO/tests/Collocation/Receiver/Receiver.idl
index d0782e58c43..d40e794b9ad 100644
--- a/CIAO/tests/Collocation/Receiver/Receiver.idl
+++ b/CIAO/tests/Collocation/Receiver/Receiver.idl
@@ -8,12 +8,10 @@
#include "Coll_Base/Base.idl"
component Receiver {
- // Which interfaces the Receiver provides.
- //provides Bye bye_from_rec;
-
- // Which interfaces Receiver uses.
+ // Which interfaces Receiver uses.
uses Hello hello_to_rec;
+ attribute string strategy;
};
#endif /* RECEIVER_IDL_ */
diff --git a/CIAO/tests/Collocation/Receiver/Receiver.mpc b/CIAO/tests/Collocation/Receiver/Receiver.mpc
index 369df637b11..eeb86e2c23a 100644
--- a/CIAO/tests/Collocation/Receiver/Receiver.mpc
+++ b/CIAO/tests/Collocation/Receiver/Receiver.mpc
@@ -1,7 +1,7 @@
// $Id$
// This file is generated with "generate_component_mpc.pl -p Base -c IDL2Client -e -I .. -l ../lib -o ../lib Receiver"
-project(CollBase_Receiver_idl_gen) : componentidldefaults, avoids_ccm_noevent {
+project(CollBase_Receiver_idl_gen) : componentidldefaults {
custom_only = 1
idlflags += -Wb,stub_export_macro=RECEIVER_STUB_Export \
@@ -17,7 +17,7 @@ project(CollBase_Receiver_idl_gen) : componentidldefaults, avoids_ccm_noevent {
}
}
-project(CollBase_Receiver_lem_gen) : ciaoidldefaults, avoids_ccm_noevent {
+project(CollBase_Receiver_lem_gen) : ciaoidldefaults {
after += CollBase_Receiver_idl_gen
custom_only = 1
idlflags += -Wb,stub_export_macro=RECEIVER_LEM_STUB_Export \
@@ -29,7 +29,7 @@ project(CollBase_Receiver_lem_gen) : ciaoidldefaults, avoids_ccm_noevent {
}
}
-project(CollBase_Receiver_lem_stub) : ccm_svnt, avoids_ccm_noevent {
+project(CollBase_Receiver_lem_stub) : ccm_svnt {
after += CollBase_Receiver_lem_gen CollBase_Receiver_stub CollBase_stub CollBase_lem_stub
libs += CollBase_stub CollBase_lem_stub Receiver_stub
includes += ..
@@ -55,7 +55,7 @@ project(CollBase_Receiver_lem_stub) : ccm_svnt, avoids_ccm_noevent {
}
}
-project(CollBase_Receiver_stub) : ccm_stub, avoids_ccm_noevent {
+project(CollBase_Receiver_stub) : ccm_stub {
after += CollBase_Receiver_idl_gen CollBase_stub CollBase_lem_stub
libs += CollBase_stub CollBase_lem_stub
includes += ..
@@ -81,7 +81,7 @@ project(CollBase_Receiver_stub) : ccm_stub, avoids_ccm_noevent {
}
}
-project(CollBase_Receiver_exec) : ciao_executor, avoids_ccm_noevent {
+project(CollBase_Receiver_exec) : ciao_executor {
after += CollBase_lem_stub CollBase_Receiver_lem_stub CollBase_Receiver_stub
sharedname = Receiver_exec
libs += CollBase_lem_stub Receiver_stub Receiver_lem_stub CollBase_stub CollBase_lem_stub
@@ -107,7 +107,7 @@ project(CollBase_Receiver_exec) : ciao_executor, avoids_ccm_noevent {
}
-project(CollBase_Receiver_svnt) : ciao_servant, avoids_ccm_noevent {
+project(CollBase_Receiver_svnt) : ciao_servant {
after += CollBase_skel CollBase_lem_stub CollBase_Receiver_lem_stub
sharedname = Receiver_svnt
libs += Receiver_stub Receiver_lem_stub \
diff --git a/CIAO/tests/Collocation/Receiver/Receiver_exec.cpp b/CIAO/tests/Collocation/Receiver/Receiver_exec.cpp
index 34e98f1c14f..4f67f5e937c 100644
--- a/CIAO/tests/Collocation/Receiver/Receiver_exec.cpp
+++ b/CIAO/tests/Collocation/Receiver/Receiver_exec.cpp
@@ -54,7 +54,8 @@ namespace CIAO_Receiver_Impl
*/
Receiver_exec_i::Receiver_exec_i (void)
- : interval_ (2, 1)
+ : interval_ (2, 1),
+ strategy_("thru_poa")
{
ACE_DEBUG ((LM_DEBUG, "Receiver_exec_i::Receiver_exec_i \n "));
ACE_NEW_THROW_EX (this->hello_generator_,
@@ -91,8 +92,6 @@ namespace CIAO_Receiver_Impl
void
Receiver_exec_i::tick (void)
{
- ACE_DEBUG ((LM_DEBUG, "$$$$$$$$$$$$$$ Start interface method in Receiver_exec_i::tick - "
- "set point for sender.\n"));
try
{
/// Retrieve the connection to the sender.
@@ -100,13 +99,9 @@ namespace CIAO_Receiver_Impl
this->ciao_context_->get_connection_hello_to_rec ();
if (! ::CORBA::is_nil (hello_to_rec.in ()))
{
- /* CORBA::String_var message = hello_to_rec->say_hello ();
- ACE_DEBUG ((LM_DEBUG, "Receiver_exec_i::tick - "
- "got hello-message from sender <%C>.\n",
- message.in()));
-*/ pointer_id::_var_type p = new pointer_id;
+ pointer_id::_var_type p = new pointer_id;
p->point = (long)p.ptr ();
- hello_to_rec->set_point(p.in());
+ hello_to_rec->set_point(p.in(), this->strategy_.in());
ACE_DEBUG ((LM_DEBUG, "Receiver_exec_i::tick - "
"set_hello-point with pointer %@\n",
@@ -119,6 +114,18 @@ namespace CIAO_Receiver_Impl
"no connection hello_to_rec with sender.\n"));
}
}
+ catch (const CORBA::INTERNAL& ex)
+ {
+ if (ACE_OS::strcmp ("no_thru_poa", this->strategy_.in())== 0)
+ {
+ ACE_DEBUG ((LM_DEBUG, "OK: Receiver received expected exception\n"));
+ }
+ else
+ {
+ ACE_ERROR ((LM_ERROR, "Receiver_exec_i::tick - "
+ "Error: Unexpected exception caught\n"));
+ }
+ }
catch (const CORBA::Exception &e)
{
/// Always catch CORBA exceptions. There might be somthing wrong with
@@ -132,12 +139,21 @@ namespace CIAO_Receiver_Impl
ACE_ERROR ((LM_ERROR, "Receiver_exec_i::tick - "
"Error: Unexpected and unknown exception caught\n"));
}
- ACE_DEBUG ((LM_DEBUG, "$$$$$$$$$$$$$$ End interface method in Receiver_exec_i::tick - "
- "set point for sender.\n"));
-
}
// Component attributes and port operations.
+ char*
+ Receiver_exec_i::strategy (void)
+ {
+ return ::CORBA::string_dup (this->strategy_);
+ }
+
+ void
+ Receiver_exec_i::strategy (const char* strategy)
+ {
+ this->strategy_ = ::CORBA::string_dup (strategy);
+ }
+
// Operations from Components::SessionComponent.
void
diff --git a/CIAO/tests/Collocation/Receiver/Receiver_exec.h b/CIAO/tests/Collocation/Receiver/Receiver_exec.h
index 786a468d924..f307546bd6b 100644
--- a/CIAO/tests/Collocation/Receiver/Receiver_exec.h
+++ b/CIAO/tests/Collocation/Receiver/Receiver_exec.h
@@ -70,6 +70,12 @@ namespace CIAO_Receiver_Impl
/** @name User defined public operations. */
//@{
void tick (void);
+
+ char*
+ strategy (void);
+
+ void
+ strategy (const char* strategy);
//@}
private:
@@ -85,6 +91,7 @@ namespace CIAO_Receiver_Impl
//@{
HelloGenerator * hello_generator_;
ACE_Time_Value interval_;
+ ::CORBA::String_var strategy_;
ACE_Reactor* reactor (void);
//@}
};
diff --git a/CIAO/tests/Collocation/Sender/Sender.idl b/CIAO/tests/Collocation/Sender/Sender.idl
index 257a71c1079..ecc70bff6c8 100644
--- a/CIAO/tests/Collocation/Sender/Sender.idl
+++ b/CIAO/tests/Collocation/Sender/Sender.idl
@@ -8,9 +8,6 @@
component Sender {
provides Hello hello;
-
- // Which interfaces the Sender uses.
- //uses Bye bye;
};
#endif /* SENDER_IDL_ */
diff --git a/CIAO/tests/Collocation/Sender/Sender.mpc b/CIAO/tests/Collocation/Sender/Sender.mpc
index 1b7d3460a18..efc59e6dcc9 100644
--- a/CIAO/tests/Collocation/Sender/Sender.mpc
+++ b/CIAO/tests/Collocation/Sender/Sender.mpc
@@ -1,7 +1,7 @@
// $Id$
// This file is generated with "generate_component_mpc.pl -p Base -e -I .. -l ../lib -o ../lib Sender"
-project(CollBase_Sender_idl_gen) : componentidldefaults, avoids_ccm_noevent {
+project(CollBase_Sender_idl_gen) : componentidldefaults {
custom_only = 1
idlflags += -Wb,stub_export_macro=SENDER_STUB_Export \
@@ -17,7 +17,7 @@ project(CollBase_Sender_idl_gen) : componentidldefaults, avoids_ccm_noevent {
}
}
-project(CollBase_Sender_lem_gen) : ciaoidldefaults, avoids_ccm_noevent {
+project(CollBase_Sender_lem_gen) : ciaoidldefaults {
after += CollBase_Sender_idl_gen
custom_only = 1
idlflags += -Wb,stub_export_macro=SENDER_LEM_STUB_Export \
@@ -29,7 +29,7 @@ project(CollBase_Sender_lem_gen) : ciaoidldefaults, avoids_ccm_noevent {
}
}
-project(CollBase_Sender_lem_stub) : ccm_svnt, avoids_ccm_noevent {
+project(CollBase_Sender_lem_stub) : ccm_svnt {
after += CollBase_Sender_lem_gen CollBase_Sender_stub CollBase_stub CollBase_lem_stub
libs += CollBase_stub CollBase_lem_stub Sender_stub
includes += ..
@@ -55,7 +55,7 @@ project(CollBase_Sender_lem_stub) : ccm_svnt, avoids_ccm_noevent {
}
}
-project(CollBase_Sender_stub) : ccm_stub, avoids_ccm_noevent {
+project(CollBase_Sender_stub) : ccm_stub {
after += CollBase_Sender_idl_gen CollBase_stub CollBase_lem_stub
libs += CollBase_stub CollBase_lem_stub
includes += ..
@@ -81,7 +81,7 @@ project(CollBase_Sender_stub) : ccm_stub, avoids_ccm_noevent {
}
}
-project(CollBase_Sender_exec) : ciao_executor, avoids_ccm_noevent {
+project(CollBase_Sender_exec) : ciao_executor {
after += CollBase_lem_stub CollBase_Sender_lem_stub CollBase_Sender_stub
sharedname = Sender_exec
libs += CollBase_lem_stub Sender_stub Sender_lem_stub CollBase_stub CollBase_lem_stub
@@ -107,7 +107,7 @@ project(CollBase_Sender_exec) : ciao_executor, avoids_ccm_noevent {
}
-project(CollBase_Sender_svnt) : ciao_servant, avoids_ccm_noevent {
+project(CollBase_Sender_svnt) : ciao_servant {
after += CollBase_skel CollBase_lem_stub CollBase_Sender_lem_stub
sharedname = Sender_svnt
libs += Sender_stub Sender_lem_stub \
diff --git a/CIAO/tests/Collocation/Sender/Sender_exec.cpp b/CIAO/tests/Collocation/Sender/Sender_exec.cpp
index eec14635c32..c5bb949dc81 100644
--- a/CIAO/tests/Collocation/Sender/Sender_exec.cpp
+++ b/CIAO/tests/Collocation/Sender/Sender_exec.cpp
@@ -18,33 +18,77 @@ namespace CIAO_Sender_Impl
}
// Operations from ::Hello
-/* char *
- hello_exec_i::say_hello (void)
- {
- ACE_DEBUG ((LM_DEBUG, "SENDER: hello_exec_i::say_hello .\n"));
- return CORBA::string_dup ("Hello from sender.");
- }
-*/
void
- hello_exec_i::set_point (const pointer_id &p)
+ hello_exec_i::set_point (const pointer_id &p, const char * strat)
{
- ACE_DEBUG ((LM_DEBUG, "SENDER: hello_exec_i::set_point pointer <%@>\n", (void *)&p));
- CORBA::Long ptr_nmb = (long)&p;
- if (ptr_nmb == p.point)
+ CORBA::Boolean coll = false;
+
+#if !defined (CCM_DIRECTCOLL)
+ ACE_DEBUG ((LM_DEBUG,
+ "SENDER: hello_exec_i::set_point pointer"
+ "No collocation because CIAO not build with "
+ "ccm_diect_collocation = 1.\n",
+ (void *)&p));
+#else
+ if ((ACE_OS::strcmp("direct", strat) == 0) ||
+ (ACE_OS::strcmp("best", strat) == 0))
+ coll = true;
+ else if (ACE_OS::strcmp("no_collocation", strat) == 0)
+ coll = false;
+ else
+ ACE_ERROR ((LM_DEBUG, "Error: hello_exec_i::set_point - "
+ "Unexpected strategy <%C> \n",
+ strat));
+#endif
+ ACE_DEBUG ((LM_DEBUG,
+ "SENDER: hello_exec_i::set_point pointer <%@>\n",
+ (void *)&p));
+
+ CORBA::Long ptr_nmb = (long)&p;
+ if (coll)
{
- ACE_DEBUG ((LM_DEBUG, "hello_exec_i::set_point - "
- "current pointer <%u> is same as starting pointer <%u>,"
- "direct or thru_poa collocation ! \n",
- ptr_nmb, p.point));
+
+ // In case of collocation pointer p is still the same pointer
+ // as at the point where poiner p was generated.
+ // Direct or thru_poa collocation, but thru_poa collocation is disabled,
+ // so remains direct .
+ if (ptr_nmb == p.point)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "hello_exec_i::set_point - current pointer <%u> "
+ " is same as starting pointer <%u>,"
+ " direct collocation! \n",
+ ptr_nmb, p.point));
+ }
+ else
+ {
+ ACE_ERROR ((LM_ERROR,
+ "Error: hello_exec_i::set_point - current pointer <%u> "
+ " is not the same as starting pointer <%u>"
+ ", No Collocation\n",
+ ptr_nmb, p.point));
+ }
}
else
{
- ACE_ERROR ((LM_DEBUG, "Error: hello_exec_i::set_point - "
- "current pointer <%u> is not the same as starting pointer <%u>"
- ", No Collocation\n",
- ptr_nmb, p.point));
+ if (ptr_nmb == p.point)
+ {
+ ACE_ERROR ((
+ LM_DEBUG,
+ "Error: hello_exec_i::set_point - current pointer <%u> "
+ " is the same as starting pointer <%u>"
+ ", Unexpected collocation\n",
+ ptr_nmb, p.point));
+ }
+ else
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "hello_exec_i::set_point - current pointer <%u>"
+ " is not the same as starting pointer <%u>,"
+ " No collocation, as expected ! \n",
+ ptr_nmb, p.point));
+ }
}
- //return p._retn ();
}
/**
@@ -81,6 +125,7 @@ namespace CIAO_Sender_Impl
this->ciao_hello_.in ());
}
+
// Operations from Components::SessionComponent.
void
Sender_exec_i::set_session_context (
diff --git a/CIAO/tests/Collocation/Sender/Sender_exec.h b/CIAO/tests/Collocation/Sender/Sender_exec.h
index 33d6d868036..f127fa5d916 100644
--- a/CIAO/tests/Collocation/Sender/Sender_exec.h
+++ b/CIAO/tests/Collocation/Sender/Sender_exec.h
@@ -62,11 +62,8 @@ namespace CIAO_Sender_Impl
/** @name Operations and attributes from Hello */
//@{
-
-// virtual
- // char * say_hello (void);
virtual
- void set_point (const pointer_id & );
+ void set_point (const pointer_id & , const char *);
//@}
@@ -96,8 +93,7 @@ namespace CIAO_Sender_Impl
virtual ::CCM_Hello_ptr
get_hello (void);
-
- //@}
+ //@}
/** @name Operations from Components::SessionComponent. */
//@{
@@ -123,7 +119,6 @@ namespace CIAO_Sender_Impl
/** @name User defined members. */
//@{
-
//@}
};
diff --git a/CIAO/tests/Collocation/descriptors/PlanAllOnMore.cdp b/CIAO/tests/Collocation/descriptors/PlanAllOnMore.cdp
new file mode 100644
index 00000000000..a53d5516ca9
--- /dev/null
+++ b/CIAO/tests/Collocation/descriptors/PlanAllOnMore.cdp
@@ -0,0 +1,252 @@
+<!-- $Id$ -->
+<Deployment:DeploymentPlan
+ xmlns:Deployment="http://www.omg.org/Deployment"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd">
+ <label>RDBaseTest</label>
+ <UUID>RDBaseTest</UUID>
+
+ <implementation xmi:id="CompSvrImpl">
+ <name>CompSvr</name>
+ <source />
+ <artifact xmi:idref="CompSvrArt" />
+ <execParameter>
+ <name>edu.vanderbilt.dre.DAnCE.ImplementationType</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>edu.vanderbilt.dre.DAnCE.LocalityManager</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+
+<implementation xmi:id="SenderImpl">
+ <name>SenderImplementation</name>
+ <source/>
+ <artifact xmi:idref="Sender_ExecArtifact" />
+ <artifact xmi:idref="Sender_SvntArtifact" />
+ <execParameter>
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_Sender_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_Sender_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Sender_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Sender_exec</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+
+ <implementation xmi:id="ReceiverImpl">
+ <name>ReceiverImplementation</name>
+ <source/>
+ <artifact xmi:idref="Receiver_ExecArtifact" />
+ <artifact xmi:idref="Receiver_SvntArtifact" />
+ <execParameter>
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_Receiver_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_Receiver_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Receiver_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Receiver_exec</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+
+ <instance xmi:id="CompSvr1Inst">
+ <name>ComponentServer1Instance</name>
+ <node>One</node>
+ <source />
+ <implementation xmi:idref="CompSvrImpl" />
+ <configProperty>
+ <name>edu.vanderbilt.dre.DAnCE.LocalityArguments</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <!--string>-ORBCollocation global -ORBCollocationStrategy thru_poa</string-->
+ <!--string>-ORBCollocation global -ORBCollocationStrategy direct</string-->
+ <string>-ORBCollocation global -ORBCollocationStrategy best</string>
+ <!--string>-ORBCollocation no</string-->
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <instance xmi:id="SenderInstance">
+ <name>Sender</name>
+ <node>One</node>
+ <source/>
+ <implementation xmi:idref="SenderImpl" />
+ </instance>
+
+ <instance xmi:id="ReceiverInstance">
+ <name>Receiver</name>
+ <node>One</node>
+ <source/>
+ <implementation xmi:idref="ReceiverImpl" />
+ <configProperty>
+ <name>strategy</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>no_collocation</string>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <connection>
+ <name>hello_connection</name>
+ <internalEndpoint>
+ <portName>hello_to_rec</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ReceiverInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>hello</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="SenderInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <!--connection>
+ <name>bye_connection</name>
+ <internalEndpoint>
+ <portName>bye</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="SenderInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>bye_from_rec</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ReceiverInstance" />
+ </internalEndpoint>
+ </connection-->
+
+ <artifact xmi:id="Sender_ExecArtifact">
+ <name>Sender_exec</name>
+ <source/>
+ <node/>
+ <location>Sender_exec</location>
+ </artifact>
+ <artifact xmi:id="Sender_SvntArtifact">
+ <name>Sender_svnt</name>
+ <source/>
+ <node/>
+ <location>Sender_svnt</location>
+ </artifact>
+
+ <artifact xmi:id="Receiver_ExecArtifact">
+ <name>Receiver_exec</name>
+ <source/>
+ <node/>
+ <location>Receiver_exec</location>
+ </artifact>
+ <artifact xmi:id="Receiver_SvntArtifact">
+ <name>Receiver_svnt</name>
+ <source/>
+ <node/>
+ <location>Receiver_svnt</location>
+ </artifact>
+
+ <artifact xmi:id="CompSvrArt">
+ <name>CompoSvrArtifactName</name>
+ <source />
+ <node />
+ <location>dance_locality_manager</location>
+ </artifact>
+
+ <localityConstraint>
+ <constraint>SameProcess</constraint>
+ <constrainedInstance xmi:idref="CompSvr1Inst" />
+ <constrainedInstance xmi:idref="SenderInstance" />
+ <!--constrainedInstance xmi:idref="ReceiverInstance" /-->
+ </localityConstraint>
+ <localityConstraint>
+ <constraint>DifferentProcess</constraint>
+ <constrainedInstance xmi:idref="SenderInstance" />
+ <constrainedInstance xmi:idref="ReceiverInstance" />
+ </localityConstraint>
+
+</Deployment:DeploymentPlan>
diff --git a/CIAO/tests/Collocation/descriptors/PlanAllOnOne.cdp b/CIAO/tests/Collocation/descriptors/PlanAllOnOne.cdp
index aeb6ce2471e..697c6b75cf3 100644
--- a/CIAO/tests/Collocation/descriptors/PlanAllOnOne.cdp
+++ b/CIAO/tests/Collocation/descriptors/PlanAllOnOne.cdp
@@ -138,7 +138,6 @@
<kind>tk_string</kind>
</type>
<value>
- <!--string>-ORBCollocation global -ORBCollocationStrategy thru_poa</string-->
<string>-ORBCollocation global -ORBCollocationStrategy direct</string>
<!--string>-ORBCollocation global -ORBCollocationStrategy best</string-->
<!--string>-ORBCollocation no</string-->
@@ -159,6 +158,17 @@
<node>One</node>
<source/>
<implementation xmi:idref="ReceiverImpl" />
+ <configProperty>
+ <name>strategy</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>direct</string>
+ </value>
+ </value>
+ </configProperty>
</instance>
<connection>
diff --git a/CIAO/tests/Collocation/descriptors/PlanAllOnOneBest.cdp b/CIAO/tests/Collocation/descriptors/PlanAllOnOneBest.cdp
new file mode 100644
index 00000000000..cf444c2c5aa
--- /dev/null
+++ b/CIAO/tests/Collocation/descriptors/PlanAllOnOneBest.cdp
@@ -0,0 +1,244 @@
+<!-- $Id$ -->
+<Deployment:DeploymentPlan
+ xmlns:Deployment="http://www.omg.org/Deployment"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd">
+ <label>RDBaseTest</label>
+ <UUID>RDBaseTest</UUID>
+
+ <implementation xmi:id="CompSvrImpl">
+ <name>CompSvr</name>
+ <source />
+ <artifact xmi:idref="CompSvrArt" />
+ <execParameter>
+ <name>edu.vanderbilt.dre.DAnCE.ImplementationType</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>edu.vanderbilt.dre.DAnCE.LocalityManager</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+
+<implementation xmi:id="SenderImpl">
+ <name>SenderImplementation</name>
+ <source/>
+ <artifact xmi:idref="Sender_ExecArtifact" />
+ <artifact xmi:idref="Sender_SvntArtifact" />
+ <execParameter>
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_Sender_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_Sender_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Sender_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Sender_exec</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+
+ <implementation xmi:id="ReceiverImpl">
+ <name>ReceiverImplementation</name>
+ <source/>
+ <artifact xmi:idref="Receiver_ExecArtifact" />
+ <artifact xmi:idref="Receiver_SvntArtifact" />
+ <execParameter>
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_Receiver_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_Receiver_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Receiver_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Receiver_exec</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+
+ <instance xmi:id="CompSvr1Inst">
+ <name>ComponentServer1Instance</name>
+ <node>One</node>
+ <source />
+ <implementation xmi:idref="CompSvrImpl" />
+ <configProperty>
+ <name>edu.vanderbilt.dre.DAnCE.LocalityArguments</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>-ORBCollocation global -ORBCollocationStrategy best</string>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <instance xmi:id="SenderInstance">
+ <name>Sender</name>
+ <node>One</node>
+ <source/>
+ <implementation xmi:idref="SenderImpl" />
+ </instance>
+
+ <instance xmi:id="ReceiverInstance">
+ <name>Receiver</name>
+ <node>One</node>
+ <source/>
+ <implementation xmi:idref="ReceiverImpl" />
+ <configProperty>
+ <name>strategy</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>best</string>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <connection>
+ <name>hello_connection</name>
+ <internalEndpoint>
+ <portName>hello_to_rec</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ReceiverInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>hello</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="SenderInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <!--connection>
+ <name>bye_connection</name>
+ <internalEndpoint>
+ <portName>bye</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="SenderInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>bye_from_rec</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ReceiverInstance" />
+ </internalEndpoint>
+ </connection-->
+
+ <artifact xmi:id="Sender_ExecArtifact">
+ <name>Sender_exec</name>
+ <source/>
+ <node/>
+ <location>Sender_exec</location>
+ </artifact>
+ <artifact xmi:id="Sender_SvntArtifact">
+ <name>Sender_svnt</name>
+ <source/>
+ <node/>
+ <location>Sender_svnt</location>
+ </artifact>
+
+ <artifact xmi:id="Receiver_ExecArtifact">
+ <name>Receiver_exec</name>
+ <source/>
+ <node/>
+ <location>Receiver_exec</location>
+ </artifact>
+ <artifact xmi:id="Receiver_SvntArtifact">
+ <name>Receiver_svnt</name>
+ <source/>
+ <node/>
+ <location>Receiver_svnt</location>
+ </artifact>
+
+ <artifact xmi:id="CompSvrArt">
+ <name>CompoSvrArtifactName</name>
+ <source />
+ <node />
+ <location>dance_locality_manager</location>
+ </artifact>
+
+ <localityConstraint>
+ <constraint>SameProcess</constraint>
+ <constrainedInstance xmi:idref="CompSvr1Inst" />
+ <constrainedInstance xmi:idref="SenderInstance" />
+ <constrainedInstance xmi:idref="ReceiverInstance" />
+ </localityConstraint>
+
+</Deployment:DeploymentPlan>
diff --git a/CIAO/tests/Collocation/descriptors/PlanAllOnOneNo.cdp b/CIAO/tests/Collocation/descriptors/PlanAllOnOneNo.cdp
new file mode 100644
index 00000000000..a3f1f341a41
--- /dev/null
+++ b/CIAO/tests/Collocation/descriptors/PlanAllOnOneNo.cdp
@@ -0,0 +1,244 @@
+<!-- $Id$ -->
+<Deployment:DeploymentPlan
+ xmlns:Deployment="http://www.omg.org/Deployment"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd">
+ <label>RDBaseTest</label>
+ <UUID>RDBaseTest</UUID>
+
+ <implementation xmi:id="CompSvrImpl">
+ <name>CompSvr</name>
+ <source />
+ <artifact xmi:idref="CompSvrArt" />
+ <execParameter>
+ <name>edu.vanderbilt.dre.DAnCE.ImplementationType</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>edu.vanderbilt.dre.DAnCE.LocalityManager</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+
+<implementation xmi:id="SenderImpl">
+ <name>SenderImplementation</name>
+ <source/>
+ <artifact xmi:idref="Sender_ExecArtifact" />
+ <artifact xmi:idref="Sender_SvntArtifact" />
+ <execParameter>
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_Sender_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_Sender_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Sender_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Sender_exec</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+
+ <implementation xmi:id="ReceiverImpl">
+ <name>ReceiverImplementation</name>
+ <source/>
+ <artifact xmi:idref="Receiver_ExecArtifact" />
+ <artifact xmi:idref="Receiver_SvntArtifact" />
+ <execParameter>
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_Receiver_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_Receiver_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Receiver_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Receiver_exec</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+
+ <instance xmi:id="CompSvr1Inst">
+ <name>ComponentServer1Instance</name>
+ <node>One</node>
+ <source />
+ <implementation xmi:idref="CompSvrImpl" />
+ <configProperty>
+ <name>edu.vanderbilt.dre.DAnCE.LocalityArguments</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>-ORBCollocation no</string>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <instance xmi:id="SenderInstance">
+ <name>Sender</name>
+ <node>One</node>
+ <source/>
+ <implementation xmi:idref="SenderImpl" />
+ </instance>
+
+ <instance xmi:id="ReceiverInstance">
+ <name>Receiver</name>
+ <node>One</node>
+ <source/>
+ <implementation xmi:idref="ReceiverImpl" />
+ <configProperty>
+ <name>strategy</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>no_collocation</string>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <connection>
+ <name>hello_connection</name>
+ <internalEndpoint>
+ <portName>hello_to_rec</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ReceiverInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>hello</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="SenderInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <!--connection>
+ <name>bye_connection</name>
+ <internalEndpoint>
+ <portName>bye</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="SenderInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>bye_from_rec</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ReceiverInstance" />
+ </internalEndpoint>
+ </connection-->
+
+ <artifact xmi:id="Sender_ExecArtifact">
+ <name>Sender_exec</name>
+ <source/>
+ <node/>
+ <location>Sender_exec</location>
+ </artifact>
+ <artifact xmi:id="Sender_SvntArtifact">
+ <name>Sender_svnt</name>
+ <source/>
+ <node/>
+ <location>Sender_svnt</location>
+ </artifact>
+
+ <artifact xmi:id="Receiver_ExecArtifact">
+ <name>Receiver_exec</name>
+ <source/>
+ <node/>
+ <location>Receiver_exec</location>
+ </artifact>
+ <artifact xmi:id="Receiver_SvntArtifact">
+ <name>Receiver_svnt</name>
+ <source/>
+ <node/>
+ <location>Receiver_svnt</location>
+ </artifact>
+
+ <artifact xmi:id="CompSvrArt">
+ <name>CompoSvrArtifactName</name>
+ <source />
+ <node />
+ <location>dance_locality_manager</location>
+ </artifact>
+
+ <localityConstraint>
+ <constraint>SameProcess</constraint>
+ <constrainedInstance xmi:idref="CompSvr1Inst" />
+ <constrainedInstance xmi:idref="SenderInstance" />
+ <constrainedInstance xmi:idref="ReceiverInstance" />
+ </localityConstraint>
+
+</Deployment:DeploymentPlan>
diff --git a/CIAO/tests/Collocation/descriptors/PlanAllOnOneNoTP.cdp b/CIAO/tests/Collocation/descriptors/PlanAllOnOneNoTP.cdp
new file mode 100644
index 00000000000..d33f2328771
--- /dev/null
+++ b/CIAO/tests/Collocation/descriptors/PlanAllOnOneNoTP.cdp
@@ -0,0 +1,244 @@
+<!-- $Id$ -->
+<Deployment:DeploymentPlan
+ xmlns:Deployment="http://www.omg.org/Deployment"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd">
+ <label>RDBaseTest</label>
+ <UUID>RDBaseTest</UUID>
+
+ <implementation xmi:id="CompSvrImpl">
+ <name>CompSvr</name>
+ <source />
+ <artifact xmi:idref="CompSvrArt" />
+ <execParameter>
+ <name>edu.vanderbilt.dre.DAnCE.ImplementationType</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>edu.vanderbilt.dre.DAnCE.LocalityManager</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+
+<implementation xmi:id="SenderImpl">
+ <name>SenderImplementation</name>
+ <source/>
+ <artifact xmi:idref="Sender_ExecArtifact" />
+ <artifact xmi:idref="Sender_SvntArtifact" />
+ <execParameter>
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_Sender_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_Sender_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Sender_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Sender_exec</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+
+ <implementation xmi:id="ReceiverImpl">
+ <name>ReceiverImplementation</name>
+ <source/>
+ <artifact xmi:idref="Receiver_ExecArtifact" />
+ <artifact xmi:idref="Receiver_SvntArtifact" />
+ <execParameter>
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_Receiver_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_Receiver_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Receiver_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Receiver_exec</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+
+ <instance xmi:id="CompSvr1Inst">
+ <name>ComponentServer1Instance</name>
+ <node>One</node>
+ <source />
+ <implementation xmi:idref="CompSvrImpl" />
+ <configProperty>
+ <name>edu.vanderbilt.dre.DAnCE.LocalityArguments</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>-ORBCollocation global -ORBCollocationStrategy thru_poa</string>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <instance xmi:id="SenderInstance">
+ <name>Sender</name>
+ <node>One</node>
+ <source/>
+ <implementation xmi:idref="SenderImpl" />
+ </instance>
+
+ <instance xmi:id="ReceiverInstance">
+ <name>Receiver</name>
+ <node>One</node>
+ <source/>
+ <implementation xmi:idref="ReceiverImpl" />
+ <configProperty>
+ <name>strategy</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>no_thru_poa</string>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <connection>
+ <name>hello_connection</name>
+ <internalEndpoint>
+ <portName>hello_to_rec</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ReceiverInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>hello</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="SenderInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <!--connection>
+ <name>bye_connection</name>
+ <internalEndpoint>
+ <portName>bye</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="SenderInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>bye_from_rec</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ReceiverInstance" />
+ </internalEndpoint>
+ </connection-->
+
+ <artifact xmi:id="Sender_ExecArtifact">
+ <name>Sender_exec</name>
+ <source/>
+ <node/>
+ <location>Sender_exec</location>
+ </artifact>
+ <artifact xmi:id="Sender_SvntArtifact">
+ <name>Sender_svnt</name>
+ <source/>
+ <node/>
+ <location>Sender_svnt</location>
+ </artifact>
+
+ <artifact xmi:id="Receiver_ExecArtifact">
+ <name>Receiver_exec</name>
+ <source/>
+ <node/>
+ <location>Receiver_exec</location>
+ </artifact>
+ <artifact xmi:id="Receiver_SvntArtifact">
+ <name>Receiver_svnt</name>
+ <source/>
+ <node/>
+ <location>Receiver_svnt</location>
+ </artifact>
+
+ <artifact xmi:id="CompSvrArt">
+ <name>CompoSvrArtifactName</name>
+ <source />
+ <node />
+ <location>dance_locality_manager</location>
+ </artifact>
+
+ <localityConstraint>
+ <constraint>SameProcess</constraint>
+ <constrainedInstance xmi:idref="CompSvr1Inst" />
+ <constrainedInstance xmi:idref="SenderInstance" />
+ <constrainedInstance xmi:idref="ReceiverInstance" />
+ </localityConstraint>
+
+</Deployment:DeploymentPlan>
diff --git a/CIAO/tests/Collocation/descriptors/run_test.pl b/CIAO/tests/Collocation/descriptors/run_test.pl
index 3833aebb9bf..cbace01d475 100755
--- a/CIAO/tests/Collocation/descriptors/run_test.pl
+++ b/CIAO/tests/Collocation/descriptors/run_test.pl
@@ -9,10 +9,10 @@ use lib "$ENV{'ACE_ROOT'}/bin";
use PerlACE::TestTarget;
#$ENV{'DANCE_LOG_LEVEL'}=9;
-$ENV{'CIAO_LOG_LEVEL'}=9;
-$ENV{'TAO_debug_level'}=5;
-$ENV{'DANCE_TRACE_ENABLE'}=1;
-$ENV{'CIAO_TRACE_ENABLE'}=1;
+$ENV{'CIAO_LOG_LEVEL'}=1;
+#$ENV{'TAO_orbdebug'}=2;
+#$ENV{'DANCE_TRACE_ENABLE'}=1;
+#$ENV{'CIAO_TRACE_ENABLE'}=1;
$CIAO_ROOT = "$ENV{'CIAO_ROOT'}";
$TAO_ROOT = "$ENV{'TAO_ROOT'}";
@@ -120,7 +120,7 @@ sub run_node_daemons {
$node_app = $tg_daemons[$i]->GetArchDir("$DANCE_ROOT/bin/") . "dance_locality_manager";
$d_cmd = "$DANCE_ROOT/bin/dance_node_manager";
- $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30 --domain-nc corbaloc:rir:/NameService -ORBDebug";
+ $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30 --domain-nc corbaloc:rir:/NameService ";
print "Run dance_node_manager with $d_param\n";
$DEAMONS[$i] = $tg_daemons[$i]->CreateProcess ($d_cmd, $d_param);
@@ -139,107 +139,125 @@ sub run_node_daemons {
return 0;
}
-create_targets ();
-init_ior_files ();
-
-# Invoke naming service
-
-$NS = $tg_naming->CreateProcess ("$TAO_ROOT/orbsvcs/Naming_Service/tao_cosnaming", " -ORBEndpoint iiop://localhost:60003 -o $ior_nsfile");
-
-$ns_status = $NS->Spawn ();
-
-if ($ns_status != 0) {
- print STDERR "ERROR: Unable to execute the naming service\n";
- kill_open_processes ();
- exit 1;
-}
-
-print STDERR "Starting Naming Service with -ORBEndpoint iiop://localhost:60003 -o ns.ior\n";
-
-if ($tg_naming->WaitForFileTimed ($ior_nsbase,
- $tg_naming->ProcessStartWaitInterval ()) == -1) {
- print STDERR "ERROR: cannot find naming service IOR file\n";
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
-}
-
-$ns_running = 1;
-# Set up NamingService environment
-$ENV{"NameServiceIOR"} = "corbaloc:iiop:localhost:60003/NameService";
-
-# Invoke node daemon.
-print "Invoking node daemon\n";
-$status = run_node_daemons ();
-
-if ($status != 0) {
- print STDERR "ERROR: Unable to execute the node daemon\n";
- kill_open_processes ();
- exit 1;
-}
-
-$daemons_running = 1;
-
-# Invoke execution manager.
-print "Invoking execution manager (dance_execution_manager.exe) with -e$ior_emfile\n";
-$EM = $tg_exe_man->CreateProcess ("$DANCE_ROOT/bin/dance_execution_manager",
- "-e$ior_emfile --domain-nc corbaloc:rir:/NameService ");
-$em_status = $EM->Spawn ();
-
-if ($em_status != 0) {
- print STDERR "ERROR: dance_execution_manager returned $em_status";
- exit 1;
-}
-
-if ($tg_exe_man->WaitForFileTimed ($ior_embase,
- $tg_exe_man->ProcessStartWaitInterval ()) == -1) {
- print STDERR
- "ERROR: The ior file of execution manager could not be found\n";
- kill_open_processes ();
- exit 1;
-}
-
-$em_running = 1;
-
-# Invoke executor - start the application -.
-print "Invoking executor - launch the application -\n";
-
-print "Start dance_plan_launcher.exe with -x $cdp_file -k file://$ior_emfile\n";
-$E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher",
- "-x $cdp_file -k file://$ior_emfile -l");
-$pl_status = $E->SpawnWaitKill (2 * $tg_executor->ProcessStartWaitInterval ());
-
-if ($pl_status != 0) {
- print STDERR "ERROR: dance_plan_launcher returned $pl_status\n";
- kill_open_processes ();
- exit 1;
+if ($#ARGV == -1) {
+ opendir(DIR, ".");
+ @files = grep(/\.cdp$/,readdir(DIR));
+ closedir(DIR);
}
-
-for ($i = 0; $i < $nr_daemon; ++$i) {
- if ($tg_daemons[$i]->WaitForFileTimed ($iorbases[$i],
- $tg_daemons[$i]->ProcessStopWaitInterval ()) == -1) {
- print STDERR "ERROR: The ior file of daemon $i could not be found\n";
- kill_open_processes ();
- exit 1;
- }
+else {
+ @files = @ARGV;
}
-sleep (15);
-
-# Invoke executor - stop the application -.
-print "Invoking executor - shutting down -\n";
-print "by running dance_plan_launcher.exe with -k file://$ior_emfile -x $cdp_file\n";
-
-$E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher",
- "-k file://$ior_emfile -x $cdp_file -s");
-$pl_status = $E->SpawnWaitKill ($tg_executor->ProcessStartWaitInterval ());
+create_targets ();
+init_ior_files ();
-if ($pl_status != 0) {
- print STDERR "ERROR: dance_plan_launcher returned $pl_status\n";
- kill_open_processes ();
- exit 1;
+foreach $file (@files) {
+ print "Starting test for deployment $file\n";
+
+ # Invoke naming service
+
+ $NS = $tg_naming->CreateProcess ("$TAO_ROOT/orbsvcs/Naming_Service/tao_cosnaming", " -ORBEndpoint iiop://localhost:60003 -o $ior_nsfile");
+
+ $ns_status = $NS->Spawn ();
+
+ if ($ns_status != 0) {
+ print STDERR "ERROR: Unable to execute the naming service\n";
+ kill_open_processes ();
+ exit 1;
+ }
+
+ print STDERR "Starting Naming Service with -ORBEndpoint iiop://localhost:60003 -o ns.ior\n";
+
+ if ($tg_naming->WaitForFileTimed ($ior_nsbase,
+ $tg_naming->ProcessStartWaitInterval ()) == -1) {
+ print STDERR "ERROR: cannot find naming service IOR file\n";
+ $NS->Kill (); $NS->TimedWait (1);
+ exit 1;
+ }
+
+ $ns_running = 1;
+ # Set up NamingService environment
+ $ENV{"NameServiceIOR"} = "corbaloc:iiop:localhost:60003/NameService";
+
+ # Invoke node daemon.
+ print "Invoking node daemon\n";
+ $status = run_node_daemons ();
+
+ if ($status != 0) {
+ print STDERR "ERROR: Unable to execute the node daemon\n";
+ kill_open_processes ();
+ exit 1;
+ }
+
+ $daemons_running = 1;
+
+ # Invoke execution manager.
+ print "Invoking execution manager (dance_execution_manager.exe) with -e$ior_emfile\n";
+ $EM = $tg_exe_man->CreateProcess ("$DANCE_ROOT/bin/dance_execution_manager",
+ "-e$ior_emfile --domain-nc corbaloc:rir:/NameService");
+ $em_status = $EM->Spawn ();
+
+ if ($em_status != 0) {
+ print STDERR "ERROR: dance_execution_manager returned $em_status";
+ exit 1;
+ }
+
+ if ($tg_exe_man->WaitForFileTimed ($ior_embase,
+ $tg_exe_man->ProcessStartWaitInterval ()) == -1) {
+ print STDERR
+ "ERROR: The ior file of execution manager could not be found\n";
+ kill_open_processes ();
+ exit 1;
+ }
+
+ $em_running = 1;
+
+ # Invoke executor - start the application -.
+ print "Invoking executor - launch the application -\n";
+
+ print "Start dance_plan_launcher.exe with -x $file -k file://$ior_emfile\n";
+ $E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher",
+ "-x $file -k file://$ior_emfile -l");
+ $pl_status = $E->SpawnWaitKill (2 * $tg_executor->ProcessStartWaitInterval ());
+
+ if ($pl_status != 0) {
+ print STDERR "ERROR: dance_plan_launcher returned $pl_status\n";
+ kill_open_processes ();
+ exit 1;
+ }
+
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ if ($tg_daemons[$i]->WaitForFileTimed ($iorbases[$i],
+ $tg_daemons[$i]->ProcessStopWaitInterval ()) == -1) {
+ print STDERR "ERROR: The ior file of daemon $i could not be found\n";
+ kill_open_processes ();
+ exit 1;
+ }
+ }
+
+ sleep (15);
+
+ # Invoke executor - stop the application -.
+ print "Invoking executor - shutting down -\n";
+ print "by running dance_plan_launcher.exe with -k file://$ior_emfile -x $file\n";
+
+ $E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher",
+ "-k file://$ior_emfile -x $file -s");
+ $pl_status = $E->SpawnWaitKill ($tg_executor->ProcessStartWaitInterval ());
+
+ if ($pl_status != 0) {
+ print STDERR "ERROR: dance_plan_launcher returned $pl_status\n";
+ kill_open_processes ();
+ exit 1;
+ }
+
+ delete_ior_files ();
+ kill_open_processes ();
+ # Sleep for a couple seconds to make sure everything has a chance to shut down.
+ sleep 5;
}
-
delete_ior_files ();
kill_open_processes ();
+
exit $status;
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index a6bc227e898..e857770d88b 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,30 @@
+Thu Nov 01 10:54:13 UTC 2011 Martin Corino <mcorino@remedy.nl>
+
+ Merged changes from Remedy SA work branch.
+
+ === start changelog ===
+
+ Mon Oct 31 13:14:04 UTC 2011 Marijke Hengstmengel <mhengstmengel@remedy.nl>
+
+ * TAO_IDL/be/be_visitor_component/servant_svs.cpp:
+ Add safe_servant_base in CIAO consumers servant
+
+
+ Fri Oct 28 11:37:40 UTC 2011 Marijke Hengstmengel <mhengstmengel@remedy.nl>
+
+ * TAO_IDL/be/be_visitor_component/servant_svs.cpp:
+ Changes for removing activators for CIAO consumers
+
+ Wed Oct 26 07:18:40 UTC 2011 Marijke Hengstmengel <mhengstmengel@remedy.nl>
+
+ * TAO_IDL/be/be_codegen.cpp:
+ Remove include files for ciao servant- and port_activator.
+
+ * TAO_IDL/be/be_visitor_component/servant_svs.cpp:
+ Changes for removing activators in CIAO
+
+ === end changelog ===
+
Thu Oct 27 16:16:09 UTC 2011 Phil Mesnier <mesnier_p@ociweb.com>
* utils/logWalker/HostProcess.h:
diff --git a/TAO/TAO_IDL/be/be_codegen.cpp b/TAO/TAO_IDL/be/be_codegen.cpp
index 39003bec0d6..052936f6589 100644
--- a/TAO/TAO_IDL/be/be_codegen.cpp
+++ b/TAO/TAO_IDL/be/be_codegen.cpp
@@ -3254,18 +3254,6 @@ TAO_CodeGen::gen_svnt_src_includes (void)
this->gen_standard_include (
this->ciao_svnt_source_,
- "ciao/Containers/CIAO_Servant_ActivatorC.h");
-
- this->gen_standard_include (
- this->ciao_svnt_source_,
- "ciao/Servants/Port_Activator_T.h");
-
- this->gen_standard_include (
- this->ciao_svnt_source_,
- "ciao/Servants/CIAO_Port_ActivatorC.h");
-
- this->gen_standard_include (
- this->ciao_svnt_source_,
"tao/SystemException.h");
this->gen_standard_include (
diff --git a/TAO/TAO_IDL/be/be_visitor_component/servant_svs.cpp b/TAO/TAO_IDL/be/be_visitor_component/servant_svs.cpp
index 649c69a3d78..c42972aa91f 100644
--- a/TAO/TAO_IDL/be/be_visitor_component/servant_svs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_component/servant_svs.cpp
@@ -293,55 +293,41 @@ be_visitor_servant_svs::visit_provides (be_provides *node)
}
os_ << be_nl_2
- << "void" << be_nl
- << node_->local_name () << "_Servant::setup_"
- << port_name << "_i (void)" << be_nl
- << "{" << be_idt_nl
- << "typedef" << be_idt_nl
- << "::CIAO::Port_Activator_T<" << be_idt_nl
- << "::CIAO_FACET" << prefix_connector
- << scope->flat_name () << "::" << lname
- << "_Servant," << be_nl
- << global << sname << "::CCM_" << lname << "," << be_nl
- << "::Components::CCMContext," << be_nl
- << node_->local_name () << "_Servant>" << be_uidt_nl
- << "MACRO_MADNESS_TYPEDEF;" << be_uidt_nl << be_nl
- << "MACRO_MADNESS_TYPEDEF * tmp = 0;" << be_nl
- << "ACE_CString obj_id (this->ins_name_);" << be_nl
- << "obj_id += \"_" << port_name << "\";" << be_nl_2
- << "ACE_NEW_THROW_EX (" << be_idt_nl
- << "tmp," << be_nl
- << "MACRO_MADNESS_TYPEDEF (" << be_idt_nl
- << "obj_id.c_str ()," << be_nl
- << "\"" << port_name << "\"," << be_nl
- << "::CIAO::Port_Activator_Types::FACET," << be_nl
- << "0," << be_nl
- << "this->context_," << be_nl
- << "this)," << be_uidt_nl
- << "::CORBA::NO_MEMORY ());" << be_uidt_nl << be_nl
- << "::CIAO::Port_Activator_var pa = tmp;" << be_nl_2
- << "::CIAO::Container_var cnt_safe =" << be_idt_nl
- << "::CIAO::Container::_duplicate ("
- << "this->container_.in ());" << be_uidt_nl << be_nl
- << "if (::CORBA::is_nil (cnt_safe.in ()))" << be_idt_nl
- << "{" << be_idt_nl << "throw ::CORBA::INV_OBJREF ();" << be_uidt_nl
- << "}" << be_uidt_nl << be_nl
- << "::CIAO::Servant_Activator_var sa =" << be_idt_nl
- << "cnt_safe->ports_servant_activator ();"
- << be_uidt_nl << be_nl
- << "if (sa->register_port_activator (pa.in ()))"
- << be_idt_nl
- << "{" << be_idt_nl
- << "::CORBA::Object_var obj =" << be_idt_nl
- << "cnt_safe->generate_reference (" << be_idt_nl
- << "obj_id.c_str ()," << be_nl
- << "\"" << obj->repoID () << "\"," << be_nl
- << "::CIAO::Container_Types::FACET_CONSUMER_t);"
- << be_uidt_nl << be_uidt_nl
- << "this->add_facet (\"" << port_name << "\", obj.in ());"
- << be_uidt_nl
- << "}" << be_uidt << be_uidt_nl
- << "}";
+ << "void" << be_nl
+ << node_->local_name () << "_Servant::setup_"
+ << port_name << "_i (void)" << be_nl
+ << "{" << be_idt_nl
+ << "ACE_CString obj_id (this->ins_name_);" << be_nl
+ << "obj_id += \"_" << port_name << "\";" << be_nl_2
+ << "::CIAO::Container_var cnt_safe =" << be_idt_nl
+ << "::CIAO::Container::_duplicate ("
+ << "this->container_.in ());" << be_uidt_nl << be_nl
+ << "if (::CORBA::is_nil (cnt_safe.in ()))" << be_idt_nl
+ << "{" << be_idt_nl << "throw ::CORBA::INV_OBJREF ();" << be_uidt_nl
+ << "}" << be_uidt_nl << be_nl
+ << "PortableServer::POA_var POA = cnt_safe->the_port_POA ();" << be_nl
+ << "::CORBA::Object_var tmp =" << be_idt_nl
+ << "this->get_facet_executor (\"" << port_name << "\");"<< be_uidt_nl << be_nl
+ << "::CIAO_FACET" << prefix_connector
+ << scope->flat_name () << "::" << lname
+ << "_Servant *" << port_name << "_servant_impl = " << be_idt_nl
+ << "new ::CIAO_FACET" << prefix_connector
+ << scope->flat_name () << "::" << lname
+ << "_Servant ("<< global << sname << "::CCM_" << lname << "::_narrow (tmp.in())," << be_nl
+ << "this->context_);" << be_uidt_nl << be_nl
+ << "PortableServer::ObjectId_var " << port_name << "_servant_oid =" << be_idt_nl
+ << "PortableServer::string_to_ObjectId (obj_id.c_str());" << be_uidt_nl << be_nl
+ << "POA->activate_object_with_id(" << port_name << "_servant_oid.in(),"
+ << port_name << "_servant_impl);" << be_nl
+ << "::CORBA::Object_var " << port_name << "_servant_impl_obj = " << be_idt_nl
+ << "cnt_safe->generate_reference ( " << be_idt_nl
+ << "obj_id.c_str ()," << be_nl
+ << "\"" << obj->repoID () << "\"," << be_nl
+ << "::CIAO::Container_Types::FACET_CONSUMER_t);"
+ << be_uidt_nl << be_uidt_nl
+ << "this->add_facet (\"" << port_name << "\", " << port_name << "_servant_impl_obj.in ());"
+ << be_uidt_nl
+ << "}";
return 0;
}
@@ -599,56 +585,49 @@ be_visitor_servant_svs::visit_consumes (be_consumes *node)
<< node_->local_name () << "_Servant::setup_consumer_"
<< port_name << "_i (void)" << be_nl
<< "{" << be_idt_nl
- << "typedef" << be_idt_nl
- << "::CIAO::Port_Activator_T<" << be_idt_nl
- << node_->local_name () << "_Servant::" << lname
- << "Consumer_" << port_name << "_Servant," << be_nl
- << global << comp_sname << "::CCM_" << comp_lname
- << "," << be_nl
- << global << comp_sname << "::CCM_" << comp_lname
- << "_Context," << be_nl
- << node_->local_name () << "_Servant>" << be_uidt_nl
- << "MACRO_MADNESS_TYPEDEF;" << be_uidt_nl << be_nl
- << "MACRO_MADNESS_TYPEDEF * tmp = 0;" << be_nl
<< "ACE_CString obj_id (this->ins_name_);" << be_nl
<< "obj_id += \"_" << port_name << "\";" << be_nl_2
- << "ACE_NEW_THROW_EX (" << be_idt_nl
- << "tmp," << be_nl
- << "MACRO_MADNESS_TYPEDEF (" << be_idt_nl
- << "obj_id.c_str ()," << be_nl
- << "\"" << port_name << "\"," << be_nl
- << "::CIAO::Port_Activator_Types::SINK," << be_nl
- << "this->executor_.in ()," << be_nl
- << "this->context_," << be_nl
- << "this)," << be_uidt_nl
- << "::CORBA::NO_MEMORY ());" << be_uidt_nl << be_nl
- << "::CIAO::Port_Activator_var pa = tmp;" << be_nl_2
- << "::CIAO::Servant_Activator_var sa =" << be_idt_nl
- << "this->container_->ports_servant_activator ();"
- << be_uidt_nl << be_nl
- << "if (sa->register_port_activator (pa.in ()))"
- << be_idt_nl
- << "{" << be_idt_nl
- << "::CORBA::Object_var obj =" << be_idt_nl
- << "this->container_->generate_reference (" << be_idt_nl
+ << "::CIAO::Container_var cnt_safe =" << be_idt_nl
+ << "::CIAO::Container::_duplicate ("
+ << "this->container_.in ());" << be_uidt_nl << be_nl
+ << "if (::CORBA::is_nil (cnt_safe.in ()))" << be_idt_nl
+ << "{" << be_idt_nl << "throw ::CORBA::INV_OBJREF ();" << be_uidt_nl
+ << "}" << be_uidt_nl << be_nl
+ << "PortableServer::POA_var POA = cnt_safe->the_port_POA ();" << be_nl
+ << node_->local_name () << "_Servant::" << lname
+ << "Consumer_" << port_name << "_Servant *"
+ << port_name << "_servant_impl = " << be_idt_nl
+ << "new " << node_->local_name () << "_Servant::" << lname
+ << "Consumer_" << port_name << "_Servant (" << be_idt_nl
+ << " this->executor_, this->context_);" << be_uidt_nl << be_uidt_nl << be_nl
+ << "PortableServer::ServantBase_var safe_base_servant ("
+ << port_name << "_servant_impl);" << be_nl
+ << "PortableServer::ObjectId_var " << port_name << "_servant_oid =" << be_idt_nl
+ << "PortableServer::string_to_ObjectId (obj_id.c_str());" << be_uidt_nl << be_nl
+ << "POA->activate_object_with_id(" << be_idt_nl
+ << port_name << "_servant_oid.in()," << be_nl
+ << port_name << "_servant_impl);" << be_uidt_nl << be_nl
+
+ << "::CORBA::Object_var " << port_name << "_servant_impl_obj = " << be_idt_nl
+ << "cnt_safe->generate_reference ( " << be_idt_nl
<< "obj_id.c_str ()," << be_nl
<< "\"";
- ACE_CString work (obj->repoID ());
- ACE_CString result (work.substr (0, work.rfind (':')));
- result += "Consumer:1.0";
+ ACE_CString work (obj->repoID ());
+ ACE_CString result (work.substr (0, work.rfind (':')));
+ result += "Consumer:1.0";
- os_ << result.c_str ();
+ os_ << result.c_str ();
- os_ << "\"," << be_nl
+ os_ << "\"," << be_nl
<< "::CIAO::Container_Types::FACET_CONSUMER_t);"
<< be_uidt_nl << be_uidt_nl
<< "::Components::EventConsumerBase_var ecb =" << be_idt_nl
- << "::Components::EventConsumerBase::_narrow (obj.in ());"
+ << "::Components::EventConsumerBase::_narrow ("
+ << port_name << "_servant_impl_obj.in ());"
<< be_uidt_nl << be_nl
<< "this->add_consumer (\"" << port_name << "\", ecb.in ());"
<< be_uidt_nl
- << "}" << be_uidt_nl << be_uidt_nl
<< "}";
return 0;