diff options
author | William R. Otte <wotte@dre.vanderbilt.edu> | 2009-02-11 14:59:08 +0000 |
---|---|---|
committer | William R. Otte <wotte@dre.vanderbilt.edu> | 2009-02-11 14:59:08 +0000 |
commit | 1d548515ebcc0fecee1bc83c1a46505f07757170 (patch) | |
tree | 94c4f1e2792532189cf0f536ab4c3d4ea608f21c /CIAO/DAnCE/tests | |
parent | 500fdb3bc07404d9b62f72a84d69f510108168df (diff) | |
download | ATCD-1d548515ebcc0fecee1bc83c1a46505f07757170.tar.gz |
ChangeLogTag: Wed Feb 11 14:46:15 UTC 2009 William R. Otte <wotte@dre.vanderbilt.edu>
Diffstat (limited to 'CIAO/DAnCE/tests')
154 files changed, 16693 insertions, 1522 deletions
diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute.cidl b/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute.cidl new file mode 100644 index 00000000000..fe2ff8f2859 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute.cidl @@ -0,0 +1,11 @@ +// $Id$ +#include "SimpleAttribute.idl" + +composition session SimpleAttribute_Impl +{ + home executor SimpleAttributeHome_Exec + { + implements Simple::SimpleAttributeHome; + manages SimpleAttribute_Exec; + }; +}; diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute.idl b/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute.idl new file mode 100644 index 00000000000..7d41978b4de --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute.idl @@ -0,0 +1,25 @@ +// $Id$ + +#ifndef SIMPLE_ATTRIBUTE_IDL +#define SIMPLE_ATTRIBUTE_IDL + +#include "Components.idl" + +module Simple +{ + component SimpleAttribute + { + attribute string str_attr; + attribute long long_attr; + attribute short short_attr; + }; + + home SimpleAttributeHome manages SimpleAttribute + { + attribute string str_attr; + attribute long long_attr; + attribute short short_attr; + }; +}; + +#endif /*SIMPLE_ATTRIBUTE_IDL*/ diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute.mpc b/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute.mpc new file mode 100644 index 00000000000..6f552eaee25 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute.mpc @@ -0,0 +1,119 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl SimpleAttribute" + +project(SimpleAttribute_idl_gen) : taoidldefaults, anytypecode { + avoids += ace_for_tao + custom_only = 1 + idlflags += -Wb,stub_export_macro=SIMPLEATTRIBUTE_STUB_Export \ + -Wb,stub_export_include=SimpleAttribute_stub_export.h \ + -Wb,skel_export_macro=SIMPLEATTRIBUTE_SVNT_Export \ + -Wb,skel_export_include=SimpleAttribute_svnt_export.h + + IDL_Files { + SimpleAttribute.idl + } +} + +project(SimpleAttribute_cidl_gen) : ciaocidldefaults, taoidldefaults { + avoids += ace_for_tao + custom_only = 1 + cidlflags += --svnt-export-macro SIMPLEATTRIBUTE_SVNT_Export \ + --svnt-export-include SimpleAttribute_svnt_export.h + idlflags += -Wb,export_macro=SIMPLEATTRIBUTE_EXEC_Export \ + -Wb,export_include=SimpleAttribute_exec_export.h \ + -SS + + CIDL_Files { + SimpleAttribute.cidl + } + + IDL_Files { + SimpleAttributeE.idl + } +} + +project(SimpleAttribute_stub) : ccm_stub { + avoids += ace_for_tao + after += SimpleAttribute_idl_gen + libs += + + sharedname = SimpleAttribute_stub + dynamicflags = SIMPLEATTRIBUTE_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimpleAttributeC.cpp + } + + Header_Files { + SimpleAttributeC.h + SimpleAttribute_stub_export.h + } + + Inline_Files { + SimpleAttributeC.inl + } +} + +project(SimpleAttribute_exec) : ciao_executor { + avoids += ace_for_tao + after += SimpleAttribute_cidl_gen SimpleAttribute_stub + sharedname = SimpleAttribute_exec + libs += SimpleAttribute_stub + + dynamicflags = SIMPLEATTRIBUTE_EXEC_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimpleAttributeEC.cpp + SimpleAttribute_exec.cpp + } + + Header_Files { + SimpleAttributeEC.h + SimpleAttribute_exec.h + SimpleAttribute_exec_export.h + } + + Inline_Files { + SimpleAttributeEC.inl + } +} + + +project(SimpleAttribute_svnt) : ciao_servant { + avoids += ace_for_tao + after += SimpleAttribute_exec + sharedname = SimpleAttribute_svnt + libs += SimpleAttribute_exec \ + SimpleAttribute_stub + + dynamicflags = SIMPLEATTRIBUTE_SVNT_BUILD_DLL + + CIDL_Files { + } + + IDL_Files { + } + + Source_Files { + SimpleAttributeS.cpp + SimpleAttribute_svnt.cpp + } + + Header_Files { + SimpleAttributeS.h + SimpleAttribute_svnt.h + SimpleAttribute_svnt_export.h + } + + Inline_Files { + SimpleAttributeS.inl + } +} + + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute_exec.cpp b/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute_exec.cpp new file mode 100644 index 00000000000..675e7dcc386 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute_exec.cpp @@ -0,0 +1,259 @@ +// $Id$ +// +// **** Code generated by the **** +// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** +// CIAO has been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// CIDL Compiler has been developed by: +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about CIAO is available at: +// http://www.dre.vanderbilt.edu/CIAO + +#include "SimpleAttribute_exec.h" +#include "ciao/CIAO_common.h" + +namespace CIDL_SimpleAttribute_Impl +{ + //================================================================== + // Component Executor Implementation Class: SimpleAttribute_exec_i + //================================================================== + + SimpleAttribute_exec_i::SimpleAttribute_exec_i (void) + : str_ (""), + long_(-1), + short_(-1) + { + } + + SimpleAttribute_exec_i::~SimpleAttribute_exec_i (void) + { + } + + // Supported or inherited operations. + + // Attribute operations. + + char * + SimpleAttribute_exec_i::str_attr () + { + // Your code here. + return CORBA::string_dup (str_.c_str ()); + } + + void + SimpleAttribute_exec_i::str_attr (const char * str) + { + CIAO_TRACE ("SimpleAttribute_exec_i::str_attr"); + // Your code here. + this->str_ = str; + } + + ::CORBA::Long + SimpleAttribute_exec_i::long_attr () + { + CIAO_TRACE ("SimpleAttribute_exec_i::long_attr"); + // Your code here. + return long_; + } + + void + SimpleAttribute_exec_i::long_attr (::CORBA::Long long_attr ) + { + CIAO_TRACE ("SimpleAttribute_exec_i::long_attr"); + // Your code here. + this->long_ = long_attr; + } + + ::CORBA::Short + SimpleAttribute_exec_i::short_attr () + { + // Your code here. + return short_; + } + + void + SimpleAttribute_exec_i::short_attr (::CORBA::Short short_attr ) + { + CIAO_TRACE ("SimpleAttribute_exec_i::short_attr"); + // Your code here. + this->short_ = short_attr; + } + + // Port operations. + + // Operations from Components::SessionComponent + + void + SimpleAttribute_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx) + { + this->context_ = + ::Simple::CCM_SimpleAttribute_Context::_narrow (ctx); + + if (CORBA::is_nil (this->context_.in ())) + { + throw ::CORBA::INTERNAL (); + } + } + + void + SimpleAttribute_exec_i::configuration_complete () + { + // Your code here. + } + + void + SimpleAttribute_exec_i::ccm_activate () + { + // Your code here. + if (this->str_ == "" || + this->long_ == -1 || + this->short_ == -1) + { + CIAO_ERROR ((LM_ERROR, "SimpleAttribute_exec_i::ccm_activate - " + "Error: Attribute values didin't initialize correctly!\n")); + } + else + { + CIAO_DEBUG ((LM_EMERGENCY, "SimpleAttribute_exec_i::ccm_activate - " + "Test passed! String attribute is %s\n", + this->str_.c_str ())); + } + + } + + void + SimpleAttribute_exec_i::ccm_passivate () + { + // Your code here. + } + + void + SimpleAttribute_exec_i::ccm_remove () + { + // Your code here. + } + + //================================================================== + // Home Executor Implementation Class: SimpleAttributeHome_exec_i + //================================================================== + + SimpleAttributeHome_exec_i::SimpleAttributeHome_exec_i (void) + : str_ (""), + long_(-1), + short_(-1) + { + } + + SimpleAttributeHome_exec_i::~SimpleAttributeHome_exec_i (void) + { + } + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + + char * + SimpleAttributeHome_exec_i::str_attr () + { + // Your code here. + return CORBA::string_dup (str_.c_str ()); + } + + void + SimpleAttributeHome_exec_i::str_attr (const char * str) + { + CIAO_TRACE ("SimpleAttributeHome_exec_i::str_attr"); + // Your code here. + this->str_ = str; + } + + ::CORBA::Long + SimpleAttributeHome_exec_i::long_attr () + { + CIAO_TRACE ("SimpleAttributeHome_exec_i::long_attr"); + // Your code here. + return long_; + } + + void + SimpleAttributeHome_exec_i::long_attr (::CORBA::Long long_attr ) + { + CIAO_TRACE ("SimpleAttributeHome_exec_i::long_attr"); + // Your code here. + this->long_ = long_attr; + } + + ::CORBA::Short + SimpleAttributeHome_exec_i::short_attr () + { + // Your code here. + return short_; + } + + void + SimpleAttributeHome_exec_i::short_attr (::CORBA::Short short_attr ) + { + CIAO_TRACE ("SimpleAttributeHome_exec_i::short_attr"); + // Your code here. + this->short_ = short_attr; + } + + // Implicit operations. + + ::Components::EnterpriseComponent_ptr + SimpleAttributeHome_exec_i::create () + { + if (this->str_ == "" || + this->long_ == -1 || + this->short_ == -1) + { + CIAO_ERROR ((LM_ERROR, "SimpleAttribute_exec_i::ccm_activate - " + "Error: Attribute values didin't initialize correctly!\n")); + } + else + { + CIAO_DEBUG ((LM_EMERGENCY, "SimpleAttributeHome_exec_i::create - " + "Test passed! String attribute is %s\n", + this->str_.c_str ())); + } + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_THROW_EX ( + retval, + SimpleAttribute_exec_i, + ::CORBA::NO_MEMORY ()); + + return retval; + } + + extern "C" SIMPLEATTRIBUTE_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Simple_SimpleAttributeHome_Impl (void) + { + ::Components::HomeExecutorBase_ptr retval = + ::Components::HomeExecutorBase::_nil (); + + ACE_NEW_RETURN ( + retval, + SimpleAttributeHome_exec_i, + ::Components::HomeExecutorBase::_nil ()); + + return retval; + } +} + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute_exec.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute_exec.h new file mode 100644 index 00000000000..2913eeb8d07 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute_exec.h @@ -0,0 +1,141 @@ +// $Id$ +// +// **** Code generated by the **** +// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** +// CIAO has been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// CIDL Compiler has been developed by: +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about CIAO is available at: +// http://www.dre.vanderbilt.edu/CIAO + +#ifndef CIAO_SIMPLEATTRIBUTE_EXEC_H +#define CIAO_SIMPLEATTRIBUTE_EXEC_H + +#include /**/ "ace/pre.h" + +#include "SimpleAttributeEC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "SimpleAttribute_exec_export.h" +#include "tao/LocalObject.h" + +namespace CIDL_SimpleAttribute_Impl +{ + class SIMPLEATTRIBUTE_EXEC_Export SimpleAttribute_exec_i + : public virtual SimpleAttribute_Exec, + public virtual ::CORBA::LocalObject + { + public: + SimpleAttribute_exec_i (void); + virtual ~SimpleAttribute_exec_i (void); + + // Supported or inherited operations. + + // Attribute operations. + + virtual char * + str_attr (); + + virtual void + str_attr (const char * str_attr); + + virtual ::CORBA::Long + long_attr (); + + virtual void + long_attr (::CORBA::Long long_attr); + + virtual ::CORBA::Short + short_attr (); + + virtual void + short_attr (::CORBA::Short short_attr); + + // Port operations. + + // Operations from Components::SessionComponent + + virtual void + set_session_context ( + ::Components::SessionContext_ptr ctx); + + virtual void configuration_complete (); + + virtual void ccm_activate (); + + virtual void ccm_passivate (); + + virtual void ccm_remove (); + + private: + ::Simple::CCM_SimpleAttribute_Context_var context_; + ACE_CString str_; + ::CORBA::Long long_; + ::CORBA::Short short_; + }; + + class SIMPLEATTRIBUTE_EXEC_Export SimpleAttributeHome_exec_i + : public virtual SimpleAttributeHome_Exec, + public virtual ::CORBA::LocalObject + { + public: + SimpleAttributeHome_exec_i (void); + virtual ~SimpleAttributeHome_exec_i (void); + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + virtual char * + str_attr (); + + virtual void + str_attr (const char * str_attr); + + virtual ::CORBA::Long + long_attr (); + + virtual void + long_attr (::CORBA::Long long_attr); + + virtual ::CORBA::Short + short_attr (); + + virtual void + short_attr (::CORBA::Short short_attr); + + // Implicit operations. + + virtual ::Components::EnterpriseComponent_ptr + create (); + private: + ACE_CString str_; + ::CORBA::Long long_; + ::CORBA::Short short_; + }; + + extern "C" SIMPLEATTRIBUTE_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Simple_SimpleAttributeHome_Impl (void); +} + +#include /**/ "ace/post.h" + +#endif /* CIAO_SIMPLEATTRIBUTE_EXEC_H */ + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute_exec_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute_exec_export.h new file mode 100644 index 00000000000..1b9481804a3 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute_exec_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEATTRIBUTE_EXEC +// ------------------------------ +#ifndef SIMPLEATTRIBUTE_EXEC_EXPORT_H +#define SIMPLEATTRIBUTE_EXEC_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEATTRIBUTE_EXEC_HAS_DLL) +# define SIMPLEATTRIBUTE_EXEC_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEATTRIBUTE_EXEC_HAS_DLL */ + +#if !defined (SIMPLEATTRIBUTE_EXEC_HAS_DLL) +# define SIMPLEATTRIBUTE_EXEC_HAS_DLL 1 +#endif /* ! SIMPLEATTRIBUTE_EXEC_HAS_DLL */ + +#if defined (SIMPLEATTRIBUTE_EXEC_HAS_DLL) && (SIMPLEATTRIBUTE_EXEC_HAS_DLL == 1) +# if defined (SIMPLEATTRIBUTE_EXEC_BUILD_DLL) +# define SIMPLEATTRIBUTE_EXEC_Export ACE_Proper_Export_Flag +# define SIMPLEATTRIBUTE_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEATTRIBUTE_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEATTRIBUTE_EXEC_BUILD_DLL */ +# define SIMPLEATTRIBUTE_EXEC_Export ACE_Proper_Import_Flag +# define SIMPLEATTRIBUTE_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEATTRIBUTE_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEATTRIBUTE_EXEC_BUILD_DLL */ +#else /* SIMPLEATTRIBUTE_EXEC_HAS_DLL == 1 */ +# define SIMPLEATTRIBUTE_EXEC_Export +# define SIMPLEATTRIBUTE_EXEC_SINGLETON_DECLARATION(T) +# define SIMPLEATTRIBUTE_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEATTRIBUTE_EXEC_HAS_DLL == 1 */ + +// Set SIMPLEATTRIBUTE_EXEC_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEATTRIBUTE_EXEC_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEATTRIBUTE_EXEC_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEATTRIBUTE_EXEC_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEATTRIBUTE_EXEC_NTRACE */ + +#if (SIMPLEATTRIBUTE_EXEC_NTRACE == 1) +# define SIMPLEATTRIBUTE_EXEC_TRACE(X) +#else /* (SIMPLEATTRIBUTE_EXEC_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEATTRIBUTE_EXEC_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEATTRIBUTE_EXEC_NTRACE == 1) */ + +#endif /* SIMPLEATTRIBUTE_EXEC_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute_stub_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute_stub_export.h new file mode 100644 index 00000000000..00e32efd226 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute_stub_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEATTRIBUTE_STUB +// ------------------------------ +#ifndef SIMPLEATTRIBUTE_STUB_EXPORT_H +#define SIMPLEATTRIBUTE_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEATTRIBUTE_STUB_HAS_DLL) +# define SIMPLEATTRIBUTE_STUB_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEATTRIBUTE_STUB_HAS_DLL */ + +#if !defined (SIMPLEATTRIBUTE_STUB_HAS_DLL) +# define SIMPLEATTRIBUTE_STUB_HAS_DLL 1 +#endif /* ! SIMPLEATTRIBUTE_STUB_HAS_DLL */ + +#if defined (SIMPLEATTRIBUTE_STUB_HAS_DLL) && (SIMPLEATTRIBUTE_STUB_HAS_DLL == 1) +# if defined (SIMPLEATTRIBUTE_STUB_BUILD_DLL) +# define SIMPLEATTRIBUTE_STUB_Export ACE_Proper_Export_Flag +# define SIMPLEATTRIBUTE_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEATTRIBUTE_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEATTRIBUTE_STUB_BUILD_DLL */ +# define SIMPLEATTRIBUTE_STUB_Export ACE_Proper_Import_Flag +# define SIMPLEATTRIBUTE_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEATTRIBUTE_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEATTRIBUTE_STUB_BUILD_DLL */ +#else /* SIMPLEATTRIBUTE_STUB_HAS_DLL == 1 */ +# define SIMPLEATTRIBUTE_STUB_Export +# define SIMPLEATTRIBUTE_STUB_SINGLETON_DECLARATION(T) +# define SIMPLEATTRIBUTE_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEATTRIBUTE_STUB_HAS_DLL == 1 */ + +// Set SIMPLEATTRIBUTE_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEATTRIBUTE_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEATTRIBUTE_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEATTRIBUTE_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEATTRIBUTE_STUB_NTRACE */ + +#if (SIMPLEATTRIBUTE_STUB_NTRACE == 1) +# define SIMPLEATTRIBUTE_STUB_TRACE(X) +#else /* (SIMPLEATTRIBUTE_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEATTRIBUTE_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEATTRIBUTE_STUB_NTRACE == 1) */ + +#endif /* SIMPLEATTRIBUTE_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute_svnt_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute_svnt_export.h new file mode 100644 index 00000000000..6c1f3cf5a6f --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute_svnt_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEATTRIBUTE_SVNT +// ------------------------------ +#ifndef SIMPLEATTRIBUTE_SVNT_EXPORT_H +#define SIMPLEATTRIBUTE_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEATTRIBUTE_SVNT_HAS_DLL) +# define SIMPLEATTRIBUTE_SVNT_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEATTRIBUTE_SVNT_HAS_DLL */ + +#if !defined (SIMPLEATTRIBUTE_SVNT_HAS_DLL) +# define SIMPLEATTRIBUTE_SVNT_HAS_DLL 1 +#endif /* ! SIMPLEATTRIBUTE_SVNT_HAS_DLL */ + +#if defined (SIMPLEATTRIBUTE_SVNT_HAS_DLL) && (SIMPLEATTRIBUTE_SVNT_HAS_DLL == 1) +# if defined (SIMPLEATTRIBUTE_SVNT_BUILD_DLL) +# define SIMPLEATTRIBUTE_SVNT_Export ACE_Proper_Export_Flag +# define SIMPLEATTRIBUTE_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEATTRIBUTE_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEATTRIBUTE_SVNT_BUILD_DLL */ +# define SIMPLEATTRIBUTE_SVNT_Export ACE_Proper_Import_Flag +# define SIMPLEATTRIBUTE_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEATTRIBUTE_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEATTRIBUTE_SVNT_BUILD_DLL */ +#else /* SIMPLEATTRIBUTE_SVNT_HAS_DLL == 1 */ +# define SIMPLEATTRIBUTE_SVNT_Export +# define SIMPLEATTRIBUTE_SVNT_SINGLETON_DECLARATION(T) +# define SIMPLEATTRIBUTE_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEATTRIBUTE_SVNT_HAS_DLL == 1 */ + +// Set SIMPLEATTRIBUTE_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEATTRIBUTE_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEATTRIBUTE_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEATTRIBUTE_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEATTRIBUTE_SVNT_NTRACE */ + +#if (SIMPLEATTRIBUTE_SVNT_NTRACE == 1) +# define SIMPLEATTRIBUTE_SVNT_TRACE(X) +#else /* (SIMPLEATTRIBUTE_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEATTRIBUTE_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEATTRIBUTE_SVNT_NTRACE == 1) */ + +#endif /* SIMPLEATTRIBUTE_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleCommon.idl b/CIAO/DAnCE/tests/CIAO/Components/SimpleCommon.idl new file mode 100644 index 00000000000..6f943e9d1d5 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleCommon.idl @@ -0,0 +1,21 @@ +// $Id$ + +#ifndef SIMPLE_COMMON_IDL +#define SIMPLE_COMMON_IDL + +#include "Components.idl" + +module Simple +{ + interface Trigger + { + void hello (in string hello); + }; + + eventtype Hello + { + public string hello_; + }; +}; + +#endif /*SIMPLE_COMMON_IDL*/ diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleCommon.mpc b/CIAO/DAnCE/tests/CIAO/Components/SimpleCommon.mpc new file mode 100644 index 00000000000..b1f86554639 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleCommon.mpc @@ -0,0 +1,67 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl SimpleCommon" + +project(SimpleCommon_idl_gen) : taoidldefaults, anytypecode { + avoids += ace_for_tao + custom_only = 1 + idlflags += -Wb,stub_export_macro=SIMPLECOMMON_STUB_Export \ + -Wb,stub_export_include=SimpleCommon_stub_export.h \ + -Wb,skel_export_macro=SIMPLECOMMON_SVNT_Export \ + -Wb,skel_export_include=SimpleCommon_svnt_export.h + + IDL_Files { + SimpleCommon.idl + } +} + +project(SimpleCommon_stub) : ccm_stub { + avoids += ace_for_tao + after += SimpleCommon_idl_gen + libs += + + sharedname = SimpleCommon_stub + dynamicflags = SIMPLECOMMON_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimpleCommonC.cpp + } + + Header_Files { + SimpleCommonC.h + SimpleCommon_stub_export.h + } + + Inline_Files { + SimpleCommonC.inl + } +} + +project(SimpleCommon_skel) : ccm_svnt { + avoids += ace_for_tao + after += SimpleCommon_stub + sharedname = SimpleCommon_skel + libs += SimpleCommon_stub + + dynamicflags = SIMPLECOMMON_SVNT_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimpleCommonS.cpp + } + + Header_Files { + SimpleCommonS.h + SimpleCommon_svnt_export.h + } + + Inline_Files { + SimpleCommonS.inl + } +} + + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleCommon_stub_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleCommon_stub_export.h new file mode 100644 index 00000000000..79aac6677b7 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleCommon_stub_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLECOMMON_STUB +// ------------------------------ +#ifndef SIMPLECOMMON_STUB_EXPORT_H +#define SIMPLECOMMON_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLECOMMON_STUB_HAS_DLL) +# define SIMPLECOMMON_STUB_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLECOMMON_STUB_HAS_DLL */ + +#if !defined (SIMPLECOMMON_STUB_HAS_DLL) +# define SIMPLECOMMON_STUB_HAS_DLL 1 +#endif /* ! SIMPLECOMMON_STUB_HAS_DLL */ + +#if defined (SIMPLECOMMON_STUB_HAS_DLL) && (SIMPLECOMMON_STUB_HAS_DLL == 1) +# if defined (SIMPLECOMMON_STUB_BUILD_DLL) +# define SIMPLECOMMON_STUB_Export ACE_Proper_Export_Flag +# define SIMPLECOMMON_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLECOMMON_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLECOMMON_STUB_BUILD_DLL */ +# define SIMPLECOMMON_STUB_Export ACE_Proper_Import_Flag +# define SIMPLECOMMON_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLECOMMON_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLECOMMON_STUB_BUILD_DLL */ +#else /* SIMPLECOMMON_STUB_HAS_DLL == 1 */ +# define SIMPLECOMMON_STUB_Export +# define SIMPLECOMMON_STUB_SINGLETON_DECLARATION(T) +# define SIMPLECOMMON_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLECOMMON_STUB_HAS_DLL == 1 */ + +// Set SIMPLECOMMON_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLECOMMON_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLECOMMON_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLECOMMON_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLECOMMON_STUB_NTRACE */ + +#if (SIMPLECOMMON_STUB_NTRACE == 1) +# define SIMPLECOMMON_STUB_TRACE(X) +#else /* (SIMPLECOMMON_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLECOMMON_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLECOMMON_STUB_NTRACE == 1) */ + +#endif /* SIMPLECOMMON_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleCommon_svnt_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleCommon_svnt_export.h new file mode 100644 index 00000000000..0190bfeebab --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleCommon_svnt_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLECOMMON_SVNT +// ------------------------------ +#ifndef SIMPLECOMMON_SVNT_EXPORT_H +#define SIMPLECOMMON_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLECOMMON_SVNT_HAS_DLL) +# define SIMPLECOMMON_SVNT_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLECOMMON_SVNT_HAS_DLL */ + +#if !defined (SIMPLECOMMON_SVNT_HAS_DLL) +# define SIMPLECOMMON_SVNT_HAS_DLL 1 +#endif /* ! SIMPLECOMMON_SVNT_HAS_DLL */ + +#if defined (SIMPLECOMMON_SVNT_HAS_DLL) && (SIMPLECOMMON_SVNT_HAS_DLL == 1) +# if defined (SIMPLECOMMON_SVNT_BUILD_DLL) +# define SIMPLECOMMON_SVNT_Export ACE_Proper_Export_Flag +# define SIMPLECOMMON_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLECOMMON_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLECOMMON_SVNT_BUILD_DLL */ +# define SIMPLECOMMON_SVNT_Export ACE_Proper_Import_Flag +# define SIMPLECOMMON_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLECOMMON_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLECOMMON_SVNT_BUILD_DLL */ +#else /* SIMPLECOMMON_SVNT_HAS_DLL == 1 */ +# define SIMPLECOMMON_SVNT_Export +# define SIMPLECOMMON_SVNT_SINGLETON_DECLARATION(T) +# define SIMPLECOMMON_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLECOMMON_SVNT_HAS_DLL == 1 */ + +// Set SIMPLECOMMON_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLECOMMON_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLECOMMON_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLECOMMON_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLECOMMON_SVNT_NTRACE */ + +#if (SIMPLECOMMON_SVNT_NTRACE == 1) +# define SIMPLECOMMON_SVNT_TRACE(X) +#else /* (SIMPLECOMMON_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLECOMMON_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLECOMMON_SVNT_NTRACE == 1) */ + +#endif /* SIMPLECOMMON_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer.cidl b/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer.cidl new file mode 100644 index 00000000000..ff5081f82dd --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer.cidl @@ -0,0 +1,11 @@ +// $Id$ +#include "SimpleConsumer.idl" + +composition session SimpleConsumer_Impl +{ + home executor SimpleConsumerHome_Exec + { + implements Simple::SimpleConsumerHome; + manages SimpleConsumer_Exec; + }; +}; diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer.idl b/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer.idl new file mode 100644 index 00000000000..3895eacda3c --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer.idl @@ -0,0 +1,21 @@ +// $Id$ + +#ifndef SIMPLE_CONSUMER_IDL +#define SIMPLE_CONSUMER_IDL + +#include "SimpleCommon.idl" +#include <Components.idl> + +module Simple +{ + component SimpleConsumer + { + consumes Hello hello_; + }; + + home SimpleConsumerHome manages SimpleConsumer + { + }; +}; + +#endif /*SIMPLE_CONSUMER_IDL*/ diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer.mpc b/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer.mpc new file mode 100644 index 00000000000..bece676d798 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer.mpc @@ -0,0 +1,121 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl -p SimpleCommon SimpleConsumer" + +project(SimpleCommon_SimpleConsumer_idl_gen) : taoidldefaults, anytypecode { + avoids += ace_for_tao + custom_only = 1 + idlflags += -Wb,stub_export_macro=SIMPLECONSUMER_STUB_Export \ + -Wb,stub_export_include=SimpleConsumer_stub_export.h \ + -Wb,skel_export_macro=SIMPLECONSUMER_SVNT_Export \ + -Wb,skel_export_include=SimpleConsumer_svnt_export.h + + IDL_Files { + SimpleConsumer.idl + } +} + +project(SimpleCommon_SimpleConsumer_cidl_gen) : ciaocidldefaults, taoidldefaults { + avoids += ace_for_tao + custom_only = 1 + cidlflags += --svnt-export-macro SIMPLECONSUMER_SVNT_Export \ + --svnt-export-include SimpleConsumer_svnt_export.h + idlflags += -Wb,export_macro=SIMPLECONSUMER_EXEC_Export \ + -Wb,export_include=SimpleConsumer_exec_export.h \ + -SS + + CIDL_Files { + SimpleConsumer.cidl + } + + IDL_Files { + SimpleConsumerE.idl + } +} + +project(SimpleCommon_SimpleConsumer_stub) : ccm_stub { + avoids += ace_for_tao + after += SimpleCommon_SimpleConsumer_idl_gen SimpleCommon_stub + libs += SimpleCommon_stub + + sharedname = SimpleConsumer_stub + dynamicflags = SIMPLECONSUMER_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimpleConsumerC.cpp + } + + Header_Files { + SimpleConsumerC.h + SimpleConsumer_stub_export.h + } + + Inline_Files { + SimpleConsumerC.inl + } +} + +project(SimpleCommon_SimpleConsumer_exec) : ciao_executor { + avoids += ace_for_tao + after += SimpleCommon_SimpleConsumer_cidl_gen SimpleCommon_SimpleConsumer_stub + sharedname = SimpleConsumer_exec + libs += SimpleConsumer_stub SimpleCommon_stub + + dynamicflags = SIMPLECONSUMER_EXEC_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimpleConsumerEC.cpp + SimpleConsumer_exec.cpp + } + + Header_Files { + SimpleConsumerEC.h + SimpleConsumer_exec.h + SimpleConsumer_exec_export.h + } + + Inline_Files { + SimpleConsumerEC.inl + } +} + + +project(SimpleCommon_SimpleConsumer_svnt) : ciao_servant { + avoids += ace_for_tao + after += SimpleCommon_skel SimpleCommon_SimpleConsumer_exec + sharedname = SimpleConsumer_svnt + libs += SimpleConsumer_exec \ + SimpleConsumer_stub \ + SimpleCommon_skel \ + SimpleCommon_stub + + dynamicflags = SIMPLECONSUMER_SVNT_BUILD_DLL + + CIDL_Files { + } + + IDL_Files { + } + + Source_Files { + SimpleConsumerS.cpp + SimpleConsumer_svnt.cpp + } + + Header_Files { + SimpleConsumerS.h + SimpleConsumer_svnt.h + SimpleConsumer_svnt_export.h + } + + Inline_Files { + SimpleConsumerS.inl + } +} + + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer_exec.cpp b/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer_exec.cpp new file mode 100644 index 00000000000..f8201a17fb9 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer_exec.cpp @@ -0,0 +1,156 @@ +// $Id$ +// +// **** Code generated by the **** +// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** +// CIAO has been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// CIDL Compiler has been developed by: +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about CIAO is available at: +// http://www.dre.vanderbilt.edu/CIAO + +#include "SimpleConsumer_exec.h" +#include "ciao/CIAO_common.h" + +namespace CIDL_SimpleConsumer_Impl +{ + //================================================================== + // Component Executor Implementation Class: SimpleConsumer_exec_i + //================================================================== + + SimpleConsumer_exec_i::SimpleConsumer_exec_i (void) + { + CIAO_TRACE ("SimpleConsumer_exec_i::SimpleConsumer_exec_i (void)"); + } + + SimpleConsumer_exec_i::~SimpleConsumer_exec_i (void) + { + CIAO_TRACE ("SimpleConsumer_exec_i::~SimpleConsumer_exec_i (void)"); + } + + // Supported or inherited operations. + + // Attribute operations. + + // Port operations. + + void + SimpleConsumer_exec_i::push_hello_ ( + ::Simple::Hello * ev ) + { + CIAO_TRACE ("SimpleConsumer_exec_i::push_hello_ ()"); + // Your code here. + + CIAO_DEBUG ((LM_EMERGENCY, "SimpleConsumer_exec_i::push_hello_ - " + "Received hello event, value is %s\n", ev->hello_ ())); + } + + // Operations from Components::SessionComponent + + void + SimpleConsumer_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx) + { + CIAO_TRACE ("SimpleConsumer_exec_i::set_session_context ()"); + + this->context_ = + ::Simple::CCM_SimpleConsumer_Context::_narrow (ctx); + + if (CORBA::is_nil (this->context_.in ())) + { + throw ::CORBA::INTERNAL (); + } + } + + void + SimpleConsumer_exec_i::configuration_complete () + { + CIAO_TRACE ("SimpleConsumer_exec_i::configuration_complete ()"); + // Your code here. + } + + void + SimpleConsumer_exec_i::ccm_activate () + { + CIAO_TRACE ("SimpleConsumer_exec_i::ccm_activate ()"); + // Your code here. + } + + void + SimpleConsumer_exec_i::ccm_passivate () + { + CIAO_TRACE ("SimpleConsumer_exec_i::ccm_passivate ()"); + // Your code here. + } + + void + SimpleConsumer_exec_i::ccm_remove () + { + CIAO_TRACE ("SimpleConsumer_exec_i::ccm_remove ()"); + // Your code here. + } + + //================================================================== + // Home Executor Implementation Class: SimpleConsumerHome_exec_i + //================================================================== + + SimpleConsumerHome_exec_i::SimpleConsumerHome_exec_i (void) + { + CIAO_TRACE ("SimpleConsumerHome_exec_i::SimpleConsumerHome_exec_i (void)"); + } + + SimpleConsumerHome_exec_i::~SimpleConsumerHome_exec_i (void) + { + CIAO_TRACE ("SimpleConsumerHome_exec_i::~SimpleConsumerHome_exec_i (void)"); + } + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + ::Components::EnterpriseComponent_ptr + SimpleConsumerHome_exec_i::create () + { + CIAO_TRACE ("SimpleConsumerHome_exec_i::create ()"); + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_THROW_EX ( + retval, + SimpleConsumer_exec_i, + ::CORBA::NO_MEMORY ()); + + return retval; + } + + extern "C" SIMPLECONSUMER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Simple_SimpleConsumerHome_Impl (void) + { + CIAO_TRACE ("create_Simple_SimpleConsumerHome_Impl (void)"); + ::Components::HomeExecutorBase_ptr retval = + ::Components::HomeExecutorBase::_nil (); + + ACE_NEW_RETURN ( + retval, + SimpleConsumerHome_exec_i, + ::Components::HomeExecutorBase::_nil ()); + + return retval; + } +} + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer_exec.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer_exec.h new file mode 100644 index 00000000000..e4b9607bb45 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer_exec.h @@ -0,0 +1,102 @@ +// $Id$ +// +// **** Code generated by the **** +// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** +// CIAO has been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// CIDL Compiler has been developed by: +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about CIAO is available at: +// http://www.dre.vanderbilt.edu/CIAO + +#ifndef CIAO_SIMPLECONSUMER_EXEC_H +#define CIAO_SIMPLECONSUMER_EXEC_H + +#include /**/ "ace/pre.h" + +#include "SimpleConsumerEC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "SimpleConsumer_exec_export.h" +#include "tao/LocalObject.h" + +namespace CIDL_SimpleConsumer_Impl +{ + class SIMPLECONSUMER_EXEC_Export SimpleConsumer_exec_i + : public virtual SimpleConsumer_Exec, + public virtual ::CORBA::LocalObject + { + public: + SimpleConsumer_exec_i (void); + virtual ~SimpleConsumer_exec_i (void); + + // Supported or inherited operations. + + // Attribute operations. + + // Port operations. + + virtual void + push_hello_ ( + ::Simple::Hello *ev); + + // Operations from Components::SessionComponent + + virtual void + set_session_context ( + ::Components::SessionContext_ptr ctx); + + virtual void configuration_complete (); + + virtual void ccm_activate (); + + virtual void ccm_passivate (); + + virtual void ccm_remove (); + + private: + ::Simple::CCM_SimpleConsumer_Context_var context_; + }; + + class SIMPLECONSUMER_EXEC_Export SimpleConsumerHome_exec_i + : public virtual SimpleConsumerHome_Exec, + public virtual ::CORBA::LocalObject + { + public: + SimpleConsumerHome_exec_i (void); + virtual ~SimpleConsumerHome_exec_i (void); + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + virtual ::Components::EnterpriseComponent_ptr + create (); + }; + + extern "C" SIMPLECONSUMER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Simple_SimpleConsumerHome_Impl (void); +} + +#include /**/ "ace/post.h" + +#endif /* CIAO_SIMPLECONSUMER_EXEC_H */ + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer_exec_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer_exec_export.h new file mode 100644 index 00000000000..a8074c4c81f --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer_exec_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLECONSUMER_EXEC +// ------------------------------ +#ifndef SIMPLECONSUMER_EXEC_EXPORT_H +#define SIMPLECONSUMER_EXEC_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLECONSUMER_EXEC_HAS_DLL) +# define SIMPLECONSUMER_EXEC_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLECONSUMER_EXEC_HAS_DLL */ + +#if !defined (SIMPLECONSUMER_EXEC_HAS_DLL) +# define SIMPLECONSUMER_EXEC_HAS_DLL 1 +#endif /* ! SIMPLECONSUMER_EXEC_HAS_DLL */ + +#if defined (SIMPLECONSUMER_EXEC_HAS_DLL) && (SIMPLECONSUMER_EXEC_HAS_DLL == 1) +# if defined (SIMPLECONSUMER_EXEC_BUILD_DLL) +# define SIMPLECONSUMER_EXEC_Export ACE_Proper_Export_Flag +# define SIMPLECONSUMER_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLECONSUMER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLECONSUMER_EXEC_BUILD_DLL */ +# define SIMPLECONSUMER_EXEC_Export ACE_Proper_Import_Flag +# define SIMPLECONSUMER_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLECONSUMER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLECONSUMER_EXEC_BUILD_DLL */ +#else /* SIMPLECONSUMER_EXEC_HAS_DLL == 1 */ +# define SIMPLECONSUMER_EXEC_Export +# define SIMPLECONSUMER_EXEC_SINGLETON_DECLARATION(T) +# define SIMPLECONSUMER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLECONSUMER_EXEC_HAS_DLL == 1 */ + +// Set SIMPLECONSUMER_EXEC_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLECONSUMER_EXEC_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLECONSUMER_EXEC_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLECONSUMER_EXEC_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLECONSUMER_EXEC_NTRACE */ + +#if (SIMPLECONSUMER_EXEC_NTRACE == 1) +# define SIMPLECONSUMER_EXEC_TRACE(X) +#else /* (SIMPLECONSUMER_EXEC_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLECONSUMER_EXEC_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLECONSUMER_EXEC_NTRACE == 1) */ + +#endif /* SIMPLECONSUMER_EXEC_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer_stub_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer_stub_export.h new file mode 100644 index 00000000000..89e5e37b32e --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer_stub_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLECONSUMER_STUB +// ------------------------------ +#ifndef SIMPLECONSUMER_STUB_EXPORT_H +#define SIMPLECONSUMER_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLECONSUMER_STUB_HAS_DLL) +# define SIMPLECONSUMER_STUB_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLECONSUMER_STUB_HAS_DLL */ + +#if !defined (SIMPLECONSUMER_STUB_HAS_DLL) +# define SIMPLECONSUMER_STUB_HAS_DLL 1 +#endif /* ! SIMPLECONSUMER_STUB_HAS_DLL */ + +#if defined (SIMPLECONSUMER_STUB_HAS_DLL) && (SIMPLECONSUMER_STUB_HAS_DLL == 1) +# if defined (SIMPLECONSUMER_STUB_BUILD_DLL) +# define SIMPLECONSUMER_STUB_Export ACE_Proper_Export_Flag +# define SIMPLECONSUMER_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLECONSUMER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLECONSUMER_STUB_BUILD_DLL */ +# define SIMPLECONSUMER_STUB_Export ACE_Proper_Import_Flag +# define SIMPLECONSUMER_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLECONSUMER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLECONSUMER_STUB_BUILD_DLL */ +#else /* SIMPLECONSUMER_STUB_HAS_DLL == 1 */ +# define SIMPLECONSUMER_STUB_Export +# define SIMPLECONSUMER_STUB_SINGLETON_DECLARATION(T) +# define SIMPLECONSUMER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLECONSUMER_STUB_HAS_DLL == 1 */ + +// Set SIMPLECONSUMER_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLECONSUMER_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLECONSUMER_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLECONSUMER_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLECONSUMER_STUB_NTRACE */ + +#if (SIMPLECONSUMER_STUB_NTRACE == 1) +# define SIMPLECONSUMER_STUB_TRACE(X) +#else /* (SIMPLECONSUMER_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLECONSUMER_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLECONSUMER_STUB_NTRACE == 1) */ + +#endif /* SIMPLECONSUMER_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer_svnt_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer_svnt_export.h new file mode 100644 index 00000000000..eab50bcfd0a --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer_svnt_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLECONSUMER_SVNT +// ------------------------------ +#ifndef SIMPLECONSUMER_SVNT_EXPORT_H +#define SIMPLECONSUMER_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLECONSUMER_SVNT_HAS_DLL) +# define SIMPLECONSUMER_SVNT_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLECONSUMER_SVNT_HAS_DLL */ + +#if !defined (SIMPLECONSUMER_SVNT_HAS_DLL) +# define SIMPLECONSUMER_SVNT_HAS_DLL 1 +#endif /* ! SIMPLECONSUMER_SVNT_HAS_DLL */ + +#if defined (SIMPLECONSUMER_SVNT_HAS_DLL) && (SIMPLECONSUMER_SVNT_HAS_DLL == 1) +# if defined (SIMPLECONSUMER_SVNT_BUILD_DLL) +# define SIMPLECONSUMER_SVNT_Export ACE_Proper_Export_Flag +# define SIMPLECONSUMER_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLECONSUMER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLECONSUMER_SVNT_BUILD_DLL */ +# define SIMPLECONSUMER_SVNT_Export ACE_Proper_Import_Flag +# define SIMPLECONSUMER_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLECONSUMER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLECONSUMER_SVNT_BUILD_DLL */ +#else /* SIMPLECONSUMER_SVNT_HAS_DLL == 1 */ +# define SIMPLECONSUMER_SVNT_Export +# define SIMPLECONSUMER_SVNT_SINGLETON_DECLARATION(T) +# define SIMPLECONSUMER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLECONSUMER_SVNT_HAS_DLL == 1 */ + +// Set SIMPLECONSUMER_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLECONSUMER_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLECONSUMER_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLECONSUMER_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLECONSUMER_SVNT_NTRACE */ + +#if (SIMPLECONSUMER_SVNT_NTRACE == 1) +# define SIMPLECONSUMER_SVNT_TRACE(X) +#else /* (SIMPLECONSUMER_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLECONSUMER_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLECONSUMER_SVNT_NTRACE == 1) */ + +#endif /* SIMPLECONSUMER_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter.cidl b/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter.cidl new file mode 100644 index 00000000000..9de9153b267 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter.cidl @@ -0,0 +1,11 @@ +// $Id$ +#include "SimpleEmitter.idl" + +composition session SimpleEmitter_Impl +{ + home executor SimpleEmitterHome_Exec + { + implements Simple::SimpleEmitterHome; + manages SimpleEmitter_Exec; + }; +}; diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter.idl b/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter.idl new file mode 100644 index 00000000000..37431ca8134 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter.idl @@ -0,0 +1,21 @@ +// $Id$ + +#ifndef SIMPLE_EMITTER_IDL +#define SIMPLE_EMITTER_IDL + +#include "SimpleCommon.idl" +#include "Components.idl" + +module Simple +{ + component SimpleEmitter + { + emits Hello hello; + }; + + home SimpleEmitterHome manages SimpleEmitter + { + }; +}; + +#endif /*SIMPLE_EMITTER_IDL*/ diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter.mpc b/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter.mpc new file mode 100644 index 00000000000..6a68a0a5376 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter.mpc @@ -0,0 +1,121 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl -p SimpleCommon SimpleEmitter" + +project(SimpleCommon_SimpleEmitter_idl_gen) : taoidldefaults, anytypecode { + avoids += ace_for_tao + custom_only = 1 + idlflags += -Wb,stub_export_macro=SIMPLEEMITTER_STUB_Export \ + -Wb,stub_export_include=SimpleEmitter_stub_export.h \ + -Wb,skel_export_macro=SIMPLEEMITTER_SVNT_Export \ + -Wb,skel_export_include=SimpleEmitter_svnt_export.h + + IDL_Files { + SimpleEmitter.idl + } +} + +project(SimpleCommon_SimpleEmitter_cidl_gen) : ciaocidldefaults, taoidldefaults { + avoids += ace_for_tao + custom_only = 1 + cidlflags += --svnt-export-macro SIMPLEEMITTER_SVNT_Export \ + --svnt-export-include SimpleEmitter_svnt_export.h + idlflags += -Wb,export_macro=SIMPLEEMITTER_EXEC_Export \ + -Wb,export_include=SimpleEmitter_exec_export.h \ + -SS + + CIDL_Files { + SimpleEmitter.cidl + } + + IDL_Files { + SimpleEmitterE.idl + } +} + +project(SimpleCommon_SimpleEmitter_stub) : ccm_stub { + avoids += ace_for_tao + after += SimpleCommon_SimpleEmitter_idl_gen SimpleCommon_stub + libs += SimpleCommon_stub + + sharedname = SimpleEmitter_stub + dynamicflags = SIMPLEEMITTER_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimpleEmitterC.cpp + } + + Header_Files { + SimpleEmitterC.h + SimpleEmitter_stub_export.h + } + + Inline_Files { + SimpleEmitterC.inl + } +} + +project(SimpleCommon_SimpleEmitter_exec) : ciao_executor { + avoids += ace_for_tao + after += SimpleCommon_SimpleEmitter_cidl_gen SimpleCommon_SimpleEmitter_stub + sharedname = SimpleEmitter_exec + libs += SimpleEmitter_stub SimpleCommon_stub + + dynamicflags = SIMPLEEMITTER_EXEC_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimpleEmitterEC.cpp + SimpleEmitter_exec.cpp + } + + Header_Files { + SimpleEmitterEC.h + SimpleEmitter_exec.h + SimpleEmitter_exec_export.h + } + + Inline_Files { + SimpleEmitterEC.inl + } +} + + +project(SimpleCommon_SimpleEmitter_svnt) : ciao_servant { + avoids += ace_for_tao + after += SimpleCommon_skel SimpleCommon_SimpleEmitter_exec + sharedname = SimpleEmitter_svnt + libs += SimpleEmitter_exec \ + SimpleEmitter_stub \ + SimpleCommon_skel \ + SimpleCommon_stub + + dynamicflags = SIMPLEEMITTER_SVNT_BUILD_DLL + + CIDL_Files { + } + + IDL_Files { + } + + Source_Files { + SimpleEmitterS.cpp + SimpleEmitter_svnt.cpp + } + + Header_Files { + SimpleEmitterS.h + SimpleEmitter_svnt.h + SimpleEmitter_svnt_export.h + } + + Inline_Files { + SimpleEmitterS.inl + } +} + + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter_exec.cpp b/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter_exec.cpp new file mode 100644 index 00000000000..99a3d01f161 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter_exec.cpp @@ -0,0 +1,149 @@ +// $Id$ +// +// **** Code generated by the **** +// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** +// CIAO has been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// CIDL Compiler has been developed by: +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about CIAO is available at: +// http://www.dre.vanderbilt.edu/CIAO + +#include "SimpleEmitter_exec.h" +#include "ciao/CIAO_common.h" + +namespace CIDL_SimpleEmitter_Impl +{ + //================================================================== + // Component Executor Implementation Class: SimpleEmitter_exec_i + //================================================================== + + SimpleEmitter_exec_i::SimpleEmitter_exec_i (void) + { + CIAO_TRACE ("SimpleEmitter_exec_i::SimpleEmitter_exec_i (void)"); + } + + SimpleEmitter_exec_i::~SimpleEmitter_exec_i (void) + { + CIAO_TRACE ("SimpleEmitter_exec_i::~SimpleEmitter_exec_i (void)"); + } + + // Supported or inherited operations. + + // Attribute operations. + + // Port operations. + + // Operations from Components::SessionComponent + + void + SimpleEmitter_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx) + { + CIAO_TRACE ("SimpleEmitter_exec_i::set_session_context ()"); + this->context_ = + ::Simple::CCM_SimpleEmitter_Context::_narrow (ctx); + + if (CORBA::is_nil (this->context_.in ())) + { + throw ::CORBA::INTERNAL (); + } + } + + void + SimpleEmitter_exec_i::configuration_complete () + { + CIAO_TRACE ("SimpleEmitter_exec_i::configuration_complete ()"); + // Your code here. + } + + void + SimpleEmitter_exec_i::ccm_activate () + { + CIAO_TRACE ("SimpleEmitter_exec_i::ccm_activate ()"); + // Your code here. + + ::Simple::Hello_var hello = new OBV_Simple::Hello ("Test successful, hello from SimpleEmitter_exec_i"); + + this->context_->push_hello (hello._retn ()); + } + + void + SimpleEmitter_exec_i::ccm_passivate () + { + CIAO_TRACE ("SimpleEmitter_exec_i::ccm_passivate ()"); + // Your code here. + } + + void + SimpleEmitter_exec_i::ccm_remove () + { + CIAO_TRACE ("SimpleEmitter_exec_i::ccm_remove ()"); + // Your code here. + } + + //================================================================== + // Home Executor Implementation Class: SimpleEmitterHome_exec_i + //================================================================== + + SimpleEmitterHome_exec_i::SimpleEmitterHome_exec_i (void) + { + CIAO_TRACE ("SimpleEmitterHome_exec_i::SimpleEmitterHome_exec_i (void)"); + } + + SimpleEmitterHome_exec_i::~SimpleEmitterHome_exec_i (void) + { + CIAO_TRACE ("SimpleEmitterHome_exec_i::~SimpleEmitterHome_exec_i (void)"); + } + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + ::Components::EnterpriseComponent_ptr + SimpleEmitterHome_exec_i::create () + { + CIAO_TRACE ("SimpleEmitterHome_exec_i::create ()"); + + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_THROW_EX ( + retval, + SimpleEmitter_exec_i, + ::CORBA::NO_MEMORY ()); + + return retval; + } + + extern "C" SIMPLEEMITTER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Simple_SimpleEmitterHome_Impl (void) + { + CIAO_TRACE ("create_Simple_SimpleEmitterHome_Impl (void)"); + ::Components::HomeExecutorBase_ptr retval = + ::Components::HomeExecutorBase::_nil (); + + ACE_NEW_RETURN ( + retval, + SimpleEmitterHome_exec_i, + ::Components::HomeExecutorBase::_nil ()); + + return retval; + } +} + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter_exec.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter_exec.h new file mode 100644 index 00000000000..a5008a85ea5 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter_exec.h @@ -0,0 +1,98 @@ +// $Id$ +// +// **** Code generated by the **** +// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** +// CIAO has been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// CIDL Compiler has been developed by: +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about CIAO is available at: +// http://www.dre.vanderbilt.edu/CIAO + +#ifndef CIAO_SIMPLEEMITTER_EXEC_H +#define CIAO_SIMPLEEMITTER_EXEC_H + +#include /**/ "ace/pre.h" + +#include "SimpleEmitterEC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "SimpleEmitter_exec_export.h" +#include "tao/LocalObject.h" + +namespace CIDL_SimpleEmitter_Impl +{ + class SIMPLEEMITTER_EXEC_Export SimpleEmitter_exec_i + : public virtual SimpleEmitter_Exec, + public virtual ::CORBA::LocalObject + { + public: + SimpleEmitter_exec_i (void); + virtual ~SimpleEmitter_exec_i (void); + + // Supported or inherited operations. + + // Attribute operations. + + // Port operations. + + // Operations from Components::SessionComponent + + virtual void + set_session_context ( + ::Components::SessionContext_ptr ctx); + + virtual void configuration_complete (); + + virtual void ccm_activate (); + + virtual void ccm_passivate (); + + virtual void ccm_remove (); + + private: + ::Simple::CCM_SimpleEmitter_Context_var context_; + }; + + class SIMPLEEMITTER_EXEC_Export SimpleEmitterHome_exec_i + : public virtual SimpleEmitterHome_Exec, + public virtual ::CORBA::LocalObject + { + public: + SimpleEmitterHome_exec_i (void); + virtual ~SimpleEmitterHome_exec_i (void); + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + virtual ::Components::EnterpriseComponent_ptr + create (); + }; + + extern "C" SIMPLEEMITTER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Simple_SimpleEmitterHome_Impl (void); +} + +#include /**/ "ace/post.h" + +#endif /* CIAO_SIMPLEEMITTER_EXEC_H */ + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter_exec_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter_exec_export.h new file mode 100644 index 00000000000..53fef48b799 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter_exec_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEEMITTER_EXEC +// ------------------------------ +#ifndef SIMPLEEMITTER_EXEC_EXPORT_H +#define SIMPLEEMITTER_EXEC_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEEMITTER_EXEC_HAS_DLL) +# define SIMPLEEMITTER_EXEC_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEEMITTER_EXEC_HAS_DLL */ + +#if !defined (SIMPLEEMITTER_EXEC_HAS_DLL) +# define SIMPLEEMITTER_EXEC_HAS_DLL 1 +#endif /* ! SIMPLEEMITTER_EXEC_HAS_DLL */ + +#if defined (SIMPLEEMITTER_EXEC_HAS_DLL) && (SIMPLEEMITTER_EXEC_HAS_DLL == 1) +# if defined (SIMPLEEMITTER_EXEC_BUILD_DLL) +# define SIMPLEEMITTER_EXEC_Export ACE_Proper_Export_Flag +# define SIMPLEEMITTER_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEEMITTER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEEMITTER_EXEC_BUILD_DLL */ +# define SIMPLEEMITTER_EXEC_Export ACE_Proper_Import_Flag +# define SIMPLEEMITTER_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEEMITTER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEEMITTER_EXEC_BUILD_DLL */ +#else /* SIMPLEEMITTER_EXEC_HAS_DLL == 1 */ +# define SIMPLEEMITTER_EXEC_Export +# define SIMPLEEMITTER_EXEC_SINGLETON_DECLARATION(T) +# define SIMPLEEMITTER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEEMITTER_EXEC_HAS_DLL == 1 */ + +// Set SIMPLEEMITTER_EXEC_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEEMITTER_EXEC_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEEMITTER_EXEC_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEEMITTER_EXEC_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEEMITTER_EXEC_NTRACE */ + +#if (SIMPLEEMITTER_EXEC_NTRACE == 1) +# define SIMPLEEMITTER_EXEC_TRACE(X) +#else /* (SIMPLEEMITTER_EXEC_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEEMITTER_EXEC_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEEMITTER_EXEC_NTRACE == 1) */ + +#endif /* SIMPLEEMITTER_EXEC_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter_stub_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter_stub_export.h new file mode 100644 index 00000000000..797140271a4 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter_stub_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEEMITTER_STUB +// ------------------------------ +#ifndef SIMPLEEMITTER_STUB_EXPORT_H +#define SIMPLEEMITTER_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEEMITTER_STUB_HAS_DLL) +# define SIMPLEEMITTER_STUB_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEEMITTER_STUB_HAS_DLL */ + +#if !defined (SIMPLEEMITTER_STUB_HAS_DLL) +# define SIMPLEEMITTER_STUB_HAS_DLL 1 +#endif /* ! SIMPLEEMITTER_STUB_HAS_DLL */ + +#if defined (SIMPLEEMITTER_STUB_HAS_DLL) && (SIMPLEEMITTER_STUB_HAS_DLL == 1) +# if defined (SIMPLEEMITTER_STUB_BUILD_DLL) +# define SIMPLEEMITTER_STUB_Export ACE_Proper_Export_Flag +# define SIMPLEEMITTER_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEEMITTER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEEMITTER_STUB_BUILD_DLL */ +# define SIMPLEEMITTER_STUB_Export ACE_Proper_Import_Flag +# define SIMPLEEMITTER_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEEMITTER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEEMITTER_STUB_BUILD_DLL */ +#else /* SIMPLEEMITTER_STUB_HAS_DLL == 1 */ +# define SIMPLEEMITTER_STUB_Export +# define SIMPLEEMITTER_STUB_SINGLETON_DECLARATION(T) +# define SIMPLEEMITTER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEEMITTER_STUB_HAS_DLL == 1 */ + +// Set SIMPLEEMITTER_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEEMITTER_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEEMITTER_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEEMITTER_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEEMITTER_STUB_NTRACE */ + +#if (SIMPLEEMITTER_STUB_NTRACE == 1) +# define SIMPLEEMITTER_STUB_TRACE(X) +#else /* (SIMPLEEMITTER_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEEMITTER_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEEMITTER_STUB_NTRACE == 1) */ + +#endif /* SIMPLEEMITTER_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter_svnt_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter_svnt_export.h new file mode 100644 index 00000000000..0fdc781a895 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter_svnt_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEEMITTER_SVNT +// ------------------------------ +#ifndef SIMPLEEMITTER_SVNT_EXPORT_H +#define SIMPLEEMITTER_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEEMITTER_SVNT_HAS_DLL) +# define SIMPLEEMITTER_SVNT_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEEMITTER_SVNT_HAS_DLL */ + +#if !defined (SIMPLEEMITTER_SVNT_HAS_DLL) +# define SIMPLEEMITTER_SVNT_HAS_DLL 1 +#endif /* ! SIMPLEEMITTER_SVNT_HAS_DLL */ + +#if defined (SIMPLEEMITTER_SVNT_HAS_DLL) && (SIMPLEEMITTER_SVNT_HAS_DLL == 1) +# if defined (SIMPLEEMITTER_SVNT_BUILD_DLL) +# define SIMPLEEMITTER_SVNT_Export ACE_Proper_Export_Flag +# define SIMPLEEMITTER_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEEMITTER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEEMITTER_SVNT_BUILD_DLL */ +# define SIMPLEEMITTER_SVNT_Export ACE_Proper_Import_Flag +# define SIMPLEEMITTER_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEEMITTER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEEMITTER_SVNT_BUILD_DLL */ +#else /* SIMPLEEMITTER_SVNT_HAS_DLL == 1 */ +# define SIMPLEEMITTER_SVNT_Export +# define SIMPLEEMITTER_SVNT_SINGLETON_DECLARATION(T) +# define SIMPLEEMITTER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEEMITTER_SVNT_HAS_DLL == 1 */ + +// Set SIMPLEEMITTER_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEEMITTER_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEEMITTER_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEEMITTER_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEEMITTER_SVNT_NTRACE */ + +#if (SIMPLEEMITTER_SVNT_NTRACE == 1) +# define SIMPLEEMITTER_SVNT_TRACE(X) +#else /* (SIMPLEEMITTER_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEEMITTER_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEEMITTER_SVNT_NTRACE == 1) */ + +#endif /* SIMPLEEMITTER_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser.cidl b/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser.cidl new file mode 100644 index 00000000000..638efe0cb30 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser.cidl @@ -0,0 +1,11 @@ +// $Id$ +#include "SimpleMultipleUser.idl" + +composition session SimpleMultipleUser_Impl +{ + home executor SimpleMultipleUserHome_Exec + { + implements Simple::SimpleMultipleUserHome; + manages SimpleMultipleUser_Exec; + }; +}; diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser.idl b/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser.idl new file mode 100644 index 00000000000..60aec58f9af --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser.idl @@ -0,0 +1,21 @@ +// $Id$ + +#ifndef SIMPLE_MULTIPLEUSER_IDL +#define SIMPLE_MULTIPLEUSER_IDL + +#include "SimpleCommon.idl" +#include "Components.idl" + +module Simple +{ + component SimpleMultipleUser + { + uses multiple Trigger trig; + }; + + home SimpleMultipleUserHome manages SimpleMultipleUser + { + }; +}; + +#endif /*SIMPLE_MULTIPLEUSER_IDL*/ diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser.mpc b/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser.mpc new file mode 100644 index 00000000000..841ba3c2c99 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser.mpc @@ -0,0 +1,121 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl -p SimpleCommon SimpleMultipleUser" + +project(SimpleCommon_SimpleMultipleUser_idl_gen) : taoidldefaults, anytypecode { + avoids += ace_for_tao + custom_only = 1 + idlflags += -Wb,stub_export_macro=SIMPLEMULTIPLEUSER_STUB_Export \ + -Wb,stub_export_include=SimpleMultipleUser_stub_export.h \ + -Wb,skel_export_macro=SIMPLEMULTIPLEUSER_SVNT_Export \ + -Wb,skel_export_include=SimpleMultipleUser_svnt_export.h + + IDL_Files { + SimpleMultipleUser.idl + } +} + +project(SimpleCommon_SimpleMultipleUser_cidl_gen) : ciaocidldefaults, taoidldefaults { + avoids += ace_for_tao + custom_only = 1 + cidlflags += --svnt-export-macro SIMPLEMULTIPLEUSER_SVNT_Export \ + --svnt-export-include SimpleMultipleUser_svnt_export.h + idlflags += -Wb,export_macro=SIMPLEMULTIPLEUSER_EXEC_Export \ + -Wb,export_include=SimpleMultipleUser_exec_export.h \ + -SS + + CIDL_Files { + SimpleMultipleUser.cidl + } + + IDL_Files { + SimpleMultipleUserE.idl + } +} + +project(SimpleCommon_SimpleMultipleUser_stub) : ccm_stub { + avoids += ace_for_tao + after += SimpleCommon_SimpleMultipleUser_idl_gen SimpleCommon_stub + libs += SimpleCommon_stub + + sharedname = SimpleMultipleUser_stub + dynamicflags = SIMPLEMULTIPLEUSER_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimpleMultipleUserC.cpp + } + + Header_Files { + SimpleMultipleUserC.h + SimpleMultipleUser_stub_export.h + } + + Inline_Files { + SimpleMultipleUserC.inl + } +} + +project(SimpleCommon_SimpleMultipleUser_exec) : ciao_executor { + avoids += ace_for_tao + after += SimpleCommon_SimpleMultipleUser_cidl_gen SimpleCommon_SimpleMultipleUser_stub + sharedname = SimpleMultipleUser_exec + libs += SimpleMultipleUser_stub SimpleCommon_stub + + dynamicflags = SIMPLEMULTIPLEUSER_EXEC_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimpleMultipleUserEC.cpp + SimpleMultipleUser_exec.cpp + } + + Header_Files { + SimpleMultipleUserEC.h + SimpleMultipleUser_exec.h + SimpleMultipleUser_exec_export.h + } + + Inline_Files { + SimpleMultipleUserEC.inl + } +} + + +project(SimpleCommon_SimpleMultipleUser_svnt) : ciao_servant { + avoids += ace_for_tao + after += SimpleCommon_skel SimpleCommon_SimpleMultipleUser_exec + sharedname = SimpleMultipleUser_svnt + libs += SimpleMultipleUser_exec \ + SimpleMultipleUser_stub \ + SimpleCommon_skel \ + SimpleCommon_stub + + dynamicflags = SIMPLEMULTIPLEUSER_SVNT_BUILD_DLL + + CIDL_Files { + } + + IDL_Files { + } + + Source_Files { + SimpleMultipleUserS.cpp + SimpleMultipleUser_svnt.cpp + } + + Header_Files { + SimpleMultipleUserS.h + SimpleMultipleUser_svnt.h + SimpleMultipleUser_svnt_export.h + } + + Inline_Files { + SimpleMultipleUserS.inl + } +} + + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser_exec.cpp b/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser_exec.cpp new file mode 100644 index 00000000000..e69a11e6e0e --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser_exec.cpp @@ -0,0 +1,176 @@ +// $Id$ +// +// **** Code generated by the **** +// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** +// CIAO has been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// CIDL Compiler has been developed by: +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about CIAO is available at: +// http://www.dre.vanderbilt.edu/CIAO + +#include "SimpleMultipleUser_exec.h" +#include "ciao/CIAO_common.h" + +namespace CIDL_SimpleMultipleUser_Impl +{ + //================================================================== + // Component Executor Implementation Class: SimpleMultipleUser_exec_i + //================================================================== + + SimpleMultipleUser_exec_i::SimpleMultipleUser_exec_i (void) + { + CIAO_TRACE ("SimpleMultipleUser_exec_i::SimpleMultipleUser_exec_i (void)"); + } + + SimpleMultipleUser_exec_i::~SimpleMultipleUser_exec_i (void) + { + CIAO_TRACE ("SimpleMultipleUser_exec_i::~SimpleMultipleUser_exec_i (void)"); + } + + // Supported or inherited operations. + + // Attribute operations. + + // Port operations. + + // Operations from Components::SessionComponent + + void + SimpleMultipleUser_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx) + { + CIAO_TRACE ("SimpleMultipleUser_exec_i::set_session_context ()"); + this->context_ = + ::Simple::CCM_SimpleMultipleUser_Context::_narrow (ctx); + + if (CORBA::is_nil (this->context_.in ())) + { + throw ::CORBA::INTERNAL (); + } + } + + void + SimpleMultipleUser_exec_i::configuration_complete () + { + CIAO_TRACE ("SimpleMultipleUser_exec_i::configuration_complete ()"); + // Your code here. + } + + void + SimpleMultipleUser_exec_i::ccm_activate () + { + CIAO_TRACE ("SimpleMultipleUser_exec_i::ccm_activate ()"); + + ::Simple::SimpleMultipleUser::trigConnections_var conns = + this->context_->get_connections_trig (); + + CIAO_DEBUG ((LM_NOTICE, "SimpleMultipleUser_exec_i::ccm_activate - " + "Got %u connections to my receptacle\n", + conns->length ())); + + for (CORBA::ULong i = 0; i < conns->length (); ++i) + { + try + { + CIAO_DEBUG ((LM_NOTICE, "SimpleMultipleUser_exec_i::ccm_activate - " + "Invoking %u'th connection\n", i)); + ::Simple::Trigger_var trig (conns[i].objref); + + trig->hello ("Test succeeded, hello from SimpleMultipleUser_exec"); + } + catch (CORBA::Exception &ex) + { + CIAO_ERROR ((LM_ERROR, "SimpleMultipleUser_exec_i::ccm_activate () - " + "Caught CORBA exception on %u'th reference, details follow:\n", + i)); + ex._tao_print_exception ("SimpleUser_exec_i::ccm_activate () - "); + } + catch (...) + { + CIAO_ERROR ((LM_ERROR, "SimpleMultipleUser_exec_i::ccm_activate () - " + "Error: Caught unknown exception whilst invoking reference for port trig.\n")); + } + } + + // Your code here. + } + + void + SimpleMultipleUser_exec_i::ccm_passivate () + { + CIAO_TRACE ("SimpleMultipleUser_exec_i::ccm_passivate ()"); + // Your code here. + } + + void + SimpleMultipleUser_exec_i::ccm_remove () + { + CIAO_TRACE ("SimpleMultipleUser_exec_i::ccm_remove ()"); + // Your code here. + } + + //================================================================== + // Home Executor Implementation Class: SimpleMultipleUserHome_exec_i + //================================================================== + + SimpleMultipleUserHome_exec_i::SimpleMultipleUserHome_exec_i (void) + { + CIAO_TRACE ("SimpleMultipleUserHome_exec_i::SimpleMultipleUserHome_exec_i (void)"); + } + + SimpleMultipleUserHome_exec_i::~SimpleMultipleUserHome_exec_i (void) + { + CIAO_TRACE ("SimpleMultipleUserHome_exec_i::~SimpleMultipleUserHome_exec_i (void)"); + } + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + ::Components::EnterpriseComponent_ptr + SimpleMultipleUserHome_exec_i::create () + { + CIAO_TRACE ("SimpleMultipleUserHome_exec_i::create ()"); + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_THROW_EX ( + retval, + SimpleMultipleUser_exec_i, + ::CORBA::NO_MEMORY ()); + + return retval; + } + + extern "C" SIMPLEMULTIPLEUSER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Simple_SimpleMultipleUserHome_Impl (void) + { + CIAO_TRACE ("create_Simple_SimpleMultipleUserHome_Impl (void)"); + ::Components::HomeExecutorBase_ptr retval = + ::Components::HomeExecutorBase::_nil (); + + ACE_NEW_RETURN ( + retval, + SimpleMultipleUserHome_exec_i, + ::Components::HomeExecutorBase::_nil ()); + + return retval; + } +} + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser_exec.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser_exec.h new file mode 100644 index 00000000000..180cce92554 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser_exec.h @@ -0,0 +1,98 @@ +// $Id$ +// +// **** Code generated by the **** +// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** +// CIAO has been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// CIDL Compiler has been developed by: +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about CIAO is available at: +// http://www.dre.vanderbilt.edu/CIAO + +#ifndef CIAO_SIMPLEMULTIPLEUSER_EXEC_H +#define CIAO_SIMPLEMULTIPLEUSER_EXEC_H + +#include /**/ "ace/pre.h" + +#include "SimpleMultipleUserEC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "SimpleMultipleUser_exec_export.h" +#include "tao/LocalObject.h" + +namespace CIDL_SimpleMultipleUser_Impl +{ + class SIMPLEMULTIPLEUSER_EXEC_Export SimpleMultipleUser_exec_i + : public virtual SimpleMultipleUser_Exec, + public virtual ::CORBA::LocalObject + { + public: + SimpleMultipleUser_exec_i (void); + virtual ~SimpleMultipleUser_exec_i (void); + + // Supported or inherited operations. + + // Attribute operations. + + // Port operations. + + // Operations from Components::SessionComponent + + virtual void + set_session_context ( + ::Components::SessionContext_ptr ctx); + + virtual void configuration_complete (); + + virtual void ccm_activate (); + + virtual void ccm_passivate (); + + virtual void ccm_remove (); + + private: + ::Simple::CCM_SimpleMultipleUser_Context_var context_; + }; + + class SIMPLEMULTIPLEUSER_EXEC_Export SimpleMultipleUserHome_exec_i + : public virtual SimpleMultipleUserHome_Exec, + public virtual ::CORBA::LocalObject + { + public: + SimpleMultipleUserHome_exec_i (void); + virtual ~SimpleMultipleUserHome_exec_i (void); + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + virtual ::Components::EnterpriseComponent_ptr + create (); + }; + + extern "C" SIMPLEMULTIPLEUSER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Simple_SimpleMultipleUserHome_Impl (void); +} + +#include /**/ "ace/post.h" + +#endif /* CIAO_SIMPLEMULTIPLEUSER_EXEC_H */ + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser_exec_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser_exec_export.h new file mode 100644 index 00000000000..79cec9f8fe7 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser_exec_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEMULTIPLEUSER_EXEC +// ------------------------------ +#ifndef SIMPLEMULTIPLEUSER_EXEC_EXPORT_H +#define SIMPLEMULTIPLEUSER_EXEC_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEMULTIPLEUSER_EXEC_HAS_DLL) +# define SIMPLEMULTIPLEUSER_EXEC_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEMULTIPLEUSER_EXEC_HAS_DLL */ + +#if !defined (SIMPLEMULTIPLEUSER_EXEC_HAS_DLL) +# define SIMPLEMULTIPLEUSER_EXEC_HAS_DLL 1 +#endif /* ! SIMPLEMULTIPLEUSER_EXEC_HAS_DLL */ + +#if defined (SIMPLEMULTIPLEUSER_EXEC_HAS_DLL) && (SIMPLEMULTIPLEUSER_EXEC_HAS_DLL == 1) +# if defined (SIMPLEMULTIPLEUSER_EXEC_BUILD_DLL) +# define SIMPLEMULTIPLEUSER_EXEC_Export ACE_Proper_Export_Flag +# define SIMPLEMULTIPLEUSER_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEMULTIPLEUSER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEMULTIPLEUSER_EXEC_BUILD_DLL */ +# define SIMPLEMULTIPLEUSER_EXEC_Export ACE_Proper_Import_Flag +# define SIMPLEMULTIPLEUSER_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEMULTIPLEUSER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEMULTIPLEUSER_EXEC_BUILD_DLL */ +#else /* SIMPLEMULTIPLEUSER_EXEC_HAS_DLL == 1 */ +# define SIMPLEMULTIPLEUSER_EXEC_Export +# define SIMPLEMULTIPLEUSER_EXEC_SINGLETON_DECLARATION(T) +# define SIMPLEMULTIPLEUSER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEMULTIPLEUSER_EXEC_HAS_DLL == 1 */ + +// Set SIMPLEMULTIPLEUSER_EXEC_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEMULTIPLEUSER_EXEC_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEMULTIPLEUSER_EXEC_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEMULTIPLEUSER_EXEC_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEMULTIPLEUSER_EXEC_NTRACE */ + +#if (SIMPLEMULTIPLEUSER_EXEC_NTRACE == 1) +# define SIMPLEMULTIPLEUSER_EXEC_TRACE(X) +#else /* (SIMPLEMULTIPLEUSER_EXEC_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEMULTIPLEUSER_EXEC_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEMULTIPLEUSER_EXEC_NTRACE == 1) */ + +#endif /* SIMPLEMULTIPLEUSER_EXEC_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser_stub_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser_stub_export.h new file mode 100644 index 00000000000..bf0be40ece3 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser_stub_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEMULTIPLEUSER_STUB +// ------------------------------ +#ifndef SIMPLEMULTIPLEUSER_STUB_EXPORT_H +#define SIMPLEMULTIPLEUSER_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEMULTIPLEUSER_STUB_HAS_DLL) +# define SIMPLEMULTIPLEUSER_STUB_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEMULTIPLEUSER_STUB_HAS_DLL */ + +#if !defined (SIMPLEMULTIPLEUSER_STUB_HAS_DLL) +# define SIMPLEMULTIPLEUSER_STUB_HAS_DLL 1 +#endif /* ! SIMPLEMULTIPLEUSER_STUB_HAS_DLL */ + +#if defined (SIMPLEMULTIPLEUSER_STUB_HAS_DLL) && (SIMPLEMULTIPLEUSER_STUB_HAS_DLL == 1) +# if defined (SIMPLEMULTIPLEUSER_STUB_BUILD_DLL) +# define SIMPLEMULTIPLEUSER_STUB_Export ACE_Proper_Export_Flag +# define SIMPLEMULTIPLEUSER_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEMULTIPLEUSER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEMULTIPLEUSER_STUB_BUILD_DLL */ +# define SIMPLEMULTIPLEUSER_STUB_Export ACE_Proper_Import_Flag +# define SIMPLEMULTIPLEUSER_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEMULTIPLEUSER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEMULTIPLEUSER_STUB_BUILD_DLL */ +#else /* SIMPLEMULTIPLEUSER_STUB_HAS_DLL == 1 */ +# define SIMPLEMULTIPLEUSER_STUB_Export +# define SIMPLEMULTIPLEUSER_STUB_SINGLETON_DECLARATION(T) +# define SIMPLEMULTIPLEUSER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEMULTIPLEUSER_STUB_HAS_DLL == 1 */ + +// Set SIMPLEMULTIPLEUSER_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEMULTIPLEUSER_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEMULTIPLEUSER_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEMULTIPLEUSER_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEMULTIPLEUSER_STUB_NTRACE */ + +#if (SIMPLEMULTIPLEUSER_STUB_NTRACE == 1) +# define SIMPLEMULTIPLEUSER_STUB_TRACE(X) +#else /* (SIMPLEMULTIPLEUSER_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEMULTIPLEUSER_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEMULTIPLEUSER_STUB_NTRACE == 1) */ + +#endif /* SIMPLEMULTIPLEUSER_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser_svnt_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser_svnt_export.h new file mode 100644 index 00000000000..97f0fdf0f00 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser_svnt_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEMULTIPLEUSER_SVNT +// ------------------------------ +#ifndef SIMPLEMULTIPLEUSER_SVNT_EXPORT_H +#define SIMPLEMULTIPLEUSER_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEMULTIPLEUSER_SVNT_HAS_DLL) +# define SIMPLEMULTIPLEUSER_SVNT_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEMULTIPLEUSER_SVNT_HAS_DLL */ + +#if !defined (SIMPLEMULTIPLEUSER_SVNT_HAS_DLL) +# define SIMPLEMULTIPLEUSER_SVNT_HAS_DLL 1 +#endif /* ! SIMPLEMULTIPLEUSER_SVNT_HAS_DLL */ + +#if defined (SIMPLEMULTIPLEUSER_SVNT_HAS_DLL) && (SIMPLEMULTIPLEUSER_SVNT_HAS_DLL == 1) +# if defined (SIMPLEMULTIPLEUSER_SVNT_BUILD_DLL) +# define SIMPLEMULTIPLEUSER_SVNT_Export ACE_Proper_Export_Flag +# define SIMPLEMULTIPLEUSER_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEMULTIPLEUSER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEMULTIPLEUSER_SVNT_BUILD_DLL */ +# define SIMPLEMULTIPLEUSER_SVNT_Export ACE_Proper_Import_Flag +# define SIMPLEMULTIPLEUSER_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEMULTIPLEUSER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEMULTIPLEUSER_SVNT_BUILD_DLL */ +#else /* SIMPLEMULTIPLEUSER_SVNT_HAS_DLL == 1 */ +# define SIMPLEMULTIPLEUSER_SVNT_Export +# define SIMPLEMULTIPLEUSER_SVNT_SINGLETON_DECLARATION(T) +# define SIMPLEMULTIPLEUSER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEMULTIPLEUSER_SVNT_HAS_DLL == 1 */ + +// Set SIMPLEMULTIPLEUSER_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEMULTIPLEUSER_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEMULTIPLEUSER_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEMULTIPLEUSER_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEMULTIPLEUSER_SVNT_NTRACE */ + +#if (SIMPLEMULTIPLEUSER_SVNT_NTRACE == 1) +# define SIMPLEMULTIPLEUSER_SVNT_TRACE(X) +#else /* (SIMPLEMULTIPLEUSER_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEMULTIPLEUSER_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEMULTIPLEUSER_SVNT_NTRACE == 1) */ + +#endif /* SIMPLEMULTIPLEUSER_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleNull.cidl b/CIAO/DAnCE/tests/CIAO/Components/SimpleNull.cidl new file mode 100644 index 00000000000..8c10398272a --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleNull.cidl @@ -0,0 +1,12 @@ +// $Id$ + +#include "SimpleNull.idl" + +composition session SimpleNull_Impl +{ + home executor SimpleNullHome_Exec + { + implements Simple::SimpleNullHome; + manages SimpleProvider_Exec; + }; +}; diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleNull.idl b/CIAO/DAnCE/tests/CIAO/Components/SimpleNull.idl new file mode 100644 index 00000000000..d8f02901be4 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleNull.idl @@ -0,0 +1,14 @@ +// $Id$ + +#include <Components.idl> + +module Simple +{ + component SimpleNull + { + }; + + home SimpleNullHome manages SimpleNull + { + }; +}; diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleNull.mpc b/CIAO/DAnCE/tests/CIAO/Components/SimpleNull.mpc new file mode 100644 index 00000000000..3e64dd78d9b --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleNull.mpc @@ -0,0 +1,119 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl SimpleNull" + +project(SimpleNull_idl_gen) : taoidldefaults, anytypecode { + avoids += ace_for_tao + custom_only = 1 + idlflags += -Wb,stub_export_macro=SIMPLENULL_STUB_Export \ + -Wb,stub_export_include=SimpleNull_stub_export.h \ + -Wb,skel_export_macro=SIMPLENULL_SVNT_Export \ + -Wb,skel_export_include=SimpleNull_svnt_export.h + + IDL_Files { + SimpleNull.idl + } +} + +project(SimpleNull_cidl_gen) : ciaocidldefaults, taoidldefaults { + avoids += ace_for_tao + custom_only = 1 + cidlflags += --svnt-export-macro SIMPLENULL_SVNT_Export \ + --svnt-export-include SimpleNull_svnt_export.h + idlflags += -Wb,export_macro=SIMPLENULL_EXEC_Export \ + -Wb,export_include=SimpleNull_exec_export.h \ + -SS + + CIDL_Files { + SimpleNull.cidl + } + + IDL_Files { + SimpleNullE.idl + } +} + +project(SimpleNull_stub) : ccm_stub { + avoids += ace_for_tao + after += SimpleNull_idl_gen + libs += + + sharedname = SimpleNull_stub + dynamicflags = SIMPLENULL_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimpleNullC.cpp + } + + Header_Files { + SimpleNullC.h + SimpleNull_stub_export.h + } + + Inline_Files { + SimpleNullC.inl + } +} + +project(SimpleNull_exec) : ciao_executor { + avoids += ace_for_tao + after += SimpleNull_cidl_gen SimpleNull_stub + sharedname = SimpleNull_exec + libs += SimpleNull_stub + + dynamicflags = SIMPLENULL_EXEC_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimpleNullEC.cpp + SimpleNull_exec.cpp + } + + Header_Files { + SimpleNullEC.h + SimpleNull_exec.h + SimpleNull_exec_export.h + } + + Inline_Files { + SimpleNullEC.inl + } +} + + +project(SimpleNull_svnt) : ciao_servant { + avoids += ace_for_tao + after += SimpleNull_exec + sharedname = SimpleNull_svnt + libs += SimpleNull_exec \ + SimpleNull_stub + + dynamicflags = SIMPLENULL_SVNT_BUILD_DLL + + CIDL_Files { + } + + IDL_Files { + } + + Source_Files { + SimpleNullS.cpp + SimpleNull_svnt.cpp + } + + Header_Files { + SimpleNullS.h + SimpleNull_svnt.h + SimpleNull_svnt_export.h + } + + Inline_Files { + SimpleNullS.inl + } +} + + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleNull_exec.cpp b/CIAO/DAnCE/tests/CIAO/Components/SimpleNull_exec.cpp new file mode 100644 index 00000000000..15ee5ee2dbb --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleNull_exec.cpp @@ -0,0 +1,168 @@ +// $Id$ +// +// **** Code generated by the **** +// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** +// CIAO has been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// CIDL Compiler has been developed by: +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about CIAO is available at: +// http://www.dre.vanderbilt.edu/CIAO + +#include "SimpleNull_exec.h" +#include "ciao/CIAO_common.h" + +namespace CIDL_SimpleNull_Impl +{ + //================================================================== + // Component Executor Implementation Class: SimpleNull_exec_i + //================================================================== + + SimpleNull_exec_i::SimpleNull_exec_i (void) + { + CIAO_TRACE ("SimpleNull_exec_i::SimpleNull_exec_i (void)"); + CIAO_DEBUG ((LM_EMERGENCY, "SimpleNull - Test - Lifecycle event - SimpleNull_exec_i::SimpleNull_exec_i (void)\n")); + } + + SimpleNull_exec_i::~SimpleNull_exec_i (void) + { + CIAO_TRACE ("SimpleNull_exec_i::~SimpleNull_exec_i"); + CIAO_DEBUG ((LM_EMERGENCY, "SimpleNull - Test - Lifecycle event - SimpleNull_exec_i::~SimpleNull_exec_i\n")); + } + + // Supported or inherited operations. + + // Attribute operations. + + // Port operations. + + // Operations from Components::SessionComponent + + void + SimpleNull_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx) + { + CIAO_TRACE ("SimpleNull_exec_i::set_session_context"); + CIAO_DEBUG ((LM_EMERGENCY, "SimpleNull - Test - Lifecycle event - SimpleNull_exec_i::set_session_context\n")); + this->context_ = + ::Simple::CCM_SimpleNull_Context::_narrow (ctx); + + if (CORBA::is_nil (this->context_.in ())) + { + throw ::CORBA::INTERNAL (); + } + } + + void + SimpleNull_exec_i::configuration_complete () + { + CIAO_TRACE ("SimpleNull_exec_i::configuration_complete\n"); + CIAO_DEBUG ((LM_EMERGENCY, "SimpleNull - Test - Lifecycle event - SimpleNull_exec_i::configuration_complete\n")); + // Your code here. + } + + void + SimpleNull_exec_i::ccm_activate () + { + CIAO_TRACE ("SimpleNull_exec_i::ccm_activate"); + CIAO_DEBUG ((LM_EMERGENCY, "SimpleNull - Test - Lifecycle event - SimpleNull_exec_i::ccm_activate\n")); + // Your code here. + } + + void + SimpleNull_exec_i::ccm_passivate () + { + CIAO_TRACE ("SimpleNull_exec_i::ccm_passivate"); + CIAO_DEBUG ((LM_EMERGENCY, "SimpleNull - Test - Lifecycle event - SimpleNull_exec_i::ccm_passivate\n")); + // Your code here. + } + + void + SimpleNull_exec_i::ccm_remove () + { + CIAO_TRACE ("SimpleNull_exec_i::ccm_remove"); + CIAO_DEBUG ((LM_EMERGENCY, "SimpleNull - Test - Lifecycle event - SimpleNull_exec_i::ccm_remove\n")); + // Your code here. + } + + extern "C" SIMPLENULL_EXEC_Export ::Components::EnterpriseComponent_ptr + create_Simple_SimpleNull_Impl (void) + { + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_RETURN (retval, + SimpleNull_exec_i, + ::Components::EnterpriseComponent::_nil ()); + + return retval; + } + + //================================================================== + // Home Executor Implementation Class: SimpleNullHome_exec_i + //================================================================== + + SimpleNullHome_exec_i::SimpleNullHome_exec_i (void) + { + CIAO_TRACE ("SimpleNullHome_exec_i::SimpleNullHome_exec_i"); + CIAO_DEBUG ((LM_EMERGENCY, "SimpleNull - Test - Lifecycle event - SimpleNullHome_exec_i::SimpleNullHome_exec_i\n")); + } + + SimpleNullHome_exec_i::~SimpleNullHome_exec_i (void) + { + CIAO_TRACE ("SimpleNullHome_exec_i::~SimpleNullHome_exec_i"); + CIAO_DEBUG ((LM_EMERGENCY, "SimpleNull - Test - Lifecycle event - SimpleNullHome_exec_i::~SimpleNullHome_exec_i\n")); + } + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + ::Components::EnterpriseComponent_ptr + SimpleNullHome_exec_i::create () + { + CIAO_TRACE ("SimpleNullHome_exec_i::create"); + CIAO_DEBUG ((LM_EMERGENCY, "SimpleNull - Test - Lifecycle event - SimpleNullHome_exec_i::create\n")); + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_THROW_EX ( + retval, + SimpleNull_exec_i, + ::CORBA::NO_MEMORY ()); + + return retval; + } + + extern "C" SIMPLENULL_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Simple_SimpleNullHome_Impl (void) + { + CIAO_TRACE ("create_Simple_SimpleNullHome_Impl"); + CIAO_DEBUG ((LM_EMERGENCY, "SimpleNull - Test - Lifecycle event - create_Simple_SimpleNullHome_Impl\n")); + ::Components::HomeExecutorBase_ptr retval = + ::Components::HomeExecutorBase::_nil (); + + ACE_NEW_RETURN ( + retval, + SimpleNullHome_exec_i, + ::Components::HomeExecutorBase::_nil ()); + + return retval; + } +} + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleNull_exec.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleNull_exec.h new file mode 100644 index 00000000000..e5887e7afdc --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleNull_exec.h @@ -0,0 +1,101 @@ +// $Id$ +// +// **** Code generated by the **** +// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** +// CIAO has been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// CIDL Compiler has been developed by: +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about CIAO is available at: +// http://www.dre.vanderbilt.edu/CIAO + +#ifndef CIAO_SIMPLENULL_EXEC_H +#define CIAO_SIMPLENULL_EXEC_H + +#include /**/ "ace/pre.h" + +#include "SimpleNullEC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "SimpleNull_exec_export.h" +#include "tao/LocalObject.h" + +namespace CIDL_SimpleNull_Impl +{ + class SIMPLENULL_EXEC_Export SimpleNull_exec_i + : public virtual SimpleProvider_Exec, + public virtual ::CORBA::LocalObject + { + public: + SimpleNull_exec_i (void); + virtual ~SimpleNull_exec_i (void); + + // Supported or inherited operations. + + // Attribute operations. + + // Port operations. + + // Operations from Components::SessionComponent + + virtual void + set_session_context ( + ::Components::SessionContext_ptr ctx); + + virtual void configuration_complete (); + + virtual void ccm_activate (); + + virtual void ccm_passivate (); + + virtual void ccm_remove (); + + private: + ::Simple::CCM_SimpleNull_Context_var context_; + }; + + extern "C" SIMPLENULL_EXEC_Export ::Components::EnterpriseComponent_ptr + create_Simple_SimpleNull_Impl (void); + + class SIMPLENULL_EXEC_Export SimpleNullHome_exec_i + : public virtual SimpleNullHome_Exec, + public virtual ::CORBA::LocalObject + { + public: + SimpleNullHome_exec_i (void); + virtual ~SimpleNullHome_exec_i (void); + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + virtual ::Components::EnterpriseComponent_ptr + create (); + }; + + extern "C" SIMPLENULL_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Simple_SimpleNullHome_Impl (void); +} + +#include /**/ "ace/post.h" + +#endif /* CIAO_SIMPLENULL_EXEC_H */ + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleNull_exec_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleNull_exec_export.h new file mode 100644 index 00000000000..5d0ff473419 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleNull_exec_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLENULL_EXEC +// ------------------------------ +#ifndef SIMPLENULL_EXEC_EXPORT_H +#define SIMPLENULL_EXEC_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLENULL_EXEC_HAS_DLL) +# define SIMPLENULL_EXEC_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLENULL_EXEC_HAS_DLL */ + +#if !defined (SIMPLENULL_EXEC_HAS_DLL) +# define SIMPLENULL_EXEC_HAS_DLL 1 +#endif /* ! SIMPLENULL_EXEC_HAS_DLL */ + +#if defined (SIMPLENULL_EXEC_HAS_DLL) && (SIMPLENULL_EXEC_HAS_DLL == 1) +# if defined (SIMPLENULL_EXEC_BUILD_DLL) +# define SIMPLENULL_EXEC_Export ACE_Proper_Export_Flag +# define SIMPLENULL_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLENULL_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLENULL_EXEC_BUILD_DLL */ +# define SIMPLENULL_EXEC_Export ACE_Proper_Import_Flag +# define SIMPLENULL_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLENULL_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLENULL_EXEC_BUILD_DLL */ +#else /* SIMPLENULL_EXEC_HAS_DLL == 1 */ +# define SIMPLENULL_EXEC_Export +# define SIMPLENULL_EXEC_SINGLETON_DECLARATION(T) +# define SIMPLENULL_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLENULL_EXEC_HAS_DLL == 1 */ + +// Set SIMPLENULL_EXEC_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLENULL_EXEC_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLENULL_EXEC_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLENULL_EXEC_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLENULL_EXEC_NTRACE */ + +#if (SIMPLENULL_EXEC_NTRACE == 1) +# define SIMPLENULL_EXEC_TRACE(X) +#else /* (SIMPLENULL_EXEC_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLENULL_EXEC_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLENULL_EXEC_NTRACE == 1) */ + +#endif /* SIMPLENULL_EXEC_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleNull_stub_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleNull_stub_export.h new file mode 100644 index 00000000000..17eef930019 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleNull_stub_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLENULL_STUB +// ------------------------------ +#ifndef SIMPLENULL_STUB_EXPORT_H +#define SIMPLENULL_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLENULL_STUB_HAS_DLL) +# define SIMPLENULL_STUB_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLENULL_STUB_HAS_DLL */ + +#if !defined (SIMPLENULL_STUB_HAS_DLL) +# define SIMPLENULL_STUB_HAS_DLL 1 +#endif /* ! SIMPLENULL_STUB_HAS_DLL */ + +#if defined (SIMPLENULL_STUB_HAS_DLL) && (SIMPLENULL_STUB_HAS_DLL == 1) +# if defined (SIMPLENULL_STUB_BUILD_DLL) +# define SIMPLENULL_STUB_Export ACE_Proper_Export_Flag +# define SIMPLENULL_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLENULL_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLENULL_STUB_BUILD_DLL */ +# define SIMPLENULL_STUB_Export ACE_Proper_Import_Flag +# define SIMPLENULL_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLENULL_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLENULL_STUB_BUILD_DLL */ +#else /* SIMPLENULL_STUB_HAS_DLL == 1 */ +# define SIMPLENULL_STUB_Export +# define SIMPLENULL_STUB_SINGLETON_DECLARATION(T) +# define SIMPLENULL_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLENULL_STUB_HAS_DLL == 1 */ + +// Set SIMPLENULL_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLENULL_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLENULL_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLENULL_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLENULL_STUB_NTRACE */ + +#if (SIMPLENULL_STUB_NTRACE == 1) +# define SIMPLENULL_STUB_TRACE(X) +#else /* (SIMPLENULL_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLENULL_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLENULL_STUB_NTRACE == 1) */ + +#endif /* SIMPLENULL_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleNull_svnt_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleNull_svnt_export.h new file mode 100644 index 00000000000..9afa614f9a4 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleNull_svnt_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLENULL_SVNT +// ------------------------------ +#ifndef SIMPLENULL_SVNT_EXPORT_H +#define SIMPLENULL_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLENULL_SVNT_HAS_DLL) +# define SIMPLENULL_SVNT_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLENULL_SVNT_HAS_DLL */ + +#if !defined (SIMPLENULL_SVNT_HAS_DLL) +# define SIMPLENULL_SVNT_HAS_DLL 1 +#endif /* ! SIMPLENULL_SVNT_HAS_DLL */ + +#if defined (SIMPLENULL_SVNT_HAS_DLL) && (SIMPLENULL_SVNT_HAS_DLL == 1) +# if defined (SIMPLENULL_SVNT_BUILD_DLL) +# define SIMPLENULL_SVNT_Export ACE_Proper_Export_Flag +# define SIMPLENULL_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLENULL_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLENULL_SVNT_BUILD_DLL */ +# define SIMPLENULL_SVNT_Export ACE_Proper_Import_Flag +# define SIMPLENULL_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLENULL_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLENULL_SVNT_BUILD_DLL */ +#else /* SIMPLENULL_SVNT_HAS_DLL == 1 */ +# define SIMPLENULL_SVNT_Export +# define SIMPLENULL_SVNT_SINGLETON_DECLARATION(T) +# define SIMPLENULL_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLENULL_SVNT_HAS_DLL == 1 */ + +// Set SIMPLENULL_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLENULL_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLENULL_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLENULL_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLENULL_SVNT_NTRACE */ + +#if (SIMPLENULL_SVNT_NTRACE == 1) +# define SIMPLENULL_SVNT_TRACE(X) +#else /* (SIMPLENULL_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLENULL_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLENULL_SVNT_NTRACE == 1) */ + +#endif /* SIMPLENULL_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider.cidl b/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider.cidl new file mode 100644 index 00000000000..cff76c14b89 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider.cidl @@ -0,0 +1,11 @@ +// $Id$ +#include "SimpleProvider.idl" + +composition session SimpleProvider_Impl +{ + home executor SimpleProviderHome_Exec + { + implements Simple::SimpleProviderHome; + manages SimpleProvider_Exec; + }; +}; diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider.idl b/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider.idl new file mode 100644 index 00000000000..97e2c80984b --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider.idl @@ -0,0 +1,21 @@ +// $Id$ + +#ifndef SIMPLE_PROVIDER_IDL +#define SIMPLE_PROVIDER_IDL + +#include "SimpleCommon.idl" +#include "Components.idl" + +module Simple +{ + component SimpleProvider + { + provides Trigger trig; + }; + + home SimpleProviderHome manages SimpleProvider + { + }; +}; + +#endif /*SIMPLE_PROVIDER_IDL*/ diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider.mpc b/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider.mpc new file mode 100644 index 00000000000..c917d235490 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider.mpc @@ -0,0 +1,121 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl -p SimpleCommon SimpleProvider" + +project(SimpleCommon_SimpleProvider_idl_gen) : taoidldefaults, anytypecode { + avoids += ace_for_tao + custom_only = 1 + idlflags += -Wb,stub_export_macro=SIMPLEPROVIDER_STUB_Export \ + -Wb,stub_export_include=SimpleProvider_stub_export.h \ + -Wb,skel_export_macro=SIMPLEPROVIDER_SVNT_Export \ + -Wb,skel_export_include=SimpleProvider_svnt_export.h + + IDL_Files { + SimpleProvider.idl + } +} + +project(SimpleCommon_SimpleProvider_cidl_gen) : ciaocidldefaults, taoidldefaults { + avoids += ace_for_tao + custom_only = 1 + cidlflags += --svnt-export-macro SIMPLEPROVIDER_SVNT_Export \ + --svnt-export-include SimpleProvider_svnt_export.h + idlflags += -Wb,export_macro=SIMPLEPROVIDER_EXEC_Export \ + -Wb,export_include=SimpleProvider_exec_export.h \ + -SS + + CIDL_Files { + SimpleProvider.cidl + } + + IDL_Files { + SimpleProviderE.idl + } +} + +project(SimpleCommon_SimpleProvider_stub) : ccm_stub { + avoids += ace_for_tao + after += SimpleCommon_SimpleProvider_idl_gen SimpleCommon_stub + libs += SimpleCommon_stub + + sharedname = SimpleProvider_stub + dynamicflags = SIMPLEPROVIDER_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimpleProviderC.cpp + } + + Header_Files { + SimpleProviderC.h + SimpleProvider_stub_export.h + } + + Inline_Files { + SimpleProviderC.inl + } +} + +project(SimpleCommon_SimpleProvider_exec) : ciao_executor { + avoids += ace_for_tao + after += SimpleCommon_SimpleProvider_cidl_gen SimpleCommon_SimpleProvider_stub + sharedname = SimpleProvider_exec + libs += SimpleProvider_stub SimpleCommon_stub + + dynamicflags = SIMPLEPROVIDER_EXEC_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimpleProviderEC.cpp + SimpleProvider_exec.cpp + } + + Header_Files { + SimpleProviderEC.h + SimpleProvider_exec.h + SimpleProvider_exec_export.h + } + + Inline_Files { + SimpleProviderEC.inl + } +} + + +project(SimpleCommon_SimpleProvider_svnt) : ciao_servant { + avoids += ace_for_tao + after += SimpleCommon_skel SimpleCommon_SimpleProvider_exec + sharedname = SimpleProvider_svnt + libs += SimpleProvider_exec \ + SimpleProvider_stub \ + SimpleCommon_skel \ + SimpleCommon_stub + + dynamicflags = SIMPLEPROVIDER_SVNT_BUILD_DLL + + CIDL_Files { + } + + IDL_Files { + } + + Source_Files { + SimpleProviderS.cpp + SimpleProvider_svnt.cpp + } + + Header_Files { + SimpleProviderS.h + SimpleProvider_svnt.h + SimpleProvider_svnt_export.h + } + + Inline_Files { + SimpleProviderS.inl + } +} + + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider_exec.cpp b/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider_exec.cpp new file mode 100644 index 00000000000..63453474a67 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider_exec.cpp @@ -0,0 +1,178 @@ +// $Id$ +// +// **** Code generated by the **** +// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** +// CIAO has been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// CIDL Compiler has been developed by: +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about CIAO is available at: +// http://www.dre.vanderbilt.edu/CIAO + +#include "SimpleProvider_exec.h" +#include "ciao/CIAO_common.h" + +namespace CIDL_SimpleProvider_Impl +{ + //================================================================== + // Facet Executor Implementation Class: Trigger_exec_i + //================================================================== + + Trigger_exec_i::Trigger_exec_i (void) + { + CIAO_TRACE ("Trigger_exec_i::Trigger_exec_i (void)"); + } + + Trigger_exec_i::~Trigger_exec_i (void) + { + CIAO_TRACE ("Trigger_exec_i::~Trigger_exec_i (void)"); + } + + // Operations from ::Simple::Trigger + + void + Trigger_exec_i::hello ( + const char * hello ) + { + CIAO_TRACE ("Trigger_exec_i::hello ()"); + // Your code here. + CIAO_DEBUG ((LM_EMERGENCY, "Trigger_exec_i::hello - " + "Got the following intofrmation from trig port: %s\n", + hello)); + } + + //================================================================== + // Component Executor Implementation Class: SimpleProvider_exec_i + //================================================================== + + SimpleProvider_exec_i::SimpleProvider_exec_i (void) + { + CIAO_TRACE ("SimpleProvider_exec_i::SimpleProvider_exec_i (void)"); + } + + SimpleProvider_exec_i::~SimpleProvider_exec_i (void) + { + CIAO_TRACE ("SimpleProvider_exec_i::~SimpleProvider_exec_i (void)"); + } + + // Supported or inherited operations. + + // Attribute operations. + + // Port operations. + + ::Simple::CCM_Trigger_ptr + SimpleProvider_exec_i::get_trig () + { + CIAO_TRACE ("SimpleProvider_exec_i::get_trig ()"); + return new Trigger_exec_i (); + } + + // Operations from Components::SessionComponent + + void + SimpleProvider_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx) + { + CIAO_TRACE ("SimpleProvider_exec_i::set_session_context ()"); + this->context_ = + ::Simple::CCM_SimpleProvider_Context::_narrow (ctx); + + if (CORBA::is_nil (this->context_.in ())) + { + throw ::CORBA::INTERNAL (); + } + } + + void + SimpleProvider_exec_i::configuration_complete () + { + CIAO_TRACE ("SimpleProvider_exec_i::configuration_complete ()"); + // Your code here. + } + + void + SimpleProvider_exec_i::ccm_activate () + { + CIAO_TRACE ("SimpleProvider_exec_i::ccm_activate ()"); + // Your code here. + } + + void + SimpleProvider_exec_i::ccm_passivate () + { + CIAO_TRACE ("SimpleProvider_exec_i::ccm_passivate ()"); + // Your code here. + } + + void + SimpleProvider_exec_i::ccm_remove () + { + CIAO_TRACE ("SimpleProvider_exec_i::ccm_remove ()"); + // Your code here. + } + + //================================================================== + // Home Executor Implementation Class: SimpleProviderHome_exec_i + //================================================================== + + SimpleProviderHome_exec_i::SimpleProviderHome_exec_i (void) + { + CIAO_TRACE ("SimpleProviderHome_exec_i::SimpleProviderHome_exec_i (void)"); + } + + SimpleProviderHome_exec_i::~SimpleProviderHome_exec_i (void) + { + CIAO_TRACE ("SimpleProviderHome_exec_i::~SimpleProviderHome_exec_i (void)"); + } + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + ::Components::EnterpriseComponent_ptr + SimpleProviderHome_exec_i::create () + { + CIAO_TRACE ("SimpleProviderHome_exec_i::create ()"); + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_THROW_EX ( + retval, + SimpleProvider_exec_i, + ::CORBA::NO_MEMORY ()); + + return retval; + } + + extern "C" SIMPLEPROVIDER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Simple_SimpleProviderHome_Impl (void) + { + CIAO_TRACE ("create_Simple_SimpleProviderHome_Impl (void)"); + ::Components::HomeExecutorBase_ptr retval = + ::Components::HomeExecutorBase::_nil (); + + ACE_NEW_RETURN ( + retval, + SimpleProviderHome_exec_i, + ::Components::HomeExecutorBase::_nil ()); + + return retval; + } +} + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider_exec.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider_exec.h new file mode 100644 index 00000000000..044c9aa56e3 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider_exec.h @@ -0,0 +1,116 @@ +// $Id$ +// +// **** Code generated by the **** +// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** +// CIAO has been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// CIDL Compiler has been developed by: +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about CIAO is available at: +// http://www.dre.vanderbilt.edu/CIAO + +#ifndef CIAO_SIMPLEPROVIDER_EXEC_H +#define CIAO_SIMPLEPROVIDER_EXEC_H + +#include /**/ "ace/pre.h" + +#include "SimpleProviderEC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "SimpleProvider_exec_export.h" +#include "tao/LocalObject.h" + +namespace CIDL_SimpleProvider_Impl +{ + class SIMPLEPROVIDER_EXEC_Export Trigger_exec_i + : public virtual ::Simple::CCM_Trigger, + public virtual ::CORBA::LocalObject + { + public: + Trigger_exec_i (void); + virtual ~Trigger_exec_i (void); + + // Operations from ::Simple::Trigger + + virtual void + hello ( + const char * hello); + }; + + class SIMPLEPROVIDER_EXEC_Export SimpleProvider_exec_i + : public virtual SimpleProvider_Exec, + public virtual ::CORBA::LocalObject + { + public: + SimpleProvider_exec_i (void); + virtual ~SimpleProvider_exec_i (void); + + // Supported or inherited operations. + + // Attribute operations. + + // Port operations. + + virtual ::Simple::CCM_Trigger_ptr + get_trig (); + + // Operations from Components::SessionComponent + + virtual void + set_session_context ( + ::Components::SessionContext_ptr ctx); + + virtual void configuration_complete (); + + virtual void ccm_activate (); + + virtual void ccm_passivate (); + + virtual void ccm_remove (); + + private: + ::Simple::CCM_SimpleProvider_Context_var context_; + }; + + class SIMPLEPROVIDER_EXEC_Export SimpleProviderHome_exec_i + : public virtual SimpleProviderHome_Exec, + public virtual ::CORBA::LocalObject + { + public: + SimpleProviderHome_exec_i (void); + virtual ~SimpleProviderHome_exec_i (void); + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + virtual ::Components::EnterpriseComponent_ptr + create (); + }; + + extern "C" SIMPLEPROVIDER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Simple_SimpleProviderHome_Impl (void); +} + +#include /**/ "ace/post.h" + +#endif /* CIAO_SIMPLEPROVIDER_EXEC_H */ + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider_exec_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider_exec_export.h new file mode 100644 index 00000000000..c5e9182f61f --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider_exec_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEPROVIDER_EXEC +// ------------------------------ +#ifndef SIMPLEPROVIDER_EXEC_EXPORT_H +#define SIMPLEPROVIDER_EXEC_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEPROVIDER_EXEC_HAS_DLL) +# define SIMPLEPROVIDER_EXEC_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEPROVIDER_EXEC_HAS_DLL */ + +#if !defined (SIMPLEPROVIDER_EXEC_HAS_DLL) +# define SIMPLEPROVIDER_EXEC_HAS_DLL 1 +#endif /* ! SIMPLEPROVIDER_EXEC_HAS_DLL */ + +#if defined (SIMPLEPROVIDER_EXEC_HAS_DLL) && (SIMPLEPROVIDER_EXEC_HAS_DLL == 1) +# if defined (SIMPLEPROVIDER_EXEC_BUILD_DLL) +# define SIMPLEPROVIDER_EXEC_Export ACE_Proper_Export_Flag +# define SIMPLEPROVIDER_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEPROVIDER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEPROVIDER_EXEC_BUILD_DLL */ +# define SIMPLEPROVIDER_EXEC_Export ACE_Proper_Import_Flag +# define SIMPLEPROVIDER_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEPROVIDER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEPROVIDER_EXEC_BUILD_DLL */ +#else /* SIMPLEPROVIDER_EXEC_HAS_DLL == 1 */ +# define SIMPLEPROVIDER_EXEC_Export +# define SIMPLEPROVIDER_EXEC_SINGLETON_DECLARATION(T) +# define SIMPLEPROVIDER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEPROVIDER_EXEC_HAS_DLL == 1 */ + +// Set SIMPLEPROVIDER_EXEC_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEPROVIDER_EXEC_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEPROVIDER_EXEC_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEPROVIDER_EXEC_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEPROVIDER_EXEC_NTRACE */ + +#if (SIMPLEPROVIDER_EXEC_NTRACE == 1) +# define SIMPLEPROVIDER_EXEC_TRACE(X) +#else /* (SIMPLEPROVIDER_EXEC_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEPROVIDER_EXEC_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEPROVIDER_EXEC_NTRACE == 1) */ + +#endif /* SIMPLEPROVIDER_EXEC_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider_stub_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider_stub_export.h new file mode 100644 index 00000000000..795f3fec902 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider_stub_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEPROVIDER_STUB +// ------------------------------ +#ifndef SIMPLEPROVIDER_STUB_EXPORT_H +#define SIMPLEPROVIDER_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEPROVIDER_STUB_HAS_DLL) +# define SIMPLEPROVIDER_STUB_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEPROVIDER_STUB_HAS_DLL */ + +#if !defined (SIMPLEPROVIDER_STUB_HAS_DLL) +# define SIMPLEPROVIDER_STUB_HAS_DLL 1 +#endif /* ! SIMPLEPROVIDER_STUB_HAS_DLL */ + +#if defined (SIMPLEPROVIDER_STUB_HAS_DLL) && (SIMPLEPROVIDER_STUB_HAS_DLL == 1) +# if defined (SIMPLEPROVIDER_STUB_BUILD_DLL) +# define SIMPLEPROVIDER_STUB_Export ACE_Proper_Export_Flag +# define SIMPLEPROVIDER_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEPROVIDER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEPROVIDER_STUB_BUILD_DLL */ +# define SIMPLEPROVIDER_STUB_Export ACE_Proper_Import_Flag +# define SIMPLEPROVIDER_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEPROVIDER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEPROVIDER_STUB_BUILD_DLL */ +#else /* SIMPLEPROVIDER_STUB_HAS_DLL == 1 */ +# define SIMPLEPROVIDER_STUB_Export +# define SIMPLEPROVIDER_STUB_SINGLETON_DECLARATION(T) +# define SIMPLEPROVIDER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEPROVIDER_STUB_HAS_DLL == 1 */ + +// Set SIMPLEPROVIDER_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEPROVIDER_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEPROVIDER_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEPROVIDER_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEPROVIDER_STUB_NTRACE */ + +#if (SIMPLEPROVIDER_STUB_NTRACE == 1) +# define SIMPLEPROVIDER_STUB_TRACE(X) +#else /* (SIMPLEPROVIDER_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEPROVIDER_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEPROVIDER_STUB_NTRACE == 1) */ + +#endif /* SIMPLEPROVIDER_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider_svnt_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider_svnt_export.h new file mode 100644 index 00000000000..5f6be2501b6 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider_svnt_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEPROVIDER_SVNT +// ------------------------------ +#ifndef SIMPLEPROVIDER_SVNT_EXPORT_H +#define SIMPLEPROVIDER_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEPROVIDER_SVNT_HAS_DLL) +# define SIMPLEPROVIDER_SVNT_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEPROVIDER_SVNT_HAS_DLL */ + +#if !defined (SIMPLEPROVIDER_SVNT_HAS_DLL) +# define SIMPLEPROVIDER_SVNT_HAS_DLL 1 +#endif /* ! SIMPLEPROVIDER_SVNT_HAS_DLL */ + +#if defined (SIMPLEPROVIDER_SVNT_HAS_DLL) && (SIMPLEPROVIDER_SVNT_HAS_DLL == 1) +# if defined (SIMPLEPROVIDER_SVNT_BUILD_DLL) +# define SIMPLEPROVIDER_SVNT_Export ACE_Proper_Export_Flag +# define SIMPLEPROVIDER_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEPROVIDER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEPROVIDER_SVNT_BUILD_DLL */ +# define SIMPLEPROVIDER_SVNT_Export ACE_Proper_Import_Flag +# define SIMPLEPROVIDER_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEPROVIDER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEPROVIDER_SVNT_BUILD_DLL */ +#else /* SIMPLEPROVIDER_SVNT_HAS_DLL == 1 */ +# define SIMPLEPROVIDER_SVNT_Export +# define SIMPLEPROVIDER_SVNT_SINGLETON_DECLARATION(T) +# define SIMPLEPROVIDER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEPROVIDER_SVNT_HAS_DLL == 1 */ + +// Set SIMPLEPROVIDER_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEPROVIDER_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEPROVIDER_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEPROVIDER_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEPROVIDER_SVNT_NTRACE */ + +#if (SIMPLEPROVIDER_SVNT_NTRACE == 1) +# define SIMPLEPROVIDER_SVNT_TRACE(X) +#else /* (SIMPLEPROVIDER_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEPROVIDER_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEPROVIDER_SVNT_NTRACE == 1) */ + +#endif /* SIMPLEPROVIDER_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher.cidl b/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher.cidl new file mode 100644 index 00000000000..d5bae5c32ee --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher.cidl @@ -0,0 +1,11 @@ +// $Id$ +#include "SimplePublisher.idl" + +composition session SimplePublisher_Impl +{ + home executor SimplePublisherHome_Exec + { + implements Simple::SimplePublisherHome; + manages SimplePublisher_Exec; + }; +}; diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher.idl b/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher.idl new file mode 100644 index 00000000000..cee261fd15a --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher.idl @@ -0,0 +1,21 @@ +// $Id$ + +#ifndef SIMPLE_PUBLISHER_IDL +#define SIMPLE_PUBLISHER_IDL + +#include "SimpleCommon.idl" +#include "Components.idl" + +module Simple +{ + component SimplePublisher + { + publishes Hello hello; + }; + + home SimplePublisherHome manages SimplePublisher + { + }; +}; + +#endif /*SIMPLE_PUBLISHER_IDL*/ diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher.mpc b/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher.mpc new file mode 100644 index 00000000000..232a4d462be --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher.mpc @@ -0,0 +1,121 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl -p SimpleCommon SimplePublisher" + +project(SimpleCommon_SimplePublisher_idl_gen) : taoidldefaults, anytypecode { + avoids += ace_for_tao + custom_only = 1 + idlflags += -Wb,stub_export_macro=SIMPLEPUBLISHER_STUB_Export \ + -Wb,stub_export_include=SimplePublisher_stub_export.h \ + -Wb,skel_export_macro=SIMPLEPUBLISHER_SVNT_Export \ + -Wb,skel_export_include=SimplePublisher_svnt_export.h + + IDL_Files { + SimplePublisher.idl + } +} + +project(SimpleCommon_SimplePublisher_cidl_gen) : ciaocidldefaults, taoidldefaults { + avoids += ace_for_tao + custom_only = 1 + cidlflags += --svnt-export-macro SIMPLEPUBLISHER_SVNT_Export \ + --svnt-export-include SimplePublisher_svnt_export.h + idlflags += -Wb,export_macro=SIMPLEPUBLISHER_EXEC_Export \ + -Wb,export_include=SimplePublisher_exec_export.h \ + -SS + + CIDL_Files { + SimplePublisher.cidl + } + + IDL_Files { + SimplePublisherE.idl + } +} + +project(SimpleCommon_SimplePublisher_stub) : ccm_stub { + avoids += ace_for_tao + after += SimpleCommon_SimplePublisher_idl_gen SimpleCommon_stub + libs += SimpleCommon_stub + + sharedname = SimplePublisher_stub + dynamicflags = SIMPLEPUBLISHER_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimplePublisherC.cpp + } + + Header_Files { + SimplePublisherC.h + SimplePublisher_stub_export.h + } + + Inline_Files { + SimplePublisherC.inl + } +} + +project(SimpleCommon_SimplePublisher_exec) : ciao_executor { + avoids += ace_for_tao + after += SimpleCommon_SimplePublisher_cidl_gen SimpleCommon_SimplePublisher_stub + sharedname = SimplePublisher_exec + libs += SimplePublisher_stub SimpleCommon_stub + + dynamicflags = SIMPLEPUBLISHER_EXEC_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimplePublisherEC.cpp + SimplePublisher_exec.cpp + } + + Header_Files { + SimplePublisherEC.h + SimplePublisher_exec.h + SimplePublisher_exec_export.h + } + + Inline_Files { + SimplePublisherEC.inl + } +} + + +project(SimpleCommon_SimplePublisher_svnt) : ciao_servant { + avoids += ace_for_tao + after += SimpleCommon_skel SimpleCommon_SimplePublisher_exec + sharedname = SimplePublisher_svnt + libs += SimplePublisher_exec \ + SimplePublisher_stub \ + SimpleCommon_skel \ + SimpleCommon_stub + + dynamicflags = SIMPLEPUBLISHER_SVNT_BUILD_DLL + + CIDL_Files { + } + + IDL_Files { + } + + Source_Files { + SimplePublisherS.cpp + SimplePublisher_svnt.cpp + } + + Header_Files { + SimplePublisherS.h + SimplePublisher_svnt.h + SimplePublisher_svnt_export.h + } + + Inline_Files { + SimplePublisherS.inl + } +} + + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher_exec.cpp b/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher_exec.cpp new file mode 100644 index 00000000000..d15ab0ce667 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher_exec.cpp @@ -0,0 +1,148 @@ +// $Id$ +// +// **** Code generated by the **** +// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** +// CIAO has been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// CIDL Compiler has been developed by: +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about CIAO is available at: +// http://www.dre.vanderbilt.edu/CIAO + +#include "SimplePublisher_exec.h" +#include "ciao/CIAO_common.h" + +namespace CIDL_SimplePublisher_Impl +{ + //================================================================== + // Component Executor Implementation Class: SimplePublisher_exec_i + //================================================================== + + SimplePublisher_exec_i::SimplePublisher_exec_i (void) + { + CIAO_TRACE ("SimplePublisher_exec_i::SimplePublisher_exec_i (void)"); + } + + SimplePublisher_exec_i::~SimplePublisher_exec_i (void) + { + CIAO_TRACE ("SimplePublisher_exec_i::~SimplePublisher_exec_i (void)"); + } + + // Supported or inherited operations. + + // Attribute operations. + + // Port operations. + + // Operations from Components::SessionComponent + + void + SimplePublisher_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx) + { + CIAO_TRACE ("SimplePublisher_exec_i::set_session_context ()"); + this->context_ = + ::Simple::CCM_SimplePublisher_Context::_narrow (ctx); + + if (CORBA::is_nil (this->context_.in ())) + { + throw ::CORBA::INTERNAL (); + } + } + + void + SimplePublisher_exec_i::configuration_complete () + { + CIAO_TRACE ("SimplePublisher_exec_i::configuration_complete ()"); + // Your code here. + } + + void + SimplePublisher_exec_i::ccm_activate () + { + CIAO_TRACE ("SimplePublisher_exec_i::ccm_activate ()"); + ::Simple::Hello_var hello = new OBV_Simple::Hello ("Test successful, hello from SimplePublisher_exec_i"); + + this->context_->push_hello (hello._retn ()); + // Your code here. + } + + void + SimplePublisher_exec_i::ccm_passivate () + { + CIAO_TRACE ("SimplePublisher_exec_i::ccm_passivate ()"); + // Your code here. + } + + void + SimplePublisher_exec_i::ccm_remove () + { + CIAO_TRACE ("SimplePublisher_exec_i::ccm_remove ()"); + // Your code here. + } + + //================================================================== + // Home Executor Implementation Class: SimplePublisherHome_exec_i + //================================================================== + + SimplePublisherHome_exec_i::SimplePublisherHome_exec_i (void) + { + CIAO_TRACE ("SimplePublisherHome_exec_i::SimplePublisherHome_exec_i (void)"); + } + + SimplePublisherHome_exec_i::~SimplePublisherHome_exec_i (void) + { + CIAO_TRACE ("SimplePublisherHome_exec_i::~SimplePublisherHome_exec_i (void)"); + } + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + ::Components::EnterpriseComponent_ptr + SimplePublisherHome_exec_i::create () + { + CIAO_TRACE ("SimplePublisherHome_exec_i::create ()"); + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_THROW_EX ( + retval, + SimplePublisher_exec_i, + ::CORBA::NO_MEMORY ()); + + return retval; + } + + extern "C" SIMPLEPUBLISHER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Simple_SimplePublisherHome_Impl (void) + { + CIAO_TRACE ("create_Simple_SimplePublisherHome_Impl (void)"); + + ::Components::HomeExecutorBase_ptr retval = + ::Components::HomeExecutorBase::_nil (); + + ACE_NEW_RETURN ( + retval, + SimplePublisherHome_exec_i, + ::Components::HomeExecutorBase::_nil ()); + + return retval; + } +} + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher_exec.h b/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher_exec.h new file mode 100644 index 00000000000..b25191f0a4a --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher_exec.h @@ -0,0 +1,98 @@ +// $Id$ +// +// **** Code generated by the **** +// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** +// CIAO has been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// CIDL Compiler has been developed by: +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about CIAO is available at: +// http://www.dre.vanderbilt.edu/CIAO + +#ifndef CIAO_SIMPLEPUBLISHER_EXEC_H +#define CIAO_SIMPLEPUBLISHER_EXEC_H + +#include /**/ "ace/pre.h" + +#include "SimplePublisherEC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "SimplePublisher_exec_export.h" +#include "tao/LocalObject.h" + +namespace CIDL_SimplePublisher_Impl +{ + class SIMPLEPUBLISHER_EXEC_Export SimplePublisher_exec_i + : public virtual SimplePublisher_Exec, + public virtual ::CORBA::LocalObject + { + public: + SimplePublisher_exec_i (void); + virtual ~SimplePublisher_exec_i (void); + + // Supported or inherited operations. + + // Attribute operations. + + // Port operations. + + // Operations from Components::SessionComponent + + virtual void + set_session_context ( + ::Components::SessionContext_ptr ctx); + + virtual void configuration_complete (); + + virtual void ccm_activate (); + + virtual void ccm_passivate (); + + virtual void ccm_remove (); + + private: + ::Simple::CCM_SimplePublisher_Context_var context_; + }; + + class SIMPLEPUBLISHER_EXEC_Export SimplePublisherHome_exec_i + : public virtual SimplePublisherHome_Exec, + public virtual ::CORBA::LocalObject + { + public: + SimplePublisherHome_exec_i (void); + virtual ~SimplePublisherHome_exec_i (void); + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + virtual ::Components::EnterpriseComponent_ptr + create (); + }; + + extern "C" SIMPLEPUBLISHER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Simple_SimplePublisherHome_Impl (void); +} + +#include /**/ "ace/post.h" + +#endif /* CIAO_SIMPLEPUBLISHER_EXEC_H */ + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher_exec_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher_exec_export.h new file mode 100644 index 00000000000..2f18677399f --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher_exec_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEPUBLISHER_EXEC +// ------------------------------ +#ifndef SIMPLEPUBLISHER_EXEC_EXPORT_H +#define SIMPLEPUBLISHER_EXEC_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEPUBLISHER_EXEC_HAS_DLL) +# define SIMPLEPUBLISHER_EXEC_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEPUBLISHER_EXEC_HAS_DLL */ + +#if !defined (SIMPLEPUBLISHER_EXEC_HAS_DLL) +# define SIMPLEPUBLISHER_EXEC_HAS_DLL 1 +#endif /* ! SIMPLEPUBLISHER_EXEC_HAS_DLL */ + +#if defined (SIMPLEPUBLISHER_EXEC_HAS_DLL) && (SIMPLEPUBLISHER_EXEC_HAS_DLL == 1) +# if defined (SIMPLEPUBLISHER_EXEC_BUILD_DLL) +# define SIMPLEPUBLISHER_EXEC_Export ACE_Proper_Export_Flag +# define SIMPLEPUBLISHER_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEPUBLISHER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEPUBLISHER_EXEC_BUILD_DLL */ +# define SIMPLEPUBLISHER_EXEC_Export ACE_Proper_Import_Flag +# define SIMPLEPUBLISHER_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEPUBLISHER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEPUBLISHER_EXEC_BUILD_DLL */ +#else /* SIMPLEPUBLISHER_EXEC_HAS_DLL == 1 */ +# define SIMPLEPUBLISHER_EXEC_Export +# define SIMPLEPUBLISHER_EXEC_SINGLETON_DECLARATION(T) +# define SIMPLEPUBLISHER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEPUBLISHER_EXEC_HAS_DLL == 1 */ + +// Set SIMPLEPUBLISHER_EXEC_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEPUBLISHER_EXEC_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEPUBLISHER_EXEC_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEPUBLISHER_EXEC_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEPUBLISHER_EXEC_NTRACE */ + +#if (SIMPLEPUBLISHER_EXEC_NTRACE == 1) +# define SIMPLEPUBLISHER_EXEC_TRACE(X) +#else /* (SIMPLEPUBLISHER_EXEC_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEPUBLISHER_EXEC_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEPUBLISHER_EXEC_NTRACE == 1) */ + +#endif /* SIMPLEPUBLISHER_EXEC_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher_stub_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher_stub_export.h new file mode 100644 index 00000000000..8ab3300c5ca --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher_stub_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEPUBLISHER_STUB +// ------------------------------ +#ifndef SIMPLEPUBLISHER_STUB_EXPORT_H +#define SIMPLEPUBLISHER_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEPUBLISHER_STUB_HAS_DLL) +# define SIMPLEPUBLISHER_STUB_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEPUBLISHER_STUB_HAS_DLL */ + +#if !defined (SIMPLEPUBLISHER_STUB_HAS_DLL) +# define SIMPLEPUBLISHER_STUB_HAS_DLL 1 +#endif /* ! SIMPLEPUBLISHER_STUB_HAS_DLL */ + +#if defined (SIMPLEPUBLISHER_STUB_HAS_DLL) && (SIMPLEPUBLISHER_STUB_HAS_DLL == 1) +# if defined (SIMPLEPUBLISHER_STUB_BUILD_DLL) +# define SIMPLEPUBLISHER_STUB_Export ACE_Proper_Export_Flag +# define SIMPLEPUBLISHER_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEPUBLISHER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEPUBLISHER_STUB_BUILD_DLL */ +# define SIMPLEPUBLISHER_STUB_Export ACE_Proper_Import_Flag +# define SIMPLEPUBLISHER_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEPUBLISHER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEPUBLISHER_STUB_BUILD_DLL */ +#else /* SIMPLEPUBLISHER_STUB_HAS_DLL == 1 */ +# define SIMPLEPUBLISHER_STUB_Export +# define SIMPLEPUBLISHER_STUB_SINGLETON_DECLARATION(T) +# define SIMPLEPUBLISHER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEPUBLISHER_STUB_HAS_DLL == 1 */ + +// Set SIMPLEPUBLISHER_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEPUBLISHER_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEPUBLISHER_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEPUBLISHER_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEPUBLISHER_STUB_NTRACE */ + +#if (SIMPLEPUBLISHER_STUB_NTRACE == 1) +# define SIMPLEPUBLISHER_STUB_TRACE(X) +#else /* (SIMPLEPUBLISHER_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEPUBLISHER_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEPUBLISHER_STUB_NTRACE == 1) */ + +#endif /* SIMPLEPUBLISHER_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher_svnt_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher_svnt_export.h new file mode 100644 index 00000000000..cbc5f4e56be --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher_svnt_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEPUBLISHER_SVNT +// ------------------------------ +#ifndef SIMPLEPUBLISHER_SVNT_EXPORT_H +#define SIMPLEPUBLISHER_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEPUBLISHER_SVNT_HAS_DLL) +# define SIMPLEPUBLISHER_SVNT_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEPUBLISHER_SVNT_HAS_DLL */ + +#if !defined (SIMPLEPUBLISHER_SVNT_HAS_DLL) +# define SIMPLEPUBLISHER_SVNT_HAS_DLL 1 +#endif /* ! SIMPLEPUBLISHER_SVNT_HAS_DLL */ + +#if defined (SIMPLEPUBLISHER_SVNT_HAS_DLL) && (SIMPLEPUBLISHER_SVNT_HAS_DLL == 1) +# if defined (SIMPLEPUBLISHER_SVNT_BUILD_DLL) +# define SIMPLEPUBLISHER_SVNT_Export ACE_Proper_Export_Flag +# define SIMPLEPUBLISHER_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEPUBLISHER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEPUBLISHER_SVNT_BUILD_DLL */ +# define SIMPLEPUBLISHER_SVNT_Export ACE_Proper_Import_Flag +# define SIMPLEPUBLISHER_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEPUBLISHER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEPUBLISHER_SVNT_BUILD_DLL */ +#else /* SIMPLEPUBLISHER_SVNT_HAS_DLL == 1 */ +# define SIMPLEPUBLISHER_SVNT_Export +# define SIMPLEPUBLISHER_SVNT_SINGLETON_DECLARATION(T) +# define SIMPLEPUBLISHER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEPUBLISHER_SVNT_HAS_DLL == 1 */ + +// Set SIMPLEPUBLISHER_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEPUBLISHER_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEPUBLISHER_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEPUBLISHER_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEPUBLISHER_SVNT_NTRACE */ + +#if (SIMPLEPUBLISHER_SVNT_NTRACE == 1) +# define SIMPLEPUBLISHER_SVNT_TRACE(X) +#else /* (SIMPLEPUBLISHER_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEPUBLISHER_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEPUBLISHER_SVNT_NTRACE == 1) */ + +#endif /* SIMPLEPUBLISHER_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleUser.cidl b/CIAO/DAnCE/tests/CIAO/Components/SimpleUser.cidl new file mode 100644 index 00000000000..e3afe5e12f6 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleUser.cidl @@ -0,0 +1,11 @@ +// $Id$ +#include "SimpleUser.idl" + +composition session SimpleUser_Impl +{ + home executor SimpleUserHome_Exec + { + implements Simple::SimpleUserHome; + manages SimpleUser_Exec; + }; +}; diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleUser.idl b/CIAO/DAnCE/tests/CIAO/Components/SimpleUser.idl new file mode 100644 index 00000000000..90d4e67e542 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleUser.idl @@ -0,0 +1,21 @@ +// $Id$ + +#ifndef SIMPLE_USER_IDL +#define SIMPLE_USER_IDL + +#include "SimpleCommon.idl" +#include "Components.idl" + +module Simple +{ + component SimpleUser + { + uses Trigger trig; + }; + + home SimpleUserHome manages SimpleUser + { + }; +}; + +#endif /*SIMPLE_USER_IDL*/ diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleUser.mpc b/CIAO/DAnCE/tests/CIAO/Components/SimpleUser.mpc new file mode 100644 index 00000000000..c33c4120a77 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleUser.mpc @@ -0,0 +1,121 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl -p SimpleCommon SimpleUser" + +project(SimpleCommon_SimpleUser_idl_gen) : taoidldefaults, anytypecode { + avoids += ace_for_tao + custom_only = 1 + idlflags += -Wb,stub_export_macro=SIMPLEUSER_STUB_Export \ + -Wb,stub_export_include=SimpleUser_stub_export.h \ + -Wb,skel_export_macro=SIMPLEUSER_SVNT_Export \ + -Wb,skel_export_include=SimpleUser_svnt_export.h + + IDL_Files { + SimpleUser.idl + } +} + +project(SimpleCommon_SimpleUser_cidl_gen) : ciaocidldefaults, taoidldefaults { + avoids += ace_for_tao + custom_only = 1 + cidlflags += --svnt-export-macro SIMPLEUSER_SVNT_Export \ + --svnt-export-include SimpleUser_svnt_export.h + idlflags += -Wb,export_macro=SIMPLEUSER_EXEC_Export \ + -Wb,export_include=SimpleUser_exec_export.h \ + -SS + + CIDL_Files { + SimpleUser.cidl + } + + IDL_Files { + SimpleUserE.idl + } +} + +project(SimpleCommon_SimpleUser_stub) : ccm_stub { + avoids += ace_for_tao + after += SimpleCommon_SimpleUser_idl_gen SimpleCommon_stub + libs += SimpleCommon_stub + + sharedname = SimpleUser_stub + dynamicflags = SIMPLEUSER_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimpleUserC.cpp + } + + Header_Files { + SimpleUserC.h + SimpleUser_stub_export.h + } + + Inline_Files { + SimpleUserC.inl + } +} + +project(SimpleCommon_SimpleUser_exec) : ciao_executor { + avoids += ace_for_tao + after += SimpleCommon_SimpleUser_cidl_gen SimpleCommon_SimpleUser_stub + sharedname = SimpleUser_exec + libs += SimpleUser_stub SimpleCommon_stub + + dynamicflags = SIMPLEUSER_EXEC_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimpleUserEC.cpp + SimpleUser_exec.cpp + } + + Header_Files { + SimpleUserEC.h + SimpleUser_exec.h + SimpleUser_exec_export.h + } + + Inline_Files { + SimpleUserEC.inl + } +} + + +project(SimpleCommon_SimpleUser_svnt) : ciao_servant { + avoids += ace_for_tao + after += SimpleCommon_skel SimpleCommon_SimpleUser_exec + sharedname = SimpleUser_svnt + libs += SimpleUser_exec \ + SimpleUser_stub \ + SimpleCommon_skel \ + SimpleCommon_stub + + dynamicflags = SIMPLEUSER_SVNT_BUILD_DLL + + CIDL_Files { + } + + IDL_Files { + } + + Source_Files { + SimpleUserS.cpp + SimpleUser_svnt.cpp + } + + Header_Files { + SimpleUserS.h + SimpleUser_svnt.h + SimpleUser_svnt_export.h + } + + Inline_Files { + SimpleUserS.inl + } +} + + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleUser_exec.cpp b/CIAO/DAnCE/tests/CIAO/Components/SimpleUser_exec.cpp new file mode 100644 index 00000000000..accb8f8f949 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleUser_exec.cpp @@ -0,0 +1,169 @@ +// $Id$ +// +// **** Code generated by the **** +// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** +// CIAO has been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// CIDL Compiler has been developed by: +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about CIAO is available at: +// http://www.dre.vanderbilt.edu/CIAO + +#include "SimpleUser_exec.h" +#include "ciao/CIAO_common.h" + +namespace CIDL_SimpleUser_Impl +{ + //================================================================== + // Component Executor Implementation Class: SimpleUser_exec_i + //================================================================== + + SimpleUser_exec_i::SimpleUser_exec_i (void) + { + CIAO_TRACE ("SimpleUser_exec_i::SimpleUser_exec_i (void)"); + } + + SimpleUser_exec_i::~SimpleUser_exec_i (void) + { + CIAO_TRACE ("SimpleUser_exec_i::~SimpleUser_exec_i (void)"); + } + + // Supported or inherited operations. + + // Attribute operations. + + // Port operations. + + // Operations from Components::SessionComponent + + void + SimpleUser_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx) + { + CIAO_TRACE ("SimpleUser_exec_i::set_session_context ()"); + this->context_ = + ::Simple::CCM_SimpleUser_Context::_narrow (ctx); + + if (CORBA::is_nil (this->context_.in ())) + { + throw ::CORBA::INTERNAL (); + } + } + + void + SimpleUser_exec_i::configuration_complete () + { + CIAO_TRACE ("SimpleUser_exec_i::configuration_complete ()"); + // Your code here. + } + + void + SimpleUser_exec_i::ccm_activate () + { + CIAO_TRACE ("SimpleUser_exec_i::ccm_activate ()"); + + ::Simple::Trigger_var trig (this->context_->get_connection_trig ()); + + if (CORBA::is_nil (trig.in ())) + { + CIAO_ERROR ((LM_ERROR, "SimpleUser_exec_i::ccm_activate () - " + "Error: Reference nil for port trig\n")); + return; + } + + // Your code here. + try + { + trig->hello ("Test successful; hello from SimpleUser."); + } + catch (CORBA::Exception &ex) + { + CIAO_ERROR ((LM_ERROR, "SimpleUser_exec_i::ccm_activate () - " + "Caught CORBA exception, details follow:\n")); + ex._tao_print_exception ("SimpleUser_exec_i::ccm_activate () - "); + } + catch (...) + { + CIAO_ERROR ((LM_ERROR, "SimpleUser_exec_i::ccm_activate () - " + "Error: Caught unknown exception whilst invoking reference for port trig.\n")); + } + } + + void + SimpleUser_exec_i::ccm_passivate () + { + CIAO_TRACE ("SimpleUser_exec_i::ccm_passivate ()"); + // Your code here. + } + + void + SimpleUser_exec_i::ccm_remove () + { + CIAO_TRACE ("SimpleUser_exec_i::ccm_remove ()"); + // Your code here. + } + + //================================================================== + // Home Executor Implementation Class: SimpleUserHome_exec_i + //================================================================== + + SimpleUserHome_exec_i::SimpleUserHome_exec_i (void) + { + CIAO_TRACE ("SimpleUserHome_exec_i::SimpleUserHome_exec_i (void)"); + } + + SimpleUserHome_exec_i::~SimpleUserHome_exec_i (void) + { + CIAO_TRACE ("SimpleUserHome_exec_i::~SimpleUserHome_exec_i (void)"); + } + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + ::Components::EnterpriseComponent_ptr + SimpleUserHome_exec_i::create () + { + CIAO_TRACE ("SimpleUserHome_exec_i::create ()"); + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_THROW_EX ( + retval, + SimpleUser_exec_i, + ::CORBA::NO_MEMORY ()); + + return retval; + } + + extern "C" SIMPLEUSER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Simple_SimpleUserHome_Impl (void) + { + CIAO_TRACE ("create_Simple_SimpleUserHome_Impl (void)"); + ::Components::HomeExecutorBase_ptr retval = + ::Components::HomeExecutorBase::_nil (); + + ACE_NEW_RETURN ( + retval, + SimpleUserHome_exec_i, + ::Components::HomeExecutorBase::_nil ()); + + return retval; + } +} + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleUser_exec.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleUser_exec.h new file mode 100644 index 00000000000..9b28f1e36f2 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleUser_exec.h @@ -0,0 +1,98 @@ +// $Id$ +// +// **** Code generated by the **** +// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** +// CIAO has been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// CIDL Compiler has been developed by: +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about CIAO is available at: +// http://www.dre.vanderbilt.edu/CIAO + +#ifndef CIAO_SIMPLEUSER_EXEC_H +#define CIAO_SIMPLEUSER_EXEC_H + +#include /**/ "ace/pre.h" + +#include "SimpleUserEC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "SimpleUser_exec_export.h" +#include "tao/LocalObject.h" + +namespace CIDL_SimpleUser_Impl +{ + class SIMPLEUSER_EXEC_Export SimpleUser_exec_i + : public virtual SimpleUser_Exec, + public virtual ::CORBA::LocalObject + { + public: + SimpleUser_exec_i (void); + virtual ~SimpleUser_exec_i (void); + + // Supported or inherited operations. + + // Attribute operations. + + // Port operations. + + // Operations from Components::SessionComponent + + virtual void + set_session_context ( + ::Components::SessionContext_ptr ctx); + + virtual void configuration_complete (); + + virtual void ccm_activate (); + + virtual void ccm_passivate (); + + virtual void ccm_remove (); + + private: + ::Simple::CCM_SimpleUser_Context_var context_; + }; + + class SIMPLEUSER_EXEC_Export SimpleUserHome_exec_i + : public virtual SimpleUserHome_Exec, + public virtual ::CORBA::LocalObject + { + public: + SimpleUserHome_exec_i (void); + virtual ~SimpleUserHome_exec_i (void); + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + virtual ::Components::EnterpriseComponent_ptr + create (); + }; + + extern "C" SIMPLEUSER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Simple_SimpleUserHome_Impl (void); +} + +#include /**/ "ace/post.h" + +#endif /* CIAO_SIMPLEUSER_EXEC_H */ + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleUser_exec_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleUser_exec_export.h new file mode 100644 index 00000000000..fcc935919a3 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleUser_exec_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEUSER_EXEC +// ------------------------------ +#ifndef SIMPLEUSER_EXEC_EXPORT_H +#define SIMPLEUSER_EXEC_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEUSER_EXEC_HAS_DLL) +# define SIMPLEUSER_EXEC_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEUSER_EXEC_HAS_DLL */ + +#if !defined (SIMPLEUSER_EXEC_HAS_DLL) +# define SIMPLEUSER_EXEC_HAS_DLL 1 +#endif /* ! SIMPLEUSER_EXEC_HAS_DLL */ + +#if defined (SIMPLEUSER_EXEC_HAS_DLL) && (SIMPLEUSER_EXEC_HAS_DLL == 1) +# if defined (SIMPLEUSER_EXEC_BUILD_DLL) +# define SIMPLEUSER_EXEC_Export ACE_Proper_Export_Flag +# define SIMPLEUSER_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEUSER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEUSER_EXEC_BUILD_DLL */ +# define SIMPLEUSER_EXEC_Export ACE_Proper_Import_Flag +# define SIMPLEUSER_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEUSER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEUSER_EXEC_BUILD_DLL */ +#else /* SIMPLEUSER_EXEC_HAS_DLL == 1 */ +# define SIMPLEUSER_EXEC_Export +# define SIMPLEUSER_EXEC_SINGLETON_DECLARATION(T) +# define SIMPLEUSER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEUSER_EXEC_HAS_DLL == 1 */ + +// Set SIMPLEUSER_EXEC_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEUSER_EXEC_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEUSER_EXEC_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEUSER_EXEC_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEUSER_EXEC_NTRACE */ + +#if (SIMPLEUSER_EXEC_NTRACE == 1) +# define SIMPLEUSER_EXEC_TRACE(X) +#else /* (SIMPLEUSER_EXEC_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEUSER_EXEC_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEUSER_EXEC_NTRACE == 1) */ + +#endif /* SIMPLEUSER_EXEC_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleUser_stub_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleUser_stub_export.h new file mode 100644 index 00000000000..a31d19d5614 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleUser_stub_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEUSER_STUB +// ------------------------------ +#ifndef SIMPLEUSER_STUB_EXPORT_H +#define SIMPLEUSER_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEUSER_STUB_HAS_DLL) +# define SIMPLEUSER_STUB_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEUSER_STUB_HAS_DLL */ + +#if !defined (SIMPLEUSER_STUB_HAS_DLL) +# define SIMPLEUSER_STUB_HAS_DLL 1 +#endif /* ! SIMPLEUSER_STUB_HAS_DLL */ + +#if defined (SIMPLEUSER_STUB_HAS_DLL) && (SIMPLEUSER_STUB_HAS_DLL == 1) +# if defined (SIMPLEUSER_STUB_BUILD_DLL) +# define SIMPLEUSER_STUB_Export ACE_Proper_Export_Flag +# define SIMPLEUSER_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEUSER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEUSER_STUB_BUILD_DLL */ +# define SIMPLEUSER_STUB_Export ACE_Proper_Import_Flag +# define SIMPLEUSER_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEUSER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEUSER_STUB_BUILD_DLL */ +#else /* SIMPLEUSER_STUB_HAS_DLL == 1 */ +# define SIMPLEUSER_STUB_Export +# define SIMPLEUSER_STUB_SINGLETON_DECLARATION(T) +# define SIMPLEUSER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEUSER_STUB_HAS_DLL == 1 */ + +// Set SIMPLEUSER_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEUSER_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEUSER_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEUSER_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEUSER_STUB_NTRACE */ + +#if (SIMPLEUSER_STUB_NTRACE == 1) +# define SIMPLEUSER_STUB_TRACE(X) +#else /* (SIMPLEUSER_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEUSER_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEUSER_STUB_NTRACE == 1) */ + +#endif /* SIMPLEUSER_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleUser_svnt_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleUser_svnt_export.h new file mode 100644 index 00000000000..897f82c3081 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleUser_svnt_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEUSER_SVNT +// ------------------------------ +#ifndef SIMPLEUSER_SVNT_EXPORT_H +#define SIMPLEUSER_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEUSER_SVNT_HAS_DLL) +# define SIMPLEUSER_SVNT_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEUSER_SVNT_HAS_DLL */ + +#if !defined (SIMPLEUSER_SVNT_HAS_DLL) +# define SIMPLEUSER_SVNT_HAS_DLL 1 +#endif /* ! SIMPLEUSER_SVNT_HAS_DLL */ + +#if defined (SIMPLEUSER_SVNT_HAS_DLL) && (SIMPLEUSER_SVNT_HAS_DLL == 1) +# if defined (SIMPLEUSER_SVNT_BUILD_DLL) +# define SIMPLEUSER_SVNT_Export ACE_Proper_Export_Flag +# define SIMPLEUSER_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEUSER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEUSER_SVNT_BUILD_DLL */ +# define SIMPLEUSER_SVNT_Export ACE_Proper_Import_Flag +# define SIMPLEUSER_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEUSER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEUSER_SVNT_BUILD_DLL */ +#else /* SIMPLEUSER_SVNT_HAS_DLL == 1 */ +# define SIMPLEUSER_SVNT_Export +# define SIMPLEUSER_SVNT_SINGLETON_DECLARATION(T) +# define SIMPLEUSER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEUSER_SVNT_HAS_DLL == 1 */ + +// Set SIMPLEUSER_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEUSER_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEUSER_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEUSER_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEUSER_SVNT_NTRACE */ + +#if (SIMPLEUSER_SVNT_NTRACE == 1) +# define SIMPLEUSER_SVNT_TRACE(X) +#else /* (SIMPLEUSER_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEUSER_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEUSER_SVNT_NTRACE == 1) */ + +#endif /* SIMPLEUSER_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/EmitsConnectionExplicitHome.cdp b/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/EmitsConnectionExplicitHome.cdp new file mode 100644 index 00000000000..01c13b3f3d1 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/EmitsConnectionExplicitHome.cdp @@ -0,0 +1,227 @@ +<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>SimpleComponent_Home</label> + <UUID>SimpleComponent_Home</UUID> + + <!-- Implementations declarations --> + + <!-- Home implementation --> + <implementation xmi:id="SimpleEmitterHomeImplementation"> + <name>SimpleEmitterHomeImplementation</name> + <source/> + <artifact xmi:idref="SimpleEmitter_ExecArtifact" /> + <artifact xmi:idref="SimpleEmitter_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleEmitterHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleEmitterHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleEmitter_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleEmitter_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimpleEmitterComponentImplementation"> + <name>SimpleEmitterComponentImplementation</name> + <source/> + <artifact xmi:idref="SimpleEmitter_ExecArtifact" /> + <artifact xmi:idref="SimpleEmitter_SvntArtifact" /> + </implementation> + + <implementation xmi:id="SimpleConsumerHomeImplementation"> + <name>SimpleConsumerHomeImplementation</name> + <source/> + <artifact xmi:idref="SimpleConsumer_ExecArtifact" /> + <artifact xmi:idref="SimpleConsumer_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleConsumerHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleConsumerHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleConsumer_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleConsumer_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimpleConsumerComponentImplementation"> + <name>SimpleConsumerComponentImplementation</name> + <source/> + <artifact xmi:idref="SimpleConsumer_ExecArtifact" /> + <artifact xmi:idref="SimpleConsumer_SvntArtifact" /> + </implementation> + + <instance xmi:id="SimpleEmitterHomeInstance"> + <name>SimpleEmitterHome</name> + <node>NodeOne</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleEmitterHomeImplementation" /> + </instance> + + <instance xmi:id="SimpleEmitterComponentInstance"> + <name>SimpleEmitterComponent</name> + <node>NodeOne</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleEmitterComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleEmitterHome</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="SimpleConsumerHomeInstance"> + <name>SimpleConsumerHome</name> + <node>NodeTwo</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleConsumerHomeImplementation" /> + </instance> + + <instance xmi:id="SimpleConsumerComponentInstance"> + <name>SimpleConsumerComponent</name> + <node>NodeTwo</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleConsumerComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleConsumerHome</string> + </value> + </value> + </configProperty> + </instance> + + <connection> + <name>TestConnection</name> + <internalEndpoint> + <portName>hello</portName> + <provider>false</provider> + <kind>EventEmitter</kind> + <instance xmi:idref="SimpleEmitterComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>hello_</portName> + <provider>true</provider> + <kind>EventConsumer</kind> + <instance xmi:idref="SimpleConsumerComponentInstance" /> + </internalEndpoint> + </connection> + + <!-- Artifacts declarations --> + <artifact xmi:id="SimpleEmitter_ExecArtifact"> + <name>SimpleEmitter_exec</name> + <source/> + <node/> + <location>SimpleEmitter_exec</location> + </artifact> + <artifact xmi:id="SimpleEmitter_SvntArtifact"> + <name>SimpleEmitter_svnt</name> + <source/> + <node/> + <location>SimpleEmitter_svnt</location> + </artifact> + + <artifact xmi:id="SimpleConsumer_ExecArtifact"> + <name>SimpleConsumer_exec</name> + <source/> + <node/> + <location>SimpleConsumer_exec</location> + </artifact> + <artifact xmi:id="SimpleConsumer_SvntArtifact"> + <name>SimpleConsumer_svnt</name> + <source/> + <node/> + <location>SimpleConsumer_svnt</location> + </artifact> + + </Deployment:DeploymentPlan> diff --git a/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/EmitsConnectionExplicitHome_NS.cdp b/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/EmitsConnectionExplicitHome_NS.cdp new file mode 100644 index 00000000000..6c01f6d36d6 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/EmitsConnectionExplicitHome_NS.cdp @@ -0,0 +1,238 @@ +<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>SimpleComponent_Home</label> + <UUID>SimpleComponent_Home</UUID> + + <!-- Implementations declarations --> + + <!-- Home implementation --> + <implementation xmi:id="SimpleEmitterHomeImplementation"> + <name>SimpleEmitterHomeImplementation</name> + <source/> + <artifact xmi:idref="SimpleEmitter_ExecArtifact" /> + <artifact xmi:idref="SimpleEmitter_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleEmitterHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleEmitterHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleEmitter_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleEmitter_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimpleEmitterComponentImplementation"> + <name>SimpleEmitterComponentImplementation</name> + <source/> + <artifact xmi:idref="SimpleEmitter_ExecArtifact" /> + <artifact xmi:idref="SimpleEmitter_SvntArtifact" /> + </implementation> + + <implementation xmi:id="SimpleConsumerHomeImplementation"> + <name>SimpleConsumerHomeImplementation</name> + <source/> + <artifact xmi:idref="SimpleConsumer_ExecArtifact" /> + <artifact xmi:idref="SimpleConsumer_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleConsumerHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleConsumerHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleConsumer_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleConsumer_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimpleConsumerComponentImplementation"> + <name>SimpleConsumerComponentImplementation</name> + <source/> + <artifact xmi:idref="SimpleConsumer_ExecArtifact" /> + <artifact xmi:idref="SimpleConsumer_SvntArtifact" /> + </implementation> + + <instance xmi:id="SimpleEmitterHomeInstance"> + <name>SimpleEmitterHome</name> + <node>NodeOne</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleEmitterHomeImplementation" /> + </instance> + + <instance xmi:id="SimpleEmitterComponentInstance"> + <name>SimpleEmitterComponent</name> + <node>NodeOne</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleEmitterComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleEmitterHome</string> + </value> + </value> + </configProperty> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.RegisterNaming</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleEmitterComponent</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="SimpleConsumerHomeInstance"> + <name>SimpleConsumerHome</name> + <node>NodeTwo</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleConsumerHomeImplementation" /> + </instance> + + <instance xmi:id="SimpleConsumerComponentInstance"> + <name>SimpleConsumerComponent</name> + <node>NodeTwo</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleConsumerComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleConsumerHome</string> + </value> + </value> + </configProperty> + </instance> + + <connection> + <name>TestConnection</name> + <internalEndpoint> + <portName>hello_</portName> + <provider>true</provider> + <kind>EventConsumer</kind> + <instance xmi:idref="SimpleConsumerComponentInstance" /> + </internalEndpoint> + <externalReference> + <location>corbaname:rir:/NameService#SimpleEmitterComponent</location> + <provider>false</provider> + <portName>hello</portName> + <supportedType>Meaningless</supportedType> + </externalReference> + </connection> + + <!-- Artifacts declarations --> + <artifact xmi:id="SimpleEmitter_ExecArtifact"> + <name>SimpleEmitter_exec</name> + <source/> + <node/> + <location>SimpleEmitter_exec</location> + </artifact> + <artifact xmi:id="SimpleEmitter_SvntArtifact"> + <name>SimpleEmitter_svnt</name> + <source/> + <node/> + <location>SimpleEmitter_svnt</location> + </artifact> + + <artifact xmi:id="SimpleConsumer_ExecArtifact"> + <name>SimpleConsumer_exec</name> + <source/> + <node/> + <location>SimpleConsumer_exec</location> + </artifact> + <artifact xmi:id="SimpleConsumer_SvntArtifact"> + <name>SimpleConsumer_svnt</name> + <source/> + <node/> + <location>SimpleConsumer_svnt</location> + </artifact> + + </Deployment:DeploymentPlan> diff --git a/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/MultiplexConnectionExplicitHome.cdp b/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/MultiplexConnectionExplicitHome.cdp new file mode 100644 index 00000000000..c5bc81c852a --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/MultiplexConnectionExplicitHome.cdp @@ -0,0 +1,262 @@ +<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>SimpleComponent_Home</label> + <UUID>SimpleComponent_Home</UUID> + + <!-- Implementations declarations --> + + <!-- Home implementation --> + <implementation xmi:id="SimpleProviderHomeImplementation"> + <name>SimpleProviderHomeImplementation</name> + <source/> + <artifact xmi:idref="SimpleProvider_ExecArtifact" /> + <artifact xmi:idref="SimpleProvider_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleProviderHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleProviderHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleProvider_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleProvider_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimpleProviderComponentImplementation"> + <name>SimpleProviderComponentImplementation</name> + <source/> + <artifact xmi:idref="SimpleProvider_ExecArtifact" /> + <artifact xmi:idref="SimpleProvider_SvntArtifact" /> + </implementation> + + <implementation xmi:id="SimpleMultipleUserHomeImplementation"> + <name>SimpleMultipleUserHomeImplementation</name> + <source/> + <artifact xmi:idref="SimpleMultipleUser_ExecArtifact" /> + <artifact xmi:idref="SimpleMultipleUser_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleMultipleUserHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleMultipleUserHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleMultipleUser_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleMultipleUser_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimpleMultipleUserComponentImplementation"> + <name>SimpleMultipleUserComponentImplementation</name> + <source/> + <artifact xmi:idref="SimpleMultipleUser_ExecArtifact" /> + <artifact xmi:idref="SimpleMultipleUser_SvntArtifact" /> + </implementation> + + <instance xmi:id="SimpleProviderHomeInstance"> + <name>SimpleProviderHome</name> + <node>NodeOne</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleProviderHomeImplementation" /> + </instance> + + <instance xmi:id="SimpleProviderComponentInstance"> + <name>SimpleProviderComponent</name> + <node>NodeOne</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleProviderComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleProviderHome</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="SimpleMultipleUserHomeInstance"> + <name>SimpleMultipleUserHome</name> + <node>NodeTwo</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleMultipleUserHomeImplementation" /> + </instance> + + <instance xmi:id="SimpleMultipleUserComponentInstance"> + <name>SimpleMultipleUserComponent</name> + <node>NodeTwo</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleMultipleUserComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleMultipleUserHome</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="SimpleMultipleUserComponentInstanceReverse"> + <name>SimpleMultipleUserComponentReverse</name> + <node>NodeTwo</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleMultipleUserComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleMultipleUserHome</string> + </value> + </value> + </configProperty> + </instance> + + <connection> + <name>TestConnection</name> + <internalEndpoint> + <portName>trig</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="SimpleProviderComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>trig</portName> + <provider>false</provider> + <kind>MultiplexReceptacle</kind> + <instance xmi:idref="SimpleMultipleUserComponentInstance" /> + </internalEndpoint> + </connection> + + <connection> + <name>TestConnectionReverse</name> + <internalEndpoint> + <portName>trig</portName> + <provider>false</provider> + <kind>MultiplexReceptacle</kind> + <instance xmi:idref="SimpleMultipleUserComponentInstanceReverse" /> + </internalEndpoint> + <internalEndpoint> + <portName>trig</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="SimpleProviderComponentInstance" /> + </internalEndpoint> + </connection> + + <!-- Artifacts declarations --> + <artifact xmi:id="SimpleProvider_ExecArtifact"> + <name>SimpleProvider_exec</name> + <source/> + <node/> + <location>SimpleProvider_exec</location> + </artifact> + <artifact xmi:id="SimpleProvider_SvntArtifact"> + <name>SimpleProvider_svnt</name> + <source/> + <node/> + <location>SimpleProvider_svnt</location> + </artifact> + + <artifact xmi:id="SimpleMultipleUser_ExecArtifact"> + <name>SimpleMultipleUser_exec</name> + <source/> + <node/> + <location>SimpleMultipleUser_exec</location> + </artifact> + <artifact xmi:id="SimpleMultipleUser_SvntArtifact"> + <name>SimpleMultipleUser_svnt</name> + <source/> + <node/> + <location>SimpleMultipleUser_svnt</location> + </artifact> + + </Deployment:DeploymentPlan> diff --git a/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/MultiplexConnectionExplicitHome_NS.cdp b/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/MultiplexConnectionExplicitHome_NS.cdp new file mode 100644 index 00000000000..dc865e8d0a3 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/MultiplexConnectionExplicitHome_NS.cdp @@ -0,0 +1,286 @@ +<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>SimpleComponent_Home</label> + <UUID>SimpleComponent_Home</UUID> + + <!-- Implementations declarations --> + + <!-- Home implementation --> + <implementation xmi:id="SimpleProviderHomeImplementation"> + <name>SimpleProviderHomeImplementation</name> + <source/> + <artifact xmi:idref="SimpleProvider_ExecArtifact" /> + <artifact xmi:idref="SimpleProvider_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleProviderHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleProviderHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleProvider_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleProvider_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimpleProviderComponentImplementation"> + <name>SimpleProviderComponentImplementation</name> + <source/> + <artifact xmi:idref="SimpleProvider_ExecArtifact" /> + <artifact xmi:idref="SimpleProvider_SvntArtifact" /> + </implementation> + + <implementation xmi:id="SimpleMultipleUserHomeImplementation"> + <name>SimpleMultipleUserHomeImplementation</name> + <source/> + <artifact xmi:idref="SimpleMultipleUser_ExecArtifact" /> + <artifact xmi:idref="SimpleMultipleUser_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleMultipleUserHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleMultipleUserHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleMultipleUser_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleMultipleUser_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimpleMultipleUserComponentImplementation"> + <name>SimpleMultipleUserComponentImplementation</name> + <source/> + <artifact xmi:idref="SimpleMultipleUser_ExecArtifact" /> + <artifact xmi:idref="SimpleMultipleUser_SvntArtifact" /> + </implementation> + + <instance xmi:id="SimpleProviderHomeInstance"> + <name>SimpleProviderHome</name> + <node>NodeOne</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleProviderHomeImplementation" /> + </instance> + + <instance xmi:id="SimpleProviderComponentInstance"> + <name>SimpleProviderComponent</name> + <node>NodeOne</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleProviderComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleProviderHome</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="SimpleMultipleUserHomeInstance"> + <name>SimpleMultipleUserHome</name> + <node>NodeTwo</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleMultipleUserHomeImplementation" /> + </instance> + + <instance xmi:id="SimpleMultipleUserComponentInstance"> + <name>SimpleMultipleUserComponent</name> + <node>NodeTwo</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleMultipleUserComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleMultipleUserHome</string> + </value> + </value> + </configProperty> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.RegisterNaming</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleMultipleUserComponent</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="SimpleMultipleUserComponentInstanceReverse"> + <name>SimpleMultipleUserComponentReverse</name> + <node>NodeTwo</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleMultipleUserComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleMultipleUserHome</string> + </value> + </value> + </configProperty> + </instance> + + <connection> + <name>TestConnection</name> + <internalEndpoint> + <portName>trig</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="SimpleProviderComponentInstance" /> + </internalEndpoint> + <externalReference> + <location>corbaname:rir:/NameService#SimpleMultipleUserComponent</location> + <provider>false</provider> + <portName>trig</portName> + <supportedType>Meaningless</supportedType> + </externalReference> +<!-- <internalEndpoint> + <portName>trig</portName> + <provider>false</provider> + <kind>MultiplexReceptacle</kind> + <instance xmi:idref="SimpleMultipleUserComponentInstance" /> + </internalEndpoint> --> + </connection> + + <connection> + <name>TestConnectionReverse</name> + <internalEndpoint> + <portName>trig</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="SimpleProviderComponentInstance" /> + </internalEndpoint> + <externalReference> + <location>corbaname:rir:/NameService#SimpleMultipleUserComponent</location> + <provider>false</provider> + <portName>trig</portName> + <supportedType>Meaningless</supportedType> + </externalReference> +<!-- + <internalEndpoint> + <portName>trig</portName> + <provider>false</provider> + <kind>MultiplexReceptacle</kind> + <instance xmi:idref="SimpleMultipleUserComponentInstanceReverse" /> + </internalEndpoint> --> + </connection> + + <!-- Artifacts declarations --> + <artifact xmi:id="SimpleProvider_ExecArtifact"> + <name>SimpleProvider_exec</name> + <source/> + <node/> + <location>SimpleProvider_exec</location> + </artifact> + <artifact xmi:id="SimpleProvider_SvntArtifact"> + <name>SimpleProvider_svnt</name> + <source/> + <node/> + <location>SimpleProvider_svnt</location> + </artifact> + + <artifact xmi:id="SimpleMultipleUser_ExecArtifact"> + <name>SimpleMultipleUser_exec</name> + <source/> + <node/> + <location>SimpleMultipleUser_exec</location> + </artifact> + <artifact xmi:id="SimpleMultipleUser_SvntArtifact"> + <name>SimpleMultipleUser_svnt</name> + <source/> + <node/> + <location>SimpleMultipleUser_svnt</location> + </artifact> + + </Deployment:DeploymentPlan> diff --git a/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/PublishConnectionExplicitHome.cdp b/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/PublishConnectionExplicitHome.cdp new file mode 100644 index 00000000000..32747bfc1bf --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/PublishConnectionExplicitHome.cdp @@ -0,0 +1,227 @@ +<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>SimpleComponent_Home</label> + <UUID>SimpleComponent_Home</UUID> + + <!-- Implementations declarations --> + + <!-- Home implementation --> + <implementation xmi:id="SimplePublisherHomeImplementation"> + <name>SimplePublisherHomeImplementation</name> + <source/> + <artifact xmi:idref="SimplePublisher_ExecArtifact" /> + <artifact xmi:idref="SimplePublisher_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimplePublisherHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimplePublisherHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimplePublisher_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimplePublisher_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimplePublisherComponentImplementation"> + <name>SimplePublisherComponentImplementation</name> + <source/> + <artifact xmi:idref="SimplePublisher_ExecArtifact" /> + <artifact xmi:idref="SimplePublisher_SvntArtifact" /> + </implementation> + + <implementation xmi:id="SimpleConsumerHomeImplementation"> + <name>SimpleConsumerHomeImplementation</name> + <source/> + <artifact xmi:idref="SimpleConsumer_ExecArtifact" /> + <artifact xmi:idref="SimpleConsumer_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleConsumerHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleConsumerHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleConsumer_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleConsumer_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimpleConsumerComponentImplementation"> + <name>SimpleConsumerComponentImplementation</name> + <source/> + <artifact xmi:idref="SimpleConsumer_ExecArtifact" /> + <artifact xmi:idref="SimpleConsumer_SvntArtifact" /> + </implementation> + + <instance xmi:id="SimplePublisherHomeInstance"> + <name>SimplePublisherHome</name> + <node>NodeOne</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimplePublisherHomeImplementation" /> + </instance> + + <instance xmi:id="SimplePublisherComponentInstance"> + <name>SimplePublisherComponent</name> + <node>NodeOne</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimplePublisherComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimplePublisherHome</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="SimpleConsumerHomeInstance"> + <name>SimpleConsumerHome</name> + <node>NodeTwo</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleConsumerHomeImplementation" /> + </instance> + + <instance xmi:id="SimpleConsumerComponentInstance"> + <name>SimpleConsumerComponent</name> + <node>NodeTwo</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleConsumerComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleConsumerHome</string> + </value> + </value> + </configProperty> + </instance> + + <connection> + <name>TestConnection</name> + <internalEndpoint> + <portName>hello</portName> + <provider>false</provider> + <kind>EventPublisher</kind> + <instance xmi:idref="SimplePublisherComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>hello_</portName> + <provider>true</provider> + <kind>EventConsumer</kind> + <instance xmi:idref="SimpleConsumerComponentInstance" /> + </internalEndpoint> + </connection> + + <!-- Artifacts declarations --> + <artifact xmi:id="SimplePublisher_ExecArtifact"> + <name>SimplePublisher_exec</name> + <source/> + <node/> + <location>SimplePublisher_exec</location> + </artifact> + <artifact xmi:id="SimplePublisher_SvntArtifact"> + <name>SimplePublisher_svnt</name> + <source/> + <node/> + <location>SimplePublisher_svnt</location> + </artifact> + + <artifact xmi:id="SimpleConsumer_ExecArtifact"> + <name>SimpleConsumer_exec</name> + <source/> + <node/> + <location>SimpleConsumer_exec</location> + </artifact> + <artifact xmi:id="SimpleConsumer_SvntArtifact"> + <name>SimpleConsumer_svnt</name> + <source/> + <node/> + <location>SimpleConsumer_svnt</location> + </artifact> + + </Deployment:DeploymentPlan> diff --git a/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/PublishConnectionExplicitHome_NS.cdp b/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/PublishConnectionExplicitHome_NS.cdp new file mode 100644 index 00000000000..054e7964bea --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/PublishConnectionExplicitHome_NS.cdp @@ -0,0 +1,244 @@ +<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>SimpleComponent_Home</label> + <UUID>SimpleComponent_Home</UUID> + + <!-- Implementations declarations --> + + <!-- Home implementation --> + <implementation xmi:id="SimplePublisherHomeImplementation"> + <name>SimplePublisherHomeImplementation</name> + <source/> + <artifact xmi:idref="SimplePublisher_ExecArtifact" /> + <artifact xmi:idref="SimplePublisher_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimplePublisherHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimplePublisherHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimplePublisher_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimplePublisher_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimplePublisherComponentImplementation"> + <name>SimplePublisherComponentImplementation</name> + <source/> + <artifact xmi:idref="SimplePublisher_ExecArtifact" /> + <artifact xmi:idref="SimplePublisher_SvntArtifact" /> + </implementation> + + <implementation xmi:id="SimpleConsumerHomeImplementation"> + <name>SimpleConsumerHomeImplementation</name> + <source/> + <artifact xmi:idref="SimpleConsumer_ExecArtifact" /> + <artifact xmi:idref="SimpleConsumer_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleConsumerHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleConsumerHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleConsumer_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleConsumer_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimpleConsumerComponentImplementation"> + <name>SimpleConsumerComponentImplementation</name> + <source/> + <artifact xmi:idref="SimpleConsumer_ExecArtifact" /> + <artifact xmi:idref="SimpleConsumer_SvntArtifact" /> + </implementation> + + <instance xmi:id="SimplePublisherHomeInstance"> + <name>SimplePublisherHome</name> + <node>NodeOne</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimplePublisherHomeImplementation" /> + </instance> + + <instance xmi:id="SimplePublisherComponentInstance"> + <name>SimplePublisherComponent</name> + <node>NodeOne</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimplePublisherComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimplePublisherHome</string> + </value> + </value> + </configProperty> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.RegisterNaming</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimplePublisherComponentInstance</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="SimpleConsumerHomeInstance"> + <name>SimpleConsumerHome</name> + <node>NodeTwo</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleConsumerHomeImplementation" /> + </instance> + + <instance xmi:id="SimpleConsumerComponentInstance"> + <name>SimpleConsumerComponent</name> + <node>NodeTwo</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleConsumerComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleConsumerHome</string> + </value> + </value> + </configProperty> + </instance> + + <connection> + <name>TestConnection</name> + <!--<internalEndpoint> + <portName>hello</portName> + <provider>false</provider> + <kind>EventPublisher</kind> + <instance xmi:idref="SimplePublisherComponentInstance" /> + </internalEndpoint>--> + <internalEndpoint> + <portName>hello_</portName> + <provider>true</provider> + <kind>EventConsumer</kind> + <instance xmi:idref="SimpleConsumerComponentInstance" /> + </internalEndpoint> + <externalReference> + <location>corbaname:rir:/NameService#SimplePublisherComponentInstance</location> + <provider>false</provider> + <portName>hello</portName> + <supportedType>Meaningless</supportedType> + </externalReference> + </connection> + + <!-- Artifacts declarations --> + <artifact xmi:id="SimplePublisher_ExecArtifact"> + <name>SimplePublisher_exec</name> + <source/> + <node/> + <location>SimplePublisher_exec</location> + </artifact> + <artifact xmi:id="SimplePublisher_SvntArtifact"> + <name>SimplePublisher_svnt</name> + <source/> + <node/> + <location>SimplePublisher_svnt</location> + </artifact> + + <artifact xmi:id="SimpleConsumer_ExecArtifact"> + <name>SimpleConsumer_exec</name> + <source/> + <node/> + <location>SimpleConsumer_exec</location> + </artifact> + <artifact xmi:id="SimpleConsumer_SvntArtifact"> + <name>SimpleConsumer_svnt</name> + <source/> + <node/> + <location>SimpleConsumer_svnt</location> + </artifact> + + </Deployment:DeploymentPlan> diff --git a/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/SimpleComponentExplicitHome.cdp b/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/SimpleComponentExplicitHome.cdp new file mode 100644 index 00000000000..e9af75b1ac4 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/SimpleComponentExplicitHome.cdp @@ -0,0 +1,113 @@ +<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>SimpleComponent_Home</label> + <UUID>SimpleComponent_Home</UUID> + + <!-- Implementations declarations --> + + <!-- Server Dance implementation--> + <!-- Home implementation --> + <implementation xmi:id="SimpleNullHomeImplementation"> + <name>SimpleNullHomeImplementation</name> + <source/> + <artifact xmi:idref="SimpleNull_ExecArtifact" /> + <artifact xmi:idref="SimpleNull_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleNullHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleNullHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleNull_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleNull_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimpleNullComponentImplementation"> + <name>SimpleNullComponentImplementation</name> + <source/> + <artifact xmi:idref="SimpleNull_ExecArtifact" /> + <artifact xmi:idref="SimpleNull_SvntArtifact" /> + </implementation> + + <instance xmi:id="SimpleNullHomeInstance"> + <name>SimpleNullHome</name> + <node>NodeOne</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleNullHomeImplementation" /> + </instance> + + <instance xmi:id="SimpleNullComponentInstance"> + <name>SimpleNullComponent</name> + <node>NodeOne</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleNullComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleNullHome</string> + </value> + </value> + </configProperty> + </instance> + + <!-- Artifacts declarations --> + <artifact xmi:id="SimpleNull_ExecArtifact"> + <name>SimpleNull_exec</name> + <source/> + <node/> + <location>SimpleNull_exec</location> + </artifact> + <artifact xmi:id="SimpleNull_SvntArtifact"> + <name>SimpleNull_svnt</name> + <source/> + <node/> + <location>SimpleNull_svnt</location> + </artifact> + + </Deployment:DeploymentPlan> diff --git a/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/SimplexConnectionExplicitHome.cdp b/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/SimplexConnectionExplicitHome.cdp new file mode 100644 index 00000000000..8283e9e869a --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/SimplexConnectionExplicitHome.cdp @@ -0,0 +1,262 @@ +<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>SimpleComponent_Home</label> + <UUID>SimpleComponent_Home</UUID> + + <!-- Implementations declarations --> + + <!-- Home implementation --> + <implementation xmi:id="SimpleProviderHomeImplementation"> + <name>SimpleProviderHomeImplementation</name> + <source/> + <artifact xmi:idref="SimpleProvider_ExecArtifact" /> + <artifact xmi:idref="SimpleProvider_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleProviderHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleProviderHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleProvider_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleProvider_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimpleProviderComponentImplementation"> + <name>SimpleProviderComponentImplementation</name> + <source/> + <artifact xmi:idref="SimpleProvider_ExecArtifact" /> + <artifact xmi:idref="SimpleProvider_SvntArtifact" /> + </implementation> + + <implementation xmi:id="SimpleUserHomeImplementation"> + <name>SimpleUserHomeImplementation</name> + <source/> + <artifact xmi:idref="SimpleUser_ExecArtifact" /> + <artifact xmi:idref="SimpleUser_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleUserHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleUserHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleUser_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleUser_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimpleUserComponentImplementation"> + <name>SimpleUserComponentImplementation</name> + <source/> + <artifact xmi:idref="SimpleUser_ExecArtifact" /> + <artifact xmi:idref="SimpleUser_SvntArtifact" /> + </implementation> + + <instance xmi:id="SimpleProviderHomeInstance"> + <name>SimpleProviderHome</name> + <node>NodeOne</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleProviderHomeImplementation" /> + </instance> + + <instance xmi:id="SimpleProviderComponentInstance"> + <name>SimpleProviderComponent</name> + <node>NodeOne</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleProviderComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleProviderHome</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="SimpleUserHomeInstance"> + <name>SimpleUserHome</name> + <node>NodeTwo</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleUserHomeImplementation" /> + </instance> + + <instance xmi:id="SimpleUserComponentInstance"> + <name>SimpleUserComponent</name> + <node>NodeTwo</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleUserComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleUserHome</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="SimpleUserComponentInstanceReverse"> + <name>SimpleUserComponentReverse</name> + <node>NodeTwo</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleUserComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleUserHome</string> + </value> + </value> + </configProperty> + </instance> + + <connection> + <name>TestConnection</name> + <internalEndpoint> + <portName>trig</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="SimpleProviderComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>trig</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="SimpleUserComponentInstance" /> + </internalEndpoint> + </connection> + + <connection> + <name>TestConnectionReverse</name> + <internalEndpoint> + <portName>trig</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="SimpleUserComponentInstanceReverse" /> + </internalEndpoint> + <internalEndpoint> + <portName>trig</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="SimpleProviderComponentInstance" /> + </internalEndpoint> + </connection> + + <!-- Artifacts declarations --> + <artifact xmi:id="SimpleProvider_ExecArtifact"> + <name>SimpleProvider_exec</name> + <source/> + <node/> + <location>SimpleProvider_exec</location> + </artifact> + <artifact xmi:id="SimpleProvider_SvntArtifact"> + <name>SimpleProvider_svnt</name> + <source/> + <node/> + <location>SimpleProvider_svnt</location> + </artifact> + + <artifact xmi:id="SimpleUser_ExecArtifact"> + <name>SimpleUser_exec</name> + <source/> + <node/> + <location>SimpleUser_exec</location> + </artifact> + <artifact xmi:id="SimpleUser_SvntArtifact"> + <name>SimpleUser_svnt</name> + <source/> + <node/> + <location>SimpleUser_svnt</location> + </artifact> + + </Deployment:DeploymentPlan> diff --git a/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/SimplexConnectionExplicitHome_NS.cdp b/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/SimplexConnectionExplicitHome_NS.cdp new file mode 100644 index 00000000000..c60ad818d6f --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/SimplexConnectionExplicitHome_NS.cdp @@ -0,0 +1,279 @@ +<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>SimpleComponent_Home</label> + <UUID>SimpleComponent_Home</UUID> + + <!-- Implementations declarations --> + + <!-- Home implementation --> + <implementation xmi:id="SimpleProviderHomeImplementation"> + <name>SimpleProviderHomeImplementation</name> + <source/> + <artifact xmi:idref="SimpleProvider_ExecArtifact" /> + <artifact xmi:idref="SimpleProvider_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleProviderHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleProviderHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleProvider_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleProvider_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimpleProviderComponentImplementation"> + <name>SimpleProviderComponentImplementation</name> + <source/> + <artifact xmi:idref="SimpleProvider_ExecArtifact" /> + <artifact xmi:idref="SimpleProvider_SvntArtifact" /> + </implementation> + + <implementation xmi:id="SimpleUserHomeImplementation"> + <name>SimpleUserHomeImplementation</name> + <source/> + <artifact xmi:idref="SimpleUser_ExecArtifact" /> + <artifact xmi:idref="SimpleUser_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleUserHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleUserHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleUser_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleUser_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimpleUserComponentImplementation"> + <name>SimpleUserComponentImplementation</name> + <source/> + <artifact xmi:idref="SimpleUser_ExecArtifact" /> + <artifact xmi:idref="SimpleUser_SvntArtifact" /> + </implementation> + + <instance xmi:id="SimpleProviderHomeInstance"> + <name>SimpleProviderHome</name> + <node>NodeOne</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleProviderHomeImplementation" /> + </instance> + + <instance xmi:id="SimpleProviderComponentInstance"> + <name>SimpleProviderComponent</name> + <node>NodeOne</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleProviderComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleProviderHome</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="SimpleUserHomeInstance"> + <name>SimpleUserHome</name> + <node>NodeTwo</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleUserHomeImplementation" /> + </instance> + + <instance xmi:id="SimpleUserComponentInstance"> + <name>SimpleUserComponent</name> + <node>NodeTwo</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleUserComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleUserHome</string> + </value> + </value> + </configProperty> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.RegisterNaming</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleUserComponent</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="SimpleUserComponentInstanceReverse"> + <name>SimpleUserComponentReverse</name> + <node>NodeTwo</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleUserComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleUserHome</string> + </value> + </value> + </configProperty> + </instance> + + <connection> + <name>TestConnection</name> + <internalEndpoint> + <portName>trig</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="SimpleProviderComponentInstance" /> + </internalEndpoint> +<!-- <internalEndpoint> + <portName>trig</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="SimpleUserComponentInstance" /> + </internalEndpoint>--> + <externalReference> + <location>corbaname:rir:/NameService#SimpleUserComponent</location> + <provider>false</provider> + <portName>trig</portName> + <supportedType>Meaningless</supportedType> + </externalReference> + </connection> + + <connection> + <name>TestConnectionReverse</name> + <internalEndpoint> + <portName>trig</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="SimpleUserComponentInstanceReverse" /> + </internalEndpoint> + <internalEndpoint> + <portName>trig</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="SimpleProviderComponentInstance" /> + </internalEndpoint> + </connection> + + <!-- Artifacts declarations --> + <artifact xmi:id="SimpleProvider_ExecArtifact"> + <name>SimpleProvider_exec</name> + <source/> + <node/> + <location>SimpleProvider_exec</location> + </artifact> + <artifact xmi:id="SimpleProvider_SvntArtifact"> + <name>SimpleProvider_svnt</name> + <source/> + <node/> + <location>SimpleProvider_svnt</location> + </artifact> + + <artifact xmi:id="SimpleUser_ExecArtifact"> + <name>SimpleUser_exec</name> + <source/> + <node/> + <location>SimpleUser_exec</location> + </artifact> + <artifact xmi:id="SimpleUser_SvntArtifact"> + <name>SimpleUser_svnt</name> + <source/> + <node/> + <location>SimpleUser_svnt</location> + </artifact> + + </Deployment:DeploymentPlan> diff --git a/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/em_launcher.mpc b/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/em_launcher.mpc new file mode 100644 index 00000000000..bfe2a2d6dba --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/em_launcher.mpc @@ -0,0 +1,5 @@ +project(simple_em_launcher) : ciao_config_handlers, dance_nodemanager_stub, ciao_logger { + Source_Files { + simple_em_launcher.cpp + } +}
\ No newline at end of file diff --git a/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/run_test.pl b/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/run_test.pl new file mode 100755 index 00000000000..b738049952b --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/run_test.pl @@ -0,0 +1,173 @@ +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +# $Id$ +# -*- perl -*- + +use lib "$ENV{'ACE_ROOT'}/bin"; +use PerlACE::Run_Test; + +$CIAO_ROOT = "$ENV{'CIAO_ROOT'}"; +$TAO_ROOT = "$ENV{'TAO_ROOT'}"; +$DAnCE = "$ENV{'CIAO_ROOT'}/DAnCE"; +$daemons_running = 0; +$em_running = 0; +$ns_running = 0; +$daemons = 2; +@ports = ( 60001, 60002 ); +@iorfiles = ( "NodeApp1.ior", "NodeApp2.ior" ); +@nodenames = ( "NodeOne", "NodeTwo" ); +$status = 0; +$dat_file = "NodeManagerMap.dat"; +$controller_exec = "$CIAO_ROOT/examples/Hello/Sender/starter"; + +$nsior = PerlACE::LocalFile ("ns.ior"); + +$E = 0; +$EM = 0; +$retval = 0; + +# Delete if there are any .ior files. +sub delete_ior_files { + for ($i = 0; $i < $daemons; ++$i) { + unlink $iorfiles[$i]; + } + unlink PerlACE::LocalFile ("EM.ior"); + unlink PerlACE::LocalFile ("Receiver.ior"); + unlink PerlACE::LocalFile ("Sender.ior"); + unlink PerlACE::LocalFile ("DAM.ior"); + unlink PerlACE::LocalFile ("ns.ior"); +} + +sub kill_node_daemons { + for ($i = 0; $i < $daemons; ++$i) { + $Daemons[$i]->Kill (); $Daemons[$i]->TimedWait (1); + } +} + +sub kill_open_processes { + if ($daemons_running == 1) { + kill_node_daemons (); + } + + if ($em_running == 1) { + $EM->Kill (); + $EM->TimedWait (1); + } + + if ($ns_running == 1) { + $NS->Kill (); + $NS->TimedWait (1); + } + +} + +sub run_node_daemons { + for ($i = 0; $i < $daemons; ++$i) + { + $iorfile = $iorfiles[$i]; + $port = $ports[$i]; + $nodename = $nodenames[$i]; + $iiop = "iiop://localhost:$port"; + $node_app = "$CIAO_ROOT/bin/ciao_componentserver"; + + $d_cmd = "$DAnCE/bin/dance_node_manager"; + $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30 --domain-nc corbaloc:rir:/NameService --instance-nc corbaloc:rir:/NameService"; + + $Daemons[$i] = new PerlACE::Process ($d_cmd, $d_param); + $result = $Daemons[$i]->Spawn (); + push(@processes, $Daemons[$i]); + + if (PerlACE::waitforfile_timed ($iorfile, + 30) == -1) { + print STDERR + "ERROR: The ior $iorfile file of node daemon $i could not be found\n"; + for (; $i >= 0; --$i) { + $Daemons[$i]->Kill (); $Daemons[$i]->TimedWait (1); + } + return -1; + } + } + return 0; +} + +if ($#ARGV == -1) +{ + opendir(DIR, "."); + @files = grep(/\.cdp$/,readdir(DIR)); + closedir(DIR); +} else { + @files = @ARGV; +} + +foreach $file (@files) { + print "Starting test for deployment $file\n"; + delete_ior_files (); + + print STDERR "Starting Naming Service\n"; + + $NS = new PerlACE::Process ("$TAO_ROOT/orbsvcs/Naming_Service/Naming_Service", "-m 0 -ORBEndpoint iiop://localhost:60003 -o ns.ior"); + $NS->Spawn (); + + if (PerlACE::waitforfile_timed ($nsior, $PerlACE::wait_interval_for_process_creation) == -1) + { + print STDERR "ERROR: cannot find naming service IOR file\n"; + $NS->Kill (); + exit 1; + } + $ns_running = 1; + +# Set up NamingService environment + $ENV{"NameServiceIOR"} = "corbaloc:iiop:localhost:60003/NameService"; + + +# Invoke node daemons. + print "Invoking node daemons\n"; + $status = run_node_daemons (); + + if ($status != 0) { + print STDERR "ERROR: Unable to execute the node daemons\n"; + kill_open_processes (); + exit 1; + } + + $daemons_running = 1; + + # Invoke execution manager. + print "Invoking execution manager\n"; + $EM = new PerlACE::Process ("$DAnCE/bin/dance_execution_manager", + "-eEM.ior --domain-nc corbaloc:rir:/NameService"); + $EM->Spawn (); + + if (PerlACE::waitforfile_timed ("EM.ior", + $PerlACE::wait_interval_for_process_creation) == -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 - start the application -\n"; + $E = new PerlACE::Process ("simple_em_launcher", + "file://EM.ior $file"); + + $status = $E->SpawnWaitKill (5000); + + if ($status != 0) + { + print "ERROR: simple_em_launcher returned an error code while deploying $file\n"; + $retval = -1; + } + + delete_ior_files (); + kill_open_processes (); +} + +delete_ior_files (); +kill_open_processes (); + +exit $status; diff --git a/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/simple_em_launcher.cpp b/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/simple_em_launcher.cpp new file mode 100644 index 00000000000..be325f6d09a --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/simple_em_launcher.cpp @@ -0,0 +1,128 @@ +/** + * @file simple_em_launcher.cpp + * @author William R. Otte <wotte@dre.vanderbilt.edu> + * + * Launches then immediately tears down a plan. + */ + +#include "ace/Log_Msg.h" +#include "ace/OS_NS_unistd.h" +#include "tao/ORB.h" +#include "ciao/Logger/Logger_Service.h" +#include "ciao/Logger/Log_Macros.h" +#include "Deployment/Deployment_DomainApplicationC.h" +#include "Deployment/Deployment_ExecutionManagerC.h" +#include "Deployment/Deployment_DeploymentPlanC.h" +#include "tools/Config_Handlers/XML_File_Intf.h" + +int usage () +{ + ACE_ERROR ((LM_ERROR, "simple_nm_launcher <nm_url> <plan>\n")); + return -1; +} + +#include <iostream> + +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) +{ + CIAO_DISABLE_TRACE (); + + auto_ptr<CIAO::Logger_Service> logger; + + CIAO::Logger_Service + * dlf = ACE_Dynamic_Service<CIAO::Logger_Service>::instance ("CIAO_Logger_Backend_Factory"); + + if (!dlf) + dlf = new CIAO::Logger_Service; + + logger.reset (dlf); + logger->init (argc, argv); + + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); + + if (argc != 3) + return usage (); + + try + { + ACE_DEBUG ((LM_INFO, "*** simple_em_launcher: parsing XML\n")); + // Parse plan + CIAO::Config_Handlers::XML_File_Intf xml (argv[2]); + xml.add_search_path ("CIAO_ROOT", "/docs/schema/"); + + auto_ptr< ::Deployment::DeploymentPlan> plan (xml.release_plan ()); + + if (plan.get () == 0) + { + ACE_ERROR ((LM_ERROR, "*** error parsing XML document\n")); + throw 1; + } + + + ACE_DEBUG ((LM_INFO, "*** simple_em_launcher: resoling execution manager reference.\n")); + CORBA::Object_var obj = orb->string_to_object (argv[1]); + Deployment::ExecutionManager_var em = Deployment::ExecutionManager::_narrow (obj.in ()); + + if (CORBA::is_nil (em.in ())) + { + ACE_ERROR ((LM_ERROR, "*** simple_em_launcher: ExecutionManager reference is nil.")); + throw 1; + } + + ACE_DEBUG ((LM_INFO, "*** simple_em_launcher: calling prepareplan.\n")); + Deployment::DomainApplicationManager_var dam = em->preparePlan (*plan, + Deployment::ResourceCommitmentManager::_nil ()); + + ACE_DEBUG ((LM_INFO, "*** simple_em_launcher: calling startLaunch\n")); + Deployment::Connections_var conns; + Deployment::Properties props; + Deployment::Application_var app = dam->startLaunch (props, conns.out ()); + Deployment::DomainApplication_var da = Deployment::DomainApplication::_narrow (app.in ()); + + ACE_DEBUG ((LM_INFO, "*** simple_em_launcher: calling finishLaunch\n")); + da->finishLaunch (conns.in (), false); + + ACE_DEBUG ((LM_INFO, "*** simple_em_launcher: calling start\n")); + da->start (); + + ACE_DEBUG ((LM_INFO, "*** simple_em_launcher: start finished, sleeping 5 seconds.\n")); + ACE_OS::sleep (5); + ACE_DEBUG ((LM_INFO, "*** simple_em_launcher: waking up from sleep, calling destroyApplication\n")); + + dam->destroyApplication (da.in ()); + + ACE_DEBUG ((LM_INFO, "*** simple_em_launcher: calling destroyManager\n")); + + em->destroyManager (dam.in ()); + + ACE_DEBUG ((LM_INFO, "*** simple_em_launcher: destroyManager completed.\n")); + + orb->destroy (); + } + catch (const Deployment::StopError &ex) + { + ACE_ERROR ((LM_ERROR, "*** Caught StopError exception with name %s and reason %s\n", + ex.name.in (), ex.reason.in ())); + return -1; + } + catch (const Deployment::StartError &ex) + { + ACE_ERROR ((LM_ERROR, "*** Caught StartError exception with name %s and reason %s\n", + ex.name.in (), ex.reason.in ())); + return -1; + } + catch (const CORBA::Exception &ex) + { + ACE_ERROR ((LM_ERROR, "*** Caught CORBA exception: %s\n", + ex._info ().c_str ())); + return -1; + + } + catch (...) + { + orb->destroy (); + ACE_ERROR ((LM_ERROR, "*** Caugn unknown exception\n")); + return -1; + } + return 0; +} diff --git a/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/EmitsConnectionExplicitHome.cdp b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/EmitsConnectionExplicitHome.cdp new file mode 100644 index 00000000000..6ac17b1e9e9 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/EmitsConnectionExplicitHome.cdp @@ -0,0 +1,227 @@ +<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>SimpleComponent_Home</label> + <UUID>SimpleComponent_Home</UUID> + + <!-- Implementations declarations --> + + <!-- Home implementation --> + <implementation xmi:id="SimpleEmitterHomeImplementation"> + <name>SimpleEmitterHomeImplementation</name> + <source/> + <artifact xmi:idref="SimpleEmitter_ExecArtifact" /> + <artifact xmi:idref="SimpleEmitter_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleEmitterHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleEmitterHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleEmitter_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleEmitter_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimpleEmitterComponentImplementation"> + <name>SimpleEmitterComponentImplementation</name> + <source/> + <artifact xmi:idref="SimpleEmitter_ExecArtifact" /> + <artifact xmi:idref="SimpleEmitter_SvntArtifact" /> + </implementation> + + <implementation xmi:id="SimpleConsumerHomeImplementation"> + <name>SimpleConsumerHomeImplementation</name> + <source/> + <artifact xmi:idref="SimpleConsumer_ExecArtifact" /> + <artifact xmi:idref="SimpleConsumer_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleConsumerHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleConsumerHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleConsumer_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleConsumer_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimpleConsumerComponentImplementation"> + <name>SimpleConsumerComponentImplementation</name> + <source/> + <artifact xmi:idref="SimpleConsumer_ExecArtifact" /> + <artifact xmi:idref="SimpleConsumer_SvntArtifact" /> + </implementation> + + <instance xmi:id="SimpleEmitterHomeInstance"> + <name>SimpleEmitterHome</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleEmitterHomeImplementation" /> + </instance> + + <instance xmi:id="SimpleEmitterComponentInstance"> + <name>SimpleEmitterComponent</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleEmitterComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleEmitterHome</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="SimpleConsumerHomeInstance"> + <name>SimpleConsumerHome</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleConsumerHomeImplementation" /> + </instance> + + <instance xmi:id="SimpleConsumerComponentInstance"> + <name>SimpleConsumerComponent</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleConsumerComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleConsumerHome</string> + </value> + </value> + </configProperty> + </instance> + + <connection> + <name>TestConnection</name> + <internalEndpoint> + <portName>hello</portName> + <provider>false</provider> + <kind>EventEmitter</kind> + <instance xmi:idref="SimpleEmitterComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>hello_</portName> + <provider>true</provider> + <kind>EventConsumer</kind> + <instance xmi:idref="SimpleConsumerComponentInstance" /> + </internalEndpoint> + </connection> + + <!-- Artifacts declarations --> + <artifact xmi:id="SimpleEmitter_ExecArtifact"> + <name>SimpleEmitter_exec</name> + <source/> + <node/> + <location>SimpleEmitter_exec</location> + </artifact> + <artifact xmi:id="SimpleEmitter_SvntArtifact"> + <name>SimpleEmitter_svnt</name> + <source/> + <node/> + <location>SimpleEmitter_svnt</location> + </artifact> + + <artifact xmi:id="SimpleConsumer_ExecArtifact"> + <name>SimpleConsumer_exec</name> + <source/> + <node/> + <location>SimpleConsumer_exec</location> + </artifact> + <artifact xmi:id="SimpleConsumer_SvntArtifact"> + <name>SimpleConsumer_svnt</name> + <source/> + <node/> + <location>SimpleConsumer_svnt</location> + </artifact> + + </Deployment:DeploymentPlan> diff --git a/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/MultiplexConnectionExplicitHome.cdp b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/MultiplexConnectionExplicitHome.cdp new file mode 100644 index 00000000000..45ff31929c3 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/MultiplexConnectionExplicitHome.cdp @@ -0,0 +1,262 @@ +<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>SimpleComponent_Home</label> + <UUID>SimpleComponent_Home</UUID> + + <!-- Implementations declarations --> + + <!-- Home implementation --> + <implementation xmi:id="SimpleProviderHomeImplementation"> + <name>SimpleProviderHomeImplementation</name> + <source/> + <artifact xmi:idref="SimpleProvider_ExecArtifact" /> + <artifact xmi:idref="SimpleProvider_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleProviderHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleProviderHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleProvider_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleProvider_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimpleProviderComponentImplementation"> + <name>SimpleProviderComponentImplementation</name> + <source/> + <artifact xmi:idref="SimpleProvider_ExecArtifact" /> + <artifact xmi:idref="SimpleProvider_SvntArtifact" /> + </implementation> + + <implementation xmi:id="SimpleMultipleUserHomeImplementation"> + <name>SimpleMultipleUserHomeImplementation</name> + <source/> + <artifact xmi:idref="SimpleMultipleUser_ExecArtifact" /> + <artifact xmi:idref="SimpleMultipleUser_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleMultipleUserHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleMultipleUserHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleMultipleUser_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleMultipleUser_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimpleMultipleUserComponentImplementation"> + <name>SimpleMultipleUserComponentImplementation</name> + <source/> + <artifact xmi:idref="SimpleMultipleUser_ExecArtifact" /> + <artifact xmi:idref="SimpleMultipleUser_SvntArtifact" /> + </implementation> + + <instance xmi:id="SimpleProviderHomeInstance"> + <name>SimpleProviderHome</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleProviderHomeImplementation" /> + </instance> + + <instance xmi:id="SimpleProviderComponentInstance"> + <name>SimpleProviderComponent</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleProviderComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleProviderHome</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="SimpleMultipleUserHomeInstance"> + <name>SimpleMultipleUserHome</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleMultipleUserHomeImplementation" /> + </instance> + + <instance xmi:id="SimpleMultipleUserComponentInstance"> + <name>SimpleMultipleUserComponent</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleMultipleUserComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleMultipleUserHome</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="SimpleMultipleUserComponentInstanceReverse"> + <name>SimpleMultipleUserComponentReverse</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleMultipleUserComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleMultipleUserHome</string> + </value> + </value> + </configProperty> + </instance> + + <connection> + <name>TestConnection</name> + <internalEndpoint> + <portName>trig</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="SimpleProviderComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>trig</portName> + <provider>false</provider> + <kind>MultiplexReceptacle</kind> + <instance xmi:idref="SimpleMultipleUserComponentInstance" /> + </internalEndpoint> + </connection> + + <connection> + <name>TestConnectionReverse</name> + <internalEndpoint> + <portName>trig</portName> + <provider>false</provider> + <kind>MultiplexReceptacle</kind> + <instance xmi:idref="SimpleMultipleUserComponentInstanceReverse" /> + </internalEndpoint> + <internalEndpoint> + <portName>trig</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="SimpleProviderComponentInstance" /> + </internalEndpoint> + </connection> + + <!-- Artifacts declarations --> + <artifact xmi:id="SimpleProvider_ExecArtifact"> + <name>SimpleProvider_exec</name> + <source/> + <node/> + <location>SimpleProvider_exec</location> + </artifact> + <artifact xmi:id="SimpleProvider_SvntArtifact"> + <name>SimpleProvider_svnt</name> + <source/> + <node/> + <location>SimpleProvider_svnt</location> + </artifact> + + <artifact xmi:id="SimpleMultipleUser_ExecArtifact"> + <name>SimpleMultipleUser_exec</name> + <source/> + <node/> + <location>SimpleMultipleUser_exec</location> + </artifact> + <artifact xmi:id="SimpleMultipleUser_SvntArtifact"> + <name>SimpleMultipleUser_svnt</name> + <source/> + <node/> + <location>SimpleMultipleUser_svnt</location> + </artifact> + + </Deployment:DeploymentPlan> diff --git a/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/PublishConnectionExplicitHome.cdp b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/PublishConnectionExplicitHome.cdp new file mode 100644 index 00000000000..53a0a54482d --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/PublishConnectionExplicitHome.cdp @@ -0,0 +1,227 @@ +<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>SimpleComponent_Home</label> + <UUID>SimpleComponent_Home</UUID> + + <!-- Implementations declarations --> + + <!-- Home implementation --> + <implementation xmi:id="SimplePublisherHomeImplementation"> + <name>SimplePublisherHomeImplementation</name> + <source/> + <artifact xmi:idref="SimplePublisher_ExecArtifact" /> + <artifact xmi:idref="SimplePublisher_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimplePublisherHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimplePublisherHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimplePublisher_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimplePublisher_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimplePublisherComponentImplementation"> + <name>SimplePublisherComponentImplementation</name> + <source/> + <artifact xmi:idref="SimplePublisher_ExecArtifact" /> + <artifact xmi:idref="SimplePublisher_SvntArtifact" /> + </implementation> + + <implementation xmi:id="SimpleConsumerHomeImplementation"> + <name>SimpleConsumerHomeImplementation</name> + <source/> + <artifact xmi:idref="SimpleConsumer_ExecArtifact" /> + <artifact xmi:idref="SimpleConsumer_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleConsumerHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleConsumerHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleConsumer_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleConsumer_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimpleConsumerComponentImplementation"> + <name>SimpleConsumerComponentImplementation</name> + <source/> + <artifact xmi:idref="SimpleConsumer_ExecArtifact" /> + <artifact xmi:idref="SimpleConsumer_SvntArtifact" /> + </implementation> + + <instance xmi:id="SimplePublisherHomeInstance"> + <name>SimplePublisherHome</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimplePublisherHomeImplementation" /> + </instance> + + <instance xmi:id="SimplePublisherComponentInstance"> + <name>SimplePublisherComponent</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimplePublisherComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimplePublisherHome</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="SimpleConsumerHomeInstance"> + <name>SimpleConsumerHome</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleConsumerHomeImplementation" /> + </instance> + + <instance xmi:id="SimpleConsumerComponentInstance"> + <name>SimpleConsumerComponent</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleConsumerComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleConsumerHome</string> + </value> + </value> + </configProperty> + </instance> + + <connection> + <name>TestConnection</name> + <internalEndpoint> + <portName>hello</portName> + <provider>false</provider> + <kind>EventPublisher</kind> + <instance xmi:idref="SimplePublisherComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>hello_</portName> + <provider>true</provider> + <kind>EventConsumer</kind> + <instance xmi:idref="SimpleConsumerComponentInstance" /> + </internalEndpoint> + </connection> + + <!-- Artifacts declarations --> + <artifact xmi:id="SimplePublisher_ExecArtifact"> + <name>SimplePublisher_exec</name> + <source/> + <node/> + <location>SimplePublisher_exec</location> + </artifact> + <artifact xmi:id="SimplePublisher_SvntArtifact"> + <name>SimplePublisher_svnt</name> + <source/> + <node/> + <location>SimplePublisher_svnt</location> + </artifact> + + <artifact xmi:id="SimpleConsumer_ExecArtifact"> + <name>SimpleConsumer_exec</name> + <source/> + <node/> + <location>SimpleConsumer_exec</location> + </artifact> + <artifact xmi:id="SimpleConsumer_SvntArtifact"> + <name>SimpleConsumer_svnt</name> + <source/> + <node/> + <location>SimpleConsumer_svnt</location> + </artifact> + + </Deployment:DeploymentPlan> diff --git a/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/SimpleAttributeExplicitHome.cdp b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/SimpleAttributeExplicitHome.cdp new file mode 100644 index 00000000000..d66eef2c70b --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/SimpleAttributeExplicitHome.cdp @@ -0,0 +1,179 @@ +<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>SimpleComponent_Home</label> + <UUID>SimpleComponent_Home</UUID> + + <!-- Implementations declarations --> + + <!-- Server Dance implementation--> + <!-- Home implementation --> + <implementation xmi:id="SimpleAttributeHomeImplementation"> + <name>SimpleAttributeHomeImplementation</name> + <source/> + <artifact xmi:idref="SimpleAttribute_ExecArtifact" /> + <artifact xmi:idref="SimpleAttribute_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleAttributeHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleAttributeHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleAttribute_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleAttribute_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimpleAttributeComponentImplementation"> + <name>SimpleAttributeComponentImplementation</name> + <source/> + <artifact xmi:idref="SimpleAttribute_ExecArtifact" /> + <artifact xmi:idref="SimpleAttribute_SvntArtifact" /> + </implementation> + + <instance xmi:id="SimpleAttributeHomeInstance"> + <name>SimpleAttributeHome</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleAttributeHomeImplementation" /> + <configProperty> + <name>str_attr</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Initialized Attribute!</string> + </value> + </value> + </configProperty> + <configProperty> + <name>long_attr</name> + <value> + <type> + <kind>tk_long</kind> + </type> + <value> + <long>1</long> + </value> + </value> + </configProperty> + <configProperty> + <name>short_attr</name> + <value> + <type> + <kind>tk_short</kind> + </type> + <value> + <short>1</short> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="SimpleAttributeComponentInstance"> + <name>SimpleAttributeComponent</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleAttributeComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleAttributeHome</string> + </value> + </value> + </configProperty> + <configProperty> + <name>str_attr</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Initialized Attribute!</string> + </value> + </value> + </configProperty> + <configProperty> + <name>long_attr</name> + <value> + <type> + <kind>tk_long</kind> + </type> + <value> + <long>1</long> + </value> + </value> + </configProperty> + <configProperty> + <name>short_attr</name> + <value> + <type> + <kind>tk_short</kind> + </type> + <value> + <short>1</short> + </value> + </value> + </configProperty> + </instance> + + <!-- Artifacts declarations --> + <artifact xmi:id="SimpleAttribute_ExecArtifact"> + <name>SimpleAttribute_exec</name> + <source/> + <node/> + <location>SimpleAttribute_exec</location> + </artifact> + <artifact xmi:id="SimpleAttribute_SvntArtifact"> + <name>SimpleAttribute_svnt</name> + <source/> + <node/> + <location>SimpleAttribute_svnt</location> + </artifact> + + </Deployment:DeploymentPlan> diff --git a/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/SimpleComponentExplicitHome.cdp b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/SimpleComponentExplicitHome.cdp new file mode 100644 index 00000000000..5632d219c48 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/SimpleComponentExplicitHome.cdp @@ -0,0 +1,113 @@ +<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>SimpleComponent_Home</label> + <UUID>SimpleComponent_Home</UUID> + + <!-- Implementations declarations --> + + <!-- Server Dance implementation--> + <!-- Home implementation --> + <implementation xmi:id="SimpleNullHomeImplementation"> + <name>SimpleNullHomeImplementation</name> + <source/> + <artifact xmi:idref="SimpleNull_ExecArtifact" /> + <artifact xmi:idref="SimpleNull_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleNullHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleNullHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleNull_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleNull_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimpleNullComponentImplementation"> + <name>SimpleNullComponentImplementation</name> + <source/> + <artifact xmi:idref="SimpleNull_ExecArtifact" /> + <artifact xmi:idref="SimpleNull_SvntArtifact" /> + </implementation> + + <instance xmi:id="SimpleNullHomeInstance"> + <name>SimpleNullHome</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleNullHomeImplementation" /> + </instance> + + <instance xmi:id="SimpleNullComponentInstance"> + <name>SimpleNullComponent</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleNullComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleNullHome</string> + </value> + </value> + </configProperty> + </instance> + + <!-- Artifacts declarations --> + <artifact xmi:id="SimpleNull_ExecArtifact"> + <name>SimpleNull_exec</name> + <source/> + <node/> + <location>SimpleNull_exec</location> + </artifact> + <artifact xmi:id="SimpleNull_SvntArtifact"> + <name>SimpleNull_svnt</name> + <source/> + <node/> + <location>SimpleNull_svnt</location> + </artifact> + + </Deployment:DeploymentPlan> diff --git a/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/SimpleComponentUnhomed.cdp b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/SimpleComponentUnhomed.cdp new file mode 100644 index 00000000000..e31930188d2 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/SimpleComponentUnhomed.cdp @@ -0,0 +1,86 @@ +<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>SimpleComponent_Home</label> + <UUID>SimpleComponent_Home</UUID> + + <!-- Implementations declarations --> + + <!-- Server Dance implementation--> + <implementation xmi:id="SimpleNullComponentImplementation"> + <name>SimpleNullComponentImplementation</name> + <source/> + <artifact xmi:idref="SimpleNull_ExecArtifact" /> + <artifact xmi:idref="SimpleNull_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>component factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleNull_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleNull_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleNull_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleNull_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <instance xmi:id="SimpleNullComponentInstance"> + <name>SimpleNullComponent</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleNullComponentImplementation" /> + </instance> + + <!-- Artifacts declarations --> + <artifact xmi:id="SimpleNull_ExecArtifact"> + <name>SimpleNull_exec</name> + <source/> + <node/> + <location>SimpleNull_exec</location> + </artifact> + <artifact xmi:id="SimpleNull_SvntArtifact"> + <name>SimpleNull_svnt</name> + <source/> + <node/> + <location>SimpleNull_svnt</location> + </artifact> + + </Deployment:DeploymentPlan> diff --git a/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/SimpleHome.cdp b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/SimpleHome.cdp new file mode 100644 index 00000000000..a63da21f0f6 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/SimpleHome.cdp @@ -0,0 +1,90 @@ +<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>SimpleComponent_Home</label> + <UUID>SimpleComponent_Home</UUID> + + <!-- Implementations declarations --> + + <!-- Server Dance implementation--> + <!-- Home implementation --> + <implementation xmi:id="SimpleNullHomeImplementation"> + <name>SimpleNullHomeImplementation</name> + <source/> + <artifact xmi:idref="SimpleNull_ExecArtifact" /> + <artifact xmi:idref="SimpleNull_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleNullHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleNullHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleNull_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleNull_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <!-- Instances declarations --> + + <!-- Server Dance instances--> + <instance xmi:id="SimpleNullHomeInstance"> + <name>SimpleNullHome</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleNullHomeImplementation" /> + </instance> + + <!-- Artifacts declarations --> + <artifact xmi:id="SimpleNull_ExecArtifact"> + <name>SimpleNull_exec</name> + <source/> + <node/> + <location>SimpleNull_exec</location> + </artifact> + <artifact xmi:id="SimpleNull_SvntArtifact"> + <name>SimpleNull_svnt</name> + <source/> + <node/> + <location>SimpleNull_svnt</location> + </artifact> + + </Deployment:DeploymentPlan> diff --git a/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/SimplexConnectionExplicitHome.cdp b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/SimplexConnectionExplicitHome.cdp new file mode 100644 index 00000000000..f3f1e1ca6e9 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/SimplexConnectionExplicitHome.cdp @@ -0,0 +1,262 @@ +<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>SimpleComponent_Home</label> + <UUID>SimpleComponent_Home</UUID> + + <!-- Implementations declarations --> + + <!-- Home implementation --> + <implementation xmi:id="SimpleProviderHomeImplementation"> + <name>SimpleProviderHomeImplementation</name> + <source/> + <artifact xmi:idref="SimpleProvider_ExecArtifact" /> + <artifact xmi:idref="SimpleProvider_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleProviderHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleProviderHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleProvider_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleProvider_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimpleProviderComponentImplementation"> + <name>SimpleProviderComponentImplementation</name> + <source/> + <artifact xmi:idref="SimpleProvider_ExecArtifact" /> + <artifact xmi:idref="SimpleProvider_SvntArtifact" /> + </implementation> + + <implementation xmi:id="SimpleUserHomeImplementation"> + <name>SimpleUserHomeImplementation</name> + <source/> + <artifact xmi:idref="SimpleUser_ExecArtifact" /> + <artifact xmi:idref="SimpleUser_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleUserHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleUserHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleUser_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleUser_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimpleUserComponentImplementation"> + <name>SimpleUserComponentImplementation</name> + <source/> + <artifact xmi:idref="SimpleUser_ExecArtifact" /> + <artifact xmi:idref="SimpleUser_SvntArtifact" /> + </implementation> + + <instance xmi:id="SimpleProviderHomeInstance"> + <name>SimpleProviderHome</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleProviderHomeImplementation" /> + </instance> + + <instance xmi:id="SimpleProviderComponentInstance"> + <name>SimpleProviderComponent</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleProviderComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleProviderHome</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="SimpleUserHomeInstance"> + <name>SimpleUserHome</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleUserHomeImplementation" /> + </instance> + + <instance xmi:id="SimpleUserComponentInstance"> + <name>SimpleUserComponent</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleUserComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleUserHome</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="SimpleUserComponentInstanceReverse"> + <name>SimpleUserComponentReverse</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleUserComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleUserHome</string> + </value> + </value> + </configProperty> + </instance> + + <connection> + <name>TestConnection</name> + <internalEndpoint> + <portName>trig</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="SimpleProviderComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>trig</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="SimpleUserComponentInstance" /> + </internalEndpoint> + </connection> + + <connection> + <name>TestConnectionReverse</name> + <internalEndpoint> + <portName>trig</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="SimpleUserComponentInstanceReverse" /> + </internalEndpoint> + <internalEndpoint> + <portName>trig</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="SimpleProviderComponentInstance" /> + </internalEndpoint> + </connection> + + <!-- Artifacts declarations --> + <artifact xmi:id="SimpleProvider_ExecArtifact"> + <name>SimpleProvider_exec</name> + <source/> + <node/> + <location>SimpleProvider_exec</location> + </artifact> + <artifact xmi:id="SimpleProvider_SvntArtifact"> + <name>SimpleProvider_svnt</name> + <source/> + <node/> + <location>SimpleProvider_svnt</location> + </artifact> + + <artifact xmi:id="SimpleUser_ExecArtifact"> + <name>SimpleUser_exec</name> + <source/> + <node/> + <location>SimpleUser_exec</location> + </artifact> + <artifact xmi:id="SimpleUser_SvntArtifact"> + <name>SimpleUser_svnt</name> + <source/> + <node/> + <location>SimpleUser_svnt</location> + </artifact> + + </Deployment:DeploymentPlan> diff --git a/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/nm_launcher.mpc b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/nm_launcher.mpc new file mode 100644 index 00000000000..479e04f2acc --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/nm_launcher.mpc @@ -0,0 +1,5 @@ +project(simple_nm_launcher) : ciao_config_handlers, dance_nodemanager_stub, ciao_logger { + Source_Files { + simple_nm_launcher.cpp + } +}
\ No newline at end of file diff --git a/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/run_test.pl b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/run_test.pl new file mode 100755 index 00000000000..27b9f7987e8 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/run_test.pl @@ -0,0 +1,115 @@ +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +# $Id$ +# -*- perl -*- + +use lib "$ENV{'ACE_ROOT'}/bin"; +use PerlACE::Run_Test; + +$CIAO_ROOT = "$ENV{'CIAO_ROOT'}"; +$TAO_ROOT = "$ENV{'TAO_ROOT'}"; +$DAnCE = "$ENV{'CIAO_ROOT'}/DAnCE"; +$daemons_running = 0; +$daemons = 1; +@ports = ( 60001 ); +@iorfiles = ( "NodeApp1.ior" ); +@nodenames = ( "Node" ); +$status = 0; + +$E = 0; +$EM = 0; + +# Delete if there are any .ior files. +sub delete_ior_files { + for ($i = 0; $i < $daemons; ++$i) { + unlink $iorfiles[$i]; + } +} + +sub kill_node_daemons { + for ($i = 0; $i < $daemons; ++$i) { + $Daemons[$i]->Kill (); $Daemons[$i]->TimedWait (1); + } +} + +sub kill_open_processes { + if ($daemons_running == 1) { + kill_node_daemons (); + } +} + +sub run_node_daemons { + for ($i = 0; $i < $daemons; ++$i) + { + $iorfile = $iorfiles[$i]; + $port = $ports[$i]; + $nodename = $nodenames[$i]; + $iiop = "iiop://localhost:$port"; + $node_app = "$CIAO_ROOT/bin/ciao_componentserver"; + + $d_cmd = "$DAnCE/bin/dance_node_manager"; + $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30"; + + $Daemons[$i] = new PerlACE::Process ($d_cmd, $d_param); + $result = $Daemons[$i]->Spawn (); + push(@processes, $Daemons[$i]); + + if (PerlACE::waitforfile_timed ($iorfile, + 30) == -1) { + print STDERR + "ERROR: The ior $iorfile file of node daemon $i could not be found\n"; + for (; $i >= 0; --$i) { + $Daemons[$i]->Kill (); $Daemons[$i]->TimedWait (1); + } + return -1; + } + } + return 0; +} + +if ($#ARGV == -1) +{ + opendir(DIR, "."); + @files = grep(/\.cdp$/,readdir(DIR)); + closedir(DIR); +} else { + @files = @ARGV; +} + +foreach $file (@files) { + delete_ior_files (); + + print "Running test for plan $file\n"; + + # Invoke node daemons. + 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 executor - start the application -. + print "Launching the plan. file://NodeApp1.ior \n"; + $E = new PerlACE::Process ("simple_nm_launcher", + "file://NodeApp1.ior $file"); + + $status = $E->SpawnWaitKill (5000); + + if ($status != 0) + { + print "ERROR: simple_nm_launcher returned error status $status\n"; + } + + print "Test for plan $file succeeded\n"; + kill_open_processes (); +} + + +exit $status; diff --git a/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/simple_nm_launcher.cpp b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/simple_nm_launcher.cpp new file mode 100644 index 00000000000..8b4d5531816 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/simple_nm_launcher.cpp @@ -0,0 +1,128 @@ +/** + * @file simple_nm_launcher.cpp + * @author William R. Otte <wotte@dre.vanderbilt.edu> + * + * Launches then immediately tears down a plan. + */ + +#include "ace/Log_Msg.h" +#include "ace/OS_NS_unistd.h" +#include "tao/ORB.h" +#include "ciao/Logger/Logger_Service.h" +#include "ciao/Logger/Log_Macros.h" +#include "Deployment/Deployment_NodeApplicationC.h" +#include "Deployment/Deployment_NodeManagerC.h" +#include "Deployment/Deployment_DeploymentPlanC.h" +#include "tools/Config_Handlers/XML_File_Intf.h" + +int usage () +{ + ACE_ERROR ((LM_ERROR, "simple_nm_launcher <nm_url> <plan>\n")); + return -1; +} + +#include <iostream> + +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) +{ + CIAO_DISABLE_TRACE (); + + auto_ptr<CIAO::Logger_Service> logger; + + CIAO::Logger_Service + * dlf = ACE_Dynamic_Service<CIAO::Logger_Service>::instance ("CIAO_Logger_Backend_Factory"); + + if (!dlf) + dlf = new CIAO::Logger_Service; + + logger.reset (dlf); + logger->init (argc, argv); + + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); + + if (argc != 3) + return usage (); + + try + { + ACE_DEBUG ((LM_DEBUG, "*** simple_nm_launcher: parsing XML\n")); + // Parse plan + CIAO::Config_Handlers::XML_File_Intf xml (argv[2]); + xml.add_search_path ("CIAO_ROOT", "/docs/schema/"); + + auto_ptr< ::Deployment::DeploymentPlan> plan (xml.release_plan ()); + + if (plan.get () == 0) + { + ACE_ERROR ((LM_ERROR, "*** error parsing XML document\n")); + throw 1; + } + + + ACE_DEBUG ((LM_DEBUG, "*** simple_nm_launcher: resoling node manager reference.\n")); + CORBA::Object_var obj = orb->string_to_object (argv[1]); + Deployment::NodeManager_var nm = Deployment::NodeManager::_narrow (obj.in ()); + + if (CORBA::is_nil (nm.in ())) + { + ACE_ERROR ((LM_ERROR, "*** simple_nm_launcher: NodeManager reference is nil.")); + throw 1; + } + + ACE_DEBUG ((LM_DEBUG, "*** simple_nm_launcher: calling prepareplan.\n")); + Deployment::NodeApplicationManager_var nam = nm->preparePlan (*plan, + Deployment::ResourceCommitmentManager::_nil ()); + + ACE_DEBUG ((LM_DEBUG, "*** simple_nm_launcher: calling startLaunch\n")); + Deployment::Connections_var conns; + Deployment::Properties props; + Deployment::Application_var app = nam->startLaunch (props, conns.out ()); + Deployment::NodeApplication_var na = Deployment::NodeApplication::_narrow (app.in ()); + + ACE_DEBUG ((LM_DEBUG, "*** simple_nm_launcher: calling finishLaunch\n")); + na->finishLaunch (conns.in (), false); + + ACE_DEBUG ((LM_DEBUG, "*** simple_nm_launcher: calling start\n")); + na->start (); + + ACE_DEBUG ((LM_DEBUG, "*** simple_nm_launcher: start finished, sleeping 5 seconds.\n")); + ACE_OS::sleep (5); + ACE_DEBUG ((LM_DEBUG, "*** simple_nm_launcher: waking up from sleep, calling destroyApplication\n")); + + nam->destroyApplication (na.in ()); + + ACE_DEBUG ((LM_DEBUG, "*** simple_nm_launcher: calling destroyManager\n")); + + nm->destroyManager (nam.in ()); + + ACE_DEBUG ((LM_DEBUG, "*** simple_nm_launcher: destroyManager completed.\n")); + + orb->destroy (); + } + catch (Deployment::StopError &ex) + { + ACE_ERROR ((LM_ERROR, "*** Caught StopError exception with name %s and reason %s\n", + ex.name.in (), ex.reason.in ())); + return -1; + } + catch (Deployment::StartError &ex) + { + ACE_ERROR ((LM_ERROR, "*** Caught StartError exception with name %s and reason %s\n", + ex.name.in (), ex.reason.in ())); + return -1; + } + catch (CORBA::Exception &ex) + { + ACE_ERROR ((LM_ERROR, "*** Caught CORBA exception: %s\n", + ex._info ().c_str ())); + return -1; + + } + catch (...) + { + orb->destroy (); + ACE_ERROR ((LM_ERROR, "*** Caugn unknown exception\n")); + return -1; + } + return 0; +} diff --git a/CIAO/DAnCE/tests/DeploymentPlanDump/CcmDance2-host1.cdp b/CIAO/DAnCE/tests/DeploymentPlanDump/CcmDance2-host1.cdp new file mode 100644 index 00000000000..7aa477fae74 --- /dev/null +++ b/CIAO/DAnCE/tests/DeploymentPlanDump/CcmDance2-host1.cdp @@ -0,0 +1,639 @@ +<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>CCmDance2_1</label> + <UUID>CcmDance2_1</UUID> + + <realizes></realizes> + + <!-- Implementations declarations --> + + <!-- Client Dance implementation--> + <!-- Home implementation --> + <implementation id="ClientDanceHomeImplementation"> + <name>ClientDanceHomeImplementation</name> + <source/> + <artifact>ClientDanceArtifact</artifact> + + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CCM_ClientDanceHome</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- COMPONENT_KIND --> + <name>cdmw.config.ComponentKind</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ComponentKindValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ComponentKindValue:1.0</typeId> + <member>SERVICE</member> + <member>SESSION</member> + <member>PROCESS</member> + <member>ENTITY</member> + <member>UNCLASSIFIED</member> + </enum> + </type> + <value> + <enum>SESSION</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- SERVANT_LIFETIME --> + <name>cdmw.config.ServantLifeTime</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ServantLifeTimeValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ServantLifetimeValue:1.0</typeId> + <member>COMPONENT_LIFETIME</member> + <member>METHOD_LIFETIME</member> + <member>TRANSACTION_LIFETIME</member> + <member>CONTAINER_LIFETIME</member> + </enum> + </type> + <value> + <enum>CONTAINER_LIFETIME</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- THREADING_POLICY --> + <name>cdmw.config.ThreadingPolicy</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ThreadingPolicyValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ThreadingPolicyValue:1.0</typeId> + <member>SERIALIZE</member> + <member>MULTITHREAD</member> + </enum> + </type> + <value> + <enum>MULTITHREAD</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- HOME_REPOSITORY_ID --> + <name>cdmw.config.HomeRepositoryId</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>IDL:acme.com/CcmDance2Test/ClientModule/ClientDanceHome:1.0</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- HOME_SERVANT_CLASSNAME --> + <name>cdmw.config.HomeServantClassName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Cdmw.CCM.CIF.CdmwCcmDance2Test.ClientModule.SessionClientDanceHome_impl</string> + </value> + </value> + </execParameter> + +<!-- <execParameter> --> + <!-- VALUETYPE_FACTORY_DEPENDENCIES --> +<!-- <name>cdmw.config.ValuetypeFactoryDependencies</name> + <value> + <type> + <kind>tk_sequence</kind> + <sequence> + <elementType> + <kind>tk_struct</kind> + <struct> + <name>ValuetypeFactoryDescription</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ValuetypeFactoryDescription:1.0</typeId> + <member> + <name>repid</name> + <type> + <kind>tk_alias</kind> + <alias> + <name>RepositoryId</name> + <typeId>IDL:omg.org/CORBA/RepositoryId</typeId> + <elementType> + <kind>tk_string</kind> + </elementType> + </alias> + </type> + </member> + <member> + <name>factory_entrypoint</name> + <type> + <kind>tk_string</kind> + </type> + </member> + </struct> + </elementType> + </sequence> + </type> + <value> + <element> + <member> + <name>repid</name> + <value> + <string>IDL:acme.com/CcmDance2Test/EventTypeModule/HostnameResult:1.0</string> + </value> + </member> + <member> + <name>factory_entrypoint</name> + <value> + <string>createHostnameResultFactory</string> + </value> + </member> + </element> + </value> + </value> + </execParameter> --> + </implementation> + + <!-- Component implementation --> + <implementation id="ClientDanceImplementation"> + <name>ClientDanceImplementation</name> + <source/> + <artifact>ClientDanceArtifact</artifact> + </implementation> + + + <!-- Test Driver implementation--> + <!-- Home implementation --> + <implementation id="TestDriverHomeImplementation"> + <name>TestDriverHomeImplementation</name> + <source/> + <artifact>ClientDanceArtifact</artifact> + + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CCM_TestDriverHome</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- COMPONENT_KIND --> + <name>cdmw.config.ComponentKind</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ComponentKindValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ComponentKindValue:1.0</typeId> + <member>SERVICE</member> + <member>SESSION</member> + <member>PROCESS</member> + <member>ENTITY</member> + <member>UNCLASSIFIED</member> + </enum> + </type> + <value> + <enum>SESSION</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- SERVANT_LIFETIME --> + <name>cdmw.config.ServantLifeTime</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ServantLifeTimeValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ServantLifetimeValue:1.0</typeId> + <member>COMPONENT_LIFETIME</member> + <member>METHOD_LIFETIME</member> + <member>TRANSACTION_LIFETIME</member> + <member>CONTAINER_LIFETIME</member> + </enum> + </type> + <value> + <enum>CONTAINER_LIFETIME</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- THREADING_POLICY --> + <name>cdmw.config.ThreadingPolicy</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ThreadingPolicyValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ThreadingPolicyValue:1.0</typeId> + <member>SERIALIZE</member> + <member>MULTITHREAD</member> + </enum> + </type> + <value> + <enum>MULTITHREAD</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- HOME_REPOSITORY_ID --> + <name>cdmw.config.HomeRepositoryId</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>IDL:acme.com/CcmDance2Test/DriverModule/TestDriverHome:1.0</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- HOME_SERVANT_CLASSNAME --> + <name>cdmw.config.HomeServantClassName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Cdmw.CCM.CIF.CdmwCcmDance2Test.DriverModule.SessionTestDriverHome_impl</string> + </value> + </value> + </execParameter> + + </implementation> + + <!-- Component implementation --> + <implementation id="TestDriverImplementation"> + <name>TestDriverImplementation</name> + <source/> + <artifact>ClientDanceArtifact</artifact> + </implementation> + + + + + + + <!-- Instances declarations --> + + <!-- Client Dance instances--> + <instance id="ClientDanceHome1"> + <name>ClientDanceHome1</name> + <node>Host1</node> + <!-- hostname --> + <source/> + <implementation>ClientDanceHomeImplementation</implementation> + <configProperty> + <!-- PROCESS_DESTINATION --> + <name>cdmw.config.ProcessDestination</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ClientDanceProcess2@CcmDance2Application</string> + </value> + </value> + </configProperty> + </instance> + + <instance id="ClientDance1"> + <name>ClientDance1</name> + <node>Host1</node> + <source/> + <implementation>ClientDanceImplementation</implementation> + + <configProperty> + <!-- HOME --> + <name>cdmw.component_home</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ClientDanceHome1</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- COMPONENT_NAME --> + <name>cdmw.config.ComponentName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ClientDance1</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: configuration--> + <name>configuration</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Client1</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: expectedServerHostname--> + <name>expectedServerHostname</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>rhel4y.prismtech.com</string> + </value> + </value> + </configProperty> + </instance> + + + <!-- Test Driver instances--> + <instance id="TestDriverHome"> + <name>TestDriverHome</name> + <node>Host1</node> + <!-- hostname --> + <source/> + <implementation>TestDriverHomeImplementation</implementation> + <configProperty> + <!-- PROCESS_DESTINATION --> + <name>cdmw.config.ProcessDestination</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ClientDanceProcess2@CcmDance2Application</string> + </value> + </value> + </configProperty> + </instance> + + <instance id="TestDriver1"> + <name>TestDriver1</name> + <node>Host1</node> + <source/> + <implementation>TestDriverImplementation</implementation> + + <configProperty> + <!-- HOME --> + <name>cdmw.component_home</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>TestDriverHome</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- COMPONENT_NAME --> + <name>cdmw.config.ComponentName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>TestDriver1</string> + </value> + </value> + </configProperty> + </instance> + + + + + + <!-- Connections declarations --> + + <connection> + <name>client1_receptacle</name> + <internalEndpoint> + <portName>serverHostInfo</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>ClientDance1</instance> + </internalEndpoint> + <externalReference> + <location>corbaname::rhel4y.prismtech.com:12345#Host2/CcmDance2_1.DeploymentPlan/ServerDance/serverHostInfo1.Port</location> + <provider>true</provider> + <portName/> + <supportedType/> + </externalReference> + </connection> + + <connection> + <name>server_receptacle1</name> + <internalEndpoint> + <portName>clientHostInfo</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance>ClientDance1</instance> + </internalEndpoint> + <externalReference> + <location>corbaname::rhel4y.prismtech.com:12345#Host2/CcmDance2_1.DeploymentPlan/ServerDance.Component</location> + <provider>false</provider> + <portName>clientHostInfo1</portName> + <supportedType/> + </externalReference> + </connection> + + <connection> + <name>client1_consumer_to_publishes</name> + <internalEndpoint> + <portName>hostnameResults</portName> + <provider>true</provider> + <kind>EventConsumer</kind> + <instance>ClientDance1</instance> + </internalEndpoint> + <externalReference> + <location>corbaname::rhel4y.prismtech.com:12345#Host2/CcmDance2_1.DeploymentPlan/ServerDance.Component</location> + <provider>false</provider> + <portName>hostnamePublishes</portName> + <supportedType/> + </externalReference> + </connection> + + <connection> + <name>server_consumer_to_emits1</name> + <internalEndpoint> + <portName>commandEmits</portName> + <provider>false</provider> + <kind>EventEmitter</kind> + <instance>ClientDance1</instance> + </internalEndpoint> + <externalReference> + <location>corbaname::rhel4y.prismtech.com:12345#Host2/CcmDance2_1.DeploymentPlan/ServerDance/commands.Port</location> + <provider>true</provider> + <portName/> + <supportedType/> + </externalReference> + </connection> + + <connection> + <name>client1_sayHello</name> + <internalEndpoint> + <portName>sayHello</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>ClientDance1</instance> + </internalEndpoint> + <externalReference> + <location>corbaname::rhel4y.prismtech.com:12345#Host2/CcmDance2_1.DeploymentPlan/ServerDance/supports.Port</location> + <provider>true</provider> + <portName/> + <supportedType/> + </externalReference> + </connection> + + <connection> + <name>client1_naming</name> + <internalEndpoint> + <portName>naming</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>ClientDance1</instance> + </internalEndpoint> + <externalReference> + <location>corbaname::rhel4x.prismtech.com:21869</location> + <provider>true</provider> + <portName/> + <supportedType/> + </externalReference> + </connection> + + <connection> + <name>testDriver_server</name> + <internalEndpoint> + <portName>server</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>TestDriver1</instance> + </internalEndpoint> + <externalReference> + <location>corbaname::rhel4y.prismtech.com:12345#Host2/CcmDance2_1.DeploymentPlan/ServerDance/supports.Port</location> + <provider>true</provider> + <portName/> + <supportedType/> + </externalReference> + </connection> + + <connection> + <name>testDriver_client1</name> + <internalEndpoint> + <portName>client1</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>TestDriver1</instance> + </internalEndpoint> + <internalEndpoint> + <portName>supports</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance>ClientDance1</instance> + </internalEndpoint> + </connection> + + <connection> + <name>testDriver_client2</name> + <internalEndpoint> + <portName>client2</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>TestDriver1</instance> + </internalEndpoint> + <externalReference> + <location>corbaname::rhel4y.prismtech.com:12345#Host2/CcmDance2_1.DeploymentPlan/ClientDance2/supports.Port</location> + <provider>true</provider> + <portName/> + <supportedType/> + </externalReference> + </connection> + + <connection> + <name>testDriver_sayHello</name> + <internalEndpoint> + <portName>handshake</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>TestDriver1</instance> + </internalEndpoint> + <externalReference> + <location>corbaname::rhel4y.prismtech.com:12345#Host2/CcmDance2_1.DeploymentPlan/ServerDance/supports.Port</location> + <provider>true</provider> + <portName/> + <supportedType/> + </externalReference> + </connection> + + <!-- Artifacts declarations --> + <artifact id="ClientDanceArtifact"> + <name>ClientDanceArtifact</name> + <source/> + <node/> + <location>/home/sl/install/ofccm_v0/demos/demo_dance2/c++/i686-pc-linux-gnu/libClientCcmDance2Demo.so</location> + <execParameter> + <name>repid</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>IDL:acme.com/CcmDance2Test/EventTypeModule/HostnameResult:1.0</string> + </value> + </value> + </execParameter> + <execParameter> + <name>factory_entrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>createHostnameResultFactory</string> + </value> + </value> + </execParameter> + </artifact> + + </Deployment:DeploymentPlan> diff --git a/CIAO/DAnCE/tests/DeploymentPlanDump/CcmDance2-host2.cdp b/CIAO/DAnCE/tests/DeploymentPlanDump/CcmDance2-host2.cdp new file mode 100644 index 00000000000..57a44321b09 --- /dev/null +++ b/CIAO/DAnCE/tests/DeploymentPlanDump/CcmDance2-host2.cdp @@ -0,0 +1,969 @@ +<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>CCmDance2_1</label> + <UUID>CcmDance2_1</UUID> + + <realizes></realizes> + + <!-- Implementations declarations --> + + <!-- Server Dance implementation--> + <!-- Home implementation --> + <implementation id="ServerDanceHomeImplementation"> + <name>ServerDanceHomeImplementation</name> + <source/> + <artifact>ServerDanceArtifact1</artifact> + <artifact>ServerDanceArtifact2</artifact> + + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CCM_ServerDanceHome</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- COMPONENT_KIND --> + <name>cdmw.config.ComponentKind</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ComponentKindValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ComponentKindValue:1.0</typeId> + <member>SERVICE</member> + <member>SESSION</member> + <member>PROCESS</member> + <member>ENTITY</member> + <member>UNCLASSIFIED</member> + </enum> + </type> + <value> + <enum>SESSION</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- SERVANT_LIFETIME --> + <name>cdmw.config.ServantLifeTime</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ServantLifeTimeValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ServantLifetimeValue:1.0</typeId> + <member>COMPONENT_LIFETIME</member> + <member>METHOD_LIFETIME</member> + <member>TRANSACTION_LIFETIME</member> + <member>CONTAINER_LIFETIME</member> + </enum> + </type> + <value> + <enum>CONTAINER_LIFETIME</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- THREADING_POLICY --> + <name>cdmw.config.ThreadingPolicy</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ThreadingPolicyValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ThreadingPolicyValue:1.0</typeId> + <member>SERIALIZE</member> + <member>MULTITHREAD</member> + </enum> + </type> + <value> + <enum>MULTITHREAD</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- HOME_REPOSITORY_ID --> + <name>cdmw.config.HomeRepositoryId</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>IDL:acme.com/CcmDance2Test/ServerModule/ServerDanceHome:1.0</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- HOME_SERVANT_CLASSNAME --> + <name>cdmw.config.HomeServantClassName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Cdmw.CCM.CIF.CdmwCcmDance2Test.ServerModule.SessionServerDanceHome_impl</string> + </value> + </value> + </execParameter> + +<!-- <execParameter> --> + <!-- VALUETYPE_FACTORY_DEPENDENCIES --> +<!-- <name>cdmw.config.ValuetypeFactoryDependencies</name> + <value> + <type> + <kind>tk_sequence</kind> + <sequence> + <elementType> + <kind>tk_struct</kind> + <struct> + <name>ValuetypeFactoryDescription</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ValuetypeFactoryDescription:1.0</typeId> + <member> + <name>repid</name> + <type> + <kind>tk_alias</kind> + <alias> + <name>RepositoryId</name> + <typeId>IDL:omg.org/CORBA/RepositoryId</typeId> + <elementType> + <kind>tk_string</kind> + </elementType> + </alias> + </type> + </member> + <member> + <name>factory_entrypoint</name> + <type> + <kind>tk_string</kind> + </type> + </member> + </struct> + </elementType> + </sequence> + </type> + <value> + <element> + <member> + <name>repid</name> + <value> + <string>IDL:acme.com/CcmDance2Test/EventTypeModule/Command:1.0</string> + </value> + </member> + <member> + <name>factory_entrypoint</name> + <value> + <string>createCommandFactory</string> + </value> + </member> + </element> + </value> + <value> + <element> + <member> + <name>repid</name> + <value> + <string>IDL:acme.com/CcmDance2Test/FooValueType:1.0</string> + </value> + </member> + <member> + <name>factory_entrypoint</name> + <value> + <string>createFooValueTypeFactory</string> + </value> + </member> + </element> + </value> + </value> + </execParameter> --> + </implementation> + + <!-- Component implementation --> + <implementation id="ServerDanceImplementation"> + <name>ServerDanceImplementation</name> + <source/> + <artifact>ServerDanceArtifact1</artifact> + </implementation> + + + + <!-- Client Dance implementation--> + <!-- Home implementation --> + <implementation id="ClientDanceHomeImplementation"> + <name>ClientDanceHomeImplementation</name> + <source/> + <artifact>ClientDanceArtifact</artifact> + + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CCM_ClientDanceHome</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- COMPONENT_KIND --> + <name>cdmw.config.ComponentKind</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ComponentKindValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ComponentKindValue:1.0</typeId> + <member>SERVICE</member> + <member>SESSION</member> + <member>PROCESS</member> + <member>ENTITY</member> + <member>UNCLASSIFIED</member> + </enum> + </type> + <value> + <enum>SESSION</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- SERVANT_LIFETIME --> + <name>cdmw.config.ServantLifeTime</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ServantLifeTimeValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ServantLifetimeValue:1.0</typeId> + <member>COMPONENT_LIFETIME</member> + <member>METHOD_LIFETIME</member> + <member>TRANSACTION_LIFETIME</member> + <member>CONTAINER_LIFETIME</member> + </enum> + </type> + <value> + <enum>CONTAINER_LIFETIME</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- THREADING_POLICY --> + <name>cdmw.config.ThreadingPolicy</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ThreadingPolicyValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ThreadingPolicyValue:1.0</typeId> + <member>SERIALIZE</member> + <member>MULTITHREAD</member> + </enum> + </type> + <value> + <enum>MULTITHREAD</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- HOME_REPOSITORY_ID --> + <name>cdmw.config.HomeRepositoryId</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>IDL:acme.com/CcmDance2Test/ClientModule/ClientDanceHome:1.0</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- HOME_SERVANT_CLASSNAME --> + <name>cdmw.config.HomeServantClassName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Cdmw.CCM.CIF.CdmwCcmDance2Test.ClientModule.SessionClientDanceHome_impl</string> + </value> + </value> + </execParameter> + +<!-- <execParameter> --> + <!-- VALUETYPE_FACTORY_DEPENDENCIES --> +<!-- <name>cdmw.config.ValuetypeFactoryDependencies</name> + <value> + <type> + <kind>tk_sequence</kind> + <sequence> + <elementType> + <kind>tk_struct</kind> + <struct> + <name>ValuetypeFactoryDescription</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ValuetypeFactoryDescription:1.0</typeId> + <member> + <name>repid</name> + <type> + <kind>tk_alias</kind> + <alias> + <name>RepositoryId</name> + <typeId>IDL:omg.org/CORBA/RepositoryId</typeId> + <elementType> + <kind>tk_string</kind> + </elementType> + </alias> + </type> + </member> + <member> + <name>factory_entrypoint</name> + <type> + <kind>tk_string</kind> + </type> + </member> + </struct> + </elementType> + </sequence> + </type> + <value> + <element> + <member> + <name>repid</name> + <value> + <string>IDL:acme.com/CcmDance2Test/EventTypeModule/HostnameResult:1.0</string> + </value> + </member> + <member> + <name>factory_entrypoint</name> + <value> + <string>createHostnameResultFactory</string> + </value> + </member> + </element> + </value> + </value> + </execParameter> --> + </implementation> + + <!-- Component implementation --> + <implementation id="ClientDanceImplementation"> + <name>ClientDanceImplementation</name> + <source/> + <artifact>ClientDanceArtifact</artifact> + </implementation> + + <!-- Instances declarations --> + + <!-- Server Dance instances--> + <instance id="ServerDanceHome"> + <name>ServerDanceHome</name> + <node>Host2</node> + <!-- hostname --> + <source/> + <implementation>ServerDanceHomeImplementation</implementation> + <configProperty> + <!-- PROCESS_DESTINATION --> + <name>cdmw.config.ProcessDestination</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ServerDanceProcess@CcmDance2Application</string> + </value> + </value> + </configProperty> + </instance> + + <instance id="ServerDance"> + <name>ServerDance</name> + <node>Host2</node> + <source/> + <implementation>ServerDanceImplementation</implementation> + + <configProperty> + <!-- HOME --> + <name>cdmw.component_home</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ServerDanceHome</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- COMPONENT_NAME --> + <name>cdmw.config.ComponentName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ServerDance</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: fooStruct--> + <name>fooStruct</name> + <value> + <type> + <kind>tk_struct</kind> + <struct> + <name>FooStruct</name> + <typeId>IDL:acme.com/CcmDance2Test/FooStruct:1.0</typeId> + <member> + <name>fooString</name> + <type> + <kind>tk_string</kind> + </type> + </member> + <member> + <name>fooLong</name> + <type> + <kind>tk_long</kind> + </type> + </member> + </struct> + </type> + <value> + <member> + <name>fooString</name> + <value> + <string>hello</string> + </value> + </member> + <member> + <name>fooLong</name> + <value> + <long>250</long> + </value> + </member> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: fooEnum--> + <name>fooEnum</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>FooEnum</name> + <typeId>IDL:acme.com/CcmDance2Test/FooEnum:1.0</typeId> + <member>A</member> + <member>B</member> + <member>C</member> + </enum> + </type> + <value> + <enum>B</enum> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: fooStructSeq--> + <name>fooStructSeq</name> + <value> + <type> + <kind>tk_sequence</kind> + <sequence> + <elementType> + <kind>tk_struct</kind> + <struct> + <name>FooStruct</name> + <typeId>IDL:acme.com/CcmDance2Test/FooStruct:1.0</typeId> + <member> + <name>fooString</name> + <type> + <kind>tk_string</kind> + </type> + </member> + <member> + <name>fooLong</name> + <type> + <kind>tk_long</kind> + </type> + </member> + </struct> + </elementType> + </sequence> + </type> + <value> + <element> + <member> + <name>fooString</name> + <value> + <string>hello1</string> + </value> + </member> + <member> + <name>fooLong</name> + <value> + <long>123</long> + </value> + </member> + </element> + <element> + <member> + <name>fooString</name> + <value> + <string>hello2</string> + </value> + </member> + <member> + <name>fooLong</name> + <value> + <long>456</long> + </value> + </member> + </element> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: fooEnumSeq--> + <name>fooEnumSeq</name> + <value> + <type> + <kind>tk_sequence</kind> + <sequence> + <elementType> + <kind>tk_enum</kind> + <enum> + <name>FooEnum</name> + <typeId>IDL:acme.com/CcmDance2Test/FooEnum:1.0</typeId> + <member>A</member> + <member>B</member> + <member>C</member> + </enum> + </elementType> + </sequence> + </type> + <value> + <element> + <enum>A</enum> + </element> + <element> + <enum>C</enum> + </element> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: expectedClientHostname1--> + <name>expectedClientHostname1</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>rhel4x.prismtech.com</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: expectedClientHostname2--> + <name>expectedClientHostname2</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>rhel4y.prismtech.com</string> + </value> + </value> + </configProperty> + </instance> + + + + <instance id="ClientDanceHome2"> + <name>ClientDanceHome2</name> + <node>Host2</node> + <!-- hostname --> + <source/> + <implementation>ClientDanceHomeImplementation</implementation> + <configProperty> + <!-- PROCESS_DESTINATION --> + <name>cdmw.config.ProcessDestination</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ClientDanceProcess1@CcmDance2Application</string> + </value> + </value> + </configProperty> + </instance> + + <instance id="ClientDance2"> + <name>ClientDance2</name> + <node>Host2</node> + <source/> + <implementation>ClientDanceImplementation</implementation> + + <configProperty> + <!-- HOME --> + <name>cdmw.component_home</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ClientDanceHome2</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- COMPONENT_NAME --> + <name>cdmw.config.ComponentName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ClientDance2</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: configuration--> + <name>configuration</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Client2</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: expectedServerHostname--> + <name>expectedServerHostname</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>rhel4y.prismtech.com</string> + </value> + </value> + </configProperty> + </instance> + + + <!-- Connections declarations --> + + <connection> + <name>client1_receptacle</name> + <internalEndpoint> + <portName>serverHostInfo1</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance>ServerDance</instance> + </internalEndpoint> + </connection> + + <connection> + <name>client2_receptacle</name> + <internalEndpoint> + <portName>serverHostInfo</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>ClientDance2</instance> + </internalEndpoint> + <internalEndpoint> + <portName>serverHostInfo2</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance>ServerDance</instance> + </internalEndpoint> + </connection> + + <connection> + <name>server_receptacle1</name> + <internalEndpoint> + <portName>clientHostInfo1</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>ServerDance</instance> + </internalEndpoint> + <externalReference> + <location>corbaloc:iiop:1.2@rhel4x.prismtech.com:12345/%14%01%0f%00NUP%00%00%00%16%02%00%00%00%01%00%00%00RootPOA%00Host1%00CcmDance2_1/ClientDance1/clientHostInfo</location> + <provider>true</provider> + <portName/> + <supportedType/> + </externalReference> + </connection> + + <connection> + <name>server_receptacle2</name> + <internalEndpoint> + <portName>clientHostInfo2</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>ServerDance</instance> + </internalEndpoint> + <internalEndpoint> + <portName>clientHostInfo</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance>ClientDance2</instance> + </internalEndpoint> + </connection> + + <connection> + <name>client1_consumer_to_publishes</name> + <internalEndpoint> + <portName>hostnamePublishes</portName> + <provider>false</provider> + <kind>EventPublisher</kind> + <instance>ServerDance</instance> + </internalEndpoint> + <externalReference> + <location>corbaloc:iiop:1.2@rhel4x.prismtech.com:12345/%14%01%0f%00NUP%00%00%00%16%02%00%00%00%01%00%00%00RootPOA%00Host1%00CcmDance2_1/ClientDance1/hostnameResults</location> + <provider>true</provider> + <portName/> + <supportedType/> + </externalReference> + </connection> + + <connection> + <name>client2_consumer_to_publishes</name> + <internalEndpoint> + <portName>hostnamePublishes</portName> + <provider>false</provider> + <kind>EventPublisher</kind> + <instance>ServerDance</instance> + </internalEndpoint> + <internalEndpoint> + <portName>hostnameResults</portName> + <provider>true</provider> + <kind>EventConsumer</kind> + <instance>ClientDance2</instance> + </internalEndpoint> + </connection> + + <connection> + <name>server_consumer_to_emits1</name> + <internalEndpoint> + <portName>commands</portName> + <provider>true</provider> + <kind>EventConsumer</kind> + <instance>ServerDance</instance> + </internalEndpoint> + </connection> + + <connection> + <name>server_consumer_to_emits2</name> + <internalEndpoint> + <portName>commandEmits</portName> + <provider>false</provider> + <kind>EventEmitter</kind> + <instance>ClientDance2</instance> + </internalEndpoint> + <internalEndpoint> + <portName>commands</portName> + <provider>true</provider> + <kind>EventConsumer</kind> + <instance>ServerDance</instance> + </internalEndpoint> + </connection> + + <connection> + <name>client1_sayHello</name> + <internalEndpoint> + <portName>supports</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance>ServerDance</instance> + </internalEndpoint> + </connection> + + <connection> + <name>client2_sayHello</name> + <internalEndpoint> + <portName>sayHello</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>ClientDance2</instance> + </internalEndpoint> + <internalEndpoint> + <portName>supports</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance>ServerDance</instance> + </internalEndpoint> + </connection> + + <connection> + <name>client2_naming</name> + <internalEndpoint> + <portName>naming</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>ClientDance2</instance> + </internalEndpoint> + <externalReference> + <location>corbaname::rhel4x.prismtech.com:21869</location> + <provider>true</provider> + <portName/> + <supportedType/> + </externalReference> + </connection> + + <connection> + <name>testDriver_server</name> + <internalEndpoint> + <portName>supports</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance>ServerDance</instance> + </internalEndpoint> + </connection> + + <connection> + <name>testDriver_client2</name> + <internalEndpoint> + <portName>supports</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance>ClientDance2</instance> + </internalEndpoint> + </connection> + + <connection> + <name>testDriver_sayHello</name> + <internalEndpoint> + <portName>supports</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance>ServerDance</instance> + </internalEndpoint> + </connection> + + + + + + <!-- Artifacts declarations --> + <artifact id="ServerDanceArtifact1"> + <name>ServerDanceArtifact</name> + <source/> + <node/> + <location>/home/sl/install/ofccm_v0/demos/demo_dance2/c++/i686-pc-linux-gnu/libServerCcmDance2Demo.so</location> + <execParameter> + <name>repid</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>IDL:acme.com/CcmDance2Test/EventTypeModule/Command:1.0</string> + </value> + </value> + </execParameter> + <execParameter> + <name>factory_entrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>createCommandFactory</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="ServerDanceArtifact2"> + <name>ServerDanceArtifact</name> + <source/> + <node/> + <location>/home/sl/install/ofccm_v0/demos/demo_dance2/c++/i686-pc-linux-gnu/libServerCcmDance2Demo.so</location> + <execParameter> + <name>repid</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>IDL:acme.com/CcmDance2Test/FooValueType:1.0</string> + </value> + </value> + </execParameter> + <execParameter> + <name>factory_entrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>createFooValueTypeFactory</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="ClientDanceArtifact"> + <name>ClientDanceArtifact</name> + <source/> + <node/> + <location>/home/sl/install/ofccm_v0/demos/demo_dance2/c++/i686-pc-linux-gnu/libClientCcmDance2Demo.so</location> + <execParameter> + <name>repid</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>IDL:acme.com/CcmDance2Test/EventTypeModule/HostnameResult:1.0</string> + </value> + </value> + </execParameter> + <execParameter> + <name>factory_entrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>createHostnameResultFactory</string> + </value> + </value> + </execParameter> + </artifact> + + </Deployment:DeploymentPlan> diff --git a/CIAO/DAnCE/tests/DeploymentPlanDump/CcmDance2.cdp b/CIAO/DAnCE/tests/DeploymentPlanDump/CcmDance2.cdp new file mode 100644 index 00000000000..bc761b07268 --- /dev/null +++ b/CIAO/DAnCE/tests/DeploymentPlanDump/CcmDance2.cdp @@ -0,0 +1,1300 @@ +<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>CCmDance2_1</label> + <UUID>CcmDance2_1</UUID> + + <realizes></realizes> + + <!-- Implementations declarations --> + + <!-- Server Dance implementation--> + <!-- Home implementation --> + <implementation id="ServerDanceHomeImplementation"> + <name>ServerDanceHomeImplementation</name> + <source/> + <artifact>ServerDanceArtifact1</artifact> + <artifact>ServerDanceArtifact2</artifact> + + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CCM_ServerDanceHome</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- COMPONENT_KIND --> + <name>cdmw.config.ComponentKind</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ComponentKindValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ComponentKindValue:1.0</typeId> + <member>SERVICE</member> + <member>SESSION</member> + <member>PROCESS</member> + <member>ENTITY</member> + <member>UNCLASSIFIED</member> + </enum> + </type> + <value> + <enum>SESSION</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- SERVANT_LIFETIME --> + <name>cdmw.config.ServantLifeTime</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ServantLifeTimeValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ServantLifetimeValue:1.0</typeId> + <member>COMPONENT_LIFETIME</member> + <member>METHOD_LIFETIME</member> + <member>TRANSACTION_LIFETIME</member> + <member>CONTAINER_LIFETIME</member> + </enum> + </type> + <value> + <enum>CONTAINER_LIFETIME</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- THREADING_POLICY --> + <name>cdmw.config.ThreadingPolicy</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ThreadingPolicyValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ThreadingPolicyValue:1.0</typeId> + <member>SERIALIZE</member> + <member>MULTITHREAD</member> + </enum> + </type> + <value> + <enum>MULTITHREAD</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- HOME_REPOSITORY_ID --> + <name>cdmw.config.HomeRepositoryId</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>IDL:acme.com/CcmDance2Test/ServerModule/ServerDanceHome:1.0</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- HOME_SERVANT_CLASSNAME --> + <name>cdmw.config.HomeServantClassName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Cdmw.CCM.CIF.CdmwCcmDance2Test.ServerModule.SessionServerDanceHome_impl</string> + </value> + </value> + </execParameter> + +<!-- <execParameter> --> + <!-- VALUETYPE_FACTORY_DEPENDENCIES --> +<!-- <name>cdmw.config.ValuetypeFactoryDependencies</name> + <value> + <type> + <kind>tk_sequence</kind> + <sequence> + <elementType> + <kind>tk_struct</kind> + <struct> + <name>ValuetypeFactoryDescription</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ValuetypeFactoryDescription:1.0</typeId> + <member> + <name>repid</name> + <type> + <kind>tk_alias</kind> + <alias> + <name>RepositoryId</name> + <typeId>IDL:omg.org/CORBA/RepositoryId</typeId> + <elementType> + <kind>tk_string</kind> + </elementType> + </alias> + </type> + </member> + <member> + <name>factory_entrypoint</name> + <type> + <kind>tk_string</kind> + </type> + </member> + </struct> + </elementType> + </sequence> + </type> + <value> + <element> + <member> + <name>repid</name> + <value> + <string>IDL:acme.com/CcmDance2Test/EventTypeModule/Command:1.0</string> + </value> + </member> + <member> + <name>factory_entrypoint</name> + <value> + <string>createCommandFactory</string> + </value> + </member> + </element> + </value> + <value> + <element> + <member> + <name>repid</name> + <value> + <string>IDL:acme.com/CcmDance2Test/FooValueType:1.0</string> + </value> + </member> + <member> + <name>factory_entrypoint</name> + <value> + <string>createFooValueTypeFactory</string> + </value> + </member> + </element> + </value> + </value> + </execParameter> --> + </implementation> + + <!-- Component implementation --> + <implementation id="ServerDanceImplementation"> + <name>ServerDanceImplementation</name> + <source/> + <artifact>ServerDanceArtifact1</artifact> + </implementation> + + + + <!-- Client Dance implementation--> + <!-- Home implementation --> + <implementation id="ClientDanceHomeImplementation"> + <name>ClientDanceHomeImplementation</name> + <source/> + <artifact>ClientDanceArtifact</artifact> + + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CCM_ClientDanceHome</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- COMPONENT_KIND --> + <name>cdmw.config.ComponentKind</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ComponentKindValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ComponentKindValue:1.0</typeId> + <member>SERVICE</member> + <member>SESSION</member> + <member>PROCESS</member> + <member>ENTITY</member> + <member>UNCLASSIFIED</member> + </enum> + </type> + <value> + <enum>SESSION</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- SERVANT_LIFETIME --> + <name>cdmw.config.ServantLifeTime</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ServantLifeTimeValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ServantLifetimeValue:1.0</typeId> + <member>COMPONENT_LIFETIME</member> + <member>METHOD_LIFETIME</member> + <member>TRANSACTION_LIFETIME</member> + <member>CONTAINER_LIFETIME</member> + </enum> + </type> + <value> + <enum>CONTAINER_LIFETIME</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- THREADING_POLICY --> + <name>cdmw.config.ThreadingPolicy</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ThreadingPolicyValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ThreadingPolicyValue:1.0</typeId> + <member>SERIALIZE</member> + <member>MULTITHREAD</member> + </enum> + </type> + <value> + <enum>MULTITHREAD</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- HOME_REPOSITORY_ID --> + <name>cdmw.config.HomeRepositoryId</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>IDL:acme.com/CcmDance2Test/ClientModule/ClientDanceHome:1.0</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- HOME_SERVANT_CLASSNAME --> + <name>cdmw.config.HomeServantClassName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Cdmw.CCM.CIF.CdmwCcmDance2Test.ClientModule.SessionClientDanceHome_impl</string> + </value> + </value> + </execParameter> + +<!-- <execParameter> --> + <!-- VALUETYPE_FACTORY_DEPENDENCIES --> +<!-- <name>cdmw.config.ValuetypeFactoryDependencies</name> + <value> + <type> + <kind>tk_sequence</kind> + <sequence> + <elementType> + <kind>tk_struct</kind> + <struct> + <name>ValuetypeFactoryDescription</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ValuetypeFactoryDescription:1.0</typeId> + <member> + <name>repid</name> + <type> + <kind>tk_alias</kind> + <alias> + <name>RepositoryId</name> + <typeId>IDL:omg.org/CORBA/RepositoryId</typeId> + <elementType> + <kind>tk_string</kind> + </elementType> + </alias> + </type> + </member> + <member> + <name>factory_entrypoint</name> + <type> + <kind>tk_string</kind> + </type> + </member> + </struct> + </elementType> + </sequence> + </type> + <value> + <element> + <member> + <name>repid</name> + <value> + <string>IDL:acme.com/CcmDance2Test/EventTypeModule/HostnameResult:1.0</string> + </value> + </member> + <member> + <name>factory_entrypoint</name> + <value> + <string>createHostnameResultFactory</string> + </value> + </member> + </element> + </value> + </value> + </execParameter> --> + </implementation> + + <!-- Component implementation --> + <implementation id="ClientDanceImplementation"> + <name>ClientDanceImplementation</name> + <source/> + <artifact>ClientDanceArtifact</artifact> + </implementation> + + + <!-- Test Driver implementation--> + <!-- Home implementation --> + <implementation id="TestDriverHomeImplementation"> + <name>TestDriverHomeImplementation</name> + <source/> + <artifact>ClientDanceArtifact</artifact> + + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CCM_TestDriverHome</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- COMPONENT_KIND --> + <name>cdmw.config.ComponentKind</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ComponentKindValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ComponentKindValue:1.0</typeId> + <member>SERVICE</member> + <member>SESSION</member> + <member>PROCESS</member> + <member>ENTITY</member> + <member>UNCLASSIFIED</member> + </enum> + </type> + <value> + <enum>SESSION</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- SERVANT_LIFETIME --> + <name>cdmw.config.ServantLifeTime</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ServantLifeTimeValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ServantLifetimeValue:1.0</typeId> + <member>COMPONENT_LIFETIME</member> + <member>METHOD_LIFETIME</member> + <member>TRANSACTION_LIFETIME</member> + <member>CONTAINER_LIFETIME</member> + </enum> + </type> + <value> + <enum>CONTAINER_LIFETIME</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- THREADING_POLICY --> + <name>cdmw.config.ThreadingPolicy</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ThreadingPolicyValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ThreadingPolicyValue:1.0</typeId> + <member>SERIALIZE</member> + <member>MULTITHREAD</member> + </enum> + </type> + <value> + <enum>MULTITHREAD</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- HOME_REPOSITORY_ID --> + <name>cdmw.config.HomeRepositoryId</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>IDL:acme.com/CcmDance2Test/DriverModule/TestDriverHome:1.0</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- HOME_SERVANT_CLASSNAME --> + <name>cdmw.config.HomeServantClassName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Cdmw.CCM.CIF.CdmwCcmDance2Test.DriverModule.SessionTestDriverHome_impl</string> + </value> + </value> + </execParameter> + + </implementation> + + <!-- Component implementation --> + <implementation id="TestDriverImplementation"> + <name>TestDriverImplementation</name> + <source/> + <artifact>ClientDanceArtifact</artifact> + </implementation> + + + + + + + <!-- Instances declarations --> + + <!-- Server Dance instances--> + <instance id="ServerDanceHome"> + <name>ServerDanceHome</name> + <node>Host2</node> + <!-- hostname --> + <source/> + <implementation>ServerDanceHomeImplementation</implementation> + <configProperty> + <!-- PROCESS_DESTINATION --> + <name>cdmw.config.ProcessDestination</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ServerDanceProcess@CcmDance2Application</string> + </value> + </value> + </configProperty> + </instance> + + <instance id="ServerDance"> + <name>ServerDance</name> + <node>Host2</node> + <source/> + <implementation>ServerDanceImplementation</implementation> + + <configProperty> + <!-- HOME --> + <name>cdmw.component_home</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ServerDanceHome</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- COMPONENT_NAME --> + <name>cdmw.config.ComponentName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ServerDance</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: fooStruct--> + <name>fooStruct</name> + <value> + <type> + <kind>tk_struct</kind> + <struct> + <name>FooStruct</name> + <typeId>IDL:acme.com/CcmDance2Test/FooStruct:1.0</typeId> + <member> + <name>fooString</name> + <type> + <kind>tk_string</kind> + </type> + </member> + <member> + <name>fooLong</name> + <type> + <kind>tk_long</kind> + </type> + </member> + </struct> + </type> + <value> + <member> + <name>fooString</name> + <value> + <string>hello</string> + </value> + </member> + <member> + <name>fooLong</name> + <value> + <long>250</long> + </value> + </member> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: fooEnum--> + <name>fooEnum</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>FooEnum</name> + <typeId>IDL:acme.com/CcmDance2Test/FooEnum:1.0</typeId> + <member>A</member> + <member>B</member> + <member>C</member> + </enum> + </type> + <value> + <enum>B</enum> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: fooStructSeq--> + <name>fooStructSeq</name> + <value> + <type> + <kind>tk_sequence</kind> + <sequence> + <elementType> + <kind>tk_struct</kind> + <struct> + <name>FooStruct</name> + <typeId>IDL:acme.com/CcmDance2Test/FooStruct:1.0</typeId> + <member> + <name>fooString</name> + <type> + <kind>tk_string</kind> + </type> + </member> + <member> + <name>fooLong</name> + <type> + <kind>tk_long</kind> + </type> + </member> + </struct> + </elementType> + </sequence> + </type> + <value> + <element> + <member> + <name>fooString</name> + <value> + <string>hello1</string> + </value> + </member> + <member> + <name>fooLong</name> + <value> + <long>123</long> + </value> + </member> + </element> + <element> + <member> + <name>fooString</name> + <value> + <string>hello2</string> + </value> + </member> + <member> + <name>fooLong</name> + <value> + <long>456</long> + </value> + </member> + </element> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: fooEnumSeq--> + <name>fooEnumSeq</name> + <value> + <type> + <kind>tk_sequence</kind> + <sequence> + <elementType> + <kind>tk_enum</kind> + <enum> + <name>FooEnum</name> + <typeId>IDL:acme.com/CcmDance2Test/FooEnum:1.0</typeId> + <member>A</member> + <member>B</member> + <member>C</member> + </enum> + </elementType> + </sequence> + </type> + <value> + <element> + <enum>A</enum> + </element> + <element> + <enum>C</enum> + </element> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: expectedClientHostname1--> + <name>expectedClientHostname1</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>rhel4x.prismtech.com</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: expectedClientHostname2--> + <name>expectedClientHostname2</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>rhel4y.prismtech.com</string> + </value> + </value> + </configProperty> + </instance> + + + + <!-- Client Dance instances--> + <instance id="ClientDanceHome1"> + <name>ClientDanceHome1</name> + <node>Host1</node> + <!-- hostname --> + <source/> + <implementation>ClientDanceHomeImplementation</implementation> + <configProperty> + <!-- PROCESS_DESTINATION --> + <name>cdmw.config.ProcessDestination</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ClientDanceProcess2@CcmDance2Application</string> + </value> + </value> + </configProperty> + </instance> + + <instance id="ClientDance1"> + <name>ClientDance1</name> + <node>Host1</node> + <source/> + <implementation>ClientDanceImplementation</implementation> + + <configProperty> + <!-- HOME --> + <name>cdmw.component_home</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ClientDanceHome1</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- COMPONENT_NAME --> + <name>cdmw.config.ComponentName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ClientDance1</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: configuration--> + <name>configuration</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Client1</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: expectedServerHostname--> + <name>expectedServerHostname</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>rhel4y.prismtech.com</string> + </value> + </value> + </configProperty> + </instance> + + + <instance id="ClientDanceHome2"> + <name>ClientDanceHome2</name> + <node>Host2</node> + <!-- hostname --> + <source/> + <implementation>ClientDanceHomeImplementation</implementation> + <configProperty> + <!-- PROCESS_DESTINATION --> + <name>cdmw.config.ProcessDestination</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ClientDanceProcess1@CcmDance2Application</string> + </value> + </value> + </configProperty> + </instance> + + <instance id="ClientDance2"> + <name>ClientDance2</name> + <node>Host2</node> + <source/> + <implementation>ClientDanceImplementation</implementation> + + <configProperty> + <!-- HOME --> + <name>cdmw.component_home</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ClientDanceHome2</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- COMPONENT_NAME --> + <name>cdmw.config.ComponentName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ClientDance2</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: configuration--> + <name>configuration</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Client2</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: expectedServerHostname--> + <name>expectedServerHostname</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>rhel4y.prismtech.com</string> + </value> + </value> + </configProperty> + </instance> + + + <!-- Test Driver instances--> + <instance id="TestDriverHome"> + <name>TestDriverHome</name> + <node>Host1</node> + <!-- hostname --> + <source/> + <implementation>TestDriverHomeImplementation</implementation> + <configProperty> + <!-- PROCESS_DESTINATION --> + <name>cdmw.config.ProcessDestination</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ClientDanceProcess2@CcmDance2Application</string> + </value> + </value> + </configProperty> + </instance> + + <instance id="TestDriver1"> + <name>TestDriver1</name> + <node>Host1</node> + <source/> + <implementation>TestDriverImplementation</implementation> + + <configProperty> + <!-- HOME --> + <name>cdmw.component_home</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>TestDriverHome</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- COMPONENT_NAME --> + <name>cdmw.config.ComponentName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>TestDriver1</string> + </value> + </value> + </configProperty> + </instance> + + + + + + <!-- Connections declarations --> + + <connection> + <name>client1_receptacle</name> + <internalEndpoint> + <portName>serverHostInfo</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>ClientDance1</instance> + </internalEndpoint> + <internalEndpoint> + <portName>serverHostInfo1</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance>ServerDance</instance> + </internalEndpoint> + </connection> + + <connection> + <name>client2_receptacle</name> + <internalEndpoint> + <portName>serverHostInfo</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>ClientDance2</instance> + </internalEndpoint> + <internalEndpoint> + <portName>serverHostInfo2</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance>ServerDance</instance> + </internalEndpoint> + </connection> + + <connection> + <name>server_receptacle1</name> + <internalEndpoint> + <portName>clientHostInfo1</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>ServerDance</instance> + </internalEndpoint> + <internalEndpoint> + <portName>clientHostInfo</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance>ClientDance1</instance> + </internalEndpoint> + </connection> + + <connection> + <name>server_receptacle2</name> + <internalEndpoint> + <portName>clientHostInfo2</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>ServerDance</instance> + </internalEndpoint> + <internalEndpoint> + <portName>clientHostInfo</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance>ClientDance2</instance> + </internalEndpoint> + </connection> + + <connection> + <name>client1_consumer_to_publishes</name> + <internalEndpoint> + <portName>hostnamePublishes</portName> + <provider>false</provider> + <kind>EventPublisher</kind> + <instance>ServerDance</instance> + </internalEndpoint> + <internalEndpoint> + <portName>hostnameResults</portName> + <provider>true</provider> + <kind>EventConsumer</kind> + <instance>ClientDance1</instance> + </internalEndpoint> + </connection> + + <connection> + <name>client2_consumer_to_publishes</name> + <internalEndpoint> + <portName>hostnamePublishes</portName> + <provider>false</provider> + <kind>EventPublisher</kind> + <instance>ServerDance</instance> + </internalEndpoint> + <internalEndpoint> + <portName>hostnameResults</portName> + <provider>true</provider> + <kind>EventConsumer</kind> + <instance>ClientDance2</instance> + </internalEndpoint> + </connection> + + <connection> + <name>server_consumer_to_emits1</name> + <internalEndpoint> + <portName>commandEmits</portName> + <provider>false</provider> + <kind>EventEmitter</kind> + <instance>ClientDance1</instance> + </internalEndpoint> + <internalEndpoint> + <portName>commands</portName> + <provider>true</provider> + <kind>EventConsumer</kind> + <instance>ServerDance</instance> + </internalEndpoint> + </connection> + + <connection> + <name>server_consumer_to_emits2</name> + <internalEndpoint> + <portName>commandEmits</portName> + <provider>false</provider> + <kind>EventEmitter</kind> + <instance>ClientDance2</instance> + </internalEndpoint> + <internalEndpoint> + <portName>commands</portName> + <provider>true</provider> + <kind>EventConsumer</kind> + <instance>ServerDance</instance> + </internalEndpoint> + </connection> + + <connection> + <name>client1_sayHello</name> + <internalEndpoint> + <portName>sayHello</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>ClientDance1</instance> + </internalEndpoint> + <internalEndpoint> + <portName>supports</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance>ServerDance</instance> + </internalEndpoint> + </connection> + + <connection> + <name>client1_naming</name> + <internalEndpoint> + <portName>naming</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>ClientDance1</instance> + </internalEndpoint> + <externalReference> + <location>corbaname::rhel4y.prismtech.com:21869</location> + <provider>true</provider> + <portName/> + <supportedType/> + </externalReference> + </connection> + + <connection> + <name>client2_sayHello</name> + <internalEndpoint> + <portName>sayHello</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>ClientDance2</instance> + </internalEndpoint> + <internalEndpoint> + <portName>supports</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance>ServerDance</instance> + </internalEndpoint> + </connection> + + <connection> + <name>client2_naming</name> + <internalEndpoint> + <portName>naming</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>ClientDance2</instance> + </internalEndpoint> + <externalReference> + <location>corbaname::rhel4y.prismtech.com:21869</location> + <provider>true</provider> + <portName/> + <supportedType/> + </externalReference> + </connection> + + <connection> + <name>testDriver_server</name> + <internalEndpoint> + <portName>server</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>TestDriver1</instance> + </internalEndpoint> + <internalEndpoint> + <portName>supports</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance>ServerDance</instance> + </internalEndpoint> + </connection> + + <connection> + <name>testDriver_client1</name> + <internalEndpoint> + <portName>client1</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>TestDriver1</instance> + </internalEndpoint> + <internalEndpoint> + <portName>supports</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance>ClientDance1</instance> + </internalEndpoint> + </connection> + + <connection> + <name>testDriver_client2</name> + <internalEndpoint> + <portName>client2</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>TestDriver1</instance> + </internalEndpoint> + <internalEndpoint> + <portName>supports</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance>ClientDance2</instance> + </internalEndpoint> + </connection> + + <connection> + <name>testDriver_sayHello</name> + <internalEndpoint> + <portName>handshake</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>TestDriver1</instance> + </internalEndpoint> + <internalEndpoint> + <portName>supports</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance>ServerDance</instance> + </internalEndpoint> + </connection> + + + + + + <!-- Artifacts declarations --> + <artifact id="ServerDanceArtifact1"> + <name>ServerDanceArtifact</name> + <source/> + <node/> + <location>/home/sl/install/ofccm_v0/demos/demo_dance2/c++/i686-pc-linux-gnu/libServerCcmDance2Demo.so</location> + <execParameter> + <name>factory_entrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>createCommandFactory</string> + </value> + </value> + </execParameter> + <execParameter> + <name>repid</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>IDL:acme.com/CcmDance2Test/EventTypeModule/Command:1.0</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="ServerDanceArtifact2"> + <name>ServerDanceArtifact</name> + <source/> + <node/> + <location>/home/sl/install/ofccm_v0/demos/demo_dance2/c++/i686-pc-linux-gnu/libServerCcmDance2Demo.so</location> + <execParameter> + <name>factory_entrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>createFooValueTypeFactory</string> + </value> + </value> + </execParameter> + <execParameter> + <name>repid</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>IDL:acme.com/CcmDance2Test/FooValueType:1.0</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="ClientDanceArtifact"> + <name>ClientDanceArtifact</name> + <source/> + <node/> + <location>/home/sl/install/ofccm_v0/demos/demo_dance2/c++/i686-pc-linux-gnu/libClientCcmDance2Demo.so</location> + <execParameter> + <name>factory_entrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>createHostnameResultFactory</string> + </value> + </value> + </execParameter> + <execParameter> + <name>repid</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>IDL:acme.com/CcmDance2Test/EventTypeModule/HostnameResult:1.0</string> + </value> + </value> + </execParameter> + + </artifact> + + </Deployment:DeploymentPlan> diff --git a/CIAO/DAnCE/tests/DeploymentPlanDump/CcmDance4-host1.cdp b/CIAO/DAnCE/tests/DeploymentPlanDump/CcmDance4-host1.cdp new file mode 100644 index 00000000000..8626b5275a9 --- /dev/null +++ b/CIAO/DAnCE/tests/DeploymentPlanDump/CcmDance4-host1.cdp @@ -0,0 +1,1055 @@ +<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>CCmDance2_1</label> + <UUID>CcmDance2_1</UUID> + + <realizes></realizes> + + <!-- Implementations declarations --> + + <!-- Server Dance implementation--> + <!-- Home implementation --> + <implementation id="ServerDanceHomeImplementation"> + <name>ServerDanceHomeImplementation</name> + <source/> + <artifact>ServerDanceArtifact1</artifact> + <artifact>ServerDanceArtifact2</artifact> + + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CCM_ServerDanceHome</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- COMPONENT_KIND --> + <name>cdmw.config.ComponentKind</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ComponentKindValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ComponentKindValue:1.0</typeId> + <member>SERVICE</member> + <member>SESSION</member> + <member>PROCESS</member> + <member>ENTITY</member> + <member>UNCLASSIFIED</member> + </enum> + </type> + <value> + <enum>SESSION</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- SERVANT_LIFETIME --> + <name>cdmw.config.ServantLifeTime</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ServantLifeTimeValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ServantLifetimeValue:1.0</typeId> + <member>COMPONENT_LIFETIME</member> + <member>METHOD_LIFETIME</member> + <member>TRANSACTION_LIFETIME</member> + <member>CONTAINER_LIFETIME</member> + </enum> + </type> + <value> + <enum>CONTAINER_LIFETIME</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- THREADING_POLICY --> + <name>cdmw.config.ThreadingPolicy</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ThreadingPolicyValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ThreadingPolicyValue:1.0</typeId> + <member>SERIALIZE</member> + <member>MULTITHREAD</member> + </enum> + </type> + <value> + <enum>MULTITHREAD</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- HOME_REPOSITORY_ID --> + <name>cdmw.config.HomeRepositoryId</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>IDL:acme.com/CcmDance2WithFTTest/ServerModule/ServerDanceHome:1.0</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- HOME_SERVANT_CLASSNAME --> + <name>cdmw.config.HomeServantClassName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Cdmw.CCM.CIF.CdmwCcmDance2WithFTTest.ServerModule.FTSessionServerDanceHome_impl</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- FAULT_TOLERANCE_REPLICATION_STYLE --> + <name>cdmw.config.FaultToleranceReplicationStyle</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>FTReplicationStyleValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/FTReplicationStyleValue:1.0</typeId> + <member>STATELSESS</member> + <member>COLD_PASSIVE</member> + <member>WARM_PASSIVE</member> + <member>ACTIVE</member> + <member>ACTIVE_WITH_VOTING</member> + </enum> + </type> + <value> + <enum>WARM_PASSIVE</enum> + </value> + </value> + </execParameter> + + </implementation> + + <!-- Component implementation --> + <implementation id="ServerDanceImplementation"> + <name>ServerDanceImplementation</name> + <source/> + <artifact>ServerDanceArtifact1</artifact> + <artifact>ServerDanceArtifact2</artifact> + </implementation> + + + + <!-- Client Dance implementation--> + <!-- Home implementation --> + <implementation id="ClientDanceHomeImplementation"> + <name>ClientDanceHomeImplementation</name> + <source/> + <artifact>ClientDanceArtifact</artifact> + <artifact>ServerDanceArtifact1</artifact> + + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CCM_ClientDanceHome</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- COMPONENT_KIND --> + <name>cdmw.config.ComponentKind</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ComponentKindValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ComponentKindValue:1.0</typeId> + <member>SERVICE</member> + <member>SESSION</member> + <member>PROCESS</member> + <member>ENTITY</member> + <member>UNCLASSIFIED</member> + </enum> + </type> + <value> + <enum>SESSION</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- SERVANT_LIFETIME --> + <name>cdmw.config.ServantLifeTime</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ServantLifeTimeValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ServantLifetimeValue:1.0</typeId> + <member>COMPONENT_LIFETIME</member> + <member>METHOD_LIFETIME</member> + <member>TRANSACTION_LIFETIME</member> + <member>CONTAINER_LIFETIME</member> + </enum> + </type> + <value> + <enum>CONTAINER_LIFETIME</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- THREADING_POLICY --> + <name>cdmw.config.ThreadingPolicy</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ThreadingPolicyValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ThreadingPolicyValue:1.0</typeId> + <member>SERIALIZE</member> + <member>MULTITHREAD</member> + </enum> + </type> + <value> + <enum>MULTITHREAD</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- HOME_REPOSITORY_ID --> + <name>cdmw.config.HomeRepositoryId</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>IDL:acme.com/CcmDance2WithFTTest/ClientModule/ClientDanceHome:1.0</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- HOME_SERVANT_CLASSNAME --> + <name>cdmw.config.HomeServantClassName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Cdmw.CCM.CIF.CdmwCcmDance2WithFTTest.ClientModule.SessionClientDanceHome_impl</string> + </value> + </value> + </execParameter> + </implementation> + + <!-- Component implementation --> + <implementation id="ClientDanceImplementation"> + <name>ClientDanceImplementation</name> + <source/> + <artifact>ClientDanceArtifact</artifact> + <artifact>ServerDanceArtifact1</artifact> + </implementation> + + + <!-- Test Driver implementation--> + <!-- Home implementation --> + <implementation id="TestDriverHomeImplementation"> + <name>TestDriverHomeImplementation</name> + <source/> + <artifact>ClientDanceArtifact</artifact> + + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CCM_TestDriverHome</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- COMPONENT_KIND --> + <name>cdmw.config.ComponentKind</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ComponentKindValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ComponentKindValue:1.0</typeId> + <member>SERVICE</member> + <member>SESSION</member> + <member>PROCESS</member> + <member>ENTITY</member> + <member>UNCLASSIFIED</member> + </enum> + </type> + <value> + <enum>SESSION</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- SERVANT_LIFETIME --> + <name>cdmw.config.ServantLifeTime</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ServantLifeTimeValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ServantLifetimeValue:1.0</typeId> + <member>COMPONENT_LIFETIME</member> + <member>METHOD_LIFETIME</member> + <member>TRANSACTION_LIFETIME</member> + <member>CONTAINER_LIFETIME</member> + </enum> + </type> + <value> + <enum>CONTAINER_LIFETIME</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- THREADING_POLICY --> + <name>cdmw.config.ThreadingPolicy</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ThreadingPolicyValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ThreadingPolicyValue:1.0</typeId> + <member>SERIALIZE</member> + <member>MULTITHREAD</member> + </enum> + </type> + <value> + <enum>MULTITHREAD</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- HOME_REPOSITORY_ID --> + <name>cdmw.config.HomeRepositoryId</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>IDL:acme.com/CcmDance2WithFTTest/DriverModule/TestDriverHome:1.0</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- HOME_SERVANT_CLASSNAME --> + <name>cdmw.config.HomeServantClassName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Cdmw.CCM.CIF.CdmwCcmDance2WithFTTest.DriverModule.SessionTestDriverHome_impl</string> + </value> + </value> + </execParameter> + + </implementation> + + <!-- Component implementation --> + <implementation id="TestDriverImplementation"> + <name>TestDriverImplementation</name> + <source/> + <artifact>ClientDanceArtifact</artifact> + </implementation> + + <!-- Instances declarations --> + + <!-- Server Dance instances--> + <instance id="ServerDanceHome1"> + <name>ServerDanceHome1</name> + <node>Host1</node> + <!-- hostname --> + <source/> + <implementation>ServerDanceHomeImplementation</implementation> + + <configProperty> + <!-- PROCESS_DESTINATION --> + <name>cdmw.config.ProcessDestination</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ServerDanceProcess1@CcmDance2WithFTApplication</string> + </value> + </value> + </configProperty> + </instance> + + <instance id="ServerDance1"> + <name>ServerDance1</name> + <node>Host1</node> + <source/> + <implementation>ServerDanceImplementation</implementation> + + <configProperty> + <!-- HOME --> + <name>cdmw.component_home</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ServerDanceHome1</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- COMPONENT_NAME --> + <name>cdmw.config.ComponentName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ServerDance1</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- FAULT_TOLERANT GROUP NAME--> + <name>cdmw.config.FaultToleranceGroupName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ServerDanceFT</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: fooStruct--> + <name>fooStruct</name> + <value> + <type> + <kind>tk_struct</kind> + <struct> + <name>FooStruct</name> + <typeId>IDL:acme.com/CcmDance2WithFTTest/FooStruct:1.0</typeId> + <member> + <name>fooString</name> + <type> + <kind>tk_string</kind> + </type> + </member> + <member> + <name>fooLong</name> + <type> + <kind>tk_long</kind> + </type> + </member> + </struct> + </type> + <value> + <member> + <name>fooString</name> + <value> + <string>hello</string> + </value> + </member> + <member> + <name>fooLong</name> + <value> + <long>250</long> + </value> + </member> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: fooEnum--> + <name>fooEnum</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>FooEnum</name> + <typeId>IDL:acme.com/CcmDance2WithFTTest/FooEnum:1.0</typeId> + <member>A</member> + <member>B</member> + <member>C</member> + </enum> + </type> + <value> + <enum>B</enum> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: fooStructSeq--> + <name>fooStructSeq</name> + <value> + <type> + <kind>tk_sequence</kind> + <sequence> + <elementType> + <kind>tk_struct</kind> + <struct> + <name>FooStruct</name> + <typeId>IDL:acme.com/CcmDance2WithFTTest/FooStruct:1.0</typeId> + <member> + <name>fooString</name> + <type> + <kind>tk_string</kind> + </type> + </member> + <member> + <name>fooLong</name> + <type> + <kind>tk_long</kind> + </type> + </member> + </struct> + </elementType> + </sequence> + </type> + <value> + <element> + <member> + <name>fooString</name> + <value> + <string>hello1</string> + </value> + </member> + <member> + <name>fooLong</name> + <value> + <long>123</long> + </value> + </member> + </element> + <element> + <member> + <name>fooString</name> + <value> + <string>hello2</string> + </value> + </member> + <member> + <name>fooLong</name> + <value> + <long>456</long> + </value> + </member> + </element> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: fooEnumSeq--> + <name>fooEnumSeq</name> + <value> + <type> + <kind>tk_sequence</kind> + <sequence> + <elementType> + <kind>tk_enum</kind> + <enum> + <name>FooEnum</name> + <typeId>IDL:acme.com/CcmDance2WithFTTest/FooEnum:1.0</typeId> + <member>A</member> + <member>B</member> + <member>C</member> + </enum> + </elementType> + </sequence> + </type> + <value> + <element> + <enum>A</enum> + </element> + <element> + <enum>C</enum> + </element> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: expectedClientHostname1--> + <name>expectedClientHostname1</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>rhel4x.prismtech.com</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: expectedClientHostname2--> + <name>expectedClientHostname2</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>rhel4y.prismtech.com</string> + </value> + </value> + </configProperty> + </instance> + + + + <!-- Client Dance instances--> + <instance id="ClientDanceHome1"> + <name>ClientDanceHome1</name> + <node>Host1</node> + <!-- hostname --> + <source/> + <implementation>ClientDanceHomeImplementation</implementation> + <configProperty> + <!-- PROCESS_DESTINATION --> + <name>cdmw.config.ProcessDestination</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ClientDanceProcess1@CcmDance2WithFTApplication</string> + </value> + </value> + </configProperty> + </instance> + + <instance id="ClientDance1"> + <name>ClientDance1</name> + <node>Host1</node> + <source/> + <implementation>ClientDanceImplementation</implementation> + + <configProperty> + <!-- HOME --> + <name>cdmw.component_home</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ClientDanceHome1</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- COMPONENT_NAME --> + <name>cdmw.config.ComponentName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ClientDance1</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: configuration--> + <name>configuration</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Client1</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: expectedServerHostname--> + <name>expectedServerHostname</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>rhel4x.prismtech.com</string> + </value> + </value> + </configProperty> + </instance> + + <!-- Test Driver instances--> + <instance id="TestDriverHome"> + <name>TestDriverHome</name> + <node>Host1</node> + <!-- hostname --> + <source/> + <implementation>TestDriverHomeImplementation</implementation> + <configProperty> + <!-- PROCESS_DESTINATION --> + <name>cdmw.config.ProcessDestination</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ClientDanceProcess1@CcmDance2WithFTApplication</string> + </value> + </value> + </configProperty> + </instance> + + <instance id="TestDriver1"> + <name>TestDriver1</name> + <node>Host1</node> + <source/> + <implementation>TestDriverImplementation</implementation> + + <configProperty> + <!-- HOME --> + <name>cdmw.component_home</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>TestDriverHome</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- COMPONENT_NAME --> + <name>cdmw.config.ComponentName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>TestDriver1</string> + </value> + </value> + </configProperty> + </instance> + + + + + + <!-- Connections declarations --> + + <connection> + <name>client1_receptacle</name> + <internalEndpoint> + <portName>serverHostInfo</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>ClientDance1</instance> + </internalEndpoint> + <externalReference> + <location>corbaname::localhost:21869#CDMW__FaultToleranceDomain/ServerDanceFT</location> + <provider>true</provider> + <portName/> + <supportedType/> + </externalReference> + </connection> + + <connection> + <name>server_receptacle1</name> + <internalEndpoint> + <portName>clientHostInfo1</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>ServerDance1</instance> + </internalEndpoint> + <internalEndpoint> + <portName>clientHostInfo</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance>ClientDance1</instance> + </internalEndpoint> + </connection> + + <connection> + <name>server_receptacle2</name> + <internalEndpoint> + <portName>clientHostInfo2</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>ServerDance1</instance> + </internalEndpoint> + <externalReference> + <location>corbaloc:iiop:1.2@rhel4y.prismtech.com:12345/%14%01%0f%00NUP%00%00%00%16%02%00%00%00%01%00%00%00RootPOA%00Host2%00CcmDance2_1/ClientDance2/clientHostInfo</location> + <provider>true</provider> + <portName/> + <supportedType/> + </externalReference> + </connection> + + <connection> + <name>client1_consumer_to_publishes</name> +<!-- <internalEndpoint> + <portName>hostnamePublishes</portName> + <provider>false</provider> + <kind>EventPublisher</kind> + <instance>ServerDance1</instance> + </internalEndpoint> --> + <internalEndpoint> + <portName>hostnameResults</portName> + <provider>true</provider> + <kind>EventConsumer</kind> + <instance>ClientDance1</instance> + </internalEndpoint> + <externalReference> + <location>corbaname::localhost:21869#CDMW__FaultToleranceDomain/ServerDanceFT</location> + <provider>false</provider> + <portName>hostnamePublishes</portName> + <supportedType/> + </externalReference> + </connection> + + <connection> + <name>client2_consumer_to_publishes</name> + <internalEndpoint> + <portName>hostnamePublishes</portName> + <provider>false</provider> + <kind>EventPublisher</kind> + <instance>ServerDance1</instance> + </internalEndpoint> + <externalReference> + <location>corbaloc:iiop:1.2@rhel4y.prismtech.com:12345/%14%01%0f%00NUP%00%00%00%16%02%00%00%00%01%00%00%00RootPOA%00Host2%00CcmDance2_1/ClientDance2/hostnameResults</location> + <provider>true</provider> + <portName/> + <supportedType/> + </externalReference> + </connection> + + <connection> + <name>server_consumer_to_emits1</name> + <internalEndpoint> + <portName>commandEmits</portName> + <provider>false</provider> + <kind>EventEmitter</kind> + <instance>ClientDance1</instance> + </internalEndpoint> + <externalReference> + <location>corbaname::localhost:21869#CDMW__FaultToleranceDomain/ServerDanceFT</location> + <provider>true</provider> + <portName/> + <supportedType/> + </externalReference> + </connection> + + <connection> + <name>client1_sayHello</name> + <internalEndpoint> + <portName>sayHello</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>ClientDance1</instance> + </internalEndpoint> + <externalReference> + <location>corbaname::localhost:21869#CDMW__FaultToleranceDomain/ServerDanceFT</location> + <provider>true</provider> + <portName/> + <supportedType/> + </externalReference> + </connection> + + <connection> + <name>testDriver_server</name> + <internalEndpoint> + <portName>server</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>TestDriver1</instance> + </internalEndpoint> + <externalReference> + <location>corbaname::localhost:21869#CDMW__FaultToleranceDomain/ServerDanceFT</location> + <provider>true</provider> + <portName/> + <supportedType/> + </externalReference> + </connection> + + <connection> + <name>testDriver_client1</name> + <internalEndpoint> + <portName>client1</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>TestDriver1</instance> + </internalEndpoint> + <internalEndpoint> + <portName>supports</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance>ClientDance1</instance> + </internalEndpoint> + </connection> + + <connection> + <name>testDriver_client2</name> + <internalEndpoint> + <portName>client2</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>TestDriver1</instance> + </internalEndpoint> + <externalReference> + <location>corbaloc:iiop:1.2@rhel4y.prismtech.com:12345/%14%01%0f%00NUP%00%00%00%16%02%00%00%00%01%00%00%00RootPOA%00Host2%00CcmDance2_1/ClientDance2/supports</location> + <provider>true</provider> + <portName/> + <supportedType/> + </externalReference> + </connection> + + <connection> + <name>testDriver_sayHello</name> + <internalEndpoint> + <portName>handshake</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>TestDriver1</instance> + </internalEndpoint> + <externalReference> + <location>corbaname::localhost:21869#CDMW__FaultToleranceDomain/ServerDanceFT</location> + <provider>true</provider> + <portName/> + <supportedType/> + </externalReference> + </connection> + + + + + + <!-- Artifacts declarations --> + <artifact id="ServerDanceArtifact1"> + <name>ServerDanceArtifact1</name> + <source/> + <node/> + <location>/home/sl/install/ofccm_v0/demos/demo_dance2_with_ft/c++/i686-pc-linux-gnu/libServerCcmDance2WithFTDemo.so</location> + <execParameter> + <name>repid</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>IDL:acme.com/CcmDance2WithFTTest/EventTypeModule/Command:1.0</string> + </value> + </value> + </execParameter> + <execParameter> + <name>factory_entrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>createCommandFactory</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="ServerDanceArtifact2"> + <name>ServerDanceArtifact2</name> + <source/> + <node/> + <location>/home/sl/install/ofccm_v0/demos/demo_dance2_with_ft/c++/i686-pc-linux-gnu/libServerCcmDance2WithFTDemo.so</location> + <execParameter> + <name>repid</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>DL:acme.com/CcmDance2WithFTTest/FooValueType:1.0</string> + </value> + </value> + </execParameter> + <execParameter> + <name>factory_entrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>createFooValueTypeFactory</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="ClientDanceArtifact"> + <name>ClientDanceArtifact</name> + <source/> + <node/> + <location>/home/sl/install/ofccm_v0/demos/demo_dance2_with_ft/c++/i686-pc-linux-gnu/libClientCcmDance2WithFTDemo.so</location> + <execParameter> + <name>repid</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>IDL:acme.com/CcmDance2WithFTTest/EventTypeModule/HostnameResult:1.0</string> + </value> + </value> + </execParameter> + <execParameter> + <name>factory_entrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>createHostnameResultFactory</string> + </value> + </value> + </execParameter> + </artifact> + + </Deployment:DeploymentPlan> diff --git a/CIAO/DAnCE/tests/DeploymentPlanDump/CcmDance4-host2.cdp b/CIAO/DAnCE/tests/DeploymentPlanDump/CcmDance4-host2.cdp new file mode 100644 index 00000000000..801ebf4b60f --- /dev/null +++ b/CIAO/DAnCE/tests/DeploymentPlanDump/CcmDance4-host2.cdp @@ -0,0 +1,941 @@ +<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>CCmDance2_1</label> + <UUID>CcmDance2_1</UUID> + + <realizes></realizes> + + <!-- Implementations declarations --> + + <!-- Server Dance implementation--> + <!-- Home implementation --> + <implementation id="ServerDanceHomeImplementation"> + <name>ServerDanceHomeImplementation</name> + <source/> + <artifact>ServerDanceArtifact1</artifact> + <artifact>ServerDanceArtifact2</artifact> + + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CCM_ServerDanceHome</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- COMPONENT_KIND --> + <name>cdmw.config.ComponentKind</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ComponentKindValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ComponentKindValue:1.0</typeId> + <member>SERVICE</member> + <member>SESSION</member> + <member>PROCESS</member> + <member>ENTITY</member> + <member>UNCLASSIFIED</member> + </enum> + </type> + <value> + <enum>SESSION</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- SERVANT_LIFETIME --> + <name>cdmw.config.ServantLifeTime</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ServantLifeTimeValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ServantLifetimeValue:1.0</typeId> + <member>COMPONENT_LIFETIME</member> + <member>METHOD_LIFETIME</member> + <member>TRANSACTION_LIFETIME</member> + <member>CONTAINER_LIFETIME</member> + </enum> + </type> + <value> + <enum>CONTAINER_LIFETIME</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- THREADING_POLICY --> + <name>cdmw.config.ThreadingPolicy</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ThreadingPolicyValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ThreadingPolicyValue:1.0</typeId> + <member>SERIALIZE</member> + <member>MULTITHREAD</member> + </enum> + </type> + <value> + <enum>MULTITHREAD</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- HOME_REPOSITORY_ID --> + <name>cdmw.config.HomeRepositoryId</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>IDL:acme.com/CcmDance2WithFTTest/ServerModule/ServerDanceHome:1.0</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- HOME_SERVANT_CLASSNAME --> + <name>cdmw.config.HomeServantClassName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Cdmw.CCM.CIF.CdmwCcmDance2WithFTTest.ServerModule.FTSessionServerDanceHome_impl</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- FAULT_TOLERANCE_REPLICATION_STYLE --> + <name>cdmw.config.FaultToleranceReplicationStyle</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>FTReplicationStyleValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/FTReplicationStyleValue:1.0</typeId> + <member>STATELSESS</member> + <member>COLD_PASSIVE</member> + <member>WARM_PASSIVE</member> + <member>ACTIVE</member> + <member>ACTIVE_WITH_VOTING</member> + </enum> + </type> + <value> + <enum>WARM_PASSIVE</enum> + </value> + </value> + </execParameter> + + </implementation> + + <!-- Component implementation --> + <implementation id="ServerDanceImplementation"> + <name>ServerDanceImplementation</name> + <source/> + <artifact>ServerDanceArtifact1</artifact> + <artifact>ServerDanceArtifact2</artifact> + </implementation> + + + + <!-- Client Dance implementation--> + <!-- Home implementation --> + <implementation id="ClientDanceHomeImplementation"> + <name>ClientDanceHomeImplementation</name> + <source/> + <artifact>ClientDanceArtifact</artifact> + <artifact>ServerDanceArtifact1</artifact> + + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CCM_ClientDanceHome</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- COMPONENT_KIND --> + <name>cdmw.config.ComponentKind</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ComponentKindValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ComponentKindValue:1.0</typeId> + <member>SERVICE</member> + <member>SESSION</member> + <member>PROCESS</member> + <member>ENTITY</member> + <member>UNCLASSIFIED</member> + </enum> + </type> + <value> + <enum>SESSION</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- SERVANT_LIFETIME --> + <name>cdmw.config.ServantLifeTime</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ServantLifeTimeValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ServantLifetimeValue:1.0</typeId> + <member>COMPONENT_LIFETIME</member> + <member>METHOD_LIFETIME</member> + <member>TRANSACTION_LIFETIME</member> + <member>CONTAINER_LIFETIME</member> + </enum> + </type> + <value> + <enum>CONTAINER_LIFETIME</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- THREADING_POLICY --> + <name>cdmw.config.ThreadingPolicy</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ThreadingPolicyValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ThreadingPolicyValue:1.0</typeId> + <member>SERIALIZE</member> + <member>MULTITHREAD</member> + </enum> + </type> + <value> + <enum>MULTITHREAD</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- HOME_REPOSITORY_ID --> + <name>cdmw.config.HomeRepositoryId</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>IDL:acme.com/CcmDance2WithFTTest/ClientModule/ClientDanceHome:1.0</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- HOME_SERVANT_CLASSNAME --> + <name>cdmw.config.HomeServantClassName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Cdmw.CCM.CIF.CdmwCcmDance2WithFTTest.ClientModule.SessionClientDanceHome_impl</string> + </value> + </value> + </execParameter> + </implementation> + + <!-- Component implementation --> + <implementation id="ClientDanceImplementation"> + <name>ClientDanceImplementation</name> + <source/> + <artifact>ClientDanceArtifact</artifact> + <artifact>ServerDanceArtifact1</artifact> + </implementation> + + + <!-- Test Driver implementation--> + <!-- Home implementation --> + <implementation id="TestDriverHomeImplementation"> + <name>TestDriverHomeImplementation</name> + <source/> + <artifact>ClientDanceArtifact</artifact> + + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CCM_TestDriverHome</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- COMPONENT_KIND --> + <name>cdmw.config.ComponentKind</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ComponentKindValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ComponentKindValue:1.0</typeId> + <member>SERVICE</member> + <member>SESSION</member> + <member>PROCESS</member> + <member>ENTITY</member> + <member>UNCLASSIFIED</member> + </enum> + </type> + <value> + <enum>SESSION</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- SERVANT_LIFETIME --> + <name>cdmw.config.ServantLifeTime</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ServantLifeTimeValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ServantLifetimeValue:1.0</typeId> + <member>COMPONENT_LIFETIME</member> + <member>METHOD_LIFETIME</member> + <member>TRANSACTION_LIFETIME</member> + <member>CONTAINER_LIFETIME</member> + </enum> + </type> + <value> + <enum>CONTAINER_LIFETIME</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- THREADING_POLICY --> + <name>cdmw.config.ThreadingPolicy</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ThreadingPolicyValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ThreadingPolicyValue:1.0</typeId> + <member>SERIALIZE</member> + <member>MULTITHREAD</member> + </enum> + </type> + <value> + <enum>MULTITHREAD</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- HOME_REPOSITORY_ID --> + <name>cdmw.config.HomeRepositoryId</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>IDL:acme.com/CcmDance2WithFTTest/DriverModule/TestDriverHome:1.0</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- HOME_SERVANT_CLASSNAME --> + <name>cdmw.config.HomeServantClassName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Cdmw.CCM.CIF.CdmwCcmDance2WithFTTest.DriverModule.SessionTestDriverHome_impl</string> + </value> + </value> + </execParameter> + + </implementation> + + <!-- Component implementation --> + <implementation id="TestDriverImplementation"> + <name>TestDriverImplementation</name> + <source/> + <artifact>ClientDanceArtifact</artifact> + </implementation> + + + + + + + <!-- Instances declarations --> + + <!-- Server Dance instances--> + <instance id="ServerDanceHome2"> + <name>ServerDanceHome2</name> + <node>Host2</node> + <!-- hostname --> + <source/> + <implementation>ServerDanceHomeImplementation</implementation> + + <configProperty> + <!-- PROCESS_DESTINATION --> + <name>cdmw.config.ProcessDestination</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ServerDanceProcess2@CcmDance2WithFTApplication</string> + </value> + </value> + </configProperty> + </instance> + + <instance id="ServerDance2"> + <name>ServerDance2</name> + <node>Host2</node> + <source/> + <implementation>ServerDanceImplementation</implementation> + + <configProperty> + <!-- HOME --> + <name>cdmw.component_home</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ServerDanceHome2</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- COMPONENT_NAME --> + <name>cdmw.config.ComponentName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ServerDance2</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- FAULT_TOLERANT GROUP NAME--> + <name>cdmw.config.FaultToleranceGroupName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ServerDanceFT</string> + </value> + </value> + </configProperty> + + + <configProperty> + <!-- Attribute: fooStruct--> + <name>fooStruct</name> + <value> + <type> + <kind>tk_struct</kind> + <struct> + <name>FooStruct</name> + <typeId>IDL:acme.com/CcmDance2WithFTTest/FooStruct:1.0</typeId> + <member> + <name>fooString</name> + <type> + <kind>tk_string</kind> + </type> + </member> + <member> + <name>fooLong</name> + <type> + <kind>tk_long</kind> + </type> + </member> + </struct> + </type> + <value> + <member> + <name>fooString</name> + <value> + <string>hello</string> + </value> + </member> + <member> + <name>fooLong</name> + <value> + <long>250</long> + </value> + </member> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: fooEnum--> + <name>fooEnum</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>FooEnum</name> + <typeId>IDL:acme.com/CcmDance2WithFTTest/FooEnum:1.0</typeId> + <member>A</member> + <member>B</member> + <member>C</member> + </enum> + </type> + <value> + <enum>B</enum> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: fooStructSeq--> + <name>fooStructSeq</name> + <value> + <type> + <kind>tk_sequence</kind> + <sequence> + <elementType> + <kind>tk_struct</kind> + <struct> + <name>FooStruct</name> + <typeId>IDL:acme.com/CcmDance2WithFTTest/FooStruct:1.0</typeId> + <member> + <name>fooString</name> + <type> + <kind>tk_string</kind> + </type> + </member> + <member> + <name>fooLong</name> + <type> + <kind>tk_long</kind> + </type> + </member> + </struct> + </elementType> + </sequence> + </type> + <value> + <element> + <member> + <name>fooString</name> + <value> + <string>hello1</string> + </value> + </member> + <member> + <name>fooLong</name> + <value> + <long>123</long> + </value> + </member> + </element> + <element> + <member> + <name>fooString</name> + <value> + <string>hello2</string> + </value> + </member> + <member> + <name>fooLong</name> + <value> + <long>456</long> + </value> + </member> + </element> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: fooEnumSeq--> + <name>fooEnumSeq</name> + <value> + <type> + <kind>tk_sequence</kind> + <sequence> + <elementType> + <kind>tk_enum</kind> + <enum> + <name>FooEnum</name> + <typeId>IDL:acme.com/CcmDance2WithFTTest/FooEnum:1.0</typeId> + <member>A</member> + <member>B</member> + <member>C</member> + </enum> + </elementType> + </sequence> + </type> + <value> + <element> + <enum>A</enum> + </element> + <element> + <enum>C</enum> + </element> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: expectedClientHostname1--> + <name>expectedClientHostname1</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>rhel4x.prismtech.com</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: expectedClientHostname2--> + <name>expectedClientHostname2</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>rhel4y.prismtech.com</string> + </value> + </value> + </configProperty> + </instance> + + + + <!-- Client Dance instances--> + <instance id="ClientDanceHome2"> + <name>ClientDanceHome2</name> + <node>Host2</node> + <!-- hostname --> + <source/> + <implementation>ClientDanceHomeImplementation</implementation> + <configProperty> + <!-- PROCESS_DESTINATION --> + <name>cdmw.config.ProcessDestination</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ClientDanceProcess2@CcmDance2WithFTApplication</string> + </value> + </value> + </configProperty> + </instance> + + <instance id="ClientDance2"> + <name>ClientDance2</name> + <node>Host2</node> + <source/> + <implementation>ClientDanceImplementation</implementation> + + <configProperty> + <!-- HOME --> + <name>cdmw.component_home</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ClientDanceHome2</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- COMPONENT_NAME --> + <name>cdmw.config.ComponentName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ClientDance2</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: configuration--> + <name>configuration</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Client2</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: expectedServerHostname--> + <name>expectedServerHostname</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>rhel4y.prismtech.com</string> + </value> + </value> + </configProperty> + </instance> + + <!-- Connections declarations --> + <connection> + <name>client2_receptacle</name> + <internalEndpoint> + <portName>serverHostInfo</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>ClientDance2</instance> + </internalEndpoint> + <externalReference> + <location>corbaname::localhost:21869#CDMW__FaultToleranceDomain/ServerDanceFT</location> + <provider>true</provider> + <portName/> + <supportedType/> + </externalReference> + </connection> + + <connection> + <name>server_receptacle1</name> + <internalEndpoint> + <portName>clientHostInfo1</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>ServerDance2</instance> + </internalEndpoint> + <externalReference> + <location>corbaloc:iiop:1.2@rhel4x.prismtech.com:12345/%14%01%0f%00NUP%00%00%00%16%02%00%00%00%01%00%00%00RootPOA%00Host1%00CcmDance2_1/ClientDance1/clientHostInfo</location> + <provider>true</provider> + <portName/> + <supportedType/> + </externalReference> + </connection> + + + <connection> + <name>server_receptacle2</name> + <internalEndpoint> + <portName>clientHostInfo2</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>ServerDance2</instance> + </internalEndpoint> + <internalEndpoint> + <portName>clientHostInfo</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance>ClientDance2</instance> + </internalEndpoint> + </connection> + + <connection> + <name>client1_consumer_to_publishes</name> + <internalEndpoint> + <portName>hostnamePublishes</portName> + <provider>false</provider> + <kind>EventPublisher</kind> + <instance>ServerDance2</instance> + </internalEndpoint> + <externalReference> + <location>corbaloc:iiop:1.2@rhel4x.prismtech.com:12345/%14%01%0f%00NUP%00%00%00%16%02%00%00%00%01%00%00%00RootPOA%00Host1%00CcmDance2_1/ClientDance1/hostnameResults</location> + <provider>true</provider> + <portName/> + <supportedType/> + </externalReference> + </connection> + + <connection> + <name>client2_consumer_to_publishes</name> + <internalEndpoint> + <portName>hostnamePublishes</portName> + <provider>false</provider> + <kind>EventPublisher</kind> + <instance>ServerDance2</instance> + </internalEndpoint> + <internalEndpoint> + <portName>hostnameResults</portName> + <provider>true</provider> + <kind>EventConsumer</kind> + <instance>ClientDance2</instance> + </internalEndpoint> + </connection> + + <connection> + <name>server_consumer_to_emits2</name> + <internalEndpoint> + <portName>commandEmits</portName> + <provider>false</provider> + <kind>EventEmitter</kind> + <instance>ClientDance2</instance> + </internalEndpoint> + <externalReference> + <location>corbaname::localhost:21869#CDMW__FaultToleranceDomain/ServerDanceFT</location> + <provider>true</provider> + <portName/> + <supportedType/> + </externalReference> + </connection> + + <connection> + <name>client2_sayHello</name> + <internalEndpoint> + <portName>sayHello</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>ClientDance2</instance> + </internalEndpoint> + <externalReference> + <location>corbaname::localhost:21869#CDMW__FaultToleranceDomain/ServerDanceFT</location> + <provider>true</provider> + <portName/> + <supportedType/> + </externalReference> + </connection> + + <connection> + <name>testDriver_client2</name> + <internalEndpoint> + <portName>supports</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance>ClientDance2</instance> + </internalEndpoint> + </connection> + + + <!-- Artifacts declarations --> + <!-- Artifacts declarations --> + <artifact id="ServerDanceArtifact1"> + <name>ServerDanceArtifact1</name> + <source/> + <node/> + <location>/home/sl/install/ofccm_v0/demos/demo_dance2_with_ft/c++/i686-pc-linux-gnu/libServerCcmDance2WithFTDemo.so</location> + <execParameter> + <name>repid</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>IDL:acme.com/CcmDance2WithFTTest/EventTypeModule/Command:1.0</string> + </value> + </value> + </execParameter> + <execParameter> + <name>factory_entrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>createCommandFactory</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="ServerDanceArtifact2"> + <name>ServerDanceArtifact2</name> + <source/> + <node/> + <location>/home/sl/install/ofccm_v0/demos/demo_dance2_with_ft/c++/i686-pc-linux-gnu/libServerCcmDance2WithFTDemo.so</location> + <execParameter> + <name>repid</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>DL:acme.com/CcmDance2WithFTTest/FooValueType:1.0</string> + </value> + </value> + </execParameter> + <execParameter> + <name>factory_entrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>createFooValueTypeFactory</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="ClientDanceArtifact"> + <name>ClientDanceArtifact</name> + <source/> + <node/> + <location>/home/sl/install/ofccm_v0/demos/demo_dance2_with_ft/c++/i686-pc-linux-gnu/libClientCcmDance2WithFTDemo.so</location> + <execParameter> + <name>repid</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>IDL:acme.com/CcmDance2WithFTTest/EventTypeModule/HostnameResult:1.0</string> + </value> + </value> + </execParameter> + <execParameter> + <name>factory_entrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>createHostnameResultFactory</string> + </value> + </value> + </execParameter> + </artifact> + + </Deployment:DeploymentPlan> diff --git a/CIAO/DAnCE/tests/DeploymentPlanDump/DeploymentPlanDump.mpc b/CIAO/DAnCE/tests/DeploymentPlanDump/DeploymentPlanDump.mpc new file mode 100644 index 00000000000..090283f81ee --- /dev/null +++ b/CIAO/DAnCE/tests/DeploymentPlanDump/DeploymentPlanDump.mpc @@ -0,0 +1,9 @@ + +project : dance, taoexe, xerces, aceexe, ciao_config_handlers, dance_logger { + exename = DeploymentPlanDump + + Source_Files { + test.cpp + } +} + diff --git a/CIAO/DAnCE/tests/DeploymentPlanDump/NewCcmDance1.cdp b/CIAO/DAnCE/tests/DeploymentPlanDump/NewCcmDance1.cdp new file mode 100644 index 00000000000..be02b05aade --- /dev/null +++ b/CIAO/DAnCE/tests/DeploymentPlanDump/NewCcmDance1.cdp @@ -0,0 +1,1063 @@ +<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>CCmDance1</label> + <UUID>CcmDance1</UUID> + + <realizes></realizes> + + <!-- Implementations declarations --> + + <!-- Server Dance implementation--> + <!-- Home implementation --> + <implementation id="ServerDanceHomeImplementation"> + <name>ServerDanceHomeImplementation</name> + <source/> + <artifact>ServerDanceArtifact</artifact> + + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CCM_ServerDanceHome</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- COMPONENT_KIND --> + <name>cdmw.config.ComponentKind</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ComponentKindValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ComponentKindValue:1.0</typeId> + <member>SERVICE</member> + <member>SESSION</member> + <member>PROCESS</member> + <member>ENTITY</member> + <member>UNCLASSIFIED</member> + </enum> + </type> + <value> + <enum>SESSION</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- SERVANT_LIFETIME --> + <name>cdmw.config.ServantLifeTime</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ServantLifeTimeValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ServantLifetimeValue:1.0</typeId> + <member>COMPONENT_LIFETIME</member> + <member>METHOD_LIFETIME</member> + <member>TRANSACTION_LIFETIME</member> + <member>CONTAINER_LIFETIME</member> + </enum> + </type> + <value> + <enum>CONTAINER_LIFETIME</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- THREADING_POLICY --> + <name>cdmw.config.ThreadingPolicy</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ThreadingPolicyValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ThreadingPolicyValue:1.0</typeId> + <member>SERIALIZE</member> + <member>MULTITHREAD</member> + </enum> + </type> + <value> + <enum>MULTITHREAD</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- HOME_REPOSITORY_ID --> + <name>cdmw.config.HomeRepositoryId</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>IDL:acme.com/CcmDance1Test/ServerModule/ServerDanceHome:1.0</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- HOME_SERVANT_CLASSNAME --> + <name>cdmw.config.HomeServantClassName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Cdmw.CCM.CIF.CdmwCcmDance1Test.ServerModule.SessionServerDanceHome_impl</string> + </value> + </value> + </execParameter> + +<!-- <execParameter> --> + <!-- VALUETYPE_FACTORY_DEPENDENCIES --> +<!-- <name>cdmw.config.ValuetypeFactoryDependencies</name> + <value> + <type> + <kind>tk_sequence</kind> + <sequence> + <elementType> + <kind>tk_struct</kind> + <struct> + <name>ValuetypeFactoryDescription</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ValuetypeFactoryDescription:1.0</typeId> + <member> + <name>repid</name> + <type> + <kind>tk_alias</kind> + <alias> + <name>RepositoryId</name> + <typeId>IDL:omg.org/CORBA/RepositoryId</typeId> + <elementType> + <kind>tk_string</kind> + </elementType> + </alias> + </type> + </member> + <member> + <name>factory_entrypoint</name> + <type> + <kind>tk_string</kind> + </type> + </member> + </struct> + </elementType> + </sequence> + </type> + <value> + <element> + <member> + <name>repid</name> + <value> + <string>IDL:acme.com/Example/SaySomethingElse:1.0</string> + </value> + </member> + <member> + <name>factory_entrypoint</name> + <value> + <string>createSaySomethingElseFactory</string> + </value> + </member> + </element> + </value> + </value> + </execParameter> --> + </implementation> + + <!-- Component implementation --> + <implementation id="ServerDanceImplementation"> + <name>ServerDanceImplementation</name> + <source/> + <artifact>ServerDanceArtifact</artifact> + </implementation> + + + + <!-- Client Dance implementation--> + <!-- Home implementation --> + <implementation id="ClientDanceHomeImplementation"> + <name>ClientDanceHomeImplementation</name> + <source/> + <artifact>ClientDanceArtifact</artifact> + + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CCM_ClientDanceHome</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- COMPONENT_KIND --> + <name>cdmw.config.ComponentKind</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ComponentKindValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ComponentKindValue:1.0</typeId> + <member>SERVICE</member> + <member>SESSION</member> + <member>PROCESS</member> + <member>ENTITY</member> + <member>UNCLASSIFIED</member> + </enum> + </type> + <value> + <enum>SESSION</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- SERVANT_LIFETIME --> + <name>cdmw.config.ServantLifeTime</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ServantLifeTimeValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ServantLifetimeValue:1.0</typeId> + <member>COMPONENT_LIFETIME</member> + <member>METHOD_LIFETIME</member> + <member>TRANSACTION_LIFETIME</member> + <member>CONTAINER_LIFETIME</member> + </enum> + </type> + <value> + <enum>CONTAINER_LIFETIME</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- THREADING_POLICY --> + <name>cdmw.config.ThreadingPolicy</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ThreadingPolicyValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ThreadingPolicyValue:1.0</typeId> + <member>SERIALIZE</member> + <member>MULTITHREAD</member> + </enum> + </type> + <value> + <enum>MULTITHREAD</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- HOME_REPOSITORY_ID --> + <name>cdmw.config.HomeRepositoryId</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>IDL:acme.com/CcmDance1Test/ClientModule/ClientDanceHome:1.0</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- HOME_SERVANT_CLASSNAME --> + <name>cdmw.config.HomeServantClassName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Cdmw.CCM.CIF.CdmwCcmDance1Test.ClientModule.SessionClientDanceHome_impl</string> + </value> + </value> + </execParameter> + + <!-- <execParameter> --> + <!-- VALUETYPE_FACTORY_DEPENDENCIES --> + <!-- <name>cdmw.config.ValuetypeFactoryDependencies</name> + <value> + <type> + <kind>tk_sequence</kind> + <sequence> + <elementType> + <kind>tk_struct</kind> + <struct> + <name>ValuetypeFactoryDescription</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ValuetypeFactoryDescription:1.0</typeId> + <member> + <name>repid</name> + <type> + <kind>tk_alias</kind> + <alias> + <name>RepositoryId</name> + <typeId>IDL:omg.org/CORBA/RepositoryId</typeId> + <elementType> + <kind>tk_string</kind> + </elementType> + </alias> + </type> + </member> + <member> + <name>factory_entrypoint</name> + <type> + <kind>tk_string</kind> + </type> + </member> + </struct> + </elementType> + </sequence> + </type> + <value> + <element> + <member> + <name>repid</name> + <value> + <string>IDL:acme.com/Example/SaySomethingElse:1.0</string> + </value> + </member> + <member> + <name>factory_entrypoint</name> + <value> + <string>createSaySomethingElseFactory</string> + </value> + </member> + </element> + </value> + </value> + </execParameter> --> + </implementation> + + <!-- Component implementation --> + <implementation id="ClientDanceImplementation"> + <name>ClientDanceImplementation</name> + <source/> + <artifact>ClientDanceArtifact</artifact> + </implementation> + + + <!-- Test Driver implementation--> + <!-- Home implementation --> + <implementation id="TestDriverHomeImplementation"> + <name>TestDriverHomeImplementation</name> + <source/> + <artifact>ClientDanceArtifact</artifact> + + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CCM_TestDriverHome</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- COMPONENT_KIND --> + <name>cdmw.config.ComponentKind</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ComponentKindValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ComponentKindValue:1.0</typeId> + <member>SERVICE</member> + <member>SESSION</member> + <member>PROCESS</member> + <member>ENTITY</member> + <member>UNCLASSIFIED</member> + </enum> + </type> + <value> + <enum>SESSION</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- SERVANT_LIFETIME --> + <name>cdmw.config.ServantLifeTime</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ServantLifeTimeValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ServantLifetimeValue:1.0</typeId> + <member>COMPONENT_LIFETIME</member> + <member>METHOD_LIFETIME</member> + <member>TRANSACTION_LIFETIME</member> + <member>CONTAINER_LIFETIME</member> + </enum> + </type> + <value> + <enum>CONTAINER_LIFETIME</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- THREADING_POLICY --> + <name>cdmw.config.ThreadingPolicy</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ThreadingPolicyValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ThreadingPolicyValue:1.0</typeId> + <member>SERIALIZE</member> + <member>MULTITHREAD</member> + </enum> + </type> + <value> + <enum>MULTITHREAD</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- HOME_REPOSITORY_ID --> + <name>cdmw.config.HomeRepositoryId</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>IDL:acme.com/CcmDance1Test/DriverModule/TestDriverHome:1.0</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- HOME_SERVANT_CLASSNAME --> + <name>cdmw.config.HomeServantClassName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Cdmw.CCM.CIF.CdmwCcmDance1Test.DriverModule.SessionTestDriverHome_impl</string> + </value> + </value> + </execParameter> + + <!-- <execParameter> --> + <!-- VALUETYPE_FACTORY_DEPENDENCIES --> + <!-- <name>cdmw.config.ValuetypeFactoryDependencies</name> + <value> + <type> + <kind>tk_sequence</kind> + <sequence> + <elementType> + <kind>tk_struct</kind> + <struct> + <name>ValuetypeFactoryDescription</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ValuetypeFactoryDescription:1.0</typeId> + <member> + <name>repid</name> + <type> + <kind>tk_alias</kind> + <alias> + <name>RepositoryId</name> + <typeId>IDL:omg.org/CORBA/RepositoryId</typeId> + <elementType> + <kind>tk_string</kind> + </elementType> + </alias> + </type> + </member> + <member> + <name>factory_entrypoint</name> + <type> + <kind>tk_string</kind> + </type> + </member> + </struct> + </elementType> + </sequence> + </type> + <value> + <element> + <member> + <name>repid</name> + <value> + <string>IDL:acme.com/Example/SaySomethingElse:1.0</string> + </value> + </member> + <member> + <name>factory_entrypoint</name> + <value> + <string>createSaySomethingElseFactory</string> + </value> + </member> + </element> + </value> + </value> + </execParameter> --> + </implementation> + + <!-- Component implementation --> + <implementation id="TestDriverImplementation"> + <name>TestDriverImplementation</name> + <source/> + <artifact>ClientDanceArtifact</artifact> + </implementation> + + + + + + + + + + + <!-- Instances declarations --> + + <!-- Server Dance instances--> + <instance id="ServerDanceHome"> + <name>ServerDanceHome</name> + <node>MyHost</node> + <!-- hostname --> + <source/> + <implementation>ServerDanceHomeImplementation</implementation> + <configProperty> + <!-- PROCESS_DESTINATION --> + <name>cdmw.config.ProcessDestination</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ServerDanceProcess@CcmDance1Application</string> + </value> + </value> + </configProperty> + </instance> + + <instance id="ServerDance"> + <name>ServerDance</name> + <node>MyHost</node> + <source/> + <implementation>ServerDanceImplementation</implementation> + + <configProperty> + <!-- HOME --> + <name>cdmw.component_home</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ServerDanceHome</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- COMPONENT_NAME --> + <name>cdmw.config.ComponentName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ServerDance</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: expectedClientHostname1--> + <name>expectedClientHostname1</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>rhel4x</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: expectedClientHostname2--> + <name>expectedClientHostname2</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>rhel4x</string> + </value> + </value> + </configProperty> + </instance> + + + + <!-- Client Dance instances--> + <instance id="ClientDanceHome"> + <name>ClientDanceHome</name> + <node>MyHost</node> + <!-- hostname --> + <source/> + <implementation>ClientDanceHomeImplementation</implementation> + <configProperty> + <!-- PROCESS_DESTINATION --> + <name>cdmw.config.ProcessDestination</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ClientDanceProcess@CcmDance1Application</string> + </value> + </value> + </configProperty> + </instance> + + <instance id="ClientDance1"> + <name>ClientDance1</name> + <node>MyHost</node> + <source/> + <implementation>ClientDanceImplementation</implementation> + + <configProperty> + <!-- HOME --> + <name>cdmw.component_home</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ClientDanceHome</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- COMPONENT_NAME --> + <name>cdmw.config.ComponentName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ClientDance1</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: configuration--> + <name>configuration</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Client1</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: expectedServerHostname--> + <name>expectedServerHostname</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>rhel4x</string> + </value> + </value> + </configProperty> + </instance> + + + <instance id="ClientDance2"> + <name>ClientDance2</name> + <node>MyHost</node> + <source/> + <implementation>ClientDanceImplementation</implementation> + + <configProperty> + <!-- HOME --> + <name>cdmw.component_home</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ClientDanceHome</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- COMPONENT_NAME --> + <name>cdmw.config.ComponentName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ClientDance2</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: configuration--> + <name>configuration</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Client2</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- Attribute: expectedServerHostname--> + <name>expectedServerHostname</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>rhel4x</string> + </value> + </value> + </configProperty> + </instance> + + + <!-- Test Driver instances--> + <instance id="TestDriverHome"> + <name>TestDriverHome</name> + <node>MyHost</node> + <!-- hostname --> + <source/> + <implementation>TestDriverHomeImplementation</implementation> + <configProperty> + <!-- PROCESS_DESTINATION --> + <name>cdmw.config.ProcessDestination</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ClientDanceProcess@CcmDance1Application</string> + </value> + </value> + </configProperty> + </instance> + + <instance id="TestDriver1"> + <name>TestDriver1</name> + <node>MyHost</node> + <source/> + <implementation>TestDriverImplementation</implementation> + + <configProperty> + <!-- HOME --> + <name>cdmw.component_home</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>TestDriverHome</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- COMPONENT_NAME --> + <name>cdmw.config.ComponentName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>TestDriver1</string> + </value> + </value> + </configProperty> + </instance> + + + + + + <!-- Connections declarations --> + + <connection> + <name>client1_receptacle</name> + <internalEndpoint> + <portName>serverHostInfo</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>ClientDance1</instance> + </internalEndpoint> + <internalEndpoint> + <portName>serverHostInfo1</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance>ServerDance</instance> + </internalEndpoint> + </connection> + + <connection> + <name>client2_receptacle</name> + <internalEndpoint> + <portName>serverHostInfo</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>ClientDance2</instance> + </internalEndpoint> + <internalEndpoint> + <portName>serverHostInfo2</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance>ServerDance</instance> + </internalEndpoint> + </connection> + + <connection> + <name>server_receptacle1</name> + <internalEndpoint> + <portName>clientHostInfo1</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>ServerDance</instance> + </internalEndpoint> + <internalEndpoint> + <portName>clientHostInfo</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance>ClientDance1</instance> + </internalEndpoint> + </connection> + + <connection> + <name>server_receptacle2</name> + <internalEndpoint> + <portName>clientHostInfo2</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>ServerDance</instance> + </internalEndpoint> + <internalEndpoint> + <portName>clientHostInfo</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance>ClientDance2</instance> + </internalEndpoint> + </connection> + + <connection> + <name>client1_consumer_to_publishes</name> + <internalEndpoint> + <portName>hostnamePublishes</portName> + <provider>false</provider> + <kind>EventPublisher</kind> + <instance>ServerDance</instance> + </internalEndpoint> + <internalEndpoint> + <portName>hostnameResults</portName> + <provider>true</provider> + <kind>EventConsumer</kind> + <instance>ClientDance1</instance> + </internalEndpoint> + </connection> + + <connection> + <name>client2_consumer_to_publishes</name> + <internalEndpoint> + <portName>hostnamePublishes</portName> + <provider>false</provider> + <kind>EventPublisher</kind> + <instance>ServerDance</instance> + </internalEndpoint> + <internalEndpoint> + <portName>hostnameResults</portName> + <provider>true</provider> + <kind>EventConsumer</kind> + <instance>ClientDance2</instance> + </internalEndpoint> + </connection> + + <connection> + <name>server_consumer_to_emits1</name> + <internalEndpoint> + <portName>commandEmits</portName> + <provider>false</provider> + <kind>EventEmitter</kind> + <instance>ClientDance1</instance> + </internalEndpoint> + <internalEndpoint> + <portName>commands</portName> + <provider>true</provider> + <kind>EventConsumer</kind> + <instance>ServerDance</instance> + </internalEndpoint> + </connection> + + <connection> + <name>server_consumer_to_emits2</name> + <internalEndpoint> + <portName>commandEmits</portName> + <provider>false</provider> + <kind>EventEmitter</kind> + <instance>ClientDance2</instance> + </internalEndpoint> + <internalEndpoint> + <portName>commands</portName> + <provider>true</provider> + <kind>EventConsumer</kind> + <instance>ServerDance</instance> + </internalEndpoint> + </connection> + + <connection> + <name>client1_sayHello</name> + <internalEndpoint> + <portName>sayHello</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>ClientDance1</instance> + </internalEndpoint> + <internalEndpoint> + <portName>supports</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance>ServerDance</instance> + </internalEndpoint> + </connection> + + <connection> + <name>client2_sayHello</name> + <internalEndpoint> + <portName>sayHello</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>ClientDance2</instance> + </internalEndpoint> + <internalEndpoint> + <portName>supports</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance>ServerDance</instance> + </internalEndpoint> + </connection> + + <connection> + <name>testDriver_server</name> + <internalEndpoint> + <portName>server</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>TestDriver1</instance> + </internalEndpoint> + <internalEndpoint> + <portName>supports</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance>ServerDance</instance> + </internalEndpoint> + </connection> + + <connection> + <name>testDriver_client1</name> + <internalEndpoint> + <portName>client1</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>TestDriver1</instance> + </internalEndpoint> + <internalEndpoint> + <portName>supports</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance>ClientDance1</instance> + </internalEndpoint> + </connection> + + <connection> + <name>testDriver_client2</name> + <internalEndpoint> + <portName>client2</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>TestDriver1</instance> + </internalEndpoint> + <internalEndpoint> + <portName>supports</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance>ClientDance2</instance> + </internalEndpoint> + </connection> + + <connection> + <name>testDriver_sayHello</name> + <internalEndpoint> + <portName>handshake</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance>TestDriver1</instance> + </internalEndpoint> + <internalEndpoint> + <portName>supports</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance>ServerDance</instance> + </internalEndpoint> + </connection> + + + + + + <!-- Artifacts declarations --> + <artifact id="ServerDanceArtifact"> + <name>ServerDanceArtifact</name> + <source/> + <node/> + <location>/home/sl/install/ofccm_v0/demos/demo_dance1/c++/i686-pc-linux-gnu/libServerCcmDance1Demo.so</location> + </artifact> + + <artifact id="ClientDanceArtifact"> + <name>ClientDanceArtifact</name> + <source/> + <node/> + <location>/home/sl/install/ofccm_v0/demos/demo_dance1/c++/i686-pc-linux-gnu/libClientCcmDance1Demo.so</location> + </artifact> + + </Deployment:DeploymentPlan> diff --git a/CIAO/DAnCE/tests/DeploymentPlanDump/test.cpp b/CIAO/DAnCE/tests/DeploymentPlanDump/test.cpp new file mode 100644 index 00000000000..3fd058f2131 --- /dev/null +++ b/CIAO/DAnCE/tests/DeploymentPlanDump/test.cpp @@ -0,0 +1,33 @@ +#include "tools/Config_Handlers/DnC_Dump.h" +#include "tools/Config_Handlers/XML_File_Intf.h" +#include "DAnCE/Logger/Log_Macros.h" + +int ACE_TMAIN (int argc, ACE_TCHAR * argv[]) +{ + try + { + if (argc < 1) + { + DANCE_ERROR((LM_ERROR, "[%M] Incorrect count of arguments. Path to deployment plan has not been specified.\n")); + return 1; + } + CIAO::Config_Handlers::XML_File_Intf file (argv[1]); + file.add_search_path ("CIAO_ROOT", "/docs/schema/"); + file.add_search_path ("TAO_ROOT", "/docs/schema/"); + Deployment::DeploymentPlan * plan = file.release_plan(); + Deployment::DnC_Dump::dump (*plan); + delete plan; + } + catch (const CORBA::Exception& ex) + { + ex._tao_print_exception ("DAnCE_DeploymentPlanDump::main\n"); + return -1; + } + catch (...) + { + DANCE_ERROR((LM_ERROR, "[%M] Unexpected exception\n")); + return 1; + } + + return 0; +} diff --git a/CIAO/DAnCE/tests/DeploymentPlanTestReferences/DeploymentPlanTestReferences.mpc b/CIAO/DAnCE/tests/DeploymentPlanTestReferences/DeploymentPlanTestReferences.mpc new file mode 100644 index 00000000000..86a4bb93ff0 --- /dev/null +++ b/CIAO/DAnCE/tests/DeploymentPlanTestReferences/DeploymentPlanTestReferences.mpc @@ -0,0 +1,9 @@ + +project : dance, taolib, tao_output, xerces, ciao_config_handlers, dance_logger { + exename = DeploymentPlanTestReferences + + Source_Files { + test.cpp + } +} + diff --git a/CIAO/DAnCE/tests/DeploymentPlanTestReferences/test.cpp b/CIAO/DAnCE/tests/DeploymentPlanTestReferences/test.cpp new file mode 100644 index 00000000000..0f89c40ea72 --- /dev/null +++ b/CIAO/DAnCE/tests/DeploymentPlanTestReferences/test.cpp @@ -0,0 +1,51 @@ +#include "ace/Auto_Ptr.h" +#include "tools/Config_Handlers/DnC_Dump.h" +#include "tools/Config_Handlers/XML_File_Intf.h" +#include "DAnCE/Logger/Log_Macros.h" + +int ACE_TMAIN (int argc, ACE_TCHAR * argv[]) +{ + try + { + if (argc < 1) + { + DANCE_ERROR((LM_ERROR, "[%M] Incorrect count of arguments. Path to deployment plan has not been specified.\n")); + return 1; + } + //parsing plan + CIAO::Config_Handlers::XML_File_Intf file (argv[1]); + file.add_search_path ("CIAO_ROOT", "/docs/schema/"); + file.add_search_path ("TAO_ROOT", "/docs/schema/"); + auto_ptr<Deployment::DeploymentPlan> plan (file.release_plan()); + + //check instance references to corresponding implementations + for (unsigned int i = 0; i < plan->instance.length(); i++) + { + if (plan->instance[i].implementationRef > plan->implementation.length() - 1) + { + DANCE_ERROR((LM_ERROR, "[%M] incorrect implementationRef in instance %s.\n", plan->instance[i].name.in())); + return 1; + } + } + + //check artifact reference for implementations of Home objects + for (unsigned int i = 0; i < plan->implementation.length(); i++) + { + if (plan->implementation[i].artifactRef.length() > 0) + { + if (plan->implementation[i].artifactRef[0] > plan->artifact.length() - 1) + { + DANCE_ERROR((LM_ERROR, "[%M] incorrect artifactRef in the implementation %s.\n", plan->implementation[i].name.in())); + return 1; + } + } + } + } + catch (...) + { + DANCE_ERROR((LM_ERROR, "[%M] Unexpected exception")); + return 1; + } + + return 0; +} diff --git a/CIAO/DAnCE/tests/DeploymentTest1/DeploymentTest1.mpc b/CIAO/DAnCE/tests/DeploymentTest1/DeploymentTest1.mpc new file mode 100644 index 00000000000..efcdaec3203 --- /dev/null +++ b/CIAO/DAnCE/tests/DeploymentTest1/DeploymentTest1.mpc @@ -0,0 +1,8 @@ +project : dance, taolib, tao_output, xerces, ciao_config_handlers, dance_logger { + exename = DeploymentTest1 + + Source_Files { + test.cpp + } +} + diff --git a/CIAO/DAnCE/tests/DeploymentTest1/test.cpp b/CIAO/DAnCE/tests/DeploymentTest1/test.cpp new file mode 100644 index 00000000000..aaccef082fc --- /dev/null +++ b/CIAO/DAnCE/tests/DeploymentTest1/test.cpp @@ -0,0 +1,66 @@ +#include "ace/Auto_Ptr.h" +#include "DAnCE/Deployment/Deployment_DeploymentPlanC.h" +#include "DAnCE/Deployment/Deployment_ExecutionManagerC.h" +#include "DAnCE/Deployment/Deployment_DomainApplicationManagerC.h" +#include "DAnCE/Deployment/Deployment_DomainApplicationC.h" +#include "DAnCE/Deployment/Deployment_NodeManagerC.h" +#include "DAnCE/Deployment/Deployment_NodeApplicationManagerC.h" +#include "DAnCE/Logger/Log_Macros.h" +#include "tools/Config_Handlers/DnC_Dump.h" +#include "tools/Config_Handlers/XML_File_Intf.h" + +int ACE_TMAIN (int argc, ACE_TCHAR * argv[]) +{ + try + { + CIAO::Config_Handlers::XML_File_Intf file (argv[1]); + file.add_search_path ("CIAO_ROOT", "/docs/schema/"); + file.add_search_path ("TAO_ROOT", "/docs/schema/"); + auto_ptr<Deployment::DeploymentPlan> pplan (file.release_plan()); + + DANCE_DEBUG((LM_DEBUG, "[%M] Test starts.\n")); + // Initialize orb + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); + const char * ior = "file://execution_manager.ior"; + + CORBA::Object_var obj = orb->string_to_object (ior); + if (CORBA::is_nil (obj. in())) + { + throw 0; + } + + Deployment::ExecutionManager_var em = Deployment::ExecutionManager::_narrow (obj); + if (CORBA::is_nil (em.in ())) + { + throw 0; + } + DANCE_DEBUG((LM_DEBUG, "[%M] preparePlan\n")); + Deployment::DomainApplicationManager_var dam = em->preparePlan (*pplan, Deployment::ResourceCommitmentManager::_nil()); + DANCE_DEBUG((LM_DEBUG, "[%M] startLaunch\n")); + //call startLaunch + Deployment::Properties dp; + Deployment::Connections_var dc; + Deployment::Application_var na = dam->startLaunch (dp, dc.out()); + Deployment::DomainApplication_var da = Deployment::DomainApplication::_narrow (na); + if (CORBA::is_nil (da.in ())) + { + DANCE_DEBUG((LM_DEBUG, "[%M] narrow fails\n")); + } + DANCE_DEBUG((LM_DEBUG, "[%M] finishLaunch\n")); + da->finishLaunch (dc.in(), true); + DANCE_DEBUG((LM_DEBUG, "[%M] Test succeded!\n")); + + } + catch (const CORBA::Exception &e) + { + e._tao_print_exception ("DeploymentTest1::main\t\n"); + DANCE_ERROR((LM_ERROR, "[%M] Uncaught CORBA exception\n")); + return 1; + } + catch (...) + { + return 1; + } + + return 0; +} diff --git a/CIAO/DAnCE/tests/MocksTest/MockObjectHome.cpp b/CIAO/DAnCE/tests/MocksTest/MockObjectHome.cpp new file mode 100644 index 00000000000..35a522bb9f6 --- /dev/null +++ b/CIAO/DAnCE/tests/MocksTest/MockObjectHome.cpp @@ -0,0 +1,18 @@ +#include "MockObjectHome.h" + +::Components::CCMObject_ptr +MockObjectHome::create_component_with_config_values ( + const ::Components::ConfigValues & config +) + { + return MockHome_Impl::create_component_with_config_values (config); + } + +extern "C" MocksTest_Export MockHome_Impl *create_MockHome (void); + +MockHome_Impl*create_MockHome (void) + { + MockHome_Impl* home = 0; + ACE_NEW_RETURN (home, MockObjectHome (), 0); + return home; + } diff --git a/CIAO/DAnCE/tests/MocksTest/MockObjectHome.h b/CIAO/DAnCE/tests/MocksTest/MockObjectHome.h new file mode 100644 index 00000000000..056e90a1244 --- /dev/null +++ b/CIAO/DAnCE/tests/MocksTest/MockObjectHome.h @@ -0,0 +1,23 @@ +#ifndef MOCKOBJECTHOME_H_ +#define MOCKOBJECTHOME_H_ + +#include "MocksTest_Export.h" +#include "Mocks/MockHome_Impl.h" + +class MocksTest_Export MockObjectHome : public MockHome_Impl + { + public: + MockObjectHome() + {}; + virtual ~MockObjectHome() + {}; + + virtual ::Components::CCMObject_ptr create_component_with_config_values ( + const ::Components::ConfigValues & config + ); + + protected: + private: + }; + +#endif /*MOCKOBJECTHOME_H_*/ diff --git a/CIAO/DAnCE/tests/MocksTest/MockTest.cdp b/CIAO/DAnCE/tests/MocksTest/MockTest.cdp new file mode 100644 index 00000000000..f3478812063 --- /dev/null +++ b/CIAO/DAnCE/tests/MocksTest/MockTest.cdp @@ -0,0 +1,196 @@ +<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>MockTest</label> + <UUID>MockTest</UUID> + + <realizes></realizes> + + <!-- Implementations declarations --> + + <!-- Mock object implementation--> + <!-- Home implementation --> + <implementation id="MockObjectHomeImplementation"> + <name>MockObjectHomeImplementation</name> + <source/> + <artifact>MockObjectArtifact</artifact> + + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_MockHome</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- COMPONENT_KIND --> + <name>cdmw.config.ComponentKind</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ComponentKindValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ComponentKindValue:1.0</typeId> + <member>SERVICE</member> + <member>SESSION</member> + <member>PROCESS</member> + <member>ENTITY</member> + <member>UNCLASSIFIED</member> + </enum> + </type> + <value> + <enum>SESSION</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- SERVANT_LIFETIME --> + <name>cdmw.config.ServantLifeTime</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ServantLifeTimeValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ServantLifetimeValue:1.0</typeId> + <member>COMPONENT_LIFETIME</member> + <member>METHOD_LIFETIME</member> + <member>TRANSACTION_LIFETIME</member> + <member>CONTAINER_LIFETIME</member> + </enum> + </type> + <value> + <enum>CONTAINER_LIFETIME</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- THREADING_POLICY --> + <name>cdmw.config.ThreadingPolicy</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>ThreadingPolicyValue</name> + <typeId>IDL:thalesgroup.com/CdmwDeployment/ThreadingPolicyValue:1.0</typeId> + <member>SERIALIZE</member> + <member>MULTITHREAD</member> + </enum> + </type> + <value> + <enum>MULTITHREAD</enum> + </value> + </value> + </execParameter> + + <execParameter> + <!-- HOME_REPOSITORY_ID --> + <name>cdmw.config.HomeRepositoryId</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>IDL:acme.com/CcmDance1Test/ServerModule/ServerDanceHome:1.0</string> + </value> + </value> + </execParameter> + + <execParameter> + <!-- HOME_SERVANT_CLASSNAME --> + <name>cdmw.config.HomeServantClassName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Cdmw.CCM.CIF.CdmwCcmDance1Test.ServerModule.SessionServerDanceHome_impl</string> + </value> + </value> + </execParameter> + </implementation> + + <!-- Component implementation --> + <implementation id="MockObjectImplementation"> + <name>MockObjectImplementation</name> + <source/> + <artifact>MockObjectArtifact</artifact> + </implementation> + + + + + <!-- Instances declarations --> + + <!-- MockObjectHome instances--> + <instance id="MockObjectHome"> + <name>MockObjectHome</name> + <node>MyHost</node> + <!-- hostname --> + <source/> + <implementation>MockObjectHomeImplementation</implementation> + <configProperty> + <!-- PROCESS_DESTINATION --> + <name>cdmw.config.ProcessDestination</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>MockTest</string> + </value> + </value> + </configProperty> + </instance> + + <instance id="MockObject"> + <name>MockObject</name> + <node>MyHost</node> + <source/> + <implementation>MockObjectImplementation</implementation> + + <configProperty> + <!-- HOME --> + <name>cdmw.component_home</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>MockObjectHome</string> + </value> + </value> + </configProperty> + + <configProperty> + <!-- COMPONENT_NAME --> + <name>cdmw.config.ComponentName</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>MockObject</string> + </value> + </value> + </configProperty> + </instance> + + <!-- Artifacts declarations --> + <artifact id="MockObjectArtifact"> + <name>MockObjectArtifact</name> + <source/> + <node/> + <location>./libMockObject.so</location> + </artifact> + + </Deployment:DeploymentPlan> diff --git a/CIAO/DAnCE/tests/MocksTest/MockTest.mpc b/CIAO/DAnCE/tests/MocksTest/MockTest.mpc new file mode 100644 index 00000000000..2de6e7bf904 --- /dev/null +++ b/CIAO/DAnCE/tests/MocksTest/MockTest.mpc @@ -0,0 +1,28 @@ +// -*- MPC -*- +// $Id$ + +project(*MockTest): dance, taoserver, naming, dance_mocks { + requires += ofccm + exename = MockTest + after += MockObject + + Source_Files { + MocksTest.cpp + } + +} + +project(*MockObject): dance_mocks{ + requires += ofccm + sharedname = MockObject + dynamicflags = MOCKTEST_BUILD_DLL + + Source_Files { + MockObjectHome.cpp + } + + Header_Files { + MockObjectHome.h + } +} + diff --git a/CIAO/DAnCE/tests/MocksTest/MocksTest.cpp b/CIAO/DAnCE/tests/MocksTest/MocksTest.cpp new file mode 100644 index 00000000000..dbe6117c2be --- /dev/null +++ b/CIAO/DAnCE/tests/MocksTest/MocksTest.cpp @@ -0,0 +1,36 @@ +#include "orbsvcs/orbsvcs/CosNamingC.h" +#include "Mocks/ComponentServer_Impl.h" +#include "tao/ORB.h" + +int ACE_TMAIN (int argc, ACE_TCHAR* argv[]) + { + + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); + + CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA"); + PortableServer::POA_var poa = PortableServer::POA::_narrow (obj.in ()); + PortableServer::POAManager_var poa_manager = poa->the_POAManager (); + poa_manager->activate (); + + obj = orb->resolve_initial_references ("NameService"); + CosNaming::NamingContext_var naming = CosNaming::NamingContext::_narrow (obj.in ()); + + ComponentServer_Impl* comp_server = 0; + + ACE_NEW_THROW_EX (comp_server, + ComponentServer_Impl (orb.in (), poa.in ()), + CORBA::NO_MEMORY()); + + PortableServer::ObjectId_var oid = poa->activate_object (comp_server); + obj = poa->id_to_reference (oid.in ()); + CdmwCcmComponentServer::ComponentServer_var server = CdmwCcmComponentServer::ComponentServer::_narrow (obj.in ()); + + CosNaming::Name name(1); + name.length(1); + name[0].id = CORBA::string_dup("MockTest"); + name[0].kind = CORBA::string_dup("ComponentServer"); + naming->bind (name, server.in ()); + + orb->run (); + return 0; + } diff --git a/CIAO/DAnCE/tests/MocksTest/MocksTest_Export.h b/CIAO/DAnCE/tests/MocksTest/MocksTest_Export.h new file mode 100644 index 00000000000..984e865bf1f --- /dev/null +++ b/CIAO/DAnCE/tests/MocksTest/MocksTest_Export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl MocksTest +// ------------------------------ +#ifndef MOCKSTEST_EXPORT_H +#define MOCKSTEST_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (MOCKSTEST_HAS_DLL) +# define MOCKSTEST_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && MOCKSTEST_HAS_DLL */ + +#if !defined (MOCKSTEST_HAS_DLL) +# define MOCKSTEST_HAS_DLL 1 +#endif /* ! MOCKSTEST_HAS_DLL */ + +#if defined (MOCKSTEST_HAS_DLL) && (MOCKSTEST_HAS_DLL == 1) +# if defined (MOCKSTEST_BUILD_DLL) +# define MocksTest_Export ACE_Proper_Export_Flag +# define MOCKSTEST_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define MOCKSTEST_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* MOCKSTEST_BUILD_DLL */ +# define MocksTest_Export ACE_Proper_Import_Flag +# define MOCKSTEST_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define MOCKSTEST_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* MOCKSTEST_BUILD_DLL */ +#else /* MOCKSTEST_HAS_DLL == 1 */ +# define MocksTest_Export +# define MOCKSTEST_SINGLETON_DECLARATION(T) +# define MOCKSTEST_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* MOCKSTEST_HAS_DLL == 1 */ + +// Set MOCKSTEST_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (MOCKSTEST_NTRACE) +# if (ACE_NTRACE == 1) +# define MOCKSTEST_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define MOCKSTEST_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !MOCKSTEST_NTRACE */ + +#if (MOCKSTEST_NTRACE == 1) +# define MOCKSTEST_TRACE(X) +#else /* (MOCKSTEST_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define MOCKSTEST_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (MOCKSTEST_NTRACE == 1) */ + +#endif /* MOCKSTEST_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/MocksTest/plCommand.In b/CIAO/DAnCE/tests/MocksTest/plCommand.In new file mode 100644 index 00000000000..ca7b0873bab --- /dev/null +++ b/CIAO/DAnCE/tests/MocksTest/plCommand.In @@ -0,0 +1,5 @@ +I +am +the +chatter +quit diff --git a/CIAO/DAnCE/tests/MocksTest/run_test.pl b/CIAO/DAnCE/tests/MocksTest/run_test.pl new file mode 100755 index 00000000000..5ecaae833c6 --- /dev/null +++ b/CIAO/DAnCE/tests/MocksTest/run_test.pl @@ -0,0 +1,97 @@ +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' +& eval 'exec perl -S $0 $argv:q' +if 0; + +# $Id$ +# -*- perl -*- + +use lib "$ENV{'ACE_ROOT'}/bin"; +use PerlACE::Run_Test; + +#delete IOR files +if (-e em.ior) { + unlink "em.ior" +} +if (-e ns.ior) { + unlink "ns.ior" +} + +$ns_status = 0; +$mt_status = 0; +$pl_status = 0; +$em_status = 0; + +if (PerlACE::is_vxworks_test()) { + $ns = new PerlACE::ProcessVX ("$ENV{'ACE_ROOT'}/TAO/orbsvcs/Naming_Service/Naming_Service", "-o ns.ior"); +} +else { + $ns = new PerlACE::Process ("$ENV{'ACE_ROOT'}/TAO/orbsvcs/Naming_Service/Naming_Service", "-o ns.ior"); +} + +$ns_status = $ns->Spawn(); +sleep 10; + +#read NameService IOR +$data_file = "ns.ior"; +open(DAT, $data_file) || die("ERROR: Could not open file!"); +$ior = <DAT>; +close(DAT); + +if (PerlACE::is_vxworks_test()) { + $mt = new PerlACE::ProcessVX ("./MockTest", "-ORBInitRef NameService=file://ns.ior"); +} +else { + $mt = new PerlACE::Process ("./MockTest", "-ORBInitRef NameService=file://ns.ior"); +} + +$mt_status = $mt->Spawn(); +sleep 10; + +if (PerlACE::is_vxworks_test()) { + $em = new PerlACE::ProcessVX ("$ENV{'ACE_ROOT'}/bin/dance", "--log-level 1 -eem.ior --node-mgr MyHost -ORBListenEndpoints iiop://localhost:12345 -ORBInitRef ProcessDestinationNC=file://ns.ior"); + $pl = new PerlACE::ProcessVX ("$ENV{'ACE_ROOT'}/bin/dance", "--log-level 1 -x MockTest.cdp -k file://em.ior"); +} +else { + $em = new PerlACE::Process ("$ENV{'ACE_ROOT'}/bin/dance", "--log-level 1 -eem.ior --node-mgr MyHost -ORBListenEndpoints iiop://localhost:12345 -ORBInitRef ProcessDestinationNC=file://ns.ior"); +#open (OLD_STDIN, "<STDIN"); +#open (STDIN, "") + $pl = new PerlACE::Process ("$ENV{'ACE_ROOT'}/bin/dance", "--log-level 1 -x MockTest.cdp -k file://em.ior"); +} + +$em_status = $em->Spawn(); +sleep 30; +#print STDIN "c\n"; +#open (OLD_STDIN, "<STDIN"); +#open (kid, "|-"); +open (STDIN, "<./plCommand.In"); +$pl_status = $pl->Spawn(); +sleep 10; +#print kid "c\n"; + +#print STDIN "c\n"; +sleep 10; + + +$pl_status = $pl->Kill(); +close (STDIN); +$em_status = $em->Kill(); + +$ns_status = $ns->Kill(); + +$mt_status = $mt->Kill(); + +#delete IOR files +if (-e em.ior) { + unlink "em.ior" +} +if (-e ns.ior) { + unlink "ns.ior" +} + +if ($pl_status != 0) +{ + print "\n ERROR: test returned $pl_status \n"; +} + +exit $pl_status; + diff --git a/CIAO/DAnCE/tests/NameServiceTest/Dummy.idl b/CIAO/DAnCE/tests/NameServiceTest/Dummy.idl new file mode 100644 index 00000000000..1f0edee59cd --- /dev/null +++ b/CIAO/DAnCE/tests/NameServiceTest/Dummy.idl @@ -0,0 +1,14 @@ +// $Id$ + +#ifndef DUMMY_IDL +#define DUMMY_IDL + +module NameServiceTest +{ + interface Dummy { + string sayHello(); + }; +}; + +#endif /* DUMMY_IDL */ + diff --git a/CIAO/DAnCE/tests/NameServiceTest/DummyImpl.cpp b/CIAO/DAnCE/tests/NameServiceTest/DummyImpl.cpp new file mode 100644 index 00000000000..7066f38cbc4 --- /dev/null +++ b/CIAO/DAnCE/tests/NameServiceTest/DummyImpl.cpp @@ -0,0 +1,13 @@ +#include "DummyImpl.h" + +namespace NameServiceTest + { + + char * DummyImpl::sayHello ( + ) + { + return CORBA::string_dup (this->helloSentence); + } + + } // namespace ObjectLocatorTest + diff --git a/CIAO/DAnCE/tests/NameServiceTest/DummyImpl.h b/CIAO/DAnCE/tests/NameServiceTest/DummyImpl.h new file mode 100644 index 00000000000..cca7e1de8f9 --- /dev/null +++ b/CIAO/DAnCE/tests/NameServiceTest/DummyImpl.h @@ -0,0 +1,24 @@ +#ifndef DUMMYIMPL_H_ +#define DUMMYIMPL_H_ + +#include "DummyS.h" + +namespace NameServiceTest + { + + class DummyImpl + : public virtual POA_NameServiceTest::Dummy + { + public: + DummyImpl() : helloSentence ("A dummy hello sentence.") {}; + + virtual char * sayHello ( + ); + + private: + const char * helloSentence; + }; + + } // namespace POA_ObjectLocatorTest + +#endif /*DUMMYIMPL_H_*/ diff --git a/CIAO/DAnCE/tests/NameServiceTest/NameServiceTest.mpc b/CIAO/DAnCE/tests/NameServiceTest/NameServiceTest.mpc new file mode 100644 index 00000000000..091c461d669 --- /dev/null +++ b/CIAO/DAnCE/tests/NameServiceTest/NameServiceTest.mpc @@ -0,0 +1,30 @@ +// $Id$ + +project(*idl): taoidldefaults { + IDL_Files { + Dummy.idl + } + custom_only = 1 +} + +project (*NameServiceTestServer): dance, taoserver, iortable, naming_serv, dance_logger { + after += *idl + IDL_Files { + } + Source_Files { + srv_main.cpp + DummyC.cpp + DummyS.cpp + DummyImpl.cpp + } +} + +project (NameServiceTestClient): dance, taoclient, naming, dance_logger { + after += *idl + IDL_Files { + } + Source_Files { + clt_main.cpp + DummyC.cpp + } +} diff --git a/CIAO/DAnCE/tests/NameServiceTest/RegistrationPath.h b/CIAO/DAnCE/tests/NameServiceTest/RegistrationPath.h new file mode 100644 index 00000000000..6ecf9197ad3 --- /dev/null +++ b/CIAO/DAnCE/tests/NameServiceTest/RegistrationPath.h @@ -0,0 +1,8 @@ +#ifndef REGISTRATIONPATH_H_ +#define REGISTRATIONPATH_H_ + +const char * app_name = "app1"; +const char * inst_name = "inst1"; +const char * port_name = "port1"; + +#endif /*REGISTRATIONPATH_H_*/ diff --git a/CIAO/DAnCE/tests/NameServiceTest/clt_main.cpp b/CIAO/DAnCE/tests/NameServiceTest/clt_main.cpp new file mode 100644 index 00000000000..f25da11c9bd --- /dev/null +++ b/CIAO/DAnCE/tests/NameServiceTest/clt_main.cpp @@ -0,0 +1,85 @@ + +#include "ace/String_Base.h" +#include <orbsvcs/orbsvcs/CosNamingC.h> +#include "DAnCE/Logger/Log_Macros.h" +#include "RegistrationPath.h" +#include "DummyC.h" + +using namespace NameServiceTest; + + +int ACE_TMAIN (int argc, ACE_TCHAR * argv[]) +{ + try + { + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); + + CORBA::Object_var naming_obj = orb->resolve_initial_references ("NameService"); +// CosNaming::NamingContext_var naming = CosNaming::NamingContext::_narrow(naming_obj.in()); +// CosNaming::Name name(1); +// +// name.length(1); +// +// name[0].id = CORBA::string_dup("Dummy"); +// name[0].kind = CORBA::string_dup(""); +// +// CORBA::Object_ptr res_obj = naming->resolve(name); +// if ( CORBA::is_nil(res_obj) ) +// { +// DANCE_ERROR((LM_ERROR, "[%M] Failed to resolve object. The test failed.\n")); +// return 1; +// } +// DANCE_DEBUG((LM_DEBUG, "[%M] resolve object : ok.\n")); +// +// Dummy_var res_dummy_obj = Dummy::_narrow(res_obj); +// if ( CORBA::is_nil(res_dummy_obj) ) +// { +// DANCE_ERROR((LM_ERROR, "[%M] Failed to narrow the resolved object to custom type. The test failed.\n")); +// return 1; +// } +// DANCE_DEBUG((LM_DEBUG, "[%M] resolved object -> dummy : ok.\n")); +// +// DANCE_DEBUG((LM_DEBUG, "[%M] Dummy object returned : %s.", res_dummy_obj->sayHello())); +// DANCE_DEBUG((LM_DEBUG, "[%M] The test succeeded.")); + //glasgow.headquarters.eclipsesp.com:12345 + ACE_CString url = "corbaname:rir:#app1.DeploymentPlan/Dummy"; +// url += app_name; +// url += "/"; +// url += inst_name; +// url += "/"; +// url += port_name; + DANCE_DEBUG((LM_DEBUG, "[%M] URL : %s\n", url.c_str())); + + CORBA::Object_var obj = orb->string_to_object (url.c_str()); + if (CORBA::is_nil (obj)) + { + DANCE_ERROR((LM_ERROR, "[%M] Failed to convert url to object. The test failed.\n")); + return 1; + } + DANCE_DEBUG((LM_DEBUG, "[%M] URL -> object : ok.\n")); + + Dummy_var dummy_obj = Dummy::_narrow (obj); + if (CORBA::is_nil (dummy_obj)) + { + DANCE_ERROR((LM_ERROR, "[%M] Failed to narrow the object to custom type. The test failed.\n")); + return 1; + } + DANCE_DEBUG((LM_DEBUG, "[%M] object -> dummy : ok.\n")); + + DANCE_DEBUG((LM_DEBUG, "[%M] Dummy object returned : %C.", dummy_obj->sayHello())); + DANCE_DEBUG((LM_DEBUG, "[%M] The test succeeded.")); + return 0; + } + catch (const CORBA::Exception & e) + { + DANCE_ERROR((LM_ERROR, "[%M] A CORBA exception \"%s\" (%s) was thrown. The test failed." + , e._name(), e._info().c_str())); + return 1; + } + catch (...) + { + DANCE_ERROR((LM_ERROR, "[%M] An exception was thrown. The test failed.")); + return 1; + } +} + diff --git a/CIAO/DAnCE/tests/NameServiceTest/run_test.pl b/CIAO/DAnCE/tests/NameServiceTest/run_test.pl new file mode 100755 index 00000000000..719974e5c50 --- /dev/null +++ b/CIAO/DAnCE/tests/NameServiceTest/run_test.pl @@ -0,0 +1,73 @@ +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +# $Id$ +# -*- perl -*- + +use lib "$ENV{ACE_ROOT}/bin"; +use PerlACE::TestTarget; + +$status = 0; +$debug_level = '0'; + +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } +} + +my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n"; +my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n"; + +my $iorbase = "server.ior"; +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + +$SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level -o $server_iorfile"); +$CL = $client->CreateProcess ("client", "-k file://$client_iorfile"); +$server_status = $SV->Spawn (); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; + exit 1; +} + +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} + +if ($server->GetFile ($iorbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} +if ($client->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} + +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval()); + +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; + $status = 1; +} + +$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval()); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; + $status = 1; +} + +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + +exit $status; diff --git a/CIAO/DAnCE/tests/NameServiceTest/srv_main.cpp b/CIAO/DAnCE/tests/NameServiceTest/srv_main.cpp new file mode 100644 index 00000000000..74794ce420b --- /dev/null +++ b/CIAO/DAnCE/tests/NameServiceTest/srv_main.cpp @@ -0,0 +1,71 @@ +#include "ace/OS_NS_stdio.h" +#include <orbsvcs/orbsvcs/CosNamingC.h> +#include <orbsvcs/orbsvcs/Naming/Naming_Loader.h> +#include "DAnCE/Logger/Log_Macros.h" + +#include "DummyC.h" +#include "DummyImpl.h" +#include "RegistrationPath.h" + +using namespace NameServiceTest; + +int ACE_TMAIN (int argc, ACE_TCHAR * argv[]) +{ + try + { + int argcm = argc + 2; + char ** argvm = new char* [argcm+1]; + for (int i = 0; i < argc; ++i) + { + argvm[i] = argv[i]; + } + char buf1[32]; + ACE_OS::sprintf (buf1, "-ORBListenEndpoints"); + argvm[argcm-2] = buf1; + char buf2[32]; + ACE_OS::sprintf (buf2, "iiop://:12345"); + argvm[argcm-1] = buf2; + argvm[argcm] = 0; + + CORBA::ORB_var orb = CORBA::ORB_init (argcm, argvm); + + CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA"); + PortableServer::POA_var root_poa = PortableServer::POA::_narrow (obj.in ()); + + PortableServer::POAManager_var poa_manager = root_poa->the_POAManager(); + poa_manager->activate(); + + DummyImpl servant; + + PortableServer::ObjectId_var id = root_poa->activate_object (&servant); + + Dummy_var dummy_obj = Dummy::_narrow (root_poa->id_to_reference (id));//servant._this(); + + TAO_Naming_Loader loader; + + CORBA::Object_var obj_tmp = loader.create_object (orb.in(), argcm, argvm); + CORBA::Object_var naming_obj = orb->resolve_initial_references ("NameService"); + CosNaming::NamingContext_var naming = CosNaming::NamingContext::_narrow (naming_obj.in()); + + CosNaming::Name name (1); + + name.length (1); + + name[0].id = CORBA::string_dup (app_name); + name[0].kind = CORBA::string_dup ("DeploymentPlan"); + + CosNaming::NamingContext_var naming_app = naming->bind_new_context (name); + + name[0].id = CORBA::string_dup ("Dummy"); + name[0].kind = CORBA::string_dup (""); + naming_app->bind (name, dummy_obj.in()); + + orb->run(); + } + catch (...) + { + DANCE_ERROR((LM_ERROR, "[%M] An error has occured.")); + } + return 0; +} + diff --git a/CIAO/DAnCE/tests/NodeApplicationManager-NodeApplication/NodeApplicationManager-NodeApplication.mpc b/CIAO/DAnCE/tests/NodeApplicationManager-NodeApplication/NodeApplicationManager-NodeApplication.mpc new file mode 100644 index 00000000000..5f82007e24e --- /dev/null +++ b/CIAO/DAnCE/tests/NodeApplicationManager-NodeApplication/NodeApplicationManager-NodeApplication.mpc @@ -0,0 +1,8 @@ + +project : dance, dance_deployment_svnt, dance_deployment_stub, dance_node_application_manager, dance_node_application, dance_logger { + exename = NodeApplicationManagerNodeApplicationTest + + Source_Files { + test.cpp + } +} diff --git a/CIAO/DAnCE/tests/NodeApplicationManager-NodeApplication/test.cpp b/CIAO/DAnCE/tests/NodeApplicationManager-NodeApplication/test.cpp new file mode 100644 index 00000000000..727f691b970 --- /dev/null +++ b/CIAO/DAnCE/tests/NodeApplicationManager-NodeApplication/test.cpp @@ -0,0 +1,47 @@ +#include "DAnCE/Deployment/Deployment_NodeManagerC.h" +#include "DAnCE/Deployment/Deployment_NodeApplicationC.h" +#include "DAnCE/Logger/Log_Macros.h" + +int ACE_TMAIN (int argc, ACE_TCHAR * argv[]) +{ + try + { + // Initialize orb + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); + const char * ior = "file://node_manager.ior"; + CORBA::Object_var obj = orb->string_to_object (ior); + if (CORBA::is_nil (obj)) + { + throw 0; + } + + Deployment::NodeManager_var nm = Deployment::NodeManager::_narrow (obj); + if (CORBA::is_nil (nm)) + { + throw 0; + } + + //get NodeApplicationManager + Deployment::DeploymentPlan plan; + Deployment::NodeApplicationManager_var nam; + nam = nm->preparePlan (plan, Deployment::ResourceCommitmentManager::_nil()); + + //call startLaunch + Deployment::Properties dp; + Deployment::Connections_var dc; + Deployment::Application_ptr app = nam->startLaunch (dp, dc.out()); + Deployment::NodeApplication_var na = Deployment::NodeApplication::_narrow (app); + } + catch (const CORBA::Exception &e) + { + e._tao_print_exception ("DAnCE_NodeManager::main\t\n"); + DANCE_ERROR((LM_ERROR, "[%M] Uncaught CORBA exception\n")); + return 1; + } + catch (...) + { + return 1; + } + + return 0; +} diff --git a/CIAO/DAnCE/tests/NodeApplicationTest/NodeAppTest.mpc b/CIAO/DAnCE/tests/NodeApplicationTest/NodeAppTest.mpc deleted file mode 100644 index 2cc04a9a18a..00000000000 --- a/CIAO/DAnCE/tests/NodeApplicationTest/NodeAppTest.mpc +++ /dev/null @@ -1,163 +0,0 @@ -// $Id$ - -project(NodeAppTest_RoundTrip_stub): ciao_client_dnc { - sharedname = NodeAppTest_RoundTrip_stub - after += CIAO_DnC_Server - - idlflags += -Wb,stub_export_macro=NODEAPPTEST_ROUNDTRIP_STUB_Export \ - -Wb,stub_export_include=RoundTrip_stub_export.h \ - -Wb,skel_export_macro=NODEAPPTEST_ROUNDTRIP_SVNT_Export \ - -Wb,skel_export_include=RoundTrip_svnt_export.h - dynamicflags = NODEAPPTEST_ROUNDTRIP_STUB_BUILD_DLL - - IDL_Files { - NodeAppTest_RoundTrip.idl - } - - Source_Files { - NodeAppTest_RoundTripC.cpp - } - - Header_Files { - NodeAppTest_RoundTripC.h - } - - Inline_Files { - NodeAppTest_RoundTripC.inl - } -} - -project(NodeAppTest_RoundTrip_svnt) : ciao_servant_dnc { - after += NodeAppTest_RoundTrip_stub - sharedname = NodeAppTest_RoundTrip_svnt - - libs += NodeAppTest_RoundTrip_stub - idlflags += -Wb,export_macro=NODEAPPTEST_ROUNDTRIP_SVNT_Export \ - -Wb,export_include=RoundTrip_svnt_export.h - dynamicflags = NODEAPPTEST_ROUNDTRIP_SVNT_BUILD_DLL - - CIDL_Files { - NodeAppTest_RoundTrip.cidl - } - - IDL_Files { - NodeAppTest_RoundTripE.idl - } - - Source_Files { - NodeAppTest_RoundTripEC.cpp - NodeAppTest_RoundTripS.cpp - NodeAppTest_RoundTrip_svnt.cpp - } - - Header_Files { - NodeAppTest_RoundTripEC.h - NodeAppTest_RoundTripS.h - NodeAppTest_RoundTrip_svnt.h - } - - Inline_Files { - NodeAppTest_RoundTripEC.inl - NodeAppTest_RoundTripS.inl - } -} - -project(NodeAppTest_RoundTrip_exec) : ciao_component_dnc, ciao_events_dnc, ciao_server_dnc { - after += NodeAppTest_RoundTrip_stub NodeAppTest_RoundTrip_svnt - - sharedname = NodeAppTest_RoundTrip_exec - libs += NodeAppTest_RoundTrip_stub NodeAppTest_RoundTrip_svnt - idlflags += -Wb,export_macro=NODEAPPTEST_ROUNDTRIP_EXEC_Export \ - -Wb,export_include=RoundTrip_exec_export.h - dynamicflags = NODEAPPTEST_ROUNDTRIP_EXEC_BUILD_DLL - - IDL_Files { - } - - Source_Files { - RoundTrip_exec.cpp - } - - Header_Files { - RoundTrip_exec.h - } - - Inline_Files { - } -} - -project (NodeAppTest_client_simple) : ciao_deployment_stub { - after += NodeAppTest_RoundTrip_stub - libs += NodeAppTest_RoundTrip_stub - exename += client_simple - - IDL_Files { - } - - Source_Files { - NodeApp_test_client_simple.cpp - } - - Header_Files { - } - - Inline_Files { - } -} - -project (NodeAppTest_client) : ciao_deployment_stub { - after += NodeAppTest_RoundTrip_stub - libs += NodeAppTest_RoundTrip_stub - exename += client - - IDL_Files { - } - - Source_Files { - NodeApp_test_client.cpp - } - - Header_Files { - } - - Inline_Files { - } -} - -project (NodeAppTest_client_ex) : ciao_deployment_stub { - after += NodeAppTest_RoundTrip_stub - libs += NodeAppTest_RoundTrip_stub - exename += client_ex - - IDL_Files { - } - - Source_Files { - NodeApp_test_client_ex.cpp - } - - Header_Files { - } - - Inline_Files { - } -} - -project (NodeAppTest_client_dynamic) : ciao_deployment_stub { - after += NodeAppTest_RoundTrip_stub - libs += NodeAppTest_RoundTrip_stub - exename += client_dynamic - - IDL_Files { - } - - Source_Files { - NodeApp_test_client_dynamic.cpp - } - - Header_Files { - } - - Inline_Files { - } -} diff --git a/CIAO/DAnCE/tests/NodeApplicationTest/NodeAppTest_RoundTrip.cidl b/CIAO/DAnCE/tests/NodeApplicationTest/NodeAppTest_RoundTrip.cidl deleted file mode 100644 index 3063a673d5a..00000000000 --- a/CIAO/DAnCE/tests/NodeApplicationTest/NodeAppTest_RoundTrip.cidl +++ /dev/null @@ -1,19 +0,0 @@ -// $Id$ - -#ifndef NODEAPPTEST_ROUNDTRIP_CIDL -#define NODEAPPTEST_ROUNDTRIP_CIDL - -#include "NodeAppTest_RoundTrip.idl" - -composition session RoundTrip_Impl -{ - - home executor RoundTripHome_Exec - { - implements NodeAppTest::NodeAppTest_RoundTripHome; - manages RoundTrip_Exec; - }; - -}; - -#endif /* NODEAPPTEST_ROUNDTRIP_CIDL */ diff --git a/CIAO/DAnCE/tests/NodeApplicationTest/NodeAppTest_RoundTrip.idl b/CIAO/DAnCE/tests/NodeApplicationTest/NodeAppTest_RoundTrip.idl deleted file mode 100644 index ca7397916b8..00000000000 --- a/CIAO/DAnCE/tests/NodeApplicationTest/NodeAppTest_RoundTrip.idl +++ /dev/null @@ -1,34 +0,0 @@ -// $Id$ - -//============================================================================= -/** - * @file NodeAppTest_RoundTrip.idl - * - * Definition of the Component that provides the LatencyTest interface - * - */ -//============================================================================= -#ifndef NODEAPP_ROUNDTRIP_IDL -#define NODEAPP_ROUNDTRIP_IDL - -#include <Components.idl> - -module NodeAppTest -{ - interface LatencyTest - { - long cube_long (in long param); - }; - - component NodeAppTest_RoundTrip supports LatencyTest - { - provides LatencyTest facet_1; - provides LatencyTest facet_2; - }; - - home NodeAppTest_RoundTripHome manages NodeAppTest_RoundTrip - { - }; - -}; -#endif /* NODEAPP_ROUNDTRIP_IDL */ diff --git a/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client.cpp b/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client.cpp deleted file mode 100644 index 08950a08b9b..00000000000 --- a/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client.cpp +++ /dev/null @@ -1,254 +0,0 @@ -// $Id$ - -// This test tries to install a set of components in 2 different containers, which -// is hosted in the same NodeApplication. - -#include "DAnCE/Deployment/Deployment_NodeApplicationC.h" -#include "Client_init.h" -#include "NodeAppTest_RoundTripC.h" -#include "ace/Get_Opt.h" -#include <sstream> -#include <vector> -#include <stdlib.h> -#include "assert.h" - -const ACE_TCHAR *ior = ACE_TEXT ("file://test.ior"); -int comp_number = 4; -int counter = 0; - -int parse_args (int argc, ACE_TCHAR *argv[]) -{ - ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("k:n:")); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'k': - ior = get_opts.opt_arg (); - break; - - case 'n': - comp_number = ACE_OS::atoi (get_opts.opt_arg ()); - break; - - case '?': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s \n" - "-k <NodeApplication ior> \n" - "-n <The number of component instances> \n" - "\n", - argv [0]), - -1); - } - // Indicates sucessful parsing of the command line - return 0; -} - -int -ACE_TMAIN(int argc, ACE_TCHAR *argv[]) -{ - std::vector<NodeAppTest::NodeAppTest_RoundTrip_var> comp_list; - //std::vector<NodeAppTest::NodeAppTest_RoundTrip_var>::const_iterator iter; - - try - { - if (parse_args (argc, argv) != 0) - return 1; - - CORBA::ULong comp_num (comp_number); - ACE_DEBUG ((LM_DEBUG, "CompNum: %d\n",comp_num)); - - CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv); - - CIAO::Client_init (orb.in ()); - - CORBA::Object_var tmp = - orb->string_to_object(ior); - - Deployment::NodeApplication_var node_app = - Deployment::NodeApplication::_narrow (tmp.in ()); - - if (CORBA::is_nil (node_app.in ())) - { - ACE_ERROR_RETURN ((LM_DEBUG, - "Nil nodeapplication reference <%s>\n", ior), - 1); - } - - // This is what we will send out of the ContainerImplmentationInfo for the - // first container - - Deployment::ContainerImplementationInfo container_info_1; - CORBA::ULong length_1 = comp_num/2; - container_info_1.impl_infos.length (CORBA::ULong (length_1)); - - CORBA::ULong i; - for (i = 0; i < length_1; ++i) - { - Deployment::ComponentImplementationInfo info; - - std::stringstream tmp; - tmp << "NodeAppTest_RoundTrip:" << counter; - counter = counter + 1; - - // Add the names and entry points of each of the DLLs - info.component_instance_name = - CORBA::string_dup (tmp.str ().c_str ()); - info.executor_dll = CORBA::string_dup ("NodeAppTest_RoundTrip_exec"); - info.executor_entrypt = - CORBA::string_dup ("createRoundTripHome_Impl"); - info.servant_dll = - CORBA::string_dup ("NodeAppTest_RoundTrip_svnt"); - info.servant_entrypt = - CORBA::string_dup ( - "create_NodeAppTest_NodeAppTest_RoundTripHome_Servant" - ); - - //Now add the info into the infos - container_info_1.impl_infos[i] = info; - } - - // For debug purpose. - for (i = 0; i < comp_num/2; ++i) - { - std::stringstream tmp; - tmp << "NodeAppTest_RoundTrip:" << i; - - // Add the names and entry points of each of the DLLs - ACE_DEBUG ((LM_DEBUG, - "The info I will send out: \n\t%s\n\t%s\n\t%s\n\t%s\n\t%s\n", - container_info_1.impl_infos[i].component_instance_name.in (), - container_info_1.impl_infos[i].executor_dll.in (), - container_info_1.impl_infos[i].executor_entrypt.in (), - container_info_1.impl_infos[i].servant_dll.in (), - container_info_1.impl_infos[i].servant_entrypt.in () )); - } - - // This is what we will send out of the ContainerImplmentationInfo for the - // first container - - Deployment::ContainerImplementationInfo container_info_2; - CORBA::ULong length_2 = comp_num - comp_num/2; - container_info_2.impl_infos.length (CORBA::ULong (length_2)); - - for (i = 0; i < length_2; ++i) - { - Deployment::ComponentImplementationInfo info; - - std::stringstream tmp; - tmp << "NodeAppTest_RoundTrip:" << counter; - counter = counter + 1; - - // Add the names and entry points of each of the DLLs - info.component_instance_name = - CORBA::string_dup (tmp.str ().c_str ()); - info.executor_dll = CORBA::string_dup ("NodeAppTest_RoundTrip_exec"); - info.executor_entrypt = - CORBA::string_dup ("createRoundTripHome_Impl"); - info.servant_dll = - CORBA::string_dup ("NodeAppTest_RoundTrip_svnt"); - info.servant_entrypt = - CORBA::string_dup ( - "create_NodeAppTest_NodeAppTest_RoundTripHome_Servant" - ); - - //Now add the info into the infos - container_info_2.impl_infos[i] = info; - } - - // For debug purpose. - for (i = 0; i < length_2; ++i) - { - std::stringstream tmp; - tmp << "NodeAppTest_RoundTrip:" << i; - - // Add the names and entry points of each of the DLLs - ACE_DEBUG ((LM_DEBUG, - "The info I will send out: \n\t%s\n\t%s\n\t%s\n\t%s\n\t%s\n", - container_info_2.impl_infos[i].component_instance_name.in (), - container_info_2.impl_infos[i].executor_dll.in (), - container_info_2.impl_infos[i].executor_entrypt.in (), - container_info_2.impl_infos[i].servant_dll.in (), - container_info_2.impl_infos[i].servant_entrypt.in () )); - } - - // container_info.container_config is not set for now - - ACE_DEBUG ((LM_DEBUG, "Try installing Homes and Components\n")); - - // Create a NodeImplementationInfo sequence - Deployment::NodeImplementationInfo node_info; - node_info.impl_infos.length (2); - node_info.impl_infos[0] = container_info_1; - node_info.impl_infos[1] = container_info_2; - - // Install test component and its home on NodeApplication - Deployment::ComponentInfos_var comp_info = - node_app->install (node_info); - - // store the component refs - for (i = 0; i < comp_num; ++i) - { - comp_list.push_back (NodeAppTest::NodeAppTest_RoundTrip::_narrow - (comp_info[i].component_ref.in ())); - - if (CORBA::is_nil (comp_list[i].in ())) - { - ACE_ERROR_RETURN ((LM_DEBUG, - "Nil RoundTripHome reference: %s \n", - comp_info[i].component_instance_name.in ()), - 1); - } - } - - ACE_DEBUG ((LM_DEBUG, "Installation finished successfully.\n")); - - // Before we can start we have to start. - node_app->start (); - - // Invoke Operation on the components - ACE_DEBUG ((LM_DEBUG, "Try cube_long operation on the Interface \n")); - - for (i = 0; i < comp_num; ++i) - { - - CORBA::Long input = i; - - CORBA::Long output = - (comp_list[i])->cube_long (input); - - if (input*input*input == output) - { - ACE_DEBUG ((LM_DEBUG, - "Return values matched!! on Component: %d \n", - i)); - } - else - { - ACE_DEBUG ((LM_DEBUG, - "Return values did not match: on Component: %d \n", - i)); - ACE_OS::exit (1); - } - } - - ACE_DEBUG ((LM_DEBUG, "Try removing everything\n")); - node_app->remove (); - - ACE_DEBUG ((LM_DEBUG, "Homes and components removed successfully\n")); - - orb->destroy (); - - ACE_DEBUG ((LM_DEBUG, "Test success!!\n")); - } - catch (const CORBA::Exception& ex) - { - ex._tao_print_exception ("Exception caught:"); - return 1; - } - - return 0; -} diff --git a/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_dynamic.cpp b/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_dynamic.cpp deleted file mode 100644 index 4cf7065221c..00000000000 --- a/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_dynamic.cpp +++ /dev/null @@ -1,155 +0,0 @@ -// $Id$ - -#include "DAnCE/Deployment/Deployment_NodeApplicationC.h" -#include "Client_init.h" -#include "NodeAppTest_RoundTripC.h" -#include "ace/Get_Opt.h" -#include "assert.h" - -const ACE_TCHAR *ior = ACE_TEXT ("file://test.ior"); - -int -parse_args (int argc, ACE_TCHAR *argv[]) -{ - ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("k:")); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'k': - ior = get_opts.opt_arg (); - break; - - case '?': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s \n" - "-k <ComponentServer ior> \n" - "\n", - argv [0]), - -1); - } - // Indicates sucessful parsing of the command line - return 0; -} - -int -ACE_TMAIN(int argc, ACE_TCHAR *argv[]) -{ - try - { - CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv); - - if (parse_args (argc, argv) != 0) - return 1; - - CIAO::Client_init (orb.in ()); - - CORBA::Object_var tmp = - orb->string_to_object(ior); - - Deployment::NodeApplication_var node_app = - Deployment::NodeApplication::_narrow(tmp.in ()); - - if (CORBA::is_nil (node_app.in ())) - { - ACE_ERROR_RETURN ((LM_DEBUG, - "Nil nodeapplication reference <%s>\n", - ior), - 1); - } - - - ACE_DEBUG ((LM_DEBUG, "Try installing Home and Component\n")); - - Deployment::ComponentImplementationInfo info; - - // Add the names and entry points of each of the DLLs - info.component_instance_name = - CORBA::string_dup ("NodeAppTest_RoundTrip"); - info.executor_dll = - CORBA::string_dup ("NodeAppTest_RoundTrip_exec"); - info.executor_entrypt = - CORBA::string_dup ("createRoundTripHome_Impl"); - info.servant_dll = - CORBA::string_dup ("NodeAppTest_RoundTrip_svnt"); - info.servant_entrypt = - CORBA::string_dup ( - "create_NodeAppTest_NodeAppTest_RoundTripHome_Servant" - ); - - // Create a ContainerImplementationInfo sequence - Deployment::ContainerImplementationInfo container_info; - container_info.impl_infos.length (1); - container_info.impl_infos[0] = info; - - // Create a NodeImplementationInfo sequence - Deployment::NodeImplementationInfo node_info; - node_info.impl_infos.length (1); - node_info.impl_infos[0] = container_info; - - // Install test component and its home on NodeApplication - Deployment::ComponentInfos_var comp_info = - node_app->install (node_info); - - assert (comp_info->length () == 1); //return 1 component objeref - - const CORBA::ULong i = 0; - Components::CCMObject_var objref = (comp_info[i]).component_ref; - - NodeAppTest::NodeAppTest_RoundTrip_var roundtrip_var = - NodeAppTest::NodeAppTest_RoundTrip::_narrow (objref.in ()); - - if (CORBA::is_nil (roundtrip_var.in ())) - { - ACE_ERROR_RETURN ((LM_DEBUG, - "Nil RoundTrip reference\n"), - 1); - } - - // Invoke Operation on the Interface - ACE_DEBUG ((LM_DEBUG, "Try cube_long operation on the Interface \n")); - CORBA::Long input = 1L; - CORBA::Long output = - roundtrip_var->cube_long (input); - - if (input == output) - ACE_DEBUG ((LM_DEBUG, "Retrun values matched!!\n")); - else - { - ACE_DEBUG ((LM_DEBUG, "Return values did not match: failure\n")); - ACE_OS::exit (1); - } - - // Install another set of components - ACE_DEBUG ((LM_DEBUG, "Try installing another component dynamically\n")); - - // Modifying the component instance name since it must be unique - (node_info.impl_infos[0]).impl_infos[0].component_instance_name = - CORBA::string_dup ("NodeAppTest_RoundTrip_2"); - Deployment::ComponentInfos_var comp_info_new = - node_app->install (node_info); - - assert (comp_info_new->length () == 1); //return 1 component objeref - - ACE_DEBUG ((LM_DEBUG, "Try removing the second component and its home\n")); - node_app->remove_component ("NodeAppTest_RoundTrip"); - ACE_DEBUG ((LM_DEBUG, "Component and Home removed successfully\n")); - - ACE_DEBUG ((LM_DEBUG, "=====Try removing all remaining components and homes\n")); - node_app->remove (); - ACE_DEBUG ((LM_DEBUG, "=====Components and Homes removed successfully\n")); - - orb->destroy (); - ACE_DEBUG ((LM_DEBUG, "=====Test success!!\n")); - } - catch (const CORBA::Exception& ex) - { - ex._tao_print_exception ("Exception caught:"); - return 1; - } - - return 0; -} diff --git a/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_ex.cpp b/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_ex.cpp deleted file mode 100644 index 9207b2886af..00000000000 --- a/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_ex.cpp +++ /dev/null @@ -1,169 +0,0 @@ -// $Id$ - -#include "DAnCE/Deployment/Deployment_NodeApplicationC.h" -#include "ciao/Client_init.h" -#include "NodeAppTest_RoundTripC.h" -#include "ace/Get_Opt.h" -#include "assert.h" - -const ACE_TCHAR *ior = ACE_TEXT ("file://test.ior"); - -int -parse_args (int argc, ACE_TCHAR *argv[]) -{ - ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("k:")); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'k': - ior = get_opts.opt_arg (); - break; - - case '?': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s \n" - "-k <NodeApplication ior> \n" - "\n", - argv [0]), - -1); - } - // Indicates sucessful parsing of the command line - return 0; -} - -int -ACE_TMAIN(int argc, ACE_TCHAR *argv[]) -{ - try - { - CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv); - - if (parse_args (argc, argv) != 0) - return 1; - - CIAO::Client_init (orb.in ()); - - CORBA::Object_var tmp = - orb->string_to_object(ior); - - Deployment::NodeApplication_var node_app = - Deployment::NodeApplication::_narrow(tmp.in ()); - - if (CORBA::is_nil (node_app.in ())) - { - ACE_ERROR_RETURN ((LM_DEBUG, - "Nil NodeApplication reference <%s>\n", - ior), - 1); - } - - - ACE_DEBUG ((LM_DEBUG, "Try installing Home and Component\n")); - - Deployment::ComponentImplementationInfo info; - - // Add the names and entry points of each of the DLLs - info.component_instance_name = - CORBA::string_dup ("NodeAppTest_RoundTrip"); - info.executor_dll = - CORBA::string_dup ("NodeAppTest_RoundTrip_exec"); - info.executor_entrypt = - CORBA::string_dup ("createRoundTripHome_Impl"); - info.servant_dll = - CORBA::string_dup ("NodeAppTest_RoundTrip_svnt"); - info.servant_entrypt = - CORBA::string_dup ( - "create_NodeAppTest_NodeAppTest_RoundTripHome_Servant" - ); - - // Create a ContainerImplementationInfo sequence - Deployment::ContainerImplementationInfo container_info; - container_info.impl_infos.length (1); - container_info.impl_infos[0] = info; - - // Create a NodeImplementationInfo sequence - Deployment::NodeImplementationInfo node_info; - node_info.impl_infos.length (1); - node_info.impl_infos[0] = container_info; - - // Install test component and its home on NodeApplication - Deployment::ComponentInfos_var comp_info = - node_app->install (node_info); - - assert (comp_info->length () == 1); //return 1 component objeref - - CORBA::ULong i = 0; - Components::CCMObject_var objref = (comp_info[i]).component_ref; - - NodeAppTest::NodeAppTest_RoundTrip_var roundtrip_var = - NodeAppTest::NodeAppTest_RoundTrip::_narrow (objref.in ()); - - if (CORBA::is_nil (roundtrip_var.in ())) - { - ACE_ERROR_RETURN ((LM_DEBUG, - "Nil RoundTrip reference\n"), - 1); - } - - // initialize the component - roundtrip_var->ciao_postactivate (); - - //get the provided facets info. - Components::FacetDescriptions_var facets_info = - roundtrip_var->get_all_facets () ; - - if ( facets_info->length () != 2 ) - { - ACE_DEBUG((LM_DEBUG, "Didn't get 2 facet back! but only %d\n", - facets_info->length ())); - return 1; - } - - // Invoke Operation on the Interface - ACE_DEBUG ((LM_DEBUG, "Try cube_long operation on the Interface \n")); - - for (i = 0; i < 2; ++i ) - { - NodeAppTest::LatencyTest_var latency_var - = NodeAppTest::LatencyTest::_narrow ( (facets_info[i]->facet_ref ())); - ACE_DEBUG((LM_DEBUG, "Calling on facet %s\n", (facets_info[i]->name ()))); - - - if ( CORBA::is_nil (latency_var.in ()) ) - { - ACE_DEBUG((LM_DEBUG, "get nil latency ref for facet%d\n", i)); - return 1; - } - - CORBA::Long input = 1L; - CORBA::Long output = - latency_var->cube_long (input); - - if (input == output) - ACE_DEBUG ((LM_DEBUG, "Retrun values matched!!\n")); - else - { - ACE_DEBUG ((LM_DEBUG, "Return values did not match: failure\n")); - ACE_OS::exit (1); - } - } - - ACE_DEBUG ((LM_DEBUG, "Try removing test component and its home\n")); - node_app->remove (); - ACE_DEBUG ((LM_DEBUG, "Component and Home removed successfully\n")); - - orb->destroy (); - ACE_DEBUG ((LM_DEBUG, "Test success!!\n")); - } - catch (const CORBA::Exception& ex) - { - ex._tao_print_exception ("Exception caught:"); - return 1; - } - - return 0; -} diff --git a/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_simple.cpp b/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_simple.cpp deleted file mode 100644 index e29470f3d95..00000000000 --- a/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_simple.cpp +++ /dev/null @@ -1,140 +0,0 @@ -// $Id$ - -#include "DAnCE/Deployment/Deployment_NodeApplicationC.h" -#include "Client_init.h" -#include "NodeAppTest_RoundTripC.h" -#include "ace/Get_Opt.h" -#include "assert.h" - -const ACE_TCHAR *ior = ACE_TEXT ("file://test.ior"); - -int -parse_args (int argc, ACE_TCHAR *argv[]) -{ - ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("k:")); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'k': - ior = get_opts.opt_arg (); - break; - - case '?': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s \n" - "-k <ComponentServer ior> \n" - "\n", - argv [0]), - -1); - } - // Indicates sucessful parsing of the command line - return 0; -} - -int -ACE_TMAIN(int argc, ACE_TCHAR *argv[]) -{ - try - { - CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv); - - if (parse_args (argc, argv) != 0) - return 1; - - CIAO::Client_init (orb.in ()); - - CORBA::Object_var tmp = - orb->string_to_object(ior); - - Deployment::NodeApplication_var node_app = - Deployment::NodeApplication::_narrow(tmp.in ()); - - if (CORBA::is_nil (node_app.in ())) - { - ACE_ERROR_RETURN ((LM_DEBUG, - "Nil nodeapplication reference <%s>\n", - ior), - 1); - } - - - ACE_DEBUG ((LM_DEBUG, "Try installing Home and Component\n")); - - Deployment::ComponentImplementationInfo info; - - // Add the names and entry points of each of the DLLs - info.component_instance_name = - CORBA::string_dup ("NodeAppTest_RoundTrip"); - info.executor_dll = - CORBA::string_dup ("NodeAppTest_RoundTrip_exec"); - info.executor_entrypt = - CORBA::string_dup ("createRoundTripHome_Impl"); - info.servant_dll = - CORBA::string_dup ("NodeAppTest_RoundTrip_svnt"); - info.servant_entrypt = - CORBA::string_dup ( - "create_NodeAppTest_NodeAppTest_RoundTripHome_Servant" - ); - - // Create a ContainerImplementationInfo sequence - Deployment::ContainerImplementationInfo container_info; - container_info.impl_infos.length (1); - container_info.impl_infos[0] = info; - - // Create a NodeImplementationInfo sequence - Deployment::NodeImplementationInfo node_info; - node_info.impl_infos.length (1); - node_info.impl_infos[0] = container_info; - - // Install test component and its home on NodeApplication - Deployment::ComponentInfos_var comp_info = - node_app->install (node_info); - - assert (comp_info->length () == 1); //return 1 component objeref - - const CORBA::ULong i = 0; - Components::CCMObject_var objref = (comp_info[i]).component_ref; - - NodeAppTest::NodeAppTest_RoundTrip_var roundtrip_var = - NodeAppTest::NodeAppTest_RoundTrip::_narrow (objref.in ()); - - if (CORBA::is_nil (roundtrip_var.in ())) - { - ACE_ERROR_RETURN ((LM_DEBUG, - "Nil RoundTrip reference\n"), - 1); - } - - // Invoke Operation on the Interface - ACE_DEBUG ((LM_DEBUG, "Try cube_long operation on the Interface \n")); - CORBA::Long input = 1L; - CORBA::Long output = - roundtrip_var->cube_long (input); - - if (input == output) - ACE_DEBUG ((LM_DEBUG, "Retrun values matched!!\n")); - else - { - ACE_DEBUG ((LM_DEBUG, "Return values did not match: failure\n")); - ACE_OS::exit (1); - } - - ACE_DEBUG ((LM_DEBUG, "Try removing test component and its home\n")); - node_app->remove (); - ACE_DEBUG ((LM_DEBUG, "Component and Home removed successfully\n")); - - orb->destroy (); - ACE_DEBUG ((LM_DEBUG, "Test success!!\n")); - } - catch (const CORBA::Exception& ex) - { - ex._tao_print_exception ("Exception caught:"); - return 1; - } - - return 0; -} diff --git a/CIAO/DAnCE/tests/NodeApplicationTest/README b/CIAO/DAnCE/tests/NodeApplicationTest/README deleted file mode 100644 index ea8fc438089..00000000000 --- a/CIAO/DAnCE/tests/NodeApplicationTest/README +++ /dev/null @@ -1,12 +0,0 @@ -$Id$ -This directory contains the basic testing program for NodeApplication. - -client_simple: Test the basic home installation and component creation. - -client: Test the installation of several homes and components. - In this test I use the more convenient method provided - by the NodeApplication to insall multiple components. Aslo - a remove method is called to easily remove all homes and components. - -client_ex: Test the get_all_facet methods provided in the servant of the - component. diff --git a/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_exec.cpp b/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_exec.cpp deleted file mode 100644 index 044e6acc8af..00000000000 --- a/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_exec.cpp +++ /dev/null @@ -1,131 +0,0 @@ -// $Id$ - -#include "RoundTrip_exec.h" -#include "CIAO_common.h" - -//-- ACE Scheduling Params -#include "ace/OS_NS_errno.h" - -//================================================================= - -namespace CIDL_RoundTrip_Impl -{ - RoundTrip_exec_i::RoundTrip_exec_i () - { - - } - - RoundTrip_exec_i::~RoundTrip_exec_i () - { - } - - NodeAppTest::CCM_LatencyTest_ptr - RoundTrip_exec_i::get_facet_1 () - { - return new LatencyTest_Impl; - } - - NodeAppTest::CCM_LatencyTest_ptr - RoundTrip_exec_i::get_facet_2 () - { - return new LatencyTest_Impl; - } - - CORBA::Long - RoundTrip_exec_i::cube_long (CORBA::Long data) - { - return data * data * data; - } - - // Operations from Components::SessionComponent - void - RoundTrip_exec_i::set_session_context (Components::SessionContext_ptr) - { - if (CIAO::debug_level () > 0) - { - ACE_DEBUG ((LM_DEBUG, - "RoundTrip_exec_i::set_session_context\n")); - } - } - - void - RoundTrip_exec_i::ccm_activate () - { - if (CIAO::debug_level () > 0) - { - ACE_DEBUG ((LM_DEBUG, "RoundTrip_exec_i::ccm_activate\n")); - } - - } - - void - RoundTrip_exec_i::ccm_passivate () - { - if (CIAO::debug_level () > 0) - { - ACE_DEBUG ((LM_DEBUG, "RoundTrip_exec_i::ccm_passivate\n")); - } - } - - void - RoundTrip_exec_i::ccm_remove () - { - if (CIAO::debug_level () > 0) - { - ACE_DEBUG ((LM_DEBUG, "RoundTrip_exec_i::ccm_remove\n")); - } - } - - void - RoundTrip_exec_i::ciao_preactivate () - { - if (CIAO::debug_level () > 0) - { - ACE_DEBUG ((LM_DEBUG, "RoundTrip_exec_i::ciao_preactivate\n")); - } - - } - - void - RoundTrip_exec_i::ciao_postactivate () - { - if (CIAO::debug_level () > 0) - { - ACE_DEBUG ((LM_DEBUG, "RoundTrip_exec_i::ciao_postactivate\n")); - } - } - - RoundTripHome_exec_i::RoundTripHome_exec_i () - { - } - - RoundTripHome_exec_i::~RoundTripHome_exec_i () - { - } - - ::Components::EnterpriseComponent_ptr - RoundTripHome_exec_i::create () - { - return new RoundTrip_exec_i; - } - - // Implementation for the probided inferface. - CORBA::Long - LatencyTest_Impl::cube_long (CORBA::Long data) - { - return data*data*data; - } - - extern "C" NODEAPPTEST_ROUNDTRIP_EXEC_Export - ::Components::HomeExecutorBase_ptr - createRoundTripHome_Impl (void) - { - if (CIAO::debug_level () > 0) - { - ACE_DEBUG ((LM_DEBUG, "Creating Round_trip impl\n")); - } - - return new RoundTripHome_exec_i (); - } -} - diff --git a/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_exec.h b/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_exec.h deleted file mode 100644 index d3ac7acd995..00000000000 --- a/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_exec.h +++ /dev/null @@ -1,129 +0,0 @@ -// -*- C++ -*- - -//============================================================ -/** - * @file RoundTrip_exec.h - * - * $Id$ - * - * Header file for the Executor implementation. - * - * @author Arvind S. Krishna <arvindk@dre.vanderbilt.edu> - */ -//============================================================ - -#ifndef NODEAPP_ROUNDTRIP_EXEC_H -#define NODEAPP_ROUNDTRIP_EXEC_H - -#include "NodeAppTest_RoundTripEC.h" -#include "RoundTrip_exec_export.h" -#include "tao/LocalObject.h" - -namespace CIDL_RoundTrip_Impl -{ - - /** - * @class RoundTrip_exec_i - * - * RoundTrip executor implementation class. - */ - class NODEAPPTEST_ROUNDTRIP_EXEC_Export RoundTrip_exec_i - : public virtual NodeAppTest::LatencyTest, - public virtual RoundTrip_Exec, - public virtual ::CORBA::LocalObject - { - - public: - /// Default constructor. - RoundTrip_exec_i (); - - /// Operation to test the data - virtual CORBA::Long cube_long (CORBA::Long data); - - /* - virtual ::NodeAppTest::CCM_LatencyTest* - get_latency (); - */ - - NodeAppTest::CCM_LatencyTest_ptr get_facet_1(); - - - NodeAppTest::CCM_LatencyTest_ptr - get_facet_2(); - - // Operations from Components::SessionComponent - virtual void set_session_context (Components::SessionContext_ptr ctx); - - virtual void ccm_activate (); - - virtual void ccm_passivate (); - - virtual void ccm_remove (); - - /// Helper function to be called back by timeout_Handler - void pulse (void); - - // CIAO defined methods - virtual void ciao_preactivate (); - - virtual void ciao_postactivate (); - - protected: - - /// Destructor. - /** - * Protected destructor to enforce proper memory management - * through the reference counting mechanism. - */ - ~RoundTrip_exec_i (); - - }; - - // - // - // - class LatencyTest_Impl : public virtual NodeAppTest::CCM_LatencyTest, - public virtual ::CORBA::LocalObject - { - public: - LatencyTest_Impl () - { - } - - virtual CORBA::Long cube_long (CORBA::Long data); - }; - - /** - * @class RoundTripHome_exec_i - * - * RoundTrip home executor implementation class. - */ - class NODEAPPTEST_ROUNDTRIP_EXEC_Export RoundTripHome_exec_i : - public virtual RoundTripHome_Exec, - public virtual ::CORBA::LocalObject - { - public: - /// Default ctor. - RoundTripHome_exec_i (); - - // Implicit home operations. - - virtual ::Components::EnterpriseComponent_ptr - create (); - - protected: - - /// Destructor. - /** - * Protected destructor to enforce proper memory management - * through the reference counting mechanism. - */ - ~RoundTripHome_exec_i (); - - }; - - extern "C" NODEAPPTEST_ROUNDTRIP_EXEC_Export - ::Components::HomeExecutorBase_ptr createRoundTripHome_Impl (void); -} - -#endif /* NODEAPP_ROUNDTRIPGEN_EXEC_H */ diff --git a/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_exec_export.h b/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_exec_export.h deleted file mode 100644 index 30f8c3b38d9..00000000000 --- a/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_exec_export.h +++ /dev/null @@ -1,58 +0,0 @@ - -// -*- C++ -*- -// $Id$ -// Definition for Win32 Export directives. -// This file is generated automatically by generate_export_file.pl NODEAPPTEST_ROUNDTRIP_EXEC -// ------------------------------ -#ifndef NODEAPPTEST_ROUNDTRIP_EXEC_EXPORT_H -#define NODEAPPTEST_ROUNDTRIP_EXEC_EXPORT_H - -#include "ace/config-all.h" - -#if defined (ACE_AS_STATIC_LIBS) && !defined (NODEAPPTEST_ROUNDTRIP_EXEC_HAS_DLL) -# define NODEAPPTEST_ROUNDTRIP_EXEC_HAS_DLL 0 -#endif /* ACE_AS_STATIC_LIBS && NODEAPPTEST_ROUNDTRIP_EXEC_HAS_DLL */ - -#if !defined (NODEAPPTEST_ROUNDTRIP_EXEC_HAS_DLL) -# define NODEAPPTEST_ROUNDTRIP_EXEC_HAS_DLL 1 -#endif /* ! NODEAPPTEST_ROUNDTRIP_EXEC_HAS_DLL */ - -#if defined (NODEAPPTEST_ROUNDTRIP_EXEC_HAS_DLL) && (NODEAPPTEST_ROUNDTRIP_EXEC_HAS_DLL == 1) -# if defined (NODEAPPTEST_ROUNDTRIP_EXEC_BUILD_DLL) -# define NODEAPPTEST_ROUNDTRIP_EXEC_Export ACE_Proper_Export_Flag -# define NODEAPPTEST_ROUNDTRIP_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# define NODEAPPTEST_ROUNDTRIP_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# else /* NODEAPPTEST_ROUNDTRIP_EXEC_BUILD_DLL */ -# define NODEAPPTEST_ROUNDTRIP_EXEC_Export ACE_Proper_Import_Flag -# define NODEAPPTEST_ROUNDTRIP_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# define NODEAPPTEST_ROUNDTRIP_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* NODEAPPTEST_ROUNDTRIP_EXEC_BUILD_DLL */ -#else /* NODEAPPTEST_ROUNDTRIP_EXEC_HAS_DLL == 1 */ -# define NODEAPPTEST_ROUNDTRIP_EXEC_Export -# define NODEAPPTEST_ROUNDTRIP_EXEC_SINGLETON_DECLARATION(T) -# define NODEAPPTEST_ROUNDTRIP_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -#endif /* NODEAPPTEST_ROUNDTRIP_EXEC_HAS_DLL == 1 */ - -// Set NODEAPPTEST_ROUNDTRIP_EXEC_NTRACE = 0 to turn on library specific tracing even if -// tracing is turned off for ACE. -#if !defined (NODEAPPTEST_ROUNDTRIP_EXEC_NTRACE) -# if (ACE_NTRACE == 1) -# define NODEAPPTEST_ROUNDTRIP_EXEC_NTRACE 1 -# else /* (ACE_NTRACE == 1) */ -# define NODEAPPTEST_ROUNDTRIP_EXEC_NTRACE 0 -# endif /* (ACE_NTRACE == 1) */ -#endif /* !NODEAPPTEST_ROUNDTRIP_EXEC_NTRACE */ - -#if (NODEAPPTEST_ROUNDTRIP_EXEC_NTRACE == 1) -# define NODEAPPTEST_ROUNDTRIP_EXEC_TRACE(X) -#else /* (NODEAPPTEST_ROUNDTRIP_EXEC_NTRACE == 1) */ -# if !defined (ACE_HAS_TRACE) -# define ACE_HAS_TRACE -# endif /* ACE_HAS_TRACE */ -# define NODEAPPTEST_ROUNDTRIP_EXEC_TRACE(X) ACE_TRACE_IMPL(X) -# include "ace/Trace.h" -#endif /* (NODEAPPTEST_ROUNDTRIP_EXEC_NTRACE == 1) */ - -#endif /* NODEAPPTEST_ROUNDTRIP_EXEC_EXPORT_H */ - -// End of auto generated file. diff --git a/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_stub_export.h b/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_stub_export.h deleted file mode 100644 index 1ad37f8e51e..00000000000 --- a/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_stub_export.h +++ /dev/null @@ -1,58 +0,0 @@ - -// -*- C++ -*- -// $Id$ -// Definition for Win32 Export directives. -// This file is generated automatically by generate_export_file.pl NODEAPPTEST_ROUNDTRIP_STUB -// ------------------------------ -#ifndef NODEAPPTEST_ROUNDTRIP_STUB_EXPORT_H -#define NODEAPPTEST_ROUNDTRIP_STUB_EXPORT_H - -#include "ace/config-all.h" - -#if defined (ACE_AS_STATIC_LIBS) && !defined (NODEAPPTEST_ROUNDTRIP_STUB_HAS_DLL) -# define NODEAPPTEST_ROUNDTRIP_STUB_HAS_DLL 0 -#endif /* ACE_AS_STATIC_LIBS && NODEAPPTEST_ROUNDTRIP_STUB_HAS_DLL */ - -#if !defined (NODEAPPTEST_ROUNDTRIP_STUB_HAS_DLL) -# define NODEAPPTEST_ROUNDTRIP_STUB_HAS_DLL 1 -#endif /* ! NODEAPPTEST_ROUNDTRIP_STUB_HAS_DLL */ - -#if defined (NODEAPPTEST_ROUNDTRIP_STUB_HAS_DLL) && (NODEAPPTEST_ROUNDTRIP_STUB_HAS_DLL == 1) -# if defined (NODEAPPTEST_ROUNDTRIP_STUB_BUILD_DLL) -# define NODEAPPTEST_ROUNDTRIP_STUB_Export ACE_Proper_Export_Flag -# define NODEAPPTEST_ROUNDTRIP_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# define NODEAPPTEST_ROUNDTRIP_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# else /* NODEAPPTEST_ROUNDTRIP_STUB_BUILD_DLL */ -# define NODEAPPTEST_ROUNDTRIP_STUB_Export ACE_Proper_Import_Flag -# define NODEAPPTEST_ROUNDTRIP_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# define NODEAPPTEST_ROUNDTRIP_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* NODEAPPTEST_ROUNDTRIP_STUB_BUILD_DLL */ -#else /* NODEAPPTEST_ROUNDTRIP_STUB_HAS_DLL == 1 */ -# define NODEAPPTEST_ROUNDTRIP_STUB_Export -# define NODEAPPTEST_ROUNDTRIP_STUB_SINGLETON_DECLARATION(T) -# define NODEAPPTEST_ROUNDTRIP_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -#endif /* NODEAPPTEST_ROUNDTRIP_STUB_HAS_DLL == 1 */ - -// Set NODEAPPTEST_ROUNDTRIP_STUB_NTRACE = 0 to turn on library specific tracing even if -// tracing is turned off for ACE. -#if !defined (NODEAPPTEST_ROUNDTRIP_STUB_NTRACE) -# if (ACE_NTRACE == 1) -# define NODEAPPTEST_ROUNDTRIP_STUB_NTRACE 1 -# else /* (ACE_NTRACE == 1) */ -# define NODEAPPTEST_ROUNDTRIP_STUB_NTRACE 0 -# endif /* (ACE_NTRACE == 1) */ -#endif /* !NODEAPPTEST_ROUNDTRIP_STUB_NTRACE */ - -#if (NODEAPPTEST_ROUNDTRIP_STUB_NTRACE == 1) -# define NODEAPPTEST_ROUNDTRIP_STUB_TRACE(X) -#else /* (NODEAPPTEST_ROUNDTRIP_STUB_NTRACE == 1) */ -# if !defined (ACE_HAS_TRACE) -# define ACE_HAS_TRACE -# endif /* ACE_HAS_TRACE */ -# define NODEAPPTEST_ROUNDTRIP_STUB_TRACE(X) ACE_TRACE_IMPL(X) -# include "ace/Trace.h" -#endif /* (NODEAPPTEST_ROUNDTRIP_STUB_NTRACE == 1) */ - -#endif /* NODEAPPTEST_ROUNDTRIP_STUB_EXPORT_H */ - -// End of auto generated file. diff --git a/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_svnt_export.h b/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_svnt_export.h deleted file mode 100644 index 96b74f356bb..00000000000 --- a/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_svnt_export.h +++ /dev/null @@ -1,58 +0,0 @@ - -// -*- C++ -*- -// $Id$ -// Definition for Win32 Export directives. -// This file is generated automatically by generate_export_file.pl NODEAPPTEST_ROUNDTRIP_SVNT -// ------------------------------ -#ifndef NODEAPPTEST_ROUNDTRIP_SVNT_EXPORT_H -#define NODEAPPTEST_ROUNDTRIP_SVNT_EXPORT_H - -#include "ace/config-all.h" - -#if defined (ACE_AS_STATIC_LIBS) && !defined (NODEAPPTEST_ROUNDTRIP_SVNT_HAS_DLL) -# define NODEAPPTEST_ROUNDTRIP_SVNT_HAS_DLL 0 -#endif /* ACE_AS_STATIC_LIBS && NODEAPPTEST_ROUNDTRIP_SVNT_HAS_DLL */ - -#if !defined (NODEAPPTEST_ROUNDTRIP_SVNT_HAS_DLL) -# define NODEAPPTEST_ROUNDTRIP_SVNT_HAS_DLL 1 -#endif /* ! NODEAPPTEST_ROUNDTRIP_SVNT_HAS_DLL */ - -#if defined (NODEAPPTEST_ROUNDTRIP_SVNT_HAS_DLL) && (NODEAPPTEST_ROUNDTRIP_SVNT_HAS_DLL == 1) -# if defined (NODEAPPTEST_ROUNDTRIP_SVNT_BUILD_DLL) -# define NODEAPPTEST_ROUNDTRIP_SVNT_Export ACE_Proper_Export_Flag -# define NODEAPPTEST_ROUNDTRIP_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# define NODEAPPTEST_ROUNDTRIP_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# else /* NODEAPPTEST_ROUNDTRIP_SVNT_BUILD_DLL */ -# define NODEAPPTEST_ROUNDTRIP_SVNT_Export ACE_Proper_Import_Flag -# define NODEAPPTEST_ROUNDTRIP_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# define NODEAPPTEST_ROUNDTRIP_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* NODEAPPTEST_ROUNDTRIP_SVNT_BUILD_DLL */ -#else /* NODEAPPTEST_ROUNDTRIP_SVNT_HAS_DLL == 1 */ -# define NODEAPPTEST_ROUNDTRIP_SVNT_Export -# define NODEAPPTEST_ROUNDTRIP_SVNT_SINGLETON_DECLARATION(T) -# define NODEAPPTEST_ROUNDTRIP_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -#endif /* NODEAPPTEST_ROUNDTRIP_SVNT_HAS_DLL == 1 */ - -// Set NODEAPPTEST_ROUNDTRIP_SVNT_NTRACE = 0 to turn on library specific tracing even if -// tracing is turned off for ACE. -#if !defined (NODEAPPTEST_ROUNDTRIP_SVNT_NTRACE) -# if (ACE_NTRACE == 1) -# define NODEAPPTEST_ROUNDTRIP_SVNT_NTRACE 1 -# else /* (ACE_NTRACE == 1) */ -# define NODEAPPTEST_ROUNDTRIP_SVNT_NTRACE 0 -# endif /* (ACE_NTRACE == 1) */ -#endif /* !NODEAPPTEST_ROUNDTRIP_SVNT_NTRACE */ - -#if (NODEAPPTEST_ROUNDTRIP_SVNT_NTRACE == 1) -# define NODEAPPTEST_ROUNDTRIP_SVNT_TRACE(X) -#else /* (NODEAPPTEST_ROUNDTRIP_SVNT_NTRACE == 1) */ -# if !defined (ACE_HAS_TRACE) -# define ACE_HAS_TRACE -# endif /* ACE_HAS_TRACE */ -# define NODEAPPTEST_ROUNDTRIP_SVNT_TRACE(X) ACE_TRACE_IMPL(X) -# include "ace/Trace.h" -#endif /* (NODEAPPTEST_ROUNDTRIP_SVNT_NTRACE == 1) */ - -#endif /* NODEAPPTEST_ROUNDTRIP_SVNT_EXPORT_H */ - -// End of auto generated file. diff --git a/CIAO/DAnCE/tests/NodeApplicationTest/run_test.pl b/CIAO/DAnCE/tests/NodeApplicationTest/run_test.pl deleted file mode 100755 index 65e97232ac6..00000000000 --- a/CIAO/DAnCE/tests/NodeApplicationTest/run_test.pl +++ /dev/null @@ -1,47 +0,0 @@ -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -# $Id$ -# -*- perl -*- - -use lib "$ENV{'ACE_ROOT'}/bin"; -use PerlACE::Run_Test; - -$status = 0; -$iorfile = PerlACE::LocalFile ("test.ior"); - -for ($iter = 0; $iter <= $#ARGV; $iter++) { - if ($ARGV[$iter] eq "-h" || $ARGV[$iter] eq "-?") { - print "Run_Test Perl script for NodeApplicationTest \n\n"; - print "run_test \n"; - print "\n"; - print "-h -- prints this information\n"; - exit 0; - } -} - - -unlink $iorfile; -$CIAO_ROOT=$ENV{'CIAO_ROOT'}; - -$SV = new PerlACE::Process ("$CIAO_ROOT/bin/NodeApplication", - "-n -o $iorfile"); - -$CL = new PerlACE::Process ("client", - "-k file://$iorfile -n 4"); - -$SV->Spawn (); - -if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; - $SV->Kill (); - exit 1; -} - -$CL->SpawnWaitKill (30); -$status = $SV->Kill (); $SV->TimedWait (1); - -unlink $iorfile; - -exit $status; diff --git a/CIAO/DAnCE/tests/NodeApplicationTest/run_test_ex.pl b/CIAO/DAnCE/tests/NodeApplicationTest/run_test_ex.pl deleted file mode 100755 index 6a39f451377..00000000000 --- a/CIAO/DAnCE/tests/NodeApplicationTest/run_test_ex.pl +++ /dev/null @@ -1,47 +0,0 @@ -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -# $Id$ -# -*- perl -*- - -use lib "$ENV{'ACE_ROOT'}/bin"; -use PerlACE::Run_Test; - -$status = 0; -$iorfile = PerlACE::LocalFile ("test.ior"); - -for ($iter = 0; $iter <= $#ARGV; $iter++) { - if ($ARGV[$iter] eq "-h" || $ARGV[$iter] eq "-?") { - print "Run_Test Perl script for NodeApplicationTest \n\n"; - print "run_test \n"; - print "\n"; - print "-h -- prints this information\n"; - exit 0; - } -} - - -unlink $iorfile; -$CIAO_ROOT=$ENV{'CIAO_ROOT'}; - -$SV = new PerlACE::Process ("$CIAO_ROOT/bin/NodeApplication", - "-n -o $iorfile"); - -$CL = new PerlACE::Process ("client_ex", - "-k file://$iorfile"); - -$SV->Spawn (); - -if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; - $SV->Kill (); - exit 1; -} - -$CL->SpawnWaitKill (30); -$status = $SV->Kill (); $SV->TimedWait (1); - -unlink $iorfile; - -exit $status; diff --git a/CIAO/DAnCE/tests/NodeApplicationTest/run_test_simple.pl b/CIAO/DAnCE/tests/NodeApplicationTest/run_test_simple.pl deleted file mode 100755 index 4d2a1c9df9d..00000000000 --- a/CIAO/DAnCE/tests/NodeApplicationTest/run_test_simple.pl +++ /dev/null @@ -1,47 +0,0 @@ -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -# $Id$ -# -*- perl -*- - -use lib "$ENV{'ACE_ROOT'}/bin"; -use PerlACE::Run_Test; - -$status = 0; -$iorfile = PerlACE::LocalFile ("test.ior"); - -for ($iter = 0; $iter <= $#ARGV; $iter++) { - if ($ARGV[$iter] eq "-h" || $ARGV[$iter] eq "-?") { - print "Run_Test Perl script for NodeApplicationTest \n\n"; - print "run_test \n"; - print "\n"; - print "-h -- prints this information\n"; - exit 0; - } -} - - -unlink $iorfile; -$CIAO_ROOT=$ENV{'CIAO_ROOT'}; - -$SV = new PerlACE::Process ("$CIAO_ROOT/bin/NodeApplication", - "-n -o $iorfile"); - -$CL = new PerlACE::Process ("client_simple", - "-k file://$iorfile "); - -$SV->Spawn (); - -if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; - $SV->Kill (); - exit 1; -} - -$CL->SpawnWaitKill (10); -$status = $SV->Kill (); $SV->TimedWait (1); - -unlink $iorfile; - -exit $status; diff --git a/CIAO/DAnCE/tests/NodeManager-NodeApplicationManager/NodeManager-NodeApplicationManager.mpc b/CIAO/DAnCE/tests/NodeManager-NodeApplicationManager/NodeManager-NodeApplicationManager.mpc new file mode 100644 index 00000000000..5864a4df895 --- /dev/null +++ b/CIAO/DAnCE/tests/NodeManager-NodeApplicationManager/NodeManager-NodeApplicationManager.mpc @@ -0,0 +1,8 @@ + +project : dance_exe, dance_deployment_svnt, dance_deployment_stub, dance_node_application_manager, dance_node_application, dance_logger { + exename = NodeManagerNodeApplicationManagerTest + + Source_Files { + test.cpp + } +} diff --git a/CIAO/DAnCE/tests/NodeManager-NodeApplicationManager/test.cpp b/CIAO/DAnCE/tests/NodeManager-NodeApplicationManager/test.cpp new file mode 100644 index 00000000000..2b60ad8bb9a --- /dev/null +++ b/CIAO/DAnCE/tests/NodeManager-NodeApplicationManager/test.cpp @@ -0,0 +1,41 @@ +#include "DAnCE/Deployment/Deployment_NodeManagerC.h" +#include "DAnCE/Logger/Log_Macros.h" + +int ACE_TMAIN (int argc, ACE_TCHAR * argv[]) +{ + try + { + // Initialize orb + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); + const char * ior = "file://node_manager.ior"; + CORBA::Object_var obj = orb->string_to_object (ior); + if (CORBA::is_nil (obj)) + { + throw 0; + } + + Deployment::NodeManager_var nm = Deployment::NodeManager::_narrow (obj); + if (CORBA::is_nil (nm)) + { + throw 0; + } + + Deployment::DeploymentPlan plan; + Deployment::NodeApplicationManager_ptr nam_ptr = nm->preparePlan (plan, Deployment::ResourceCommitmentManager::_nil()); + DANCE_DEBUG((LM_DEBUG, "[%M] Plan prepared\n")); + + nm->destroyManager (nam_ptr); + DANCE_DEBUG((LM_DEBUG, "[%M] NodeApplicationManager object destroyed\n")); + } + catch (const CORBA::Exception &) + { + DANCE_ERROR((LM_ERROR, "[%M] Uncaught CORBA exception\n")); + return 1; + } + catch (...) + { + return 1; + } + + return 0; +} diff --git a/CIAO/DAnCE/tests/ObjectLocatorTest/Dummy.idl b/CIAO/DAnCE/tests/ObjectLocatorTest/Dummy.idl new file mode 100644 index 00000000000..b91938cb4df --- /dev/null +++ b/CIAO/DAnCE/tests/ObjectLocatorTest/Dummy.idl @@ -0,0 +1,13 @@ +// $Id$ +#ifndef DUMMY_IDL +#define DUMMY_IDL + +module ObjectLocatorTest +{ + interface Dummy { + string sayHello(); + }; +}; + +#endif /* DUMMY_IDL */ + diff --git a/CIAO/DAnCE/tests/ObjectLocatorTest/DummyImpl.cpp b/CIAO/DAnCE/tests/ObjectLocatorTest/DummyImpl.cpp new file mode 100644 index 00000000000..a84441fe146 --- /dev/null +++ b/CIAO/DAnCE/tests/ObjectLocatorTest/DummyImpl.cpp @@ -0,0 +1,13 @@ +#include "DummyImpl.h" + +namespace ObjectLocatorTest + { + + char * DummyImpl::sayHello ( + ) + { + return CORBA::string_dup (this->helloSentence); + } + + } // namespace ObjectLocatorTest + diff --git a/CIAO/DAnCE/tests/ObjectLocatorTest/DummyImpl.h b/CIAO/DAnCE/tests/ObjectLocatorTest/DummyImpl.h new file mode 100644 index 00000000000..83671cbf84e --- /dev/null +++ b/CIAO/DAnCE/tests/ObjectLocatorTest/DummyImpl.h @@ -0,0 +1,24 @@ +#ifndef DUMMYIMPL_H_ +#define DUMMYIMPL_H_ + +#include "DummyS.h" + +namespace ObjectLocatorTest + { + + class DummyImpl + : public virtual POA_ObjectLocatorTest::Dummy + { + public: + DummyImpl() : helloSentence ("A dummy hello sentence.") {}; + + virtual char * sayHello ( + ); + + private: + const char * helloSentence; + }; + + } // namespace POA_ObjectLocatorTest + +#endif /*DUMMYIMPL_H_*/ diff --git a/CIAO/DAnCE/tests/ObjectLocatorTest/ObjectLocatorTest.mpc b/CIAO/DAnCE/tests/ObjectLocatorTest/ObjectLocatorTest.mpc new file mode 100644 index 00000000000..caf05417148 --- /dev/null +++ b/CIAO/DAnCE/tests/ObjectLocatorTest/ObjectLocatorTest.mpc @@ -0,0 +1,27 @@ + +project (ObjectLocatorTestServer): dance, taoserver, iortable, dance_redirection_service, dance_logger { + exename = ObjectLocatorTestServer + + IDL_Files { + Dummy.idl + } + + Source_Files { + srv_main.cpp + DummyC.cpp + DummyS.cpp + DummyImpl.cpp + } +} + +project (ObjectLocatorTestClient): dance, taoclient, anytypecode, dance_logger { + + after += ObjectLocatorTestServer + exename = ObjectLocatorTestClient + + Source_Files { + clt_main.cpp + DummyC.cpp + DummyS.cpp + } +} diff --git a/CIAO/DAnCE/tests/ObjectLocatorTest/RegistrationPath.h b/CIAO/DAnCE/tests/ObjectLocatorTest/RegistrationPath.h new file mode 100644 index 00000000000..6ecf9197ad3 --- /dev/null +++ b/CIAO/DAnCE/tests/ObjectLocatorTest/RegistrationPath.h @@ -0,0 +1,8 @@ +#ifndef REGISTRATIONPATH_H_ +#define REGISTRATIONPATH_H_ + +const char * app_name = "app1"; +const char * inst_name = "inst1"; +const char * port_name = "port1"; + +#endif /*REGISTRATIONPATH_H_*/ diff --git a/CIAO/DAnCE/tests/ObjectLocatorTest/clt_main.cpp b/CIAO/DAnCE/tests/ObjectLocatorTest/clt_main.cpp new file mode 100644 index 00000000000..361d70dbc00 --- /dev/null +++ b/CIAO/DAnCE/tests/ObjectLocatorTest/clt_main.cpp @@ -0,0 +1,56 @@ + +#include "ace/String_Base.h" +#include "DAnCE/Logger/Log_Macros.h" +#include "RegistrationPath.h" +#include "DummyC.h" + +using namespace ObjectLocatorTest; + + +int ACE_TMAIN (int argc, ACE_TCHAR * argv[]) +{ + try + { + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); + + ACE_CString url = "corbaloc:iiop:glasgow.headquarters.eclipsesp.com:12345/"; + url += app_name; + url += "/"; + url += inst_name; + url += "/"; + url += port_name; + DANCE_DEBUG((LM_DEBUG, "[%M] URL : %s\n", url.c_str())); + + CORBA::Object_var obj = orb->string_to_object (url.c_str()); + if (CORBA::is_nil (obj)) + { + DANCE_ERROR((LM_ERROR, "[%M] Failed to convert url to object. The test failed.\n")); + return 1; + } + DANCE_DEBUG((LM_DEBUG, "[%M] URL -> object : ok.\n")); + + Dummy_var dummy_obj = Dummy::_narrow (obj); + if (CORBA::is_nil (dummy_obj)) + { + DANCE_ERROR((LM_ERROR, "[%M] Failed to narrow the object to custom type. The test failed.\n")); + return 1; + } + DANCE_DEBUG((LM_DEBUG, "[%M] object -> dummy : ok.\n")); + + DANCE_DEBUG((LM_DEBUG, "[%M] Dummy object returned : %s.", dummy_obj->sayHello())); + DANCE_DEBUG((LM_DEBUG, "[%M] The test succeeded.")); + return 0; + } + catch (CORBA::Exception & e) + { + DANCE_ERROR((LM_ERROR, "[%M] A CORBA exception \"%s\" (%s) was thrown. The test failed." + , e._name(), e._info().c_str())); + return 1; + } + catch (...) + { + DANCE_ERROR((LM_ERROR, "[%M] An exception was thrown. The test failed.")); + return 1; + } +} + diff --git a/CIAO/DAnCE/tests/ObjectLocatorTest/srv_main.cpp b/CIAO/DAnCE/tests/ObjectLocatorTest/srv_main.cpp new file mode 100644 index 00000000000..45086a67704 --- /dev/null +++ b/CIAO/DAnCE/tests/ObjectLocatorTest/srv_main.cpp @@ -0,0 +1,55 @@ + +#include "ace/OS_NS_stdio.h" + +#include "DummyC.h" +#include "DummyImpl.h" +#include "RedirectionService/CCMObjectLocator.h" +#include "RegistrationPath.h" +#include "DAnCE/Logger/Log_Macros.h" + +using namespace ObjectLocatorTest; + + +int ACE_TMAIN (int argc, ACE_TCHAR * argv[]) +{ + try + { + int argcm = argc + 2; + char ** argvm = new ACE_TCHAR* [argcm+1]; + for (int i = 0; i < argc; ++i) + { + argvm[i] = argv[i]; + } + ACE_TCHAR buf1[32]; + ACE_OS::sprintf (buf1, ACE_TEXT("-ORBListenEndpoints")); + argvm[argcm-2] = buf1; + char buf2[32]; + ACE_OS::sprintf (buf2, ACE_TEXT("iiop://:12345")); + argvm[argcm-1] = buf2; + argvm[argcm] = 0; + CORBA::ORB_var orb = CORBA::ORB_init (argcm, argvm); + + CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA"); + PortableServer::POA_var root_poa = PortableServer::POA::_narrow (obj.in ()); + + PortableServer::POAManager_var poa_manager = root_poa->the_POAManager(); + poa_manager->activate(); + + DAnCE::CCMObjectLocator locator (orb.in(), root_poa.in(), "Dummy"); + + DummyImpl servant; + + PortableServer::ObjectId_var id = root_poa->activate_object (&servant); + Dummy_var dummy_obj = Dummy::_narrow (root_poa->id_to_reference (id));//servant._this(); + + locator.register_object (app_name, inst_name, port_name, dummy_obj); + + orb->run(); + } + catch (...) + { + DANCE_ERROR((LM_ERROR, "[%M] An error has occured.")); + } + return 0; +} + diff --git a/CIAO/DAnCE/tests/RedirectionServiceTest/Dummy.idl b/CIAO/DAnCE/tests/RedirectionServiceTest/Dummy.idl new file mode 100644 index 00000000000..5925a4ceeba --- /dev/null +++ b/CIAO/DAnCE/tests/RedirectionServiceTest/Dummy.idl @@ -0,0 +1,13 @@ +// $Id$ +#ifndef DUMMY_IDL +#define DUMMY_IDL + +module Test +{ + interface Dummy { + string sayHello(); + }; +}; + +#endif /* DUMMY_IDL */ + diff --git a/CIAO/DAnCE/tests/RedirectionServiceTest/DummyImpl.cpp b/CIAO/DAnCE/tests/RedirectionServiceTest/DummyImpl.cpp new file mode 100644 index 00000000000..92a0f9bf474 --- /dev/null +++ b/CIAO/DAnCE/tests/RedirectionServiceTest/DummyImpl.cpp @@ -0,0 +1,13 @@ +#include "DummyImpl.h" + +namespace Test + { + + char * DummyImpl::sayHello ( + ) + { + return CORBA::string_dup (this->helloSentence); + } + + } // namespace ObjectLocatorTest + diff --git a/CIAO/DAnCE/tests/RedirectionServiceTest/DummyImpl.h b/CIAO/DAnCE/tests/RedirectionServiceTest/DummyImpl.h new file mode 100644 index 00000000000..c75204b0495 --- /dev/null +++ b/CIAO/DAnCE/tests/RedirectionServiceTest/DummyImpl.h @@ -0,0 +1,24 @@ +#ifndef DUMMYIMPL_H_ +#define DUMMYIMPL_H_ + +#include "DummyS.h" + +namespace Test + { + + class DummyImpl + : public virtual POA_Test::Dummy + { + public: + DummyImpl() : helloSentence ("A dummy hello sentence.") {}; + + virtual char * sayHello ( + ); + + private: + const char * helloSentence; + }; + + } // namespace POA_ObjectLocatorTest + +#endif /*DUMMYIMPL_H_*/ diff --git a/CIAO/DAnCE/tests/RedirectionServiceTest/RedirectionServiceTest.mpc b/CIAO/DAnCE/tests/RedirectionServiceTest/RedirectionServiceTest.mpc new file mode 100644 index 00000000000..b587494e045 --- /dev/null +++ b/CIAO/DAnCE/tests/RedirectionServiceTest/RedirectionServiceTest.mpc @@ -0,0 +1,25 @@ + +project (*RedirectionServiceTestServer): dance, taoserver, iortable, naming, dance_redirection_service, dance_logger, naming_serv { + exename = RedirectionServiceTestServer + + IDL_Files { + Dummy.idl + } + + Source_Files { + srv_main.cpp + DummyC.cpp + DummyS.cpp + DummyImpl.cpp + } +} + +project (*RedirectionServiceTestClient): dance, taoclient, naming, dance_logger { + after = *RedirectionServiceTestServer + exename = RedirectionServiceTestClient + + Source_Files { + clt_main.cpp + DummyC.cpp + } +} diff --git a/CIAO/DAnCE/tests/RedirectionServiceTest/RegistrationPath.h b/CIAO/DAnCE/tests/RedirectionServiceTest/RegistrationPath.h new file mode 100644 index 00000000000..21a4b5dd91e --- /dev/null +++ b/CIAO/DAnCE/tests/RedirectionServiceTest/RegistrationPath.h @@ -0,0 +1,10 @@ +#ifndef REGISTRATIONPATH_H_ +#define REGISTRATIONPATH_H_ +#include "ace/SString.h" + +const ACE_CString node_name = "MyNode"; +const ACE_CString app_name = "app1"; +const ACE_CString inst_name = "inst1"; +const ACE_CString port_name = "port1"; + +#endif /*REGISTRATIONPATH_H_*/ diff --git a/CIAO/DAnCE/tests/RedirectionServiceTest/clt_main.cpp b/CIAO/DAnCE/tests/RedirectionServiceTest/clt_main.cpp new file mode 100644 index 00000000000..af42d33e8f1 --- /dev/null +++ b/CIAO/DAnCE/tests/RedirectionServiceTest/clt_main.cpp @@ -0,0 +1,110 @@ + +#include "ace/String_Base.h" +#include <orbsvcs/orbsvcs/CosNamingC.h> +#include "DAnCE/Logger/Log_Macros.h" +#include "RegistrationPath.h" +#include "DummyC.h" +#include "ace/OS.h" + +using namespace Test; + +CORBA::ORB_var orb; +CORBA::Object_var naming_obj; + +void inspect () + { + CORBA::Object_var obj = orb->resolve_initial_references("NameService"); + CosNaming::NamingContext_var naming = CosNaming::NamingContext::_narrow(obj.in()); + CosNaming::BindingList_var bl; + CosNaming::BindingIterator_var bi; + //naming->list(10L, bl.out(), bi.out()); + CosNaming::Name name(1); + name.length(2); + name[0].id = CORBA::string_dup("Host1");//CORBA::string_dup("CcmDance1Test"); + name[1].id = CORBA::string_dup ("CcmDance2_1@Host1"); + name[1].kind = CORBA::string_dup ("DeploymentPlan"); + //name[2].id = CORBA::string_dup("ASSEMBLYANDDEPLOYMENT"); + obj = naming->resolve(name); + DANCE_DEBUG((LM_DEBUG, "[%M] create_external_connections - After resolve\n")); + CosNaming::NamingContext_var CcmDance1Test = CosNaming::NamingContext::_narrow(obj.in()); + CcmDance1Test->list(10L, bl.out(), bi.out()); + bool exit = false; + while (!exit) + { + DANCE_DEBUG((LM_DEBUG, "[%M] create_external_connections - naming size is %u\n", bl->length())); + for ( size_t i = 0; i< bl->length(); i++ ) + { + for ( size_t j = 0; j < (*bl)[i].binding_name.length(); j++ ) + { + DANCE_DEBUG((LM_DEBUG, "create_external_connections - Binding name %s, binding kind %s, binding type %i\n" + , (*bl)[i].binding_name[j].id.in() + , (*bl)[i].binding_name[j].kind.in() + , (*bl)[i].binding_type)); + } + } + if(!bi->next_n(10L, bl.out())) + { + exit = true; + } + } + + } +bool test (const ACE_CString& url) +{ + bool res = false; + try + { + DANCE_DEBUG((LM_DEBUG, "[%M] URL : %s\n", url.c_str())); + + CORBA::Object_var obj = orb->string_to_object (url.c_str()); + if (CORBA::is_nil (obj)) + { + DANCE_ERROR((LM_ERROR, "[%M] Failed to convert url to object. The test failed.\n")); + return 1; + } + DANCE_DEBUG((LM_DEBUG, "[%M] URL -> object : ok.\n")); + + Dummy_var dummy_obj = Dummy::_narrow (obj); + if (CORBA::is_nil (dummy_obj)) + { + DANCE_ERROR((LM_ERROR, "[%M] Failed to narrow the object to custom type. The test failed.\n")); + return 1; + } + DANCE_DEBUG((LM_DEBUG, "[%M] object -> dummy : ok.\n")); + + DANCE_DEBUG((LM_DEBUG, "[%M] Dummy object returned : %s.\n", dummy_obj->sayHello())); + DANCE_DEBUG((LM_DEBUG, "[%M] The test succeeded.\n")); + res = true; + } + catch (CORBA::Exception & e) + { + DANCE_ERROR((LM_ERROR, "[%M] A CORBA exception \"%s\" (%s) was thrown. The test failed." + , e._name(), e._info().c_str())); + } + catch (...) + { + DANCE_ERROR((LM_ERROR, "[%M] An exception was thrown. The test failed.\n")); + } + + return res; +}; + + +int ACE_TMAIN (int argc, ACE_TCHAR * argv[]) +{ + orb = CORBA::ORB_init (argc, argv); + + //naming_obj = orb->resolve_initial_references("NameService"); + //glasgow.headquarters.eclipsesp.com:12345 + ACE_CString url = "corbaname::glasgow:12345#" + node_name + "/" + app_name + ".DeploymentPlan" + "/" + inst_name + "/" + port_name + ".Port"; + test (url); + url = "corbaname::glasgow:12345#" + node_name + "/" + app_name + ".DeploymentPlan" + "/" + inst_name + ".Component"; + test (url); + //node_name + "/" + %14%01%0f%00NUP%00%00%00%17%01%00%00%00%01%00%00%00RootPOA%00MyNode%00 + url = "corbaloc:iiop:1.2@glasgow.headquarters.eclipsesp.com:12345/%14%01%0f%00NUP%00%00%00%17%01%00%00%00%01%00%00%00RootPOA%00MyNode%00" + app_name + "/" + inst_name + "/" + port_name; + test (url); + url = "corbaloc:iiop:1.2@glasgow.headquarters.eclipsesp.com:12345/%14%01%0f%00NUP%00%00%00%17%01%00%00%00%01%00%00%00RootPOA%00MyNode%00" + app_name + "/" + inst_name; + test (url); + + return 0; +} diff --git a/CIAO/DAnCE/tests/RedirectionServiceTest/srv_main.cpp b/CIAO/DAnCE/tests/RedirectionServiceTest/srv_main.cpp new file mode 100644 index 00000000000..1158a27e6b1 --- /dev/null +++ b/CIAO/DAnCE/tests/RedirectionServiceTest/srv_main.cpp @@ -0,0 +1,67 @@ +#include "ace/OS_NS_stdio.h" +#include "ace/Get_Opt.h" +#include <orbsvcs/orbsvcs/Naming/Naming_Loader.h> +#include "DAnCE/Logger/Log_Macros.h" +#include "RedirectionService/RedirectionService.h" + +#include "DummyC.h" +#include "DummyImpl.h" +#include "RegistrationPath.h" + +using namespace Test; + +int ACE_TMAIN (int argc, ACE_TCHAR * argv[]) +{ +// try + { + int argcm = argc + 2; + char ** argvm = new char* [argcm+1]; + for (int i = 0; i < argc; ++i) + { + argvm[i] = argv[i]; + } + char buf1[32]; + ACE_OS::sprintf (buf1, "-ORBListenEndpoints"); + argvm[argcm-2] = buf1; + char buf2[32]; + ACE_OS::sprintf (buf2, "iiop://:12345"); + argvm[argcm-1] = buf2; + argvm[argcm] = 0; + + CORBA::ORB_var orb = CORBA::ORB_init (argcm, argvm); + + CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA"); + PortableServer::POA_var root_poa = PortableServer::POA::_narrow (obj.in ()); + + PortableServer::POAManager_var poa_manager = root_poa->the_POAManager(); + poa_manager->activate(); + + DummyImpl servant; + + PortableServer::ObjectId_var id = root_poa->activate_object (&servant); + + Dummy_var dummy_obj = Dummy::_narrow (root_poa->id_to_reference (id));//servant._this(); + + TAO_Naming_Loader loader; + + CORBA::Object_var obj_tmp = loader.create_object (orb.in(), argcm, argvm); + CORBA::Object_var naming_obj = orb->resolve_initial_references ("NameService"); + CosNaming::NamingContext_var naming = CosNaming::NamingContext::_narrow (naming_obj.in()); + + DAnCE::RedirectionService redirection (orb.in(), root_poa.in(), naming.in(), CosNaming::NamingContext::_nil(), true, true); + + redirection.registration_start (node_name, app_name); + redirection.registration (node_name, app_name, inst_name, port_name, dummy_obj.in()); + DANCE_DEBUG((LM_DEBUG, "[%M] Registration for port have finished.\n\n")); + redirection.registration (node_name, app_name, inst_name, /*CORBA::Object::_nil()*/dummy_obj.in()); + DANCE_DEBUG((LM_DEBUG, "[%M] Registration for component have finished.\n\n")); + redirection.registration_finish (node_name, app_name); + orb->run(); + } +// catch (...) +// { +// DANCE_ERROR((LM_ERROR, "[%M] An error has occured.")); +// } + return 0; +} + diff --git a/CIAO/DAnCE/tests/scripts/BasicSP/basicsp.dat b/CIAO/DAnCE/tests/scripts/BasicSP/basicsp.dat index ab4b1faf954..8bd5e6a72f6 100644 --- a/CIAO/DAnCE/tests/scripts/BasicSP/basicsp.dat +++ b/CIAO/DAnCE/tests/scripts/BasicSP/basicsp.dat @@ -1,2 +1,3 @@ BMClosedED corbaloc:iiop:localhost:10000/NodeManager -EC corbaloc:iiop:localhost:20000/NodeManager
\ No newline at end of file +EC corbaloc:iiop:localhost:20000/NodeManager + |