summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-04-05 04:35:08 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-04-05 04:35:08 +0000
commit90ff34dcc66bada7b8ce47c937be693697d0279b (patch)
treed45204c04e92e64ea5f639f16813fa858afca609
parent09e0571acdf0b862e3ec2f40c9f7d3c64ff3b36f (diff)
downloadATCD-90ff34dcc66bada7b8ce47c937be693697d0279b.tar.gz
*** empty log message ***
-rw-r--r--TAO/CIAO/examples/handcrafted/Display/HUDisplay.cad3
-rw-r--r--TAO/CIAO/examples/handcrafted/Display/descriptors/HUDisplay.cad76
-rw-r--r--TAO/CIAO/examples/handcrafted/Display/descriptors/NOTE.txt27
-rw-r--r--TAO/CIAO/examples/handcrafted/Display/descriptors/test.dat1
-rw-r--r--TAO/CIAO/tools/Assembly_Deployer/Assembly_Impl.cpp36
-rw-r--r--TAO/CIAO/tools/Assembly_Deployer/Assembly_Visitors.h48
-rw-r--r--TAO/CIAO/tools/Assembly_Deployer/Assembly_Visitors.inl2
-rw-r--r--TAO/CIAO/tools/XML_Helpers/Assembly_Spec.h6
-rw-r--r--TAO/CIAO/tools/XML_Helpers/Assembly_Spec.inl2
9 files changed, 182 insertions, 19 deletions
diff --git a/TAO/CIAO/examples/handcrafted/Display/HUDisplay.cad b/TAO/CIAO/examples/handcrafted/Display/HUDisplay.cad
index 20da8103e62..47609e5ac4e 100644
--- a/TAO/CIAO/examples/handcrafted/Display/HUDisplay.cad
+++ b/TAO/CIAO/examples/handcrafted/Display/HUDisplay.cad
@@ -19,7 +19,6 @@
<partitioning>
<!-- A plain vanilla partition. We don't even need the processcollocation tag here. -->
- <processcollocation>
<homeplacement id="a_RateGenHome">
<componentfileref idref="com-RateGen"/>
<componentinstantiation id="a_RateGen"/>
@@ -34,7 +33,7 @@
<componentfileref idref="com-NavDisplay"/>
<componentinstantiation id="a_NavDisplay"/>
</homeplacement>
- </processcollocation>
+
</partitioning>
<connections>
diff --git a/TAO/CIAO/examples/handcrafted/Display/descriptors/HUDisplay.cad b/TAO/CIAO/examples/handcrafted/Display/descriptors/HUDisplay.cad
new file mode 100644
index 00000000000..e9d087d75ba
--- /dev/null
+++ b/TAO/CIAO/examples/handcrafted/Display/descriptors/HUDisplay.cad
@@ -0,0 +1,76 @@
+<?xml version="1.0"?> <!-- -*- SGML -*- -->
+
+<!-- XML doesn't really support the following $(CIAO_ROOT) syntax :) -->
+<!DOCTYPE componentassembly SYSTEM "$(CIAO_ROOT)/docs/XML/componentassembly.dtd">
+
+<componentassembly id="Single-process HUDisplay assembly">
+ <componentfiles>
+ <componentfile id="com-RateGen">
+ <fileinarchive name="RateGen.csd"/>
+ </componentfile>
+ <componentfile id="com-GPS">
+ <fileinarchive name="GPS.csd"/>
+ </componentfile>
+ <componentfile id="com-NavDisplay">
+ <fileinarchive name="NavDisplay.csd"/>
+ </componentfile>
+ </componentfiles>
+
+ <partitioning>
+
+ <!-- A plain vanilla partition. We don't even need the processcollocation tag here. -->
+ <homeplacement id="a_RateGenHome">
+ <componentfileref idref="com-RateGen"/>
+ <componentinstantiation id="a_RateGen"/>
+ </homeplacement>
+
+ <homeplacement id="a_GPSHome">
+ <componentfileref idref="com-GPS"/>
+ <componentinstantiation id="a_GPS"/>
+ </homeplacement>
+
+ <homeplacement id="a_NavDisplayHome">
+ <componentfileref idref="com-NavDisplay"/>
+ <componentinstantiation id="a_NavDisplay"/>
+ </homeplacement>
+
+ </partitioning>
+
+ <connections>
+
+ <connectevent>
+ <consumesport>
+ <consumesidentifier>Refresh</consumesidentifier>
+ <componentinstantiationref idref="a_GPS"/>
+ </consumesport>
+ <publishesport>
+ <publishesidentifier>Pulse</publishesidentifier>
+ <componentinstantiationref idref="a_RateGen"/>
+ </publishesport>
+ </connectevent>
+
+ <connectevent>
+ <consumesport>
+ <consumesidentifier>Refresh</consumesidentifier>
+ <componentinstantiationref idref="a_NavDisplay"/>
+ </consumesport>
+ <publishesport>
+ <publishesidentifier>Ready</publishesidentifier>
+ <componentinstantiationref idref="a_GPS"/>
+ </publishesport>
+ </connectevent>
+
+ <connectinterface>
+ <usesport>
+ <usesidentifier>GPSLocation</usesidentifier>
+ <componentinstantiationref idref="a_NavDisplay"/>
+ </usesport>
+ <providesport>
+ <providesidentifier>MyLocation</providesidentifier>
+ <componentinstantiationref idref="a_GPS"/>
+ </providesport>
+ </connectinterface>
+
+ </connections>
+
+</componentassembly> \ No newline at end of file
diff --git a/TAO/CIAO/examples/handcrafted/Display/descriptors/NOTE.txt b/TAO/CIAO/examples/handcrafted/Display/descriptors/NOTE.txt
new file mode 100644
index 00000000000..719e56a24df
--- /dev/null
+++ b/TAO/CIAO/examples/handcrafted/Display/descriptors/NOTE.txt
@@ -0,0 +1,27 @@
+Step1:
+======
+
+W:\ACE_wrappers\TAO\CIAO\tools\Daemon\CIAO_Daemon -ORBEndpoint iiop://localhost:10000 -n ../../../../tools/ComponentServer/ComponentServer
+
+
+CIAO-Daemon IOR: corbaloc:iiop:1.2@localhost:10000/\14\01\0f\00RST]L\8e>\ae\cb\0
+c\00\00\00\00\00\01\00\00\00\01\00\00\00
+CIAO_Daemon is running...
+CIAO::ServerActivator_Impl::create_component_server
+ComponentServer IOR: IOR:010000003600000049444c3a6f6d672e6f72672f436f6d706f6e656
+e74732f4465706c6f796d656e742f436f6d706f6e656e745365727665723a312e300000000100000
+00000000060000000010102cd050000004349414f00cdc2051b00000014010f00525354644c8e3ec
+b070100000000000100000001000000cd02000000000000000800000001cdcdcd004f41540100000
+01400000001cdcdcd01000100000000000901010000000000
+Running ComponentServer...
+
+
+Step2:
+======
+
+W:\ACE_wrappers\TAO\CIAO\tools\Assembly_Deployer\Assembly_Manager -o ior -c test.dat
+
+Step3:
+======
+
+W:\ACE_wrappers\TAO\CIAO\tools\Assembly_Deployer\Assembly_Deployer -k file://ior -a HUDisplay.cad \ No newline at end of file
diff --git a/TAO/CIAO/examples/handcrafted/Display/descriptors/test.dat b/TAO/CIAO/examples/handcrafted/Display/descriptors/test.dat
new file mode 100644
index 00000000000..be142640322
--- /dev/null
+++ b/TAO/CIAO/examples/handcrafted/Display/descriptors/test.dat
@@ -0,0 +1 @@
+Default corbaloc:iiop:localhost:10000/ServerActivator
diff --git a/TAO/CIAO/tools/Assembly_Deployer/Assembly_Impl.cpp b/TAO/CIAO/tools/Assembly_Deployer/Assembly_Impl.cpp
index ce3550ebb97..08a350cd3d2 100644
--- a/TAO/CIAO/tools/Assembly_Deployer/Assembly_Impl.cpp
+++ b/TAO/CIAO/tools/Assembly_Deployer/Assembly_Impl.cpp
@@ -141,7 +141,7 @@ CIAO::AssemblyFactory_Impl::destroy (Components::Cookie * c
this->poa_->deactivate_object (oid
ACE_ENV_ARG_PARAMETER);
- this->orb_->shutdown ();
+ this->orb_->shutdown (0);
}
@@ -191,6 +191,7 @@ CIAO::Assembly_Impl::build (ACE_ENV_SINGLE_ARG_DECL)
CIAO::Assembly_Builder_Visitor builder (this->orb_.in (),
this->assembly_context_,
+ this->assembly_spec_->componentfiles_,
this->deployment_config_);
int build_result = this->assembly_spec_->partitioning_.accept (builder);
@@ -213,6 +214,39 @@ CIAO::Assembly_Impl::tear_down (ACE_ENV_SINGLE_ARG_DECL)
return; // Nothing to do here.
// @@ At least we should remove home and kill the component server.
+ // Remove all components:
+ {
+ CIAO::Assembly_Context::COMP_MAP::ITERATOR
+ iter (this->assembly_context_.instantiated_components_);
+
+ while (!iter.done ())
+ {
+ CIAO::Assembly_Context::COMP_MAP::ENTRY *entry;
+ iter.next (entry);
+
+ entry->int_id_->remove (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ iter.advance ();
+ }
+ }
+
+ // Remove all server
+ {
+ CIAO::Assembly_Context::SERVER_QUEUE::ITERATOR
+ iter (this->assembly_context_.component_servers_);
+
+ while (!iter.done ())
+ {
+ Components::Deployment::ComponentServer_var *entry;
+ iter.next (entry);
+
+ (*entry)->remove (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ iter.advance ();
+ }
+ }
this->state_ = ::Components::Deployment::INACTIVE;
}
diff --git a/TAO/CIAO/tools/Assembly_Deployer/Assembly_Visitors.h b/TAO/CIAO/tools/Assembly_Deployer/Assembly_Visitors.h
index 1f2fdd09378..add69e46c09 100644
--- a/TAO/CIAO/tools/Assembly_Deployer/Assembly_Visitors.h
+++ b/TAO/CIAO/tools/Assembly_Deployer/Assembly_Visitors.h
@@ -38,17 +38,22 @@ namespace CIAO
*/
typedef struct _assembly_context
{
- ACE_Hash_Map_Manager_Ex<ACE_CString,
- Components::CCMHome_var,
- ACE_Hash<ACE_CString>,
- ACE_Equal_To<ACE_CString>,
- ACE_Null_Mutex> installed_homes_;
-
- ACE_Hash_Map_Manager_Ex<ACE_CString,
- Components::CCMObject_var,
- ACE_Hash<ACE_CString>,
- ACE_Equal_To<ACE_CString>,
- ACE_Null_Mutex> instantiated_components_;
+ typedef ACE_Hash_Map_Manager_Ex<ACE_CString,
+ Components::CCMHome_var,
+ ACE_Hash<ACE_CString>,
+ ACE_Equal_To<ACE_CString>,
+ ACE_Null_Mutex> HOME_MAP;
+ HOME_MAP installed_homes_;
+
+ typedef ACE_Hash_Map_Manager_Ex<ACE_CString,
+ Components::CCMObject_var,
+ ACE_Hash<ACE_CString>,
+ ACE_Equal_To<ACE_CString>,
+ ACE_Null_Mutex> COMP_MAP;
+ COMP_MAP instantiated_components_;
+
+ typedef ACE_Unbounded_Queue<Components::Deployment::ComponentServer_var> SERVER_QUEUE;
+ SERVER_QUEUE component_servers_;
} Assembly_Context;
/**
@@ -63,6 +68,7 @@ namespace CIAO
/// Constructor
Assembly_Builder_Visitor (CORBA::ORB_ptr o,
Assembly_Context &context,
+ CIAO::ID_IMPL_MAP &idmap,
Deployment_Configuration &config);
/// Destructor
@@ -78,13 +84,33 @@ namespace CIAO
virtual int visit_componentinstantiation (Assembly_Placement::componentinstantiation *ci);
+ Components::Deployment::Container_ptr
+ get_current_container (void);
+
protected:
+ /// Current Component Server.
+ Components::Deployment::ComponentServer_var compserv_;
+
+ /// Current Container. (This shouldn't be necessary because the
+ /// component server supposedly should be able to figure out if a
+ /// component home can be installed in the same container based on
+ /// its configvalue. However, our component server don't do that
+ /// yet, so we just install all home in a process into one single
+ /// container.)
+ Components::Deployment::Container_var container_;
+
+ /// Current Component Home.
+ Components::CCMHome_var home_;
+
/// Keep a pointer to the managing ORB serving this servant.
CORBA::ORB_var orb_;
/// Context to build on.
Assembly_Context &context_;
+ /// Context to build on.
+ CIAO::ID_IMPL_MAP &impl_idref_map_;
+
/// Deployment Configuration Info.
Deployment_Configuration &deployment_config_;
};
diff --git a/TAO/CIAO/tools/Assembly_Deployer/Assembly_Visitors.inl b/TAO/CIAO/tools/Assembly_Deployer/Assembly_Visitors.inl
index 971f2e3197d..c825d29a509 100644
--- a/TAO/CIAO/tools/Assembly_Deployer/Assembly_Visitors.inl
+++ b/TAO/CIAO/tools/Assembly_Deployer/Assembly_Visitors.inl
@@ -2,9 +2,11 @@
CIAO::Assembly_Builder_Visitor::Assembly_Builder_Visitor (CORBA::ORB_ptr o,
Assembly_Context &context,
+ CIAO::ID_IMPL_MAP &idmap,
Deployment_Configuration &config)
: orb_ (CORBA::ORB::_duplicate (o)),
context_ (context),
+ impl_idref_map_ (idmap),
deployment_config_ (config)
{
}
diff --git a/TAO/CIAO/tools/XML_Helpers/Assembly_Spec.h b/TAO/CIAO/tools/XML_Helpers/Assembly_Spec.h
index 4690406eaeb..545403cf62d 100644
--- a/TAO/CIAO/tools/XML_Helpers/Assembly_Spec.h
+++ b/TAO/CIAO/tools/XML_Helpers/Assembly_Spec.h
@@ -359,11 +359,7 @@ namespace CIAO
_ASpec ();
/// ID to implementation map.
- ACE_Hash_Map_Manager_Ex<ACE_CString,
- ACE_CString,
- ACE_Hash<ACE_CString>,
- ACE_Equal_To<ACE_CString>,
- ACE_Null_Mutex> componentfiles_;
+ ID_IMPL_MAP componentfiles_;
/// Partitioning data
Assembly_Placement::Container partitioning_;
diff --git a/TAO/CIAO/tools/XML_Helpers/Assembly_Spec.inl b/TAO/CIAO/tools/XML_Helpers/Assembly_Spec.inl
index 2d5d8dac3cf..fcebcc9914e 100644
--- a/TAO/CIAO/tools/XML_Helpers/Assembly_Spec.inl
+++ b/TAO/CIAO/tools/XML_Helpers/Assembly_Spec.inl
@@ -47,6 +47,8 @@ CIAO::Assembly_Placement::Container::destination (const char *des)
ACE_INLINE const char *
CIAO::Assembly_Placement::Container::destination (void) const
{
+ if (this->destination_.length == 0)
+ return 0;
return this->destination_.c_str ();
}