summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-11-15 21:00:59 +0000
committerjai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-11-15 21:00:59 +0000
commit6332881ff52faf17394f02cdcbfa51dfd5ccd906 (patch)
tree20ae5317caa60d1f71bbf4abce03fce889a2dfd5
parent8307a34c87173d8d9fc690f222462c6837a84588 (diff)
downloadATCD-6332881ff52faf17394f02cdcbfa51dfd5ccd906.tar.gz
*** empty log message ***
-rw-r--r--TAO/CIAO/DAnCE/ciao/Swapping_Container.cpp45
-rw-r--r--TAO/CIAO/DAnCE/ciao/Swapping_Container.h18
2 files changed, 27 insertions, 36 deletions
diff --git a/TAO/CIAO/DAnCE/ciao/Swapping_Container.cpp b/TAO/CIAO/DAnCE/ciao/Swapping_Container.cpp
index 0865626a46e..a004c72b046 100644
--- a/TAO/CIAO/DAnCE/ciao/Swapping_Container.cpp
+++ b/TAO/CIAO/DAnCE/ciao/Swapping_Container.cpp
@@ -5,7 +5,6 @@
#include "ace/DLL.h"
#include "tao/Utils/PolicyList_Destroyer.h"
#include "ace/OS_NS_stdio.h"
-//#include "Dynamic_Component_Activator.h"
#if !defined (__ACE_INLINE__)
# include "Swapping_Container.inl"
@@ -58,10 +57,10 @@ namespace CIAO
ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
- this->create_component_POA (name,
- more_policies,
- root_poa.in ()
- ACE_ENV_ARG_PARAMETER);
+ this->create_servant_POA (name,
+ more_policies,
+ root_poa.in ()
+ ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
PortableServer::POAManager_var poa_manager =
@@ -75,15 +74,19 @@ namespace CIAO
}
void
- Swapping_Container::create_component_POA (const char *name,
- const CORBA::PolicyList *p,
- PortableServer::POA_ptr root
- ACE_ENV_ARG_DECL)
+ Swapping_Container::update_servant_map
+ (PortableServer::ObjectId &oid,
+ Dynamic_Component_Servant_Base* servant
+ ACE_ENV_ARG_DECL)
{
- // @@ Jai, the whole policy length stuff is not going to work. See
- // below.
+ }
- // @@ Jai, policy length is initialized zero.
+ void
+ Swapping_Container::create_servant_POA (const char *name,
+ const CORBA::PolicyList *p,
+ PortableServer::POA_ptr root
+ ACE_ENV_ARG_DECL)
+ {
CORBA::PolicyList policies (0);
if (p != 0)
@@ -93,42 +96,28 @@ namespace CIAO
root->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK;
- // @@Jai, if you are lucky you will get zero or some arbitrary
- // number. Let us assume that you get zero.
-
CORBA::ULong policy_length = policies.length ();
-
- // @@ Jai, you are setting the length of the policy length to 1.
policies.length (policy_length + 1);
-
policies[policy_length] =
root->create_id_assignment_policy (PortableServer::USER_ID
ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
- // @@ Jai, tell what are you doing here. It is 1 here
- // again.. Right?
+ policy_length = policies.length ();
policies.length (policy_length + 1);
-
- // @@ Jai, you are overriding teh value at position zero it again
- // here.
policies[policy_length] =
root->create_request_processing_policy (
PortableServer::USE_SERVANT_MANAGER
ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
- // Servant Retention Policy
-
- // @@ Jai, tell What is going on here?
+ policy_length = policies.length ();
policies.length (policy_length + 1);
policies[policy_length] =
root->create_servant_retention_policy (PortableServer::RETAIN
ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
- // @@ Jai, if you want to copy code please do it properly. The
- // above is GUARANTEED NOT to work.
this->component_poa_ =
root->create_POA (name,
poa_manager.in (),
diff --git a/TAO/CIAO/DAnCE/ciao/Swapping_Container.h b/TAO/CIAO/DAnCE/ciao/Swapping_Container.h
index 60a87dae5aa..302300e32bc 100644
--- a/TAO/CIAO/DAnCE/ciao/Swapping_Container.h
+++ b/TAO/CIAO/DAnCE/ciao/Swapping_Container.h
@@ -33,6 +33,8 @@
namespace CIAO
{
+ class Dynamic_Component_Servant_Base;
+
class CIAO_SERVER_Export Swapping_Container : public Session_Container
{
public:
@@ -51,17 +53,17 @@ namespace CIAO
ACE_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
+ void update_servant_map (PortableServer::ObjectId &oid,
+ Dynamic_Component_Servant_Base* servant
+ ACE_ENV_ARG_DECL);
+
private:
/// Create POA for the component.
- // @@ Jai, do you want to rename this method? BTW, why don't you
- // share the implementation of create_facet_consumer_POA ()? This
- // implementation is totally wrong and atleast sharing code would
- // help you.
- void create_component_POA (const char *name,
- const CORBA::PolicyList *p,
- PortableServer::POA_ptr root
- ACE_ENV_ARG_DECL);
+ void create_servant_POA (const char *name,
+ const CORBA::PolicyList *p,
+ PortableServer::POA_ptr root
+ ACE_ENV_ARG_DECL);
protected:
long number_;