summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-02-09 02:45:53 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-02-09 02:45:53 +0000
commit8ac92e6f002ee9376dc7808952423ec35b6b8164 (patch)
tree5d7eb41cbf2fd7ce5aa9cb8da3a748cf29a06c2c
parent0679ea8711f5f17e478734373659e9845ed221f2 (diff)
downloadATCD-8ac92e6f002ee9376dc7808952423ec35b6b8164.tar.gz
*** empty log message ***
-rw-r--r--TAO/CIAO/ChangeLog8
-rw-r--r--TAO/CIAO/ciao/ComponentInstallation_Impl.cpp68
-rw-r--r--TAO/CIAO/ciao/ComponentInstallation_Impl.h102
-rw-r--r--TAO/CIAO/ciao/ComponentInstallation_Impl.inl8
-rw-r--r--TAO/CIAO/ciao/ComponentServer_Impl.cpp75
-rw-r--r--TAO/CIAO/ciao/ComponentServer_Impl.h108
-rw-r--r--TAO/CIAO/ciao/ComponentServer_Impl.inl8
-rw-r--r--TAO/CIAO/ciao/Container_Impl.cpp84
-rw-r--r--TAO/CIAO/ciao/Container_Impl.h113
-rw-r--r--TAO/CIAO/ciao/Container_Impl.inl8
-rw-r--r--TAO/CIAO/ciao/Object_Set_T.cpp15
-rw-r--r--TAO/CIAO/ciao/Object_Set_T.h5
-rw-r--r--TAO/CIAO/ciao/ServerActivator_Impl.cpp53
-rw-r--r--TAO/CIAO/ciao/ServerActivator_Impl.h94
-rw-r--r--TAO/CIAO/ciao/ServerActivator_Impl.inl8
-rw-r--r--TAO/CIAO/tools/Assembly_Deployer/Assembly_Impl.cpp99
-rw-r--r--TAO/CIAO/tools/Assembly_Deployer/Assembly_Impl.h146
-rw-r--r--TAO/CIAO/tools/Assembly_Deployer/Assembly_Impl.inl14
18 files changed, 1016 insertions, 0 deletions
diff --git a/TAO/CIAO/ChangeLog b/TAO/CIAO/ChangeLog
index 52c4819fd76..73cf821e15a 100644
--- a/TAO/CIAO/ChangeLog
+++ b/TAO/CIAO/ChangeLog
@@ -1,3 +1,11 @@
+Sat Feb 08 20:45:20 2003 Nanbor Wang <nanbor@cs.wustl.edu>
+
+ * ciao/*: WiP intermediate checkins.
+
+ * ciao/Object_Set_T.h:
+ * ciao/Object_Set_T.cpp (object_in_set): Added a new method to
+ check if an object is already in the set or not.
+
Fri Feb 07 23:35:35 2003 Nanbor Wang <nanbor@cs.wustl.edu>
* ciao/Object_Set_T.h:
diff --git a/TAO/CIAO/ciao/ComponentInstallation_Impl.cpp b/TAO/CIAO/ciao/ComponentInstallation_Impl.cpp
new file mode 100644
index 00000000000..900419f007a
--- /dev/null
+++ b/TAO/CIAO/ciao/ComponentInstallation_Impl.cpp
@@ -0,0 +1,68 @@
+// $Id$
+
+#include "ComponentInstallation_Impl.h"
+
+#if !defined (__ACE_INLINE__)
+# include "ComponentInstallation_Impl.inl"
+#endif /* __ACE_INLINE__ */
+
+CIAO::ComponentInstallation_Impl::~ComponentInstallation_Impl ()
+{
+ // @@ remove all Containers?
+}
+
+PortableServer::POA_ptr
+CIAO::ComponentInstallation_Impl::_default_POA (void)
+{
+ return PortableServer::_duplicate (this->poa_.in ());
+}
+
+int
+CIAO::ComponentInstallation_Impl::init (ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ // @@ Initialize ComponentInstallation and create the internal container
+ // implementation that actually interacts with installed
+ // homes/components.
+
+ // We will probably need two ORBs in this process. One for the
+ // deployment framework, and one for the actual components.
+}
+
+void
+CIAO::ComponentInstallation_Impl::install (const char * implUUID,
+ const char * component_loc
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::Deployment::InvalidLocation,
+ Components::Deployment::InstallationFailure))
+{
+}
+
+void
+CIAO::ComponentInstallation_Impl::replace (const char * implUUID,
+ const char * component_loc
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::Deployment::InvalidLocation,
+ Components::Deployment::InstallationFailure))
+{
+}
+
+void
+CIAO::ComponentInstallation_Impl::remove (const char * implUUID
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::Deployment::UnknownImplId,
+ Components::RemoveFailure))
+{
+}
+
+char *
+CIAO::ComponentInstallation_Impl::get_implementation (const char * implUUID
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::Deployment::UnknownImplId,
+ Components::Deployment::InstallationFailure))
+{
+}
diff --git a/TAO/CIAO/ciao/ComponentInstallation_Impl.h b/TAO/CIAO/ciao/ComponentInstallation_Impl.h
new file mode 100644
index 00000000000..a9733111e2b
--- /dev/null
+++ b/TAO/CIAO/ciao/ComponentInstallation_Impl.h
@@ -0,0 +1,102 @@
+// -*- C++ -*-
+
+//=============================================================================
+/**
+ * @file ComponentInstallation_Impl.h
+ *
+ * $Id$
+ *
+ * This file contains implementation for the servant of
+ * Components::Deployment::ComponentInstallation interface.
+ *
+ * @author Nanbor Wang <nanbor@cs.wustl.edu>
+ */
+//=============================================================================
+
+
+#ifndef CIAO_SERVERACTIVATOR_IMPL_H
+#define CIAO_SERVERACTIVATOR_IMPL_H
+#include "ace/pre.h"
+
+#include "ace/config-all.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "CCM_DeploymentS.h"
+
+namespace CIAO
+{
+ /**
+ * @class ComponentInstallation_Impl
+ *
+ * @brief Servant implementation for Components::Deployment::ComponentInstallation
+ *
+ * This class implements the Components::Deployment::ComponentInstallation
+ * interface as defined by the CCM spcification. As the interface
+ * implies, this is actually part of the deployment interface and is
+ * used to manage the lifecycle of containers running on the server.
+ */
+ class CIAO_SERVER_Export ComponentInstallation_Impl
+ : public virtual POA_Components::Deployment::ComponentInstallation,
+ public virtual PortableServer::RefCountServantBase
+ {
+ public:
+ /// Constructor
+ ComponentInstallation_Impl (CORBA::ORB_ptr o);
+
+ /// Destructor
+ virtual ~ComponentInstallation_Impl (void);
+
+ /// Get the containing POA. This operation does *not*
+ /// increase the reference count of the POA.
+ virtual PortableServer::POA_ptr _default_POA (void);
+
+ /// Initialize the ComponentInstallation.
+ int init (ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ /// Components::Deployment::ComponentInstallation defined attributes/operations.
+
+ virtual void install (const char * implUUID,
+ const char * component_loc
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::Deployment::InvalidLocation,
+ Components::Deployment::InstallationFailure));
+
+ virtual void replace (const char * implUUID,
+ const char * component_loc
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::Deployment::InvalidLocation,
+ Components::Deployment::InstallationFailure));
+
+ virtual void remove (const char * implUUID
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::Deployment::UnknownImplId,
+ Components::RemoveFailure));
+
+ virtual char * get_implementation (const char * implUUID
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::Deployment::UnknownImplId,
+ Components::Deployment::InstallationFailure));
+
+ protected:
+ /// Keep a pointer to the managing ORB serving this servant.
+ CORBA::ORB_var orb_;
+
+ /// Keep a pointer to the managing POA.
+ PortableServer::POA_var poa_;
+ };
+}
+
+#if defined (__ACE_INLINE__)
+# include "ComponentInstallation_Impl.inl"
+#endif /* __ACE_INLINE__ */
+
+#include "ace/post.h"
+#endif /* CIAO_SERVERACTIVATOR_IMPL_H */
diff --git a/TAO/CIAO/ciao/ComponentInstallation_Impl.inl b/TAO/CIAO/ciao/ComponentInstallation_Impl.inl
new file mode 100644
index 00000000000..0391c8db2b2
--- /dev/null
+++ b/TAO/CIAO/ciao/ComponentInstallation_Impl.inl
@@ -0,0 +1,8 @@
+/* -*- C++ -*- */
+// $Id$
+
+ACE_INLINE
+CIAO::ComponentInstallation_Impl::ComponentInstallation_Impl (CORBA::ORB_ptr o)
+ : orb_ (o)
+{
+}
diff --git a/TAO/CIAO/ciao/ComponentServer_Impl.cpp b/TAO/CIAO/ciao/ComponentServer_Impl.cpp
new file mode 100644
index 00000000000..9535e7ddb2d
--- /dev/null
+++ b/TAO/CIAO/ciao/ComponentServer_Impl.cpp
@@ -0,0 +1,75 @@
+// $Id$
+
+#include "ComponentServer_Impl.h"
+
+#if !defined (__ACE_INLINE__)
+# include "ComponentServer_Impl.inl"
+#endif /* __ACE_INLINE__ */
+
+CIAO::ComponentServer_Impl::~ComponentServer_Impl ()
+{
+ // @@ remove all Containers?
+}
+
+PortableServer::POA_ptr
+CIAO::ComponentServer_Impl::_default_POA (void)
+{
+ return PortableServer::_duplicate (this->poa_.in ());
+}
+
+int
+CIAO::ComponentServer_Impl::init (::Components::ConfigValues &options
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ // @@ Initialize ComponentServer and create the internal container
+ // implementation that actually interacts with installed
+ // homes/components.
+
+ // We will probably need two ORBs in this process. One for the
+ // deployment framework, and one for the actual components.
+}
+
+::Components::ConfigValues *
+CIAO::ComponentServer_Impl::configuration (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ // return a copy of configration values.
+}
+
+::Components::Deployment::ServerActivator_ptr
+CIAO::ComponentServer_Impl::get_server_activator (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+}
+
+::Components::Deployment::Container_ptr
+CIAO::ComponentServer_Impl::create_container (const Components::ConfigValues & config
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CreateFailure,
+ Components::InvalidConfiguration))
+{
+
+}
+
+void
+CIAO::ComponentServer_Impl::remove_container (Components::Deployment::Container_ptr cref
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::RemoveFailure))
+{
+}
+
+::Components::Deployment::Containers *
+CIAO::ComponentServer_Impl::get_containers (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+}
+
+void
+CIAO::ComponentServer_Impl::remove (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::RemoveFailure))
+{
+}
diff --git a/TAO/CIAO/ciao/ComponentServer_Impl.h b/TAO/CIAO/ciao/ComponentServer_Impl.h
new file mode 100644
index 00000000000..b9eee11d448
--- /dev/null
+++ b/TAO/CIAO/ciao/ComponentServer_Impl.h
@@ -0,0 +1,108 @@
+// -*- C++ -*-
+
+//=============================================================================
+/**
+ * @file ComponentServer_Impl.h
+ *
+ * $Id$
+ *
+ * This file contains implementation for the servant of
+ * Components::Deployment::ComponentServer interface.
+ *
+ * @author Nanbor Wang <nanbor@cs.wustl.edu>
+ */
+//=============================================================================
+
+
+#ifndef CIAO_COMPONENTSERVER_IMPL_H
+#define CIAO_COMPONENTSERVER_IMPL_H
+#include "ace/pre.h"
+
+#include "ace/config-all.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "CCM_DeploymentS.h"
+
+namespace CIAO
+{
+ /**
+ * @class ComponentServer_Impl
+ *
+ * @brief Servant implementation for Components::Deployment::ComponentServer
+ *
+ * This class implements the Components::Deployment::ComponentServer
+ * interface as defined by the CCM spcification. As the interface
+ * implies, this is actually part of the deployment interface and is
+ * used to manage the lifecycle of containers running on the server.
+ */
+ class CIAO_SERVER_Export ComponentServer_Impl
+ : public virtual POA_Components::Deployment::ComponentServer,
+ public virtual PortableServer::RefCountServantBase
+ {
+ public:
+ /// Constructor
+ ComponentServer_Impl (CORBA::ORB_ptr o);
+
+ /// Destructor
+ virtual ~ComponentServer_Impl (void);
+
+ /// Get the containing POA. This operation does *not*
+ /// increase the reference count of the POA.
+ virtual PortableServer::POA_ptr _default_POA (void);
+
+ /// Initialize the container with a name.
+ int init (::Components::ConfigValues &options
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ /// Components::Deployment::ComponentServer defined attributes/operations.
+
+ virtual ::Components::ConfigValues *
+ configuration (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual ::Components::Deployment::ServerActivator_ptr
+ get_server_activator (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual ::Components::Deployment::Container_ptr
+ create_container (const Components::ConfigValues & config
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CreateFailure,
+ Components::InvalidConfiguration));
+
+ virtual void remove_container (Components::Deployment::Container_ptr cref
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::RemoveFailure));
+
+ virtual ::Components::Deployment::Containers *
+ get_containers (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual void remove (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::RemoveFailure));
+
+protected:
+ /// Keep a pointer to the managing ORB serving this servant.
+ CORBA::ORB_var orb_;
+
+ /// Keep a pointer to the managing POA.
+ PortableServer::POA_var poa_;
+
+ /// Keep a list of managed Container objects.
+ Object_Set<::Components::Deployment::Container> container_set_;
+ };
+}
+
+#if defined (__ACE_INLINE__)
+# include "ComponentServer_Impl.inl"
+#endif /* __ACE_INLINE__ */
+
+#include "ace/post.h"
+#endif /* CIAO_COMPONENTSERVER_IMPL_H */
diff --git a/TAO/CIAO/ciao/ComponentServer_Impl.inl b/TAO/CIAO/ciao/ComponentServer_Impl.inl
new file mode 100644
index 00000000000..6526247f1f6
--- /dev/null
+++ b/TAO/CIAO/ciao/ComponentServer_Impl.inl
@@ -0,0 +1,8 @@
+/* -*- C++ -*- */
+// $Id$
+
+ACE_INLINE
+CIAO::ComponentServer_Impl::ComponentServer_Impl (CORBA::ORB_ptr o)
+ : orb_ (o)
+{
+}
diff --git a/TAO/CIAO/ciao/Container_Impl.cpp b/TAO/CIAO/ciao/Container_Impl.cpp
new file mode 100644
index 00000000000..93eaab1cf63
--- /dev/null
+++ b/TAO/CIAO/ciao/Container_Impl.cpp
@@ -0,0 +1,84 @@
+// $Id$
+
+#include "Container_Impl.h"
+
+#if !defined (__ACE_INLINE__)
+# include "Container_Impl.inl"
+#endif /* __ACE_INLINE__ */
+
+CIAO::Container_Impl::~Container_Impl ()
+{
+ // @@ remove all home?
+}
+
+PortableServer::POA_ptr
+CIAO::Container_Impl::_default_POA (void)
+{
+ return PortableServer::_duplicate (this->poa_.in ());
+}
+
+int
+CIAO::Container_Impl::init (::Components::ConfigValues &options
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ // @@ Initialize container and create the internal container
+ // implementation that actually interacts with installed
+ // homes/components.
+}
+
+::Components::ConfigValues *
+CIAO::Container_Impl::configuration (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ // return a copy of configration values.
+}
+
+::Components::Deployment::ComponentServer_ptr
+CIAO::Container_Impl::get_component_server (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+}
+
+::Components::CCMHome_ptr
+CIAO::Container_Impl::install_home (const char * id,
+ const char * entrypt,
+ const Components::ConfigValues & config
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::Deployment::UnknownImplId,
+ Components::Deployment::ImplEntryPointNotFound,
+ Components::Deployment::InstallationFailure,
+ Components::InvalidConfiguration))
+{
+ // use id to locate the softpkg from the ComponentInstallation interface.
+ // depending on where we want to parse the softpkg descriptor, we
+ // can either use the <entrypt> directly (if we parse the softpkg in
+ // Assembly), simply verify that is correct, or even discard this
+ // value.
+
+ // It seems to me that the intention of CCM spec is to get
+ // Assembly/AssemblyFactory to parse all the XML files and convert
+ // all the properties files and such into ConfigValues.
+}
+
+void
+CIAO::Container_Impl::remove_home (Components::CCMHome_ptr href
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::RemoveFailure))
+{
+}
+
+::Components::CCMHomes *
+CIAO::Container_Impl::get_homes (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+}
+
+void
+CIAO::Container_Impl::remove (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::RemoveFailure))
+{
+}
diff --git a/TAO/CIAO/ciao/Container_Impl.h b/TAO/CIAO/ciao/Container_Impl.h
new file mode 100644
index 00000000000..d2847ed2387
--- /dev/null
+++ b/TAO/CIAO/ciao/Container_Impl.h
@@ -0,0 +1,113 @@
+// -*- C++ -*-
+
+//=============================================================================
+/**
+ * @file Container_Impl.h
+ *
+ * $Id$
+ *
+ * This file contains implementation for the servant of
+ * Components::Deployment::Container interface.
+ *
+ * @author Nanbor Wang <nanbor@cs.wustl.edu>
+ */
+//=============================================================================
+
+
+#ifndef CIAO_CONTAINER_IMPL_H
+#define CIAO_CONTAINER_IMPL_H
+#include "ace/pre.h"
+
+#include "ace/config-all.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "Container_Base.h"
+#include "Object_Set_T.h"
+
+namespace CIAO
+{
+ /**
+ * @class Container_Impl
+ *
+ * @brief Servant implementation for Components::Deployment::Container
+ *
+ * This class implements the Components::Deployment::Container
+ * interface as defined by the CCM spcification. As the interface
+ * implies, this is actually part of the deployment interface and is
+ * used to manage the lifecycle of the installed components and
+ * homes.
+ */
+ class CIAO_SERVER_Export Container_Impl
+ : public virtual POA_Components::Deployment::Container,
+ public virtual PortableServer::RefCountServantBase
+ {
+ public:
+ /// Constructor
+ Container_Impl (CORBA::ORB_ptr o);
+
+ /// Destructor
+ virtual ~Container_Impl (void);
+
+ /// Get the containing POA. This operation does *not*
+ /// increase the reference count of the POA.
+ virtual PortableServer::POA_ptr _default_POA (void);
+
+ /// Initialize the container with a name.
+ int init (::Components::ConfigValues &options
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ /// Components::Deployment::Container defined attributes/operations.
+
+ virtual ::Components::ConfigValues * configuration (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual ::Components::Deployment::ComponentServer_ptr get_component_server (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual ::Components::CCMHome_ptr install_home (const char * id,
+ const char * entrypt,
+ const Components::ConfigValues & config
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::Deployment::UnknownImplId,
+ Components::Deployment::ImplEntryPointNotFound,
+ Components::Deployment::InstallationFailure,
+ Components::InvalidConfiguration));
+
+ virtual void remove_home (Components::CCMHome_ptr href
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::RemoveFailure));
+
+ virtual ::Components::CCMHomes * get_homes (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual void remove (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::RemoveFailure));
+
+protected:
+ /// Keep a pointer to the managing ORB serving this servant.
+ CORBA::ORB_var orb_;
+
+ /// Keep a pointer to the managing POA.
+ PortableServer::POA_var poa_;
+
+ /// Keep a list of managed CCMHome.
+ Object_Set<::Components::CCMHome> home_set_;
+
+ /// Internal container implementation
+ Container *container_;
+ };
+}
+
+#if defined (__ACE_INLINE__)
+# include "Container_Impl.inl"
+#endif /* __ACE_INLINE__ */
+
+#include "ace/post.h"
+#endif /* CIAO_CONTAINER_IMPL_H */
diff --git a/TAO/CIAO/ciao/Container_Impl.inl b/TAO/CIAO/ciao/Container_Impl.inl
new file mode 100644
index 00000000000..09459a80f7c
--- /dev/null
+++ b/TAO/CIAO/ciao/Container_Impl.inl
@@ -0,0 +1,8 @@
+/* -*- C++ -*- */
+// $Id$
+
+ACE_INLINE
+CIAO::Container_Impl::Container_Impl (CORBA::ORB_ptr o)
+ : orb_ (o)
+{
+}
diff --git a/TAO/CIAO/ciao/Object_Set_T.cpp b/TAO/CIAO/ciao/Object_Set_T.cpp
index f086ca3e6c1..5c3c261cd18 100644
--- a/TAO/CIAO/ciao/Object_Set_T.cpp
+++ b/TAO/CIAO/ciao/Object_Set_T.cpp
@@ -105,4 +105,19 @@ CIAO::Object_Set<COBJ>::copy (CORBA::ULong len,
return len;
}
+
+template <class COBJ> int
+CIAO::Object_Set<COBJ>::object_in_set (COBJ::_ptr_type objref)
+{
+ if (CORBA::_is_nil (objref)) // Don't count nil objref
+ return 0;
+
+ CORBA::ULong i = 0;
+
+ for (; i < this->size_; ++i)
+ if (objref->_is_equivalent (this->buffer_[i])) // _is_equivalent could be unreliable?
+ return -1;
+
+ return 0;
+}
#endif /* CIAO_OBJECT_SET_T_C */
diff --git a/TAO/CIAO/ciao/Object_Set_T.h b/TAO/CIAO/ciao/Object_Set_T.h
index b9c58ec3770..4ddc11a7e67 100644
--- a/TAO/CIAO/ciao/Object_Set_T.h
+++ b/TAO/CIAO/ciao/Object_Set_T.h
@@ -70,6 +70,11 @@ namespace CIAO
CORBA::ULong copy (CORBA::ULong size,
COBJ **buffer);
+ /**
+ * Check if an object is in the set. Return 0 if false.
+ */
+ int object_in_set (COBJ::_ptr_type objref);
+
/// Query the current size the set contains.
CORBA::ULong size (void) const;
diff --git a/TAO/CIAO/ciao/ServerActivator_Impl.cpp b/TAO/CIAO/ciao/ServerActivator_Impl.cpp
new file mode 100644
index 00000000000..a7735bb8afb
--- /dev/null
+++ b/TAO/CIAO/ciao/ServerActivator_Impl.cpp
@@ -0,0 +1,53 @@
+// $Id$
+
+#include "ServerActivator_Impl.h"
+
+#if !defined (__ACE_INLINE__)
+# include "ServerActivator_Impl.inl"
+#endif /* __ACE_INLINE__ */
+
+CIAO::ServerActivator_Impl::~ServerActivator_Impl ()
+{
+ // @@ remove all Containers?
+}
+
+PortableServer::POA_ptr
+CIAO::ServerActivator_Impl::_default_POA (void)
+{
+ return PortableServer::_duplicate (this->poa_.in ());
+}
+
+int
+CIAO::ServerActivator_Impl::init (ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ // @@ Initialize ServerActivator and create the internal container
+ // implementation that actually interacts with installed
+ // homes/components.
+
+ // We will probably need two ORBs in this process. One for the
+ // deployment framework, and one for the actual components.
+}
+
+::Components::Deployment::ComponentServer_ptr
+CIAO::ServerActivator::create_component_server (const Components::ConfigValues & config
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CreateFailure,
+ Components::InvalidConfiguration))
+{
+}
+
+void
+CIAO::ServerActivator::remove_component_server (Components::Deployment::ComponentServer_ptr server
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::RemoveFailure))
+{
+}
+
+::Components::Deployment::ComponentServers *
+CIAO::ServerActivator::get_component_servers (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+}
diff --git a/TAO/CIAO/ciao/ServerActivator_Impl.h b/TAO/CIAO/ciao/ServerActivator_Impl.h
new file mode 100644
index 00000000000..d78acebbbcb
--- /dev/null
+++ b/TAO/CIAO/ciao/ServerActivator_Impl.h
@@ -0,0 +1,94 @@
+// -*- C++ -*-
+
+//=============================================================================
+/**
+ * @file ServerActivator_Impl.h
+ *
+ * $Id$
+ *
+ * This file contains implementation for the servant of
+ * Components::Deployment::ServerActivator interface.
+ *
+ * @author Nanbor Wang <nanbor@cs.wustl.edu>
+ */
+//=============================================================================
+
+
+#ifndef CIAO_SERVERACTIVATOR_IMPL_H
+#define CIAO_SERVERACTIVATOR_IMPL_H
+#include "ace/pre.h"
+
+#include "ace/config-all.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "CCM_DeploymentS.h"
+
+namespace CIAO
+{
+ /**
+ * @class ServerActivator_Impl
+ *
+ * @brief Servant implementation for Components::Deployment::ServerActivator
+ *
+ * This class implements the Components::Deployment::ServerActivator
+ * interface as defined by the CCM spcification. As the interface
+ * implies, this is actually part of the deployment interface and is
+ * used to manage the lifecycle of containers running on the server.
+ */
+ class CIAO_SERVER_Export ServerActivator_Impl
+ : public virtual POA_Components::Deployment::ServerActivator,
+ public virtual PortableServer::RefCountServantBase
+ {
+ public:
+ /// Constructor
+ ServerActivator_Impl (CORBA::ORB_ptr o);
+
+ /// Destructor
+ virtual ~ServerActivator_Impl (void);
+
+ /// Get the containing POA. This operation does *not*
+ /// increase the reference count of the POA.
+ virtual PortableServer::POA_ptr _default_POA (void);
+
+ /// Initialize the ServerActivator.
+ int init (ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ /// Components::Deployment::ServerActivator defined attributes/operations.
+
+ virtual ::Components::Deployment::ComponentServer_ptr
+ create_component_server (const Components::ConfigValues & config
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CreateFailure,
+ Components::InvalidConfiguration));
+ virtual void remove_component_server (Components::Deployment::ComponentServer_ptr server
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::RemoveFailure));
+
+ virtual ::Components::Deployment::ComponentServers *
+ get_component_servers (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ protected:
+ /// Keep a pointer to the managing ORB serving this servant.
+ CORBA::ORB_var orb_;
+
+ /// Keep a pointer to the managing POA.
+ PortableServer::POA_var poa_;
+
+ /// Keep a list of managed ComponentServer objects.
+ Object_Set<::Components::Deployment::ComponentServer> cs_set_;
+ };
+}
+
+#if defined (__ACE_INLINE__)
+# include "ServerActivator_Impl.inl"
+#endif /* __ACE_INLINE__ */
+
+#include "ace/post.h"
+#endif /* CIAO_SERVERACTIVATOR_IMPL_H */
diff --git a/TAO/CIAO/ciao/ServerActivator_Impl.inl b/TAO/CIAO/ciao/ServerActivator_Impl.inl
new file mode 100644
index 00000000000..585ba5b45c3
--- /dev/null
+++ b/TAO/CIAO/ciao/ServerActivator_Impl.inl
@@ -0,0 +1,8 @@
+/* -*- C++ -*- */
+// $Id$
+
+ACE_INLINE
+CIAO::ServerActivator_Impl::ServerActivator_Impl (CORBA::ORB_ptr o)
+ : orb_ (o)
+{
+}
diff --git a/TAO/CIAO/tools/Assembly_Deployer/Assembly_Impl.cpp b/TAO/CIAO/tools/Assembly_Deployer/Assembly_Impl.cpp
new file mode 100644
index 00000000000..9510c40fb5b
--- /dev/null
+++ b/TAO/CIAO/tools/Assembly_Deployer/Assembly_Impl.cpp
@@ -0,0 +1,99 @@
+// $Id$
+
+#include "Assembly_Impl.h"
+
+#if !defined (__ACE_INLINE__)
+# include "Assembly_Impl.inl"
+#endif /* __ACE_INLINE__ */
+
+CIAO::AssemblyFactory_Impl::~AssemblyFactory_Impl ()
+{
+ // @@ remove all Containers?
+}
+
+PortableServer::POA_ptr
+CIAO::AssemblyFactory_Impl::_default_POA (void)
+{
+ return PortableServer::_duplicate (this->poa_.in ());
+}
+
+int
+CIAO::AssemblyFactory_Impl::init (ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ // @@ Initialize AssemblyFactory and create the internal container
+ // implementation that actually interacts with installed
+ // homes/components.
+
+ // We will probably need two ORBs in this process. One for the
+ // deployment framework, and one for the actual components.
+}
+
+::Components::Cookie *
+CIAO::AssemblyFactory::create (const char * assembly_loc
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::Deployment::InvalidLocation,
+ Components::CreateFailure))
+{
+}
+
+::Components::Deployment::Assembly_ptr
+CIAO::AssemblyFactory::lookup (Components::Cookie * c
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::Deployment::InvalidAssembly))
+{
+}
+
+void
+CIAO::AssemblyFactory::destroy (Components::Cookie * c
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::Deployment::InvalidAssembly,
+ Components::RemoveFailure))
+{
+}
+
+
+CIAO::Assembly_Impl::~Assembly_Impl ()
+{
+ // @@ remove all Containers?
+}
+
+PortableServer::POA_ptr
+CIAO::Assembly_Impl::_default_POA (void)
+{
+ return PortableServer::_duplicate (this->poa_.in ());
+}
+
+int
+CIAO::Assembly_Impl::init (ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ // @@ Initialize Assembly and create the internal container
+ // implementation that actually interacts with installed
+ // homes/components.
+
+ // We will probably need two ORBs in this process. One for the
+ // deployment framework, and one for the actual components.
+}
+
+void
+CIAO::Assembly_Impl::build (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+}
+
+void
+CIAO::Assembly_Impl::tear_down (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::RemoveFailure))
+{
+}
+
+::Components::Deployment::AssemblyState
+CIAO::Assembly_Impl::get_state (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+}
diff --git a/TAO/CIAO/tools/Assembly_Deployer/Assembly_Impl.h b/TAO/CIAO/tools/Assembly_Deployer/Assembly_Impl.h
new file mode 100644
index 00000000000..78f89b77744
--- /dev/null
+++ b/TAO/CIAO/tools/Assembly_Deployer/Assembly_Impl.h
@@ -0,0 +1,146 @@
+// -*- C++ -*-
+
+//=============================================================================
+/**
+ * @file Assembly_Impl.h
+ *
+ * $Id$
+ *
+ * This file contains implementations for
+ * Components::Deployment::AssemblyFactory and
+ * Components::Deployment::Assembly interface.
+ *
+ * @author Nanbor Wang <nanbor@cs.wustl.edu>
+ */
+//=============================================================================
+
+
+#ifndef CIAO_SERVERACTIVATOR_IMPL_H
+#define CIAO_SERVERACTIVATOR_IMPL_H
+#include "ace/pre.h"
+
+#include "ace/config-all.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "CCM_DeploymentS.h"
+
+namespace CIAO
+{
+ /**
+ * @class AssemblyFactory_Impl
+ *
+ * @brief Servant implementation for Components::Deployment::AssemblyFactory
+ *
+ * This class implements the Components::Deployment::AssemblyFactory
+ * interface as defined by the CCM spcification. As the interface
+ * implies, this is actually part of the deployment interface and is
+ * used to manage the lifecycle of containers running on the server.
+ */
+ class CIAO_SERVER_Export AssemblyFactory_Impl
+ : public virtual POA_Components::Deployment::AssemblyFactory,
+ public virtual PortableServer::RefCountServantBase
+ {
+ public:
+ /// Constructor
+ AssemblyFactory_Impl (CORBA::ORB_ptr o);
+
+ /// Destructor
+ virtual ~AssemblyFactory_Impl (void);
+
+ /// Get the containing POA. This operation does *not*
+ /// increase the reference count of the POA.
+ virtual PortableServer::POA_ptr _default_POA (void);
+
+ /// Initialize the AssemblyFactory.
+ int init (ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ /// Components::Deployment::Assembly defined attributes/operations.
+ virtual ::Components::Cookie * create (const char * assembly_loc
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::Deployment::InvalidLocation,
+ Components::CreateFailure));
+
+ virtual ::Components::Deployment::Assembly_ptr lookup (Components::Cookie * c
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::Deployment::InvalidAssembly));
+
+ virtual void destroy (Components::Cookie * c
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::Deployment::InvalidAssembly,
+ Components::RemoveFailure));
+
+ protected:
+ /// Keep a pointer to the managing ORB serving this servant.
+ CORBA::ORB_var orb_;
+
+ /// Keep a pointer to the managing POA.
+ PortableServer::POA_var poa_;
+
+ /// Keep a list of managed Assembly objects.
+ CIAO::Active_Objref_Map assembly_map_;
+ };
+
+ /**
+ * @class Assembly_Impl
+ *
+ * @brief Servant implementation for Components::Deployment::Assembly
+ *
+ * This class implements the Components::Deployment::Assembly
+ * interface as defined by the CCM spcification. As the interface
+ * implies, this is actually part of the deployment interface and is
+ * used to manage the lifecycle of containers running on the server.
+ */
+ class CIAO_SERVER_Export Assembly_Impl
+ : public virtual POA_Components::Deployment::Assembly,
+ public virtual PortableServer::RefCountServantBase
+ {
+ public:
+ /// Constructor
+ Assembly_Impl (CORBA::ORB_ptr o);
+
+ /// Destructor
+ virtual ~Assembly_Impl (void);
+
+ /// Get the containing POA. This operation does *not*
+ /// increase the reference count of the POA.
+ virtual PortableServer::POA_ptr _default_POA (void);
+
+ /// Initialize the Assembly.
+ int init (ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ /// Components::Deployment::Assembly defined attributes/operations.
+
+ virtual void build (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual void tear_down (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::RemoveFailure));
+
+ virtual ::Components::Deployment::AssemblyState
+ get_state (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ protected:
+ /// Keep a pointer to the managing ORB serving this servant.
+ CORBA::ORB_var orb_;
+
+ /// Keep a pointer to the managing POA.
+ PortableServer::POA_var poa_;
+ };
+}
+
+#if defined (__ACE_INLINE__)
+# include "Assembly_Impl.inl"
+#endif /* __ACE_INLINE__ */
+
+#include "ace/post.h"
+#endif /* CIAO_SERVERACTIVATOR_IMPL_H */
diff --git a/TAO/CIAO/tools/Assembly_Deployer/Assembly_Impl.inl b/TAO/CIAO/tools/Assembly_Deployer/Assembly_Impl.inl
new file mode 100644
index 00000000000..be9009d84b8
--- /dev/null
+++ b/TAO/CIAO/tools/Assembly_Deployer/Assembly_Impl.inl
@@ -0,0 +1,14 @@
+/* -*- C++ -*- */
+// $Id$
+
+ACE_INLINE
+CIAO::AssemblyFactory_Impl::AssemblyFactory_Impl (CORBA::ORB_ptr o)
+ : orb_ (o)
+{
+}
+
+ACE_INLINE
+CIAO::Assembly_Impl::Assembly_Impl (CORBA::ORB_ptr o)
+ : orb_ (o)
+{
+}