diff options
author | mcorino <mcorino@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2011-02-11 11:33:12 +0000 |
---|---|---|
committer | mcorino <mcorino@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2011-02-11 11:33:12 +0000 |
commit | 4df04cc27ef1e77bcc941afaba7d4c943b98a936 (patch) | |
tree | 5054c2bde24d048d4790ff659b61be0838cd0d69 | |
parent | b723802f85ac66026a503827677a2fb1e9a77933 (diff) | |
download | ATCD-4df04cc27ef1e77bcc941afaba7d4c943b98a936.tar.gz |
Fri Feb 11 11:16:00 UTC 2011 Martin Corino <mcorino@remedy.nl>
Merged changes from Remedy work branch.
489 files changed, 11057 insertions, 4025 deletions
diff --git a/ACE/ACE-INSTALL.html b/ACE/ACE-INSTALL.html index aa5714f4772..796caa96768 100644 --- a/ACE/ACE-INSTALL.html +++ b/ACE/ACE-INSTALL.html @@ -154,12 +154,12 @@ document</a>.</p><p> <th>Remedy IT</th> <td>Maintains ACE on many platforms required for their ACE and TAO service offerings. We support AIX, - CodeGear C++ Builder 2007/2009, CodeGear RAD Studio 2007, Embarcadero C++ Builder 2010, - CBuilderX 1.0, Windows CE, MinGW, Microsoft Visual C++ 7.1/8/9/10, GCC, - Cygwin, VxWorks 5.5.x - 6.x (kernel and rtp), OpenVMS 8.2-1 & 8.3 on Alpha and IA64, + CodeGear C++ Builder 2007/2009, CodeGear RAD Studio 2007, Embarcadero C++ Builder 2010/XE, + Windows CE, MinGW, Microsoft Visual C++ 7.1/8/9/10, GCC, + Cygwin, VxWorks 6.x (kernel and rtp), OpenVMS 8.3 on IA64, BlueCAT Linux, RedHat Linux, Fedora, MacOSX, Solaris, - Tru64, SuSE Linux on Alpha/IA32/EM64T/IA64, RTEMS, QNX, LynxOS 4.0/4.2, - HPUX 11i v1/v2 32/64 bit on PA-RISC, and + Tru64, SuSE Linux on Alpha/IA32/EM64T/IA64, RTEMS, QNX, LynxOS, + and HPUX 11i v2/v3 on IA64. The Intel C++ compiler is supported on Windows 32/64bit, Linux IA32/EM64T/IA64, MacOSX. </td> diff --git a/ACE/ChangeLog b/ACE/ChangeLog index f674433a16a..733e67d3691 100644 --- a/ACE/ChangeLog +++ b/ACE/ChangeLog @@ -1,3 +1,219 @@ +Fri Feb 11 11:16:00 UTC 2011 Martin Corino <mcorino@remedy.nl> + + Merged changes from Remedy work branch. + + === start changelog === + + Wed Feb 9 12:53:58 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * ace/CDR_Size.h: + * ace/Lib_Find.h: + * ace/Local_Name_Space_T.h: + * ace/Lock.h: + * ace/Message_Block.h: + * ace/Name_Space.h: + * ace/Naming_Context.h: + Doxygen changes + + Tue Feb 8 20:52:58 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * ace/ACE.cpp: + Removed support for deprecated VxWorks versions + + * ace/Active_Map_Manager.h: + Doxygen changes + + Tue Feb 8 20:47:58 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * include/makeinclude/platform_linux_icc.GNU: + Intel C++ 12 has support for visibility + + * include/makeinclude/rules.bin.GNU: + * include/makeinclude/wrapper_macros.GNU: + Removed support for Chorus + + Tue Feb 8 20:44:58 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * ace/os_include/os_dirent.h: + * ace/os_include/os_fcntl.h: + * ace/os_include/os_limits.h: + * ace/os_include/os_netdb.h: + * ace/os_include/os_stdio.h: + * ace/os_include/sys/os_time.h: + Removed support for deprecated VxWorks versions + + Tue Feb 8 19:14:58 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * examples/Reactor/Misc/notification.cpp: + * examples/Reactor/Misc/pingpong.cpp: + Removed old support for chorus + + Tue Feb 8 19:11:58 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * tests/Atomic_Op_Test.cpp: + * tests/Dirent_Test.cpp: + * tests/SSL/SSL_Asynch_Stream_Test.cpp: + * tests/SSL/Thread_Pool_Reactor_SSL_Test.cpp: + * tests/Thread_Manager_Test.cpp: + * tests/Thread_Pool_Reactor_Resume_Test.cpp: + Removed old support for chorus and vxworks 5.5 + + Tue Feb 8 13:37:12 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * bin/fuzz.pl: + * bin/sets-manager.py: + * bin/svn_props.py: + Check py files for Id + + Tue Feb 8 10:40:12 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * src/Bool_Array.h: + * src/Bool_Array.cpp: + * src/Gen_Perf.h: + * src/Hash_Table.h: + * src/Hash_Table.cpp: + * src/Iterator.h: + * src/Iterator.cpp: + * src/Key_List.h: + * src/Key_List.cpp: + * src/List_Node.h: + * src/Options.h: + * src/Options.cpp: + * src/Vectors.h: + * src/Vectors.cpp: + * src/gperf.cpp: + Removed checks for ACE_HAS_GPERF, just always compile this executable. + + Tue Feb 8 10:21:36 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * ace/IOStream_T.h: + * ace/IOStream.h: + * ace/IOStream.cpp: + Doxygen changes + + * ace/config-netbsd.h: + Removed define which we don't have anymore + + * ace/config-macosx.h: + * ace/config-openbsd.h: + * ace/config-win32-interix.h: + Added new defines + + * ace/os_include/sys/os_select.h: + Updated comment + + * ace/OS_NS_netdb.cpp: + Use new define + + Mon Feb 7 09:53:50 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * include/makeinclude/platform_linux_icc.GNU: + Fix for Intel C++ 12.0 + + Sun Feb 7 19:35:18 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * include/makeinclude/platform_g++_common.GNU: + Added gprof for compiling for gprof, gcov for compiling with gcov + + Sat Feb 5 13:49:18 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * include/makeinclude/platform_aix_g++.GNU: + * include/makeinclude/platform_freebsd.GNU: + * include/makeinclude/platform_gnuwin32_common.GNU: + * include/makeinclude/platform_hpux_gcc.GNU: + * include/makeinclude/platform_linux.GNU: + * include/makeinclude/platform_linux_icc.GNU: + * include/makeinclude/platform_linux_pgi.GNU: + * include/makeinclude/platform_linux_suncc.GNU: + * include/makeinclude/platform_lynxos.GNU: + * include/makeinclude/platform_macosx.GNU: + * include/makeinclude/platform_macosx_common.GNU: + * include/makeinclude/platform_macosx_icc.GNU: + * include/makeinclude/platform_macosx_panther.GNU: + * include/makeinclude/platform_netbsd.GNU: + * include/makeinclude/platform_openbsd.GNU: + * include/makeinclude/platform_sunos5_g++.GNU: + * include/makeinclude/platform_sunos5_sunc++.GNU: + * include/makeinclude/platform_vxworks6.2.GNU: + * include/makeinclude/platform_vxworks6.3.GNU: + * include/makeinclude/platform_win32_dmc.GNU: + * include/makeinclude/platform_win32_icc.GNU: + * include/makeinclude/platform_win32_interix.GNU: + * include/makeinclude/wrapper_macros.GNU: + Cleanup, removed old template flags + + Thu Feb 3 13:05:13 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * ace/config-qnx-neutrino.h: + * ace/config-qnx-rtp-common.h: + * ace/config-qnx-rtp.h: + Cleanup + + * ace/config-minimal.h: + Removed this file, not used + + Thu Feb 3 09:54:32 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * ace/config-qnx-rtp.h: + Just one file for qnx, pre 6.2 support is already removed + + * ace/config-qnx-rtp-62x.h: + * ace/config-qnx-rtp-pre62x.h: + Removed these files. + + Wed Feb 2 11:22:13 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * etc/ace.doxygen: + Added more macros + + * ace/config-doxygen.h: + Removed this file, not needed for doxygen + + Tue Feb 1 15:24:47 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * ace/Cache_Map_Manager_T.cpp: + * ace/Cached_Connect_Strategy_T.cpp: + * ace/Hash_Cache_Map_Manager_T.inl: + * ace/Hash_Cache_Map_Manager_T.cpp: + Removed ACE_T1/ACE_T2, this improves doxygen documentation + + * ace/Guard_T.h: + * ace/Asynch_IO_Impl.h: + Doxygen fixes + * etc/ace.doxygen: + + * ace/Hash_Cache_Map_Manager_T.h: + Removed not needed define + + Thu Jan 27 08:34:36 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * ace/Condition_T.h: + * ace/Lock.h: + Doxygen changes + + * tests/tests.mpc: + Updated qt base project + + Wed Jan 26 13:53:27 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * ace/Lock_Adapter_T.h: + Layout, doxygen changes + + * ace/Lock_Adapter_T.inl: + * ace/Lock_Adapter_T.cpp: + Moved constructor to inline, the old compiler mentioned is deprecated + a long time ago + + * ace/QtReactor/QtReactor.h: + Removed Qt3 support + + * ace/QtReactor/ace_qt3reactor.mpc: + * bin/MakeProjectCreator/config/ace_qt3.mpb: + * bin/MakeProjectCreator/config/ace_qtreactor.mpb: + Removed these files, qt3 support is removed + + === end changelog === + Wed Feb 9 08:41:00 UTC 2011 Olli Savia <ops@iki.fi> * include/makeinclude/platform_gnuwin32_common.GNU: diff --git a/ACE/ace/ACE.cpp b/ACE/ace/ACE.cpp index 952e83b9bed..f868f6dea1a 100644 --- a/ACE/ace/ACE.cpp +++ b/ACE/ace/ACE.cpp @@ -25,10 +25,6 @@ #include "ace/OS_TLI.h" #include "ace/Truncate.h" -#if defined (ACE_VXWORKS) && (ACE_VXWORKS < 0x620) -extern "C" int maxFiles; -#endif /* ACE_VXWORKS */ - #if !defined (__ACE_INLINE__) #include "ace/ACE.inl" #endif /* __ACE_INLINE__ */ @@ -2811,8 +2807,6 @@ ACE::max_handles (void) #if defined (_SC_OPEN_MAX) return ACE_OS::sysconf (_SC_OPEN_MAX); -#elif defined (ACE_VXWORKS) && (ACE_VXWORKS < 0x620) - return maxFiles; #elif defined (FD_SETSIZE) return FD_SETSIZE; #else diff --git a/ACE/ace/Active_Map_Manager.h b/ACE/ace/Active_Map_Manager.h index 4a53b81a018..9da187e582e 100644 --- a/ACE/ace/Active_Map_Manager.h +++ b/ACE/ace/Active_Map_Manager.h @@ -68,7 +68,7 @@ public: void decode (const void *data); /// Encode state of the active key into @a data. @a data must be as - /// big as the value returned from <size>. + /// big as the value returned from size(). void encode (void *data) const; /// Compare keys. diff --git a/ACE/ace/Argv_Type_Converter.h b/ACE/ace/Argv_Type_Converter.h index 6d01c05faee..09259f241ef 100644 --- a/ACE/ace/Argv_Type_Converter.h +++ b/ACE/ace/Argv_Type_Converter.h @@ -78,7 +78,7 @@ private: /// argv list. void align_wchar_with_char (void); - /// Clean up removed (comsumed) argv entries and reset the pass flags. + /// Clean up removed (consumed) argv entries and reset the pass flags. void cleanup (void); #endif // ACE_USES_WCHAR diff --git a/ACE/ace/Array_Base.h b/ACE/ace/Array_Base.h index 0110a5224a9..e75b994c45a 100644 --- a/ACE/ace/Array_Base.h +++ b/ACE/ace/Array_Base.h @@ -67,21 +67,21 @@ public: ACE_Array_Base (size_type size = 0, ACE_Allocator * the_allocator = 0); - /// Dynamically initialize the entire array to the <default_value>. + /// Dynamically initialize the entire array to the @a default_value. ACE_Array_Base (size_type size, T const & default_value, ACE_Allocator * the_allocator = 0); /** * The copy constructor performs initialization by making an exact - * copy of the contents of parameter <s>, i.e., *this == s will + * copy of the contents of parameter @a s, i.e., *this == s will * return true. */ ACE_Array_Base (ACE_Array_Base<T> const & s); /** * Assignment operator performs an assignment by making an exact - * copy of the contents of parameter <s>, i.e., *this == s will + * copy of the contents of parameter @a s, i.e., *this == s will * return true. Note that if the <max_size_> of <array_> is >= than * <s.max_size_> we can copy it without reallocating. However, if * <max_size_> is < <s.max_size_> we must delete the <array_>, diff --git a/ACE/ace/Asynch_IO_Impl.h b/ACE/ace/Asynch_IO_Impl.h index b2a308a7565..2e3895f9d6c 100644 --- a/ACE/ace/Asynch_IO_Impl.h +++ b/ACE/ace/Asynch_IO_Impl.h @@ -81,7 +81,7 @@ public: /** * POSIX4 real-time signal number to be used for the - * operation. <signal_number> ranges from SIGRTMIN to SIGRTMAX. By + * operation. signal_number ranges from SIGRTMIN to SIGRTMAX. By * default, SIGRTMIN is used to issue <aio_> calls. This is a no-op * on non-POSIX4 systems and returns 0. */ diff --git a/ACE/ace/Barrier.h b/ACE/ace/Barrier.h index 44607bc6f34..562d4467f11 100644 --- a/ACE/ace/Barrier.h +++ b/ACE/ace/Barrier.h @@ -101,7 +101,7 @@ public: const ACE_TCHAR *name = 0, void *arg = 0); - /// Default dtor. + /// Default destructor. ~ACE_Barrier (void); /// Block the caller until all @c count threads have called @c wait and @@ -170,7 +170,7 @@ public: /// Create a Thread_Barrier, passing in the optional @a name. ACE_Thread_Barrier (unsigned int count, const ACE_TCHAR *name = 0); - /// Default dtor. + /// Default destructor. ~ACE_Thread_Barrier (void); /// Dump the state of an object. diff --git a/ACE/ace/Base_Thread_Adapter.h b/ACE/ace/Base_Thread_Adapter.h index e71dfd65e42..cf15ad75f84 100644 --- a/ACE/ace/Base_Thread_Adapter.h +++ b/ACE/ace/Base_Thread_Adapter.h @@ -33,9 +33,8 @@ # define ACE_THREAD_ADAPTER_NAME ace_thread_adapter #endif /* ACE_HAS_VERSIONED_NAMESPACE == 1 */ -// Run the thread entry point for the ACE_Thread_Adapter. This must -// be an extern "C" to make certain compilers happy... - +/// Run the thread entry point for the ACE_Thread_Adapter. This must +/// be an extern "C" to make certain compilers happy... extern "C" ACE_Export ACE_THR_FUNC_RETURN ACE_THREAD_ADAPTER_NAME (void *args); ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -61,17 +60,14 @@ protected: /** * Keeps track of whether this thread was created "detached" or not. * If a thread is *not* created detached then if someone calls - * <ACE_Thread_Manager::wait>, we need to join with that thread (and + * ACE_Thread_Manager::wait(), we need to join with that thread (and * close down the handle). */ long flags_; }; - - class ACE_Service_Gestalt; - /** * @class ACE_Base_Thread_Adapter * @@ -163,8 +159,8 @@ protected: /** * Optional thread descriptor. Passing this pointer in will force - * the spawned thread to cache this location in <Log_Msg> and wait - * until <Thread_Manager> fills in all information in thread + * the spawned thread to cache this location in Log_Msg and wait + * until Thread_Manager fills in all information in thread * descriptor. */ ACE_OS_Thread_Descriptor *thr_desc_; @@ -172,7 +168,7 @@ protected: /// The ACE_Log_Msg attributes. ACE_OS_Log_Msg_Attributes log_msg_attributes_; - /// That is usefull for gprof, define itimerval + /// That is useful for gprof, define itimerval #ifdef ACE_USES_GPROF struct itimerval itimer_; #endif // ACE_USES_GPROF diff --git a/ACE/ace/CDR_Size.h b/ACE/ace/CDR_Size.h index a7ff689479b..7ee009e0fdd 100644 --- a/ACE/ace/CDR_Size.h +++ b/ACE/ace/CDR_Size.h @@ -13,7 +13,7 @@ * The current implementation assumes that the host has 1-byte, * 2-byte and 4-byte integral types, and that it has single * precision and double precision IEEE floats. - * Those assumptions are pretty good these days, with Crays beign + * Those assumptions are pretty good these days, with Crays being * the only known exception. * * diff --git a/ACE/ace/Cache_Map_Manager_T.cpp b/ACE/ace/Cache_Map_Manager_T.cpp index 7d27cc9a311..fa9caf53041 100644 --- a/ACE/ace/Cache_Map_Manager_T.cpp +++ b/ACE/ace/Cache_Map_Manager_T.cpp @@ -24,11 +24,8 @@ ACE_ALLOC_HOOK_DEFINE(ACE_Cache_Map_Iterator) ACE_ALLOC_HOOK_DEFINE(ACE_Cache_Map_Reverse_Iterator) -#define ACE_T1 class KEY, class VALUE, class CMAP_TYPE, class ITERATOR_IMPL, class REVERSE_ITERATOR_IMPL, class CACHING_STRATEGY, class ATTRIBUTES -#define ACE_T2 KEY, VALUE, CMAP_TYPE, ITERATOR_IMPL, REVERSE_ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES - -template <ACE_T1> -ACE_Cache_Map_Manager<ACE_T2>::ACE_Cache_Map_Manager (CACHING_STRATEGY &caching_s, +template <class KEY, class VALUE, class CMAP_TYPE, class ITERATOR_IMPL, class REVERSE_ITERATOR_IMPL, class CACHING_STRATEGY, class ATTRIBUTES> +ACE_Cache_Map_Manager<KEY, VALUE, CMAP_TYPE, ITERATOR_IMPL, REVERSE_ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES>::ACE_Cache_Map_Manager (CACHING_STRATEGY &caching_s, size_t size, ACE_Allocator *alloc) : caching_strategy_ (caching_s) @@ -40,28 +37,28 @@ ACE_Cache_Map_Manager<ACE_T2>::ACE_Cache_Map_Manager (CACHING_STRATEGY &caching_ } -template <ACE_T1> -ACE_Cache_Map_Manager<ACE_T2>::~ACE_Cache_Map_Manager (void) +template <class KEY, class VALUE, class CMAP_TYPE, class ITERATOR_IMPL, class REVERSE_ITERATOR_IMPL, class CACHING_STRATEGY, class ATTRIBUTES> +ACE_Cache_Map_Manager<KEY, VALUE, CMAP_TYPE, ITERATOR_IMPL, REVERSE_ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES>::~ACE_Cache_Map_Manager (void) { this->close (); } -template <ACE_T1> int -ACE_Cache_Map_Manager<ACE_T2>::open (size_t length, +template <class KEY, class VALUE, class CMAP_TYPE, class ITERATOR_IMPL, class REVERSE_ITERATOR_IMPL, class CACHING_STRATEGY, class ATTRIBUTES> int +ACE_Cache_Map_Manager<KEY, VALUE, CMAP_TYPE, ITERATOR_IMPL, REVERSE_ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES>::open (size_t length, ACE_Allocator *alloc) { return this->map_.open (length, alloc); } -template <ACE_T1> int -ACE_Cache_Map_Manager<ACE_T2>::close (void) +template <class KEY, class VALUE, class CMAP_TYPE, class ITERATOR_IMPL, class REVERSE_ITERATOR_IMPL, class CACHING_STRATEGY, class ATTRIBUTES> int +ACE_Cache_Map_Manager<KEY, VALUE, CMAP_TYPE, ITERATOR_IMPL, REVERSE_ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES>::close (void) { return this->map_.close (); } -template <ACE_T1> int -ACE_Cache_Map_Manager<ACE_T2>::bind (const KEY &key, +template <class KEY, class VALUE, class CMAP_TYPE, class ITERATOR_IMPL, class REVERSE_ITERATOR_IMPL, class CACHING_STRATEGY, class ATTRIBUTES> int +ACE_Cache_Map_Manager<KEY, VALUE, CMAP_TYPE, ITERATOR_IMPL, REVERSE_ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES>::bind (const KEY &key, const VALUE &value) { // Insert an entry which has the <key> and the <cache_value> which @@ -96,8 +93,8 @@ ACE_Cache_Map_Manager<ACE_T2>::bind (const KEY &key, } -template <ACE_T1> int -ACE_Cache_Map_Manager<ACE_T2>::rebind (const KEY &key, +template <class KEY, class VALUE, class CMAP_TYPE, class ITERATOR_IMPL, class REVERSE_ITERATOR_IMPL, class CACHING_STRATEGY, class ATTRIBUTES> int +ACE_Cache_Map_Manager<KEY, VALUE, CMAP_TYPE, ITERATOR_IMPL, REVERSE_ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES>::rebind (const KEY &key, const VALUE &value) { CACHE_VALUE cache_value (value, @@ -133,8 +130,8 @@ ACE_Cache_Map_Manager<ACE_T2>::rebind (const KEY &key, } -template <ACE_T1> int -ACE_Cache_Map_Manager<ACE_T2>::rebind (const KEY &key, +template <class KEY, class VALUE, class CMAP_TYPE, class ITERATOR_IMPL, class REVERSE_ITERATOR_IMPL, class CACHING_STRATEGY, class ATTRIBUTES> int +ACE_Cache_Map_Manager<KEY, VALUE, CMAP_TYPE, ITERATOR_IMPL, REVERSE_ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES>::rebind (const KEY &key, const VALUE &value, VALUE &old_value) { @@ -180,8 +177,8 @@ ACE_Cache_Map_Manager<ACE_T2>::rebind (const KEY &key, return rebind_result; } -template <ACE_T1> int -ACE_Cache_Map_Manager<ACE_T2>::rebind (const KEY &key, +template <class KEY, class VALUE, class CMAP_TYPE, class ITERATOR_IMPL, class REVERSE_ITERATOR_IMPL, class CACHING_STRATEGY, class ATTRIBUTES> int +ACE_Cache_Map_Manager<KEY, VALUE, CMAP_TYPE, ITERATOR_IMPL, REVERSE_ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES>::rebind (const KEY &key, const VALUE &value, KEY &old_key, VALUE &old_value) @@ -229,8 +226,8 @@ ACE_Cache_Map_Manager<ACE_T2>::rebind (const KEY &key, return rebind_result; } -template <ACE_T1> int -ACE_Cache_Map_Manager<ACE_T2>::trybind (const KEY &key, +template <class KEY, class VALUE, class CMAP_TYPE, class ITERATOR_IMPL, class REVERSE_ITERATOR_IMPL, class CACHING_STRATEGY, class ATTRIBUTES> int +ACE_Cache_Map_Manager<KEY, VALUE, CMAP_TYPE, ITERATOR_IMPL, REVERSE_ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES>::trybind (const KEY &key, VALUE &value) { CACHE_VALUE cache_value (value, @@ -271,8 +268,8 @@ ACE_Cache_Map_Manager<ACE_T2>::trybind (const KEY &key, return trybind_result; } -template <ACE_T1> int -ACE_Cache_Map_Manager<ACE_T2>::find (const KEY &key, +template <class KEY, class VALUE, class CMAP_TYPE, class ITERATOR_IMPL, class REVERSE_ITERATOR_IMPL, class CACHING_STRATEGY, class ATTRIBUTES> int +ACE_Cache_Map_Manager<KEY, VALUE, CMAP_TYPE, ITERATOR_IMPL, REVERSE_ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES>::find (const KEY &key, VALUE &value) { // Lookup the key and populate the <value>. @@ -310,8 +307,8 @@ ACE_Cache_Map_Manager<ACE_T2>::find (const KEY &key, return find_result; } -template <ACE_T1> int -ACE_Cache_Map_Manager<ACE_T2>::find (const KEY &key) +template <class KEY, class VALUE, class CMAP_TYPE, class ITERATOR_IMPL, class REVERSE_ITERATOR_IMPL, class CACHING_STRATEGY, class ATTRIBUTES> int +ACE_Cache_Map_Manager<KEY, VALUE, CMAP_TYPE, ITERATOR_IMPL, REVERSE_ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES>::find (const KEY &key) { // Lookup the key and populate the <value>. CACHE_VALUE cache_value; @@ -348,8 +345,8 @@ ACE_Cache_Map_Manager<ACE_T2>::find (const KEY &key) } -template <ACE_T1> int -ACE_Cache_Map_Manager<ACE_T2>::unbind (const KEY &key) +template <class KEY, class VALUE, class CMAP_TYPE, class ITERATOR_IMPL, class REVERSE_ITERATOR_IMPL, class CACHING_STRATEGY, class ATTRIBUTES> int +ACE_Cache_Map_Manager<KEY, VALUE, CMAP_TYPE, ITERATOR_IMPL, REVERSE_ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES>::unbind (const KEY &key) { // Remove the entry from the cache. CACHE_VALUE cache_value; @@ -371,8 +368,8 @@ ACE_Cache_Map_Manager<ACE_T2>::unbind (const KEY &key) return unbind_result; } -template <ACE_T1> int -ACE_Cache_Map_Manager<ACE_T2>::unbind (const KEY &key, +template <class KEY, class VALUE, class CMAP_TYPE, class ITERATOR_IMPL, class REVERSE_ITERATOR_IMPL, class CACHING_STRATEGY, class ATTRIBUTES> int +ACE_Cache_Map_Manager<KEY, VALUE, CMAP_TYPE, ITERATOR_IMPL, REVERSE_ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES>::unbind (const KEY &key, VALUE &value) { // Remove the entry from the cache. @@ -397,8 +394,8 @@ ACE_Cache_Map_Manager<ACE_T2>::unbind (const KEY &key, return unbind_result; } -template <ACE_T1> void -ACE_Cache_Map_Manager<ACE_T2>::dump (void) const +template <class KEY, class VALUE, class CMAP_TYPE, class ITERATOR_IMPL, class REVERSE_ITERATOR_IMPL, class CACHING_STRATEGY, class ATTRIBUTES> void +ACE_Cache_Map_Manager<KEY, VALUE, CMAP_TYPE, ITERATOR_IMPL, REVERSE_ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES>::dump (void) const { #if defined (ACE_HAS_DUMP) this->map_.dump (); @@ -407,9 +404,6 @@ ACE_Cache_Map_Manager<ACE_T2>::dump (void) const #endif /* ACE_HAS_DUMP */ } -#undef ACE_T1 -#undef ACE_T2 - template <class KEY, class VALUE, class IMPLEMENTATION, class CACHING_STRATEGY, class ATTRIBUTES> ACE_Cache_Map_Iterator<KEY, VALUE, IMPLEMENTATION, CACHING_STRATEGY, ATTRIBUTES>::~ACE_Cache_Map_Iterator (void) { diff --git a/ACE/ace/Cached_Connect_Strategy_T.cpp b/ACE/ace/Cached_Connect_Strategy_T.cpp index 05338be2c31..bf587cee5fb 100644 --- a/ACE/ace/Cached_Connect_Strategy_T.cpp +++ b/ACE/ace/Cached_Connect_Strategy_T.cpp @@ -15,13 +15,10 @@ #include "ace/Thread_Manager.h" #include "ace/WFMO_Reactor.h" -#define ACE_T1 class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX -#define ACE_T2 SVC_HANDLER, ACE_PEER_CONNECTOR_2, CACHING_STRATEGY, ATTRIBUTES, MUTEX - ACE_BEGIN_VERSIONED_NAMESPACE_DECL -template <ACE_T1> -ACE_Cached_Connect_Strategy_Ex<ACE_T2>::ACE_Cached_Connect_Strategy_Ex +template <class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX> +ACE_Cached_Connect_Strategy_Ex<SVC_HANDLER, ACE_PEER_CONNECTOR_2, CACHING_STRATEGY, ATTRIBUTES, MUTEX>::ACE_Cached_Connect_Strategy_Ex (CACHING_STRATEGY &caching_s, ACE_Creation_Strategy<SVC_HANDLER> *cre_s, ACE_Concurrency_Strategy<SVC_HANDLER> *con_s, @@ -34,18 +31,18 @@ ACE_Cached_Connect_Strategy_Ex<ACE_T2>::ACE_Cached_Connect_Strategy_Ex if (this->open (cre_s, con_s, rec_s) == -1) ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_Cached_Connect_Strategy_Ex<ACE_T2>\n"))); + ACE_TEXT ("ACE_Cached_Connect_Strategy_Ex<SVC_HANDLER, ACE_PEER_CONNECTOR_2, CACHING_STRATEGY, ATTRIBUTES, MUTEX>\n"))); } -template <ACE_T1> -ACE_Cached_Connect_Strategy_Ex<ACE_T2>::~ACE_Cached_Connect_Strategy_Ex (void) +template <class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX> +ACE_Cached_Connect_Strategy_Ex<SVC_HANDLER, ACE_PEER_CONNECTOR_2, CACHING_STRATEGY, ATTRIBUTES, MUTEX>::~ACE_Cached_Connect_Strategy_Ex (void) { cleanup (); } -template <ACE_T1> int -ACE_Cached_Connect_Strategy_Ex<ACE_T2>::check_hint_i +template <class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX> int +ACE_Cached_Connect_Strategy_Ex<SVC_HANDLER, ACE_PEER_CONNECTOR_2, CACHING_STRATEGY, ATTRIBUTES, MUTEX>::check_hint_i (SVC_HANDLER *&sh, const ACE_PEER_CONNECTOR_ADDR &remote_addr, ACE_Time_Value *timeout, @@ -134,8 +131,8 @@ ACE_Cached_Connect_Strategy_Ex<ACE_T2>::check_hint_i return 0; } -template <ACE_T1> int -ACE_Cached_Connect_Strategy_Ex<ACE_T2>::find_or_create_svc_handler_i +template <class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX> int +ACE_Cached_Connect_Strategy_Ex<SVC_HANDLER, ACE_PEER_CONNECTOR_2, CACHING_STRATEGY, ATTRIBUTES, MUTEX>::find_or_create_svc_handler_i (SVC_HANDLER *&sh, const ACE_PEER_CONNECTOR_ADDR &remote_addr, ACE_Time_Value *timeout, @@ -250,8 +247,8 @@ ACE_Cached_Connect_Strategy_Ex<ACE_T2>::find_or_create_svc_handler_i return 0; } -template <ACE_T1> int -ACE_Cached_Connect_Strategy_Ex<ACE_T2>::cached_connect (SVC_HANDLER *&sh, +template <class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX> int +ACE_Cached_Connect_Strategy_Ex<SVC_HANDLER, ACE_PEER_CONNECTOR_2, CACHING_STRATEGY, ATTRIBUTES, MUTEX>::cached_connect (SVC_HANDLER *&sh, const ACE_PEER_CONNECTOR_ADDR &remote_addr, ACE_Time_Value *timeout, const ACE_PEER_CONNECTOR_ADDR &local_addr, @@ -312,8 +309,8 @@ ACE_Cached_Connect_Strategy_Ex<ACE_T2>::cached_connect (SVC_HANDLER *&sh, } -template <ACE_T1> int -ACE_Cached_Connect_Strategy_Ex<ACE_T2>::connect_svc_handler_i +template <class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX> int +ACE_Cached_Connect_Strategy_Ex<SVC_HANDLER, ACE_PEER_CONNECTOR_2, CACHING_STRATEGY, ATTRIBUTES, MUTEX>::connect_svc_handler_i (SVC_HANDLER *&sh, const ACE_PEER_CONNECTOR_ADDR &remote_addr, ACE_Time_Value *timeout, @@ -369,8 +366,8 @@ ACE_Cached_Connect_Strategy_Ex<ACE_T2>::connect_svc_handler_i } -template <ACE_T1> int -ACE_Cached_Connect_Strategy_Ex<ACE_T2>::cache_i (const void *recycling_act) +template <class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX> int +ACE_Cached_Connect_Strategy_Ex<SVC_HANDLER, ACE_PEER_CONNECTOR_2, CACHING_STRATEGY, ATTRIBUTES, MUTEX>::cache_i (const void *recycling_act) { // The wonders and perils of ACT CONNECTION_CACHE_ENTRY *entry = (CONNECTION_CACHE_ENTRY *) recycling_act; @@ -382,8 +379,8 @@ ACE_Cached_Connect_Strategy_Ex<ACE_T2>::cache_i (const void *recycling_act) return 0; } -template<ACE_T1> int -ACE_Cached_Connect_Strategy_Ex<ACE_T2>::recycle_state_i (const void *recycling_act, +template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX> int +ACE_Cached_Connect_Strategy_Ex<SVC_HANDLER, ACE_PEER_CONNECTOR_2, CACHING_STRATEGY, ATTRIBUTES, MUTEX>::recycle_state_i (const void *recycling_act, ACE_Recyclable_State new_state) { // The wonders and perils of ACT @@ -396,8 +393,8 @@ ACE_Cached_Connect_Strategy_Ex<ACE_T2>::recycle_state_i (const void *recycling_a return 0; } -template<ACE_T1> ACE_Recyclable_State -ACE_Cached_Connect_Strategy_Ex<ACE_T2>::recycle_state_i (const void *recycling_act) const +template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX> ACE_Recyclable_State +ACE_Cached_Connect_Strategy_Ex<SVC_HANDLER, ACE_PEER_CONNECTOR_2, CACHING_STRATEGY, ATTRIBUTES, MUTEX>::recycle_state_i (const void *recycling_act) const { // The wonders and perils of ACT CONNECTION_CACHE_ENTRY *entry = (CONNECTION_CACHE_ENTRY *) recycling_act; @@ -407,8 +404,8 @@ ACE_Cached_Connect_Strategy_Ex<ACE_T2>::recycle_state_i (const void *recycling_a return entry->ext_id_.recycle_state (); } -template <ACE_T1> int -ACE_Cached_Connect_Strategy_Ex<ACE_T2>::purge_i (const void *recycling_act) +template <class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX> int +ACE_Cached_Connect_Strategy_Ex<SVC_HANDLER, ACE_PEER_CONNECTOR_2, CACHING_STRATEGY, ATTRIBUTES, MUTEX>::purge_i (const void *recycling_act) { // The wonders and perils of ACT CONNECTION_CACHE_ENTRY *entry = (CONNECTION_CACHE_ENTRY *) recycling_act; @@ -417,8 +414,8 @@ ACE_Cached_Connect_Strategy_Ex<ACE_T2>::purge_i (const void *recycling_act) } -template <ACE_T1> int -ACE_Cached_Connect_Strategy_Ex<ACE_T2>::mark_as_closed_i (const void *recycling_act) +template <class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX> int +ACE_Cached_Connect_Strategy_Ex<SVC_HANDLER, ACE_PEER_CONNECTOR_2, CACHING_STRATEGY, ATTRIBUTES, MUTEX>::mark_as_closed_i (const void *recycling_act) { // The wonders and perils of ACT CONNECTION_CACHE_ENTRY *entry = (CONNECTION_CACHE_ENTRY *) recycling_act; @@ -429,8 +426,8 @@ ACE_Cached_Connect_Strategy_Ex<ACE_T2>::mark_as_closed_i (const void *recycling_ return 0; } -template <ACE_T1> int -ACE_Cached_Connect_Strategy_Ex<ACE_T2>::cleanup_hint_i (const void *recycling_act, +template <class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX> int +ACE_Cached_Connect_Strategy_Ex<SVC_HANDLER, ACE_PEER_CONNECTOR_2, CACHING_STRATEGY, ATTRIBUTES, MUTEX>::cleanup_hint_i (const void *recycling_act, void **act_holder) { // Reset the <*act_holder> in the confines and protection of the @@ -457,20 +454,20 @@ ACE_Cached_Connect_Strategy_Ex<ACE_T2>::cleanup_hint_i (const void *recycling_ac return 0; } -template <ACE_T1> int -ACE_Cached_Connect_Strategy_Ex<ACE_T2>::purge_connections (void) +template <class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX> int +ACE_Cached_Connect_Strategy_Ex<SVC_HANDLER, ACE_PEER_CONNECTOR_2, CACHING_STRATEGY, ATTRIBUTES, MUTEX>::purge_connections (void) { return this->connection_cache_.purge (); } -template <ACE_T1> CACHING_STRATEGY & -ACE_Cached_Connect_Strategy_Ex<ACE_T2>::caching_strategy (void) +template <class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX> CACHING_STRATEGY & +ACE_Cached_Connect_Strategy_Ex<SVC_HANDLER, ACE_PEER_CONNECTOR_2, CACHING_STRATEGY, ATTRIBUTES, MUTEX>::caching_strategy (void) { return this->connection_cache_.caching_strategy (); } -template <ACE_T1> int -ACE_Cached_Connect_Strategy_Ex<ACE_T2>::find (ACE_Refcounted_Hash_Recyclable<ACE_PEER_CONNECTOR_ADDR> &search_addr, +template <class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX> int +ACE_Cached_Connect_Strategy_Ex<SVC_HANDLER, ACE_PEER_CONNECTOR_2, CACHING_STRATEGY, ATTRIBUTES, MUTEX>::find (ACE_Refcounted_Hash_Recyclable<ACE_PEER_CONNECTOR_ADDR> &search_addr, ACE_Hash_Map_Entry<ACE_Refcounted_Hash_Recyclable<ACE_PEER_CONNECTOR_ADDR>, std::pair<SVC_HANDLER *, ATTRIBUTES> > *&entry) { typedef ACE_Hash_Map_Bucket_Iterator<REFCOUNTED_HASH_RECYCLABLE_ADDRESS, @@ -522,8 +519,8 @@ ACE_Cached_Connect_Strategy_Ex<ACE_T2>::find (ACE_Refcounted_Hash_Recyclable<ACE return -1; } -template <ACE_T1> void -ACE_Cached_Connect_Strategy_Ex<ACE_T2>::cleanup (void) +template <class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX> void +ACE_Cached_Connect_Strategy_Ex<SVC_HANDLER, ACE_PEER_CONNECTOR_2, CACHING_STRATEGY, ATTRIBUTES, MUTEX>::cleanup (void) { // Excluded other threads from changing the cache while we cleanup ACE_GUARD (MUTEX, ace_mon, *this->lock_); @@ -560,8 +557,8 @@ ACE_Cached_Connect_Strategy_Ex<ACE_T2>::cleanup (void) ACE_ALLOC_HOOK_DEFINE(ACE_Cached_Connect_Strategy_Ex) ///////////////////////////////////////////////////////////////////////// -template <ACE_T1> -ACE_Bounded_Cached_Connect_Strategy<ACE_T2>::ACE_Bounded_Cached_Connect_Strategy +template <class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX> +ACE_Bounded_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, CACHING_STRATEGY, ATTRIBUTES, MUTEX>::ACE_Bounded_Cached_Connect_Strategy (size_t max_size, CACHING_STRATEGY &caching_s, ACE_Creation_Strategy<SVC_HANDLER> *cre_s, @@ -574,14 +571,14 @@ ACE_Bounded_Cached_Connect_Strategy<ACE_T2>::ACE_Bounded_Cached_Connect_Strategy { } -template <ACE_T1> -ACE_Bounded_Cached_Connect_Strategy<ACE_T2>::~ACE_Bounded_Cached_Connect_Strategy(void) +template <class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX> +ACE_Bounded_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, CACHING_STRATEGY, ATTRIBUTES, MUTEX>::~ACE_Bounded_Cached_Connect_Strategy(void) { } -template <ACE_T1> +template <class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX> int -ACE_Bounded_Cached_Connect_Strategy<ACE_T2>::find_or_create_svc_handler_i +ACE_Bounded_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, CACHING_STRATEGY, ATTRIBUTES, MUTEX>::find_or_create_svc_handler_i (SVC_HANDLER *&sh, const ACE_PEER_CONNECTOR_ADDR &remote_addr, ACE_Time_Value *timeout, @@ -727,7 +724,4 @@ ACE_ALLOC_HOOK_DEFINE(ACE_Bounded_Cached_Connect_Strategy) ACE_END_VERSIONED_NAMESPACE_DECL -#undef ACE_T1 -#undef ACE_T2 - #endif /* ACE_CACHED_CONNECT_STRATEGY_T_CPP */ diff --git a/ACE/ace/Condition_T.h b/ACE/ace/Condition_T.h index edcf72c4931..44a1f55fb91 100644 --- a/ACE/ace/Condition_T.h +++ b/ACE/ace/Condition_T.h @@ -37,8 +37,8 @@ class ACE_Time_Value; * until shared data changes state. * * A condition variable enables threads to atomically block and - * test the condition under the protection of a mutual exclu- - * sion lock (mutex) until the condition is satisfied. That is, + * test the condition under the protection of a mutual exclusion + * lock (mutex) until the condition is satisfied. That is, * the mutex must have been held by the thread before calling * wait or signal on the condition. If the condition is false, * a thread blocks on a condition variable and atomically @@ -54,7 +54,6 @@ template <class MUTEX> class ACE_Condition { public: - // = Initialiation and termination methods. /// Initialize the condition variable. ACE_Condition (MUTEX &m, int type = USYNC_THREAD, const ACE_TCHAR *name = 0, void *arg = 0); @@ -67,7 +66,7 @@ public: * Block on condition, or until absolute time-of-day has passed. If * @a abstime == 0 use "blocking" <wait> semantics. Else, if @a abstime * != 0 and the call times out before the condition is signaled - * <wait> returns -1 and sets errno to ETIME. + * wait() returns -1 and sets errno to ETIME. */ int wait (const ACE_Time_Value *abstime); @@ -76,10 +75,10 @@ public: /** * Block on condition or until absolute time-of-day has passed. If - * abstime == 0 use "blocking" wait() semantics on the <mutex> + * @a abstime == 0 use "blocking" wait() semantics on the @a mutex * passed as a parameter (this is useful if you need to store the - * <Condition> in shared memory). Else, if <abstime> != 0 and the - * call times out before the condition is signaled <wait> returns -1 + * <Condition> in shared memory). Else, if @a abstime != 0 and the + * call times out before the condition is signaled wait() returns -1 * and sets errno to ETIME. */ int wait (MUTEX &mutex, const ACE_Time_Value *abstime = 0); diff --git a/ACE/ace/Configuration_Import_Export.h b/ACE/ace/Configuration_Import_Export.h index 41dc401e0c7..e3b9cde0457 100644 --- a/ACE/ace/Configuration_Import_Export.h +++ b/ACE/ace/Configuration_Import_Export.h @@ -83,12 +83,12 @@ private: * using the Win32 Registry file export format. This format looks like * [Section] * "key"="String Data" - * "key"=dword: numeric data in hexidecimal format + * "key"=dword: numeric data in hexadecimal format * "key"=hex: binary data * * @todo * - Add dynamic buffer when importing. currently it will not allow - * importing of values greater than a fixed ammount (4096 bytes) + * importing of values greater than a fixed amount (4096 bytes) * */ class ACE_Export ACE_Registry_ImpExp : public ACE_Config_ImpExp_Base @@ -101,7 +101,7 @@ public: virtual ~ACE_Registry_ImpExp (void); /** - * Imports the configuration database from filename. + * Imports the configuration database from @a filename. * No existing data is removed. */ virtual int import_config (const ACE_TCHAR* filename); @@ -149,7 +149,7 @@ private: * Justification = left_justified * * The caller can then retrieve the string with the regular - * <get_string_value> function and convert the string to the + * get_string_value() function and convert the string to the * desired data type. * * @todo @@ -157,7 +157,7 @@ private: * - Strings with embedded quotes " cause the import to fail * - Importing/exporting for values in the root section does not work * - Add dynamic buffer when importing. currently it will not allow - * importing of values greater than a fixed ammount (4096 bytes) + * importing of values greater than a fixed amount (4096 bytes) */ class ACE_Export ACE_Ini_ImpExp : public ACE_Config_ImpExp_Base { @@ -173,7 +173,7 @@ public: virtual ~ACE_Ini_ImpExp (void); /** - * Imports the configuration database from filename. + * Imports the configuration database from @a filename. * No existing data is removed. */ virtual int import_config (const ACE_TCHAR* filename); diff --git a/ACE/ace/FIFO_Recv_Msg.cpp b/ACE/ace/FIFO_Recv_Msg.cpp index 41ecca6054a..4755e41981c 100644 --- a/ACE/ace/FIFO_Recv_Msg.cpp +++ b/ACE/ace/FIFO_Recv_Msg.cpp @@ -8,8 +8,6 @@ #include "ace/FIFO_Recv_Msg.inl" #endif /* __ACE_INLINE__ */ - - ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_ALLOC_HOOK_DEFINE(ACE_FIFO_Recv_Msg) diff --git a/ACE/ace/Guard_T.h b/ACE/ace/Guard_T.h index 5a95f43999b..8efd96f6a22 100644 --- a/ACE/ace/Guard_T.h +++ b/ACE/ace/Guard_T.h @@ -36,9 +36,9 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * function... It performs automatic acquisition and release of * a parameterized synchronization object ACE_LOCK. * - * The <ACE_LOCK> class given as an actual parameter must provide, at - * the very least the <acquire>, <tryacquire>, <release>, and - * <remove> methods. + * The ACE_LOCK class given as an actual parameter must provide, at + * the very least the acquire(), tryacquire(), release(), and + * remove() methods. * * @warning A successfully constructed ACE_Guard does NOT mean that the * lock was acquired! It is the caller's responsibility, after diff --git a/ACE/ace/Hash_Cache_Map_Manager_T.cpp b/ACE/ace/Hash_Cache_Map_Manager_T.cpp index d3999783bc9..ad00ac797a3 100644 --- a/ACE/ace/Hash_Cache_Map_Manager_T.cpp +++ b/ACE/ace/Hash_Cache_Map_Manager_T.cpp @@ -17,11 +17,8 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_ALLOC_HOOK_DEFINE(ACE_Hash_Cache_Map_Manager) -#define ACE_T1 class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class CACHING_STRATEGY, class ATTRIBUTES -#define ACE_T2 KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES - -template <ACE_T1> -ACE_Hash_Cache_Map_Manager<ACE_T2>::ACE_Hash_Cache_Map_Manager (CACHING_STRATEGY &caching_s, +template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class CACHING_STRATEGY, class ATTRIBUTES> +ACE_Hash_Cache_Map_Manager<KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES>::ACE_Hash_Cache_Map_Manager (CACHING_STRATEGY &caching_s, size_t size, ACE_Allocator *alloc) : ACE_HCMM_BASE (caching_s, @@ -30,13 +27,13 @@ ACE_Hash_Cache_Map_Manager<ACE_T2>::ACE_Hash_Cache_Map_Manager (CACHING_STRATEGY { } -template <ACE_T1> -ACE_Hash_Cache_Map_Manager<ACE_T2>::~ACE_Hash_Cache_Map_Manager (void) +template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class CACHING_STRATEGY, class ATTRIBUTES> +ACE_Hash_Cache_Map_Manager<KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES>::~ACE_Hash_Cache_Map_Manager (void) { } -template <ACE_T1> int -ACE_Hash_Cache_Map_Manager<ACE_T2>::bind (const KEY &key, +template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class CACHING_STRATEGY, class ATTRIBUTES> int +ACE_Hash_Cache_Map_Manager<KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES>::bind (const KEY &key, const VALUE &value, CACHE_ENTRY *&entry) { @@ -71,8 +68,8 @@ ACE_Hash_Cache_Map_Manager<ACE_T2>::bind (const KEY &key, return bind_result; } -template <ACE_T1> int -ACE_Hash_Cache_Map_Manager<ACE_T2>::rebind (const KEY &key, +template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class CACHING_STRATEGY, class ATTRIBUTES> int +ACE_Hash_Cache_Map_Manager<KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES>::rebind (const KEY &key, const VALUE &value, CACHE_ENTRY *&entry) { @@ -109,8 +106,8 @@ ACE_Hash_Cache_Map_Manager<ACE_T2>::rebind (const KEY &key, return rebind_result; } -template <ACE_T1> int -ACE_Hash_Cache_Map_Manager<ACE_T2>::trybind (const KEY &key, +template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class CACHING_STRATEGY, class ATTRIBUTES> int +ACE_Hash_Cache_Map_Manager<KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES>::trybind (const KEY &key, VALUE &value, CACHE_ENTRY *&entry) { @@ -152,8 +149,8 @@ ACE_Hash_Cache_Map_Manager<ACE_T2>::trybind (const KEY &key, return trybind_result; } -template <ACE_T1> int -ACE_Hash_Cache_Map_Manager<ACE_T2>::find (const KEY &key, +template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class CACHING_STRATEGY, class ATTRIBUTES> int +ACE_Hash_Cache_Map_Manager<KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES>::find (const KEY &key, CACHE_ENTRY *&entry) { // Lookup the key and populate the <value>. @@ -178,8 +175,8 @@ ACE_Hash_Cache_Map_Manager<ACE_T2>::find (const KEY &key, return find_result; } -template <ACE_T1> int -ACE_Hash_Cache_Map_Manager<ACE_T2>::find (const KEY &key, +template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class CACHING_STRATEGY, class ATTRIBUTES> int +ACE_Hash_Cache_Map_Manager<KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES>::find (const KEY &key, VALUE &value) { CACHE_ENTRY *entry = 0; @@ -195,8 +192,8 @@ ACE_Hash_Cache_Map_Manager<ACE_T2>::find (const KEY &key, return result; } -template <ACE_T1> int -ACE_Hash_Cache_Map_Manager<ACE_T2>::find (const KEY &key) +template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class CACHING_STRATEGY, class ATTRIBUTES> int +ACE_Hash_Cache_Map_Manager<KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES>::find (const KEY &key) { CACHE_ENTRY *entry = 0; @@ -204,8 +201,8 @@ ACE_Hash_Cache_Map_Manager<ACE_T2>::find (const KEY &key) entry); } -template <ACE_T1> int -ACE_Hash_Cache_Map_Manager<ACE_T2>::unbind (CACHE_ENTRY *entry) +template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class CACHING_STRATEGY, class ATTRIBUTES> int +ACE_Hash_Cache_Map_Manager<KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES>::unbind (CACHE_ENTRY *entry) { // Remove the entry from the cache. int unbind_result = this->map_.unbind (entry); @@ -226,7 +223,4 @@ ACE_Hash_Cache_Map_Manager<ACE_T2>::unbind (CACHE_ENTRY *entry) ACE_END_VERSIONED_NAMESPACE_DECL -#undef ACE_T1 -#undef ACE_T2 - #endif /* ACE_HASH_CACHE_MAP_MANAGER_T_CPP */ diff --git a/ACE/ace/Hash_Cache_Map_Manager_T.h b/ACE/ace/Hash_Cache_Map_Manager_T.h index f9237b732d3..13ef28b781b 100644 --- a/ACE/ace/Hash_Cache_Map_Manager_T.h +++ b/ACE/ace/Hash_Cache_Map_Manager_T.h @@ -39,9 +39,6 @@ class ACE_Allocator; CACHING_STRATEGY, \ ATTRIBUTES> -// For linkers that cant grok long names. -#define ACE_Hash_Cache_Map_Manager AHCMM - /** * @class ACE_Hash_Cache_Map_Manager * @@ -189,7 +186,6 @@ class ACE_Hash_Cache_Map_Manager : public ACE_CACHE_MAP_MANAGER int unbind (CACHE_ENTRY *entry); protected: - /// Base class. typedef ACE_CACHE_MAP_MANAGER ACE_HCMM_BASE; }; diff --git a/ACE/ace/Hash_Cache_Map_Manager_T.inl b/ACE/ace/Hash_Cache_Map_Manager_T.inl index 0388abd6c6e..ba320285dd4 100644 --- a/ACE/ace/Hash_Cache_Map_Manager_T.inl +++ b/ACE/ace/Hash_Cache_Map_Manager_T.inl @@ -1,43 +1,43 @@ // -*- C++ -*- -// // $Id$ -#define ACE_T1 class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class CACHING_STRATEGY, class ATTRIBUTES -#define ACE_T2 KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES - ACE_BEGIN_VERSIONED_NAMESPACE_DECL -template <ACE_T1> ACE_INLINE int -ACE_Hash_Cache_Map_Manager<ACE_T2>::bind (const KEY &key, - const VALUE &value) +template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class CACHING_STRATEGY, class ATTRIBUTES> +ACE_INLINE int +ACE_Hash_Cache_Map_Manager<KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES>::bind ( + const KEY &key, + const VALUE &value) { - return ACE_HCMM_BASE::bind (key, - value); + return ACE_HCMM_BASE::bind (key, value); } -template <ACE_T1> ACE_INLINE int -ACE_Hash_Cache_Map_Manager<ACE_T2>::rebind (const KEY &key, - const VALUE &value) +template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class CACHING_STRATEGY, class ATTRIBUTES> +ACE_INLINE int +ACE_Hash_Cache_Map_Manager<KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES>::rebind ( + const KEY &key, + const VALUE &value) { - return ACE_HCMM_BASE::rebind (key, - value); + return ACE_HCMM_BASE::rebind (key, value); } -template <ACE_T1> ACE_INLINE int -ACE_Hash_Cache_Map_Manager<ACE_T2>::rebind (const KEY &key, - const VALUE &value, - VALUE &old_value) +template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class CACHING_STRATEGY, class ATTRIBUTES> +ACE_INLINE int +ACE_Hash_Cache_Map_Manager<KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES>::rebind ( + const KEY &key, + const VALUE &value, + VALUE &old_value) { - return ACE_HCMM_BASE::rebind (key, - value, - old_value); + return ACE_HCMM_BASE::rebind (key, value, old_value); } -template <ACE_T1> ACE_INLINE int -ACE_Hash_Cache_Map_Manager<ACE_T2>::rebind (const KEY &key, - const VALUE &value, - KEY &old_key, - VALUE &old_value) +template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class CACHING_STRATEGY, class ATTRIBUTES> +ACE_INLINE int +ACE_Hash_Cache_Map_Manager<KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES>::rebind ( + const KEY &key, + const VALUE &value, + KEY &old_key, + VALUE &old_value) { return ACE_HCMM_BASE::rebind (key, value, @@ -45,29 +45,28 @@ ACE_Hash_Cache_Map_Manager<ACE_T2>::rebind (const KEY &key, old_value); } -template <ACE_T1> ACE_INLINE int -ACE_Hash_Cache_Map_Manager<ACE_T2>::trybind (const KEY &key, - VALUE &value) +template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class CACHING_STRATEGY, class ATTRIBUTES> +ACE_INLINE int +ACE_Hash_Cache_Map_Manager<KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES>::trybind ( + const KEY &key, + VALUE &value) { - return ACE_HCMM_BASE::trybind (key, - value); + return ACE_HCMM_BASE::trybind (key, value); } -template <ACE_T1> ACE_INLINE int -ACE_Hash_Cache_Map_Manager<ACE_T2>::unbind (const KEY &key) +template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class CACHING_STRATEGY, class ATTRIBUTES> +ACE_INLINE int +ACE_Hash_Cache_Map_Manager<KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES>::unbind (const KEY &key) { return ACE_HCMM_BASE::unbind (key); } -template <ACE_T1> ACE_INLINE int -ACE_Hash_Cache_Map_Manager<ACE_T2>::unbind (const KEY &key, +template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class CACHING_STRATEGY, class ATTRIBUTES> +ACE_INLINE int +ACE_Hash_Cache_Map_Manager<KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES>::unbind (const KEY &key, VALUE &value) { - return ACE_HCMM_BASE::unbind (key, - value); + return ACE_HCMM_BASE::unbind (key, value); } ACE_END_VERSIONED_NAMESPACE_DECL - -#undef ACE_T1 -#undef ACE_T2 diff --git a/ACE/ace/IOStream.cpp b/ACE/ace/IOStream.cpp index b6bc8310bd9..f0ab6f5098d 100644 --- a/ACE/ace/IOStream.cpp +++ b/ACE/ace/IOStream.cpp @@ -5,8 +5,6 @@ #include "ace/IOStream.h" - - #if !defined (ACE_LACKS_ACE_IOSTREAM) # include "ace/OS_NS_errno.h" diff --git a/ACE/ace/IOStream.h b/ACE/ace/IOStream.h index 4c51c8d2dc7..864883f0df8 100644 --- a/ACE/ace/IOStream.h +++ b/ACE/ace/IOStream.h @@ -156,7 +156,7 @@ class ACE_Export ACE_Streambuf : public streambuf public: /** - * If the default allocation strategey were used the common buffer + * If the default allocation strategy were used the common buffer * would be deleted when the object destructs. Since we are * providing separate read/write buffers, it is up to us to manage * their memory. @@ -274,11 +274,11 @@ protected: */ int syncin (void); - /// syncout is called when the output needs to be flushed. This is + /// syncout() is called when the output needs to be flushed. This is /// easily done by calling the peer's send_n function. int syncout (void); - /// flushbuf is the worker of syncout. It is a separate function + /// flushbuf() is the worker of syncout. It is a separate function /// because it gets used sometimes in different context. int flushbuf (void); diff --git a/ACE/ace/IOStream_T.h b/ACE/ace/IOStream_T.h index 9bf90cee122..3201938f636 100644 --- a/ACE/ace/IOStream_T.h +++ b/ACE/ace/IOStream_T.h @@ -116,7 +116,7 @@ public: u_int streambuf_size = ACE_STREAMBUF_SIZE); /** - * The default constructor. This will initiailze your STREAM and + * The default constructor. This will initialize your STREAM and * then setup the iostream baseclass to use a custom streambuf based * on STREAM. */ @@ -126,7 +126,7 @@ public: /// to the <iostream> base class; virtual ~ACE_IOStream (void); - /// The only ambituity in the multiple inheritance is the <close> + /// The only ambiguity in the multiple inheritance is the <close> /// function. virtual int close (void); diff --git a/ACE/ace/Lib_Find.h b/ACE/ace/Lib_Find.h index ef146bb337d..e43259e58ca 100644 --- a/ACE/ace/Lib_Find.h +++ b/ACE/ace/Lib_Find.h @@ -101,10 +101,10 @@ namespace ACE extern ACE_Export size_t strrepl (char *s, char search, char replace); /** - * Splits string <s> into pieces separated by the string <token>. - * <next_start> is an opaque cookie handed back by the call to store + * Splits string @a s into pieces separated by the string @a token. + * @a next_start is an opaque cookie handed back by the call to store * its state for the next invocation, thus making it re-entrant. - * This operates very similar to Perl's <split> function except that + * This operates very similar to Perl's @c split function except that * it returns pieces one at a time instead of into an array. */ extern ACE_Export char *strsplit_r (char *s, diff --git a/ACE/ace/Local_Name_Space_T.h b/ACE/ace/Local_Name_Space_T.h index 13f6adc12a4..829346b644c 100644 --- a/ACE/ace/Local_Name_Space_T.h +++ b/ACE/ace/Local_Name_Space_T.h @@ -135,13 +135,13 @@ public: /** * Overwrite the value or type of an existing name in a * ACE_Local_Name_Space or bind a new name to the context, if it - * didn't exist yet. (Wide charcter strings interface). + * didn't exist yet. (Wide character strings interface). */ virtual int rebind (const ACE_NS_WString &name, const ACE_NS_WString &value, const char *type = ""); - /// Delete a name from a ACE_Local_Name_Space (Wide charcter strings + /// Delete a name from a ACE_Local_Name_Space (Wide character strings /// Interface). virtual int unbind (const ACE_NS_WString &name); virtual int unbind_i (const ACE_NS_WString &name); diff --git a/ACE/ace/Lock.h b/ACE/ace/Lock.h index 2b95c1962da..eaab7fbef8f 100644 --- a/ACE/ace/Lock.h +++ b/ACE/ace/Lock.h @@ -43,7 +43,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL class ACE_Export ACE_Lock { public: - /// CE needs a default ctor here. + /// CE needs a default constructor here. ACE_Lock (void); /// Noop virtual destructor @@ -86,7 +86,7 @@ public: /** * Conditionally acquire a read lock. If the locking mechanism - * doesn't support read locks then this just calls <acquire>. + * doesn't support read locks then this just calls acquire(). * Returns -1 on failure. If we "failed" because someone else * already had the lock, @c errno is set to @c EBUSY. */ @@ -94,7 +94,7 @@ public: /** * Conditionally acquire a write lock. If the locking mechanism - * doesn't support read locks then this just calls <acquire>. + * doesn't support read locks then this just calls acquire(). * Returns -1 on failure. If we "failed" because someone else * already had the lock, @c errno is set to @c EBUSY. */ @@ -103,7 +103,7 @@ public: /** * Conditionally try to upgrade a lock held for read to a write lock. * If the locking mechanism doesn't support read locks then this just - * calls <acquire>. Returns 0 on success, -1 on failure. + * calls acquire(). Returns 0 on success, -1 on failure. */ virtual int tryacquire_write_upgrade (void) = 0; }; @@ -118,13 +118,13 @@ public: * However, it defers our decision of what kind of lock to use * to the run time and delegates all locking operations to the actual * lock. Users must define a constructor in their subclass to - * initialize <lock_>. + * initialize @c lock_. */ class ACE_Export ACE_Adaptive_Lock : public ACE_Lock { public: /// You must also override the destructor function to match with how - /// you construct the underneath <lock_>. + /// you construct the underneath @c lock_. virtual ~ACE_Adaptive_Lock (void); // = Lock/unlock operations. @@ -142,8 +142,8 @@ public: protected: /** - * Create and initialize create the actual lcok used in the class. - * The default constructor simply set the <lock_> to 0 (null). You + * Create and initialize create the actual lock used in the class. + * The default constructor simply set the @c lock_ to 0 (null). You * must overwrite this method for this class to work. */ ACE_Adaptive_Lock (void); diff --git a/ACE/ace/Lock_Adapter_T.cpp b/ACE/ace/Lock_Adapter_T.cpp index f26a79fdd4c..04c1e00ce06 100644 --- a/ACE/ace/Lock_Adapter_T.cpp +++ b/ACE/ace/Lock_Adapter_T.cpp @@ -16,17 +16,6 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL -// This constructor isn't inlined, because SunPRO C++ 4.2 + patch -// 104631-07 has trouble compiling TAO with it inline. -template <class ACE_LOCKING_MECHANISM> -ACE_Lock_Adapter<ACE_LOCKING_MECHANISM>::ACE_Lock_Adapter (void) - : lock_ (0), - delete_lock_ (true) -{ - ACE_NEW (this->lock_, - ACE_LOCKING_MECHANISM); -} - template <class ACE_LOCKING_MECHANISM> ACE_Lock_Adapter<ACE_LOCKING_MECHANISM>::~ACE_Lock_Adapter (void) { diff --git a/ACE/ace/Lock_Adapter_T.h b/ACE/ace/Lock_Adapter_T.h index 866616d1bb1..089b14965ab 100644 --- a/ACE/ace/Lock_Adapter_T.h +++ b/ACE/ace/Lock_Adapter_T.h @@ -28,7 +28,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * @class ACE_Lock_Adapter * * @brief This is an adapter that allows applications to transparently - * combine the <ACE_Lock> abstract base class (which contains + * combine the ACE_Lock abstract base class (which contains * pure virtual methods) with any of the other concrete ACE * synchronization classes (e.g., ACE_Mutex, ACE_Semaphore, * ACE_RW_Mutex, etc.). @@ -50,7 +50,7 @@ public: /// created internally. ACE_Lock_Adapter (void); - /// Destructor. If <lock_> was not passed in by the user, it will be + /// Destructor. If @c lock_ was not passed in by the user, it will be /// deleted. virtual ~ACE_Lock_Adapter (void); @@ -67,29 +67,29 @@ public: /** * Block until the thread acquires a read lock. If the locking * mechanism doesn't support read locks then this just calls - * <acquire>. + * acquire(). */ virtual int acquire_read (void); /** * Block until the thread acquires a write lock. If the locking * mechanism doesn't support read locks then this just calls - * <acquire>. + * acquire(). */ virtual int acquire_write (void); /// Conditionally acquire a read lock. If the locking mechanism - /// doesn't support read locks then this just calls <acquire>. + /// doesn't support read locks then this just calls acquire(). virtual int tryacquire_read (void); /// Conditionally acquire a write lock. If the locking mechanism - /// doesn't support read locks then this just calls <acquire>. + /// doesn't support read locks then this just calls acquire(). virtual int tryacquire_write (void); /** * Conditionally try to upgrade a lock held for read to a write lock. * If the locking mechanism doesn't support read locks then this just - * calls <acquire>. Returns 0 on success, -1 on failure. + * calls acquire(). Returns 0 on success, -1 on failure. */ virtual int tryacquire_write_upgrade (void); diff --git a/ACE/ace/Lock_Adapter_T.inl b/ACE/ace/Lock_Adapter_T.inl index bc7899bffb3..c03cf9721a1 100644 --- a/ACE/ace/Lock_Adapter_T.inl +++ b/ACE/ace/Lock_Adapter_T.inl @@ -13,4 +13,15 @@ ACE_Lock_Adapter<ACE_LOCKING_MECHANISM>::ACE_Lock_Adapter ( { } +template <class ACE_LOCKING_MECHANISM> +ACE_INLINE +ACE_Lock_Adapter<ACE_LOCKING_MECHANISM>::ACE_Lock_Adapter (void) + : lock_ (0), + delete_lock_ (true) +{ + ACE_NEW (this->lock_, + ACE_LOCKING_MECHANISM); +} + + ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/Message_Block.h b/ACE/ace/Message_Block.h index c02a37d61f1..80c1a2de638 100644 --- a/ACE/ace/Message_Block.h +++ b/ACE/ace/Message_Block.h @@ -717,7 +717,7 @@ public: */ char *mark (void) const; - // = Message size is the total amount of space alloted. + // = Message size is the total amount of space allotred. /// Get the total amount of allotted space in the message. The amount of /// allotted space may be less than allocated space. @@ -762,11 +762,11 @@ public: ACE_Data_Block *release (ACE_Lock *lock = 0); // = Message flag accessors and mutators. - /// Bitwise-or the <more_flags> into the existing message flags and + /// Bitwise-or the @a more_flags into the existing message flags and /// return the new value. ACE_Message_Block::Message_Flags set_flags (ACE_Message_Block::Message_Flags more_flags); - /// Clear the message flag bits specified in <less_flags> and return + /// Clear the message flag bits specified in @a less_flags and return /// the new value. ACE_Message_Block::Message_Flags clr_flags (ACE_Message_Block::Message_Flags less_flags); @@ -803,7 +803,7 @@ protected: * Decrease the reference count, but don't delete the object. * Returns 0 if the object should be removed. * If @a lock is equal to the locking strategy then we assume that - * the lock is beign held by the current thread; this is used to + * the lock is being held by the current thread; this is used to * release all the data blocks in a chain while holding a single * lock. */ @@ -843,7 +843,7 @@ protected: /** * Reference count for this ACE_Data_Block, which is used to avoid - * deep copies (i.e., <clone>). Note that this pointer value is + * deep copies (i.e., clone()). Note that this pointer value is * shared by all owners of the <Data_Block>'s data, i.e., all the * ACE_Message_Blocks. */ diff --git a/ACE/ace/Name_Space.h b/ACE/ace/Name_Space.h index 1848443d37c..d9a844f23eb 100644 --- a/ACE/ace/Name_Space.h +++ b/ACE/ace/Name_Space.h @@ -99,13 +99,13 @@ public: /** * Overwrite the value or type of an existing name in a * ACE_Name_Space or bind a new name to the context, if it didn't - * exist yet. (Wide charcter strings interface). + * exist yet. (Wide character strings interface). */ virtual int rebind (const ACE_NS_WString &name_in, const ACE_NS_WString &value_in, const char *type_in = "") = 0; - /// Delete a name from a ACE_Name_Space (Wide charcter strings + /// Delete a name from a ACE_Name_Space (Wide character strings /// Interface). virtual int unbind (const ACE_NS_WString &name_in) = 0; diff --git a/ACE/ace/Naming_Context.h b/ACE/ace/Naming_Context.h index a4b1dde2b32..9d85b65b74f 100644 --- a/ACE/ace/Naming_Context.h +++ b/ACE/ace/Naming_Context.h @@ -126,7 +126,7 @@ public: /** * Overwrite the value or type of an existing name in a * ACE_Naming_Context or bind a new name to the context, if it - * didn't exist yet. (Wide charcter strings interface). + * didn't exist yet. (Wide character strings interface). */ int rebind (const ACE_NS_WString &name_in, const ACE_NS_WString &value_in, @@ -135,13 +135,13 @@ public: /** * Overwrite the value or type of an existing name in a * ACE_Naming_Context or bind a new name to the context, if it - * didn't exist yet. ( charcter strings interface) + * didn't exist yet. ( character strings interface) */ int rebind (const char *name_in, const char *value_in, const char *type_in = ""); - /// Delete a name from a ACE_Naming_Context (Wide charcter strings + /// Delete a name from a ACE_Naming_Context (Wide character strings /// Interface). int unbind (const ACE_NS_WString &name_in); diff --git a/ACE/ace/OS_NS_netdb.cpp b/ACE/ace/OS_NS_netdb.cpp index 144b2ed17dd..552ee178443 100644 --- a/ACE/ace/OS_NS_netdb.cpp +++ b/ACE/ace/OS_NS_netdb.cpp @@ -385,7 +385,7 @@ ACE_OS::getmacaddress (struct macaddr_node_t *node) return 0; -#elif defined (ACE_HAS_IPHONE) || defined (ACE_HAS_MAC_OSX) +#elif defined (ACE_HAS_SIOCGIFCONF) const long BUFFERSIZE = 4000; char buffer[BUFFERSIZE]; diff --git a/ACE/ace/OS_NS_sys_shm.h b/ACE/ace/OS_NS_sys_shm.h index 0d2a5a49d32..42f9f37be81 100644 --- a/ACE/ace/OS_NS_sys_shm.h +++ b/ACE/ace/OS_NS_sys_shm.h @@ -37,7 +37,6 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL namespace ACE_OS { - //@{ @name A set of wrappers for System V shared memory. ACE_NAMESPACE_INLINE_FUNCTION void *shmat (int int_id, @@ -56,8 +55,7 @@ namespace ACE_OS int shmget (key_t key, size_t size, int flags); - ///@} - + //@} } /* namespace ACE_OS */ ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/OS_NS_unistd.inl b/ACE/ace/OS_NS_unistd.inl index d2f53a7ba2a..79774cd86ac 100644 --- a/ACE/ace/OS_NS_unistd.inl +++ b/ACE/ace/OS_NS_unistd.inl @@ -23,7 +23,7 @@ # include "ace/os_include/os_unistd.h" #endif /* ACE_HAS_ACCESS_EMULATION */ -#if defined (ACE_VXWORKS) && (((ACE_VXWORKS >= 0x620) && (ACE_VXWORKS <= 0x680)) || defined (ACE_HAS_VXWORKS551_MEDUSA)) +#if defined (ACE_VXWORKS) && (ACE_VXWORKS <= 0x680) # if defined (__RTP__) # include "ace/os_include/os_strings.h" # else @@ -274,7 +274,7 @@ ACE_OS::execv (const char *path, ACE_NOTSUP_RETURN (-1); #elif defined (ACE_WIN32) -# if defined (__BORLANDC__) /* VSB */ +# if defined (__BORLANDC__) return ::execv (path, argv); # elif defined (__MINGW32__) return ::_execv (path, (char *const *) argv); @@ -304,7 +304,7 @@ ACE_OS::execve (const char *path, ACE_NOTSUP_RETURN (-1); #elif defined (ACE_WIN32) -# if defined (__BORLANDC__) /* VSB */ +# if defined (__BORLANDC__) return ::execve (path, argv, envp); # elif defined (__MINGW32__) return ::_execve (path, (char *const *) argv, (char *const *) envp); @@ -332,7 +332,7 @@ ACE_OS::execvp (const char *file, ACE_NOTSUP_RETURN (-1); #elif defined (ACE_WIN32) -# if defined (__BORLANDC__) /* VSB */ +# if defined (__BORLANDC__) return ::execvp (file, argv); # elif defined (__MINGW32__) return ::_execvp (file, (char *const *) argv); diff --git a/ACE/ace/Process.cpp b/ACE/ace/Process.cpp index d60a3d2f931..f1cebecae39 100644 --- a/ACE/ace/Process.cpp +++ b/ACE/ace/Process.cpp @@ -24,13 +24,11 @@ #include "ace/Vector_T.h" #include "ace/Tokenizer_T.h" -#if defined (ACE_VXWORKS) && (ACE_VXWORKS > 0x600) && defined (__RTP__) +#if defined (ACE_VXWORKS) && defined (__RTP__) # include <rtpLib.h> # include <taskLib.h> #endif - - // This function acts as a signal handler for SIGCHLD. We don't really want // to do anything with the signal - it's just needed to interrupt a sleep. // See wait() for more info. @@ -255,7 +253,7 @@ ACE_Process::spawn (ACE_Process_Options &options) } return this->child_id_; -#elif (defined (ACE_VXWORKS) && (ACE_VXWORKS > 0x600)) && defined (__RTP__) +#elif defined (ACE_VXWORKS) && defined (__RTP__) if (ACE_BIT_ENABLED (options.creation_flags (), ACE_Process_Options::NO_EXEC)) ACE_NOTSUP_RETURN (ACE_INVALID_PID); @@ -1325,7 +1323,7 @@ ACE_Process_Options::command_line_argv (void) do command_line_argv_[x] = parser.next (); while (command_line_argv_[x] != 0 - // substract one for the ending zero. + // subtract one for the ending zero. && ++x < max_command_line_args_ - 1); command_line_argv_[x] = 0; diff --git a/ACE/ace/Process_Manager.cpp b/ACE/ace/Process_Manager.cpp index eb4cfb42d60..cc00a43af71 100644 --- a/ACE/ace/Process_Manager.cpp +++ b/ACE/ace/Process_Manager.cpp @@ -917,7 +917,7 @@ ACE_Process_Manager::wait (pid_t pid, for (ACE_Countdown_Time time_left (&tmo); ; time_left.update ()) { pid = ACE_OS::waitpid (-1, status, WNOHANG); -# if defined (ACE_VXWORKS) && (ACE_VXWORKS >= 0x600) +# if defined (ACE_VXWORKS) if (pid > 0 || (pid == ACE_INVALID_PID && errno != EINTR)) # else if (pid > 0 || pid == ACE_INVALID_PID) diff --git a/ACE/ace/Process_Semaphore.h b/ACE/ace/Process_Semaphore.h index 29a7b0b0406..b10c47898b1 100644 --- a/ACE/ace/Process_Semaphore.h +++ b/ACE/ace/Process_Semaphore.h @@ -71,14 +71,14 @@ public: int release (void); /** - * Acquire semaphore ownership. This calls <acquire> and is only + * Acquire semaphore ownership. This calls acquire() and is only * here to make the ACE_Process_Semaphore interface consistent * with the other synchronization APIs. */ int acquire_read (void); /** - * Acquire semaphore ownership. This calls <acquire> and is only + * Acquire semaphore ownership. This calls acquire() and is only * here to make the ACE_Process_Semaphore interface consistent * with the other synchronization APIs. */ @@ -86,7 +86,7 @@ public: /** * Conditionally acquire semaphore (i.e., won't block). This calls - * <tryacquire> and is only here to make the ACE_Process_Semaphore + * tryacquire() and is only here to make the ACE_Process_Semaphore * interface consistent with the other synchronization APIs. * Returns -1 on failure. If we "failed" because someone else * already had the lock, @c errno is set to @c EBUSY. @@ -95,7 +95,7 @@ public: /** * Conditionally acquire semaphore (i.e., won't block). This calls - * <tryacquire> and is only here to make the ACE_Process_Semaphore + * tryacquire() and is only here to make the ACE_Process_Semaphore * interface consistent with the other synchronization APIs. * Returns -1 on failure. If we "failed" because someone else * already had the lock, @c errno is set to @c EBUSY. @@ -138,7 +138,7 @@ template <class T> class ACE_Malloc_Lock_Adapter_T; * @brief Template specialization of ACE_Malloc_Lock_Adapter_T for * ACE_Process_Semaphore. * - * This is needed since the ctor for ACE_Process_Semaphore doesn't match + * This is needed since the constructor for ACE_Process_Semaphore doesn't match * the standard form used by other lock strategy classes. */ template<> diff --git a/ACE/ace/Profile_Timer.h b/ACE/ace/Profile_Timer.h index 1dd699a1b6a..f17551d7f72 100644 --- a/ACE/ace/Profile_Timer.h +++ b/ACE/ace/Profile_Timer.h @@ -101,14 +101,14 @@ private: ACE_Profile_Timer::Rusage last_usage_; #if defined (ACE_HAS_PRUSAGE_T) - /// Substract two timestructs and store their difference. + /// Subtract two timestructs and store their difference. void subtract (timespec_t &tdiff, timespec_t &t0, timespec_t &t1); /// I/O handle for /proc file system. ACE_HANDLE proc_handle_; #elif defined (ACE_HAS_GETRUSAGE) - /// Substract two timestructs and store their difference. + /// Subtract two timestructs and store their difference. void subtract (timeval &tdiff, timeval &t0, timeval &t1); diff --git a/ACE/ace/QtReactor/QtReactor.h b/ACE/ace/QtReactor/QtReactor.h index 9d34c8d58b8..511d6ab81a2 100644 --- a/ACE/ace/QtReactor/QtReactor.h +++ b/ACE/ace/QtReactor/QtReactor.h @@ -27,22 +27,13 @@ #if defined (ACE_HAS_QT4) # include "Qt/qglobal.h" -#else -# include "qglobal.h" #endif // QT toolkit specific includes. -#if QT_VERSION < 0x040000 -#include /**/ <qapplication.h> -#include /**/ <qobject.h> -#include /**/ <qsocketnotifier.h> -#include /**/ <qtimer.h> -#else #include /**/ <QtGui/QApplication> #include /**/ <QtCore/QObject> #include /**/ <QtCore/QSocketNotifier> #include /**/ <QtCore/QTimer> -#endif ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -225,7 +216,7 @@ private slots: /// Dispatch an exception event void exception_event (int FD); - /// Dispach a timeout event + /// Dispatch a timeout event void timeout_event (void); }; diff --git a/ACE/ace/QtReactor/ace_qt3reactor.mpc b/ACE/ace/QtReactor/ace_qt3reactor.mpc deleted file mode 100644 index 74a2ab5e43e..00000000000 --- a/ACE/ace/QtReactor/ace_qt3reactor.mpc +++ /dev/null @@ -1,27 +0,0 @@ -// -*- MPC -*- now wouldn't this be cool... -// $Id$ - -project(ACE_Qt3Reactor_moc) : acedefaults, ace_qt3 { - custom_only = 1 - MOC_Files { - QtReactor.h - } -} - -project(ACE_Qt3Reactor) : acedefaults, install, acelib, ace_output, ace_qt3 { - after += ACE_Qt3Reactor_moc - sharedname = ACE_QtReactor - dynamicflags += ACE_QTREACTOR_BUILD_DLL - - MOC_Files { - } - - Source_Files { - QtReactor_moc.cpp - QtReactor.cpp - } - - specific { - install_dir = ace/QtReactor - } -} diff --git a/ACE/ace/README b/ACE/ace/README index 4d911bc4404..fcd0828cd73 100644 --- a/ACE/ace/README +++ b/ACE/ace/README @@ -353,8 +353,6 @@ ACE_USES_IPV4_IPV6_MIGRATION Enable IPv6 support in ACE on turned on by default. ACE_HAS_IPV6_V6ONLY Platform supports the IPPROTO_IPV6 level IPV6_V6ONLY socket option. -ACE_HAS_IRIX62_THREADS Platform supports the very odd - IRIX 6.2 threads... ACE_HAS_NONSTATIC_OBJECT_MANAGER Causes the ACE_Object_Manager instance to be created in main (int, char *[]), instead of as @@ -482,9 +480,6 @@ ACE_HAS_PTHREADS Platform supports POSIX one. Also may need some ACE_HAS_... thing for extensions. -ACE_HAS_PTHREADS_DRAFT4 Platform's 'Pthreads' is .4a draft 4 -ACE_HAS_PTHREADS_DRAFT6 Platform's 'Pthreads' is .4a draft 6 -ACE_HAS_PTHREADS_DRAFT7 Platform's 'Pthreads' is .1c draft 7 ACE_HAS_PTHREADS_STD Platform supports POSIX.1c-1995 threads (This is the final standard Pthreads). @@ -694,9 +689,6 @@ ACE_HAS_UCONTEXT_T Platform supports ucontext_t ACE_HAS_UNION_WAIT The wait() system call takes a (union wait *) rather than int * -ACE_HAS_UNIXWARE_SVR4_SIGNAL_T Has inconsistent SVR4 signal - stuff, but not the same as the - other platforms ACE_HAS_VALGRIND Running with valgrind ACE_HAS_VERBOSE_NOTSUP Prints out console message in ACE_NOTSUP. Useful for diff --git a/ACE/ace/RW_Mutex.h b/ACE/ace/RW_Mutex.h index 1abed623c5f..b1c4bf331a7 100644 --- a/ACE/ace/RW_Mutex.h +++ b/ACE/ace/RW_Mutex.h @@ -92,7 +92,7 @@ public: /** * Note, for interface uniformity with other synchronization - * wrappers we include the <tryacquire> method. This is implemented + * wrappers we include the tryacquire() method. This is implemented * as a write-lock to be safe... Returns -1 on failure. If we * "failed" because someone else already had the lock, @c errno is * set to @c EBUSY. @@ -115,11 +115,11 @@ protected: /// Readers/writer lock. ACE_rwlock_t lock_; - /// Keeps track of whether <remove> has been called yet to avoid - /// multiple <remove> calls, e.g., explicitly and implicitly in the - /// destructor. This flag isn't protected by a lock, so make sure + /// Keeps track of whether remove() has been called yet to avoid + /// multiple remove() calls, e.g., explicitly and implicitly in the + /// destructor. This flag isn't protected by a lock, so make sure /// that you don't have multiple threads simultaneously calling - /// <remove> on the same object, which is a bad idea anyway... + /// remove() on the same object, which is a bad idea anyway... bool removed_; private: diff --git a/ACE/ace/Recursive_Thread_Mutex.h b/ACE/ace/Recursive_Thread_Mutex.h index 5cdc4582f0c..ab5b3a6f2f1 100644 --- a/ACE/ace/Recursive_Thread_Mutex.h +++ b/ACE/ace/Recursive_Thread_Mutex.h @@ -72,7 +72,7 @@ public: int acquire (ACE_Time_Value &tv); /** - * If @a tv == 0 the call <acquire()> directly. Otherwise, Block the + * If @a tv == 0 the call acquire() directly. Otherwise, Block the * thread until we acquire the mutex or until @a tv times out, in * which case -1 is returned with @c errno == @c ETIME. Note that * <*tv> is assumed to be in "absolute" rather than "relative" time. @@ -89,14 +89,14 @@ public: int tryacquire (void); /** - * Acquire mutex ownership. This calls <acquire> and is only + * Acquire mutex ownership. This calls acquire() and is only * here to make the ACE_Recusive_Thread_Mutex interface consistent * with the other synchronization APIs. */ int acquire_read (void); /** - * Acquire mutex ownership. This calls <acquire> and is only + * Acquire mutex ownership. This calls acquire() and is only * here to make the ACE_Recusive_Thread_Mutex interface consistent * with the other synchronization APIs. */ @@ -104,7 +104,7 @@ public: /** * Conditionally acquire mutex (i.e., won't block). This calls - * <tryacquire> and is only here to make the + * tryacquire() and is only here to make the * ACE_Recusive_Thread_Mutex interface consistent with the other * synchronization APIs. Returns -1 on failure. If we "failed" * because someone else already had the lock, @c errno is set to @@ -114,7 +114,7 @@ public: /** * Conditionally acquire mutex (i.e., won't block). This calls - * <tryacquire> and is only here to make the + * tryacquire() and is only here to make the * ACE_Recusive_Thread_Mutex interface consistent with the other * synchronization APIs. Returns -1 on failure. If we "failed" * because someone else already had the lock, @c errno is set to @@ -169,11 +169,11 @@ protected: /// Recursive mutex. ACE_recursive_thread_mutex_t lock_; - /// Keeps track of whether <remove> has been called yet to avoid - /// multiple <remove> calls, e.g., explicitly and implicitly in the + /// Keeps track of whether remove() has been called yet to avoid + /// multiple remove() calls, e.g., explicitly and implicitly in the /// destructor. This flag isn't protected by a lock, so make sure /// that you don't have multiple threads simultaneously calling - /// <remove> on the same object, which is a bad idea anyway... + /// remove() on the same object, which is a bad idea anyway... bool removed_; private: diff --git a/ACE/ace/Registry_Name_Space.h b/ACE/ace/Registry_Name_Space.h index 5b27fef9307..66db9652890 100644 --- a/ACE/ace/Registry_Name_Space.h +++ b/ACE/ace/Registry_Name_Space.h @@ -67,13 +67,13 @@ public: /** * Overwrite the value or type of an existing name in a * ACE_Name_Space or bind a new name to the context, if it didn't - * exist yet. (Wide charcter strings interface). + * exist yet. (Wide character strings interface). */ int rebind (const ACE_NS_WString &name_in, const ACE_NS_WString &value_in, const char *type_in = ""); - /// Delete a name from a ACE_Name_Space (Wide charcter strings + /// Delete a name from a ACE_Name_Space (Wide character strings /// Interface). int unbind (const ACE_NS_WString &name_in); diff --git a/ACE/ace/Remote_Name_Space.h b/ACE/ace/Remote_Name_Space.h index 1f7e8de6555..bfb7cdfe4c1 100644 --- a/ACE/ace/Remote_Name_Space.h +++ b/ACE/ace/Remote_Name_Space.h @@ -77,18 +77,18 @@ public: /** * Overwrite the value or type of an existing name in a * ACE_Remote_Name_Space or bind a new name to the context, if it - * didn't exist yet. (Wide charcter strings interface). + * didn't exist yet. (Wide character strings interface). */ virtual int rebind (const ACE_NS_WString &name_in, const ACE_NS_WString &value_in, const char *type_in = ""); - /// Delete a name from a ACE_Remote_Name_Space (Wide charcter strings + /// Delete a name from a ACE_Remote_Name_Space (Wide character strings /// Interface). virtual int unbind (const ACE_NS_WString &name_in); /// Get value and type of a given name binding (Wide chars). The - /// caller is responsible for deleting both <value_out> and <type_out>! + /// caller is responsible for deleting both @a value_out and @a type_out! virtual int resolve (const ACE_NS_WString &name_in, ACE_NS_WString &value_out, char *&type_out); diff --git a/ACE/ace/Remote_Tokens.h b/ACE/ace/Remote_Tokens.h index 8f6078029a0..a5c080ab6be 100644 --- a/ACE/ace/Remote_Tokens.h +++ b/ACE/ace/Remote_Tokens.h @@ -42,7 +42,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * distributed token operations. It is similar to the * ACE_Token_Proxy. * @todo - * Distributed sleep_hooks have not been implemented. <owner_id> + * Distributed sleep_hooks have not been implemented. <owner_id> * is not implemented. */ class ACE_Export ACE_Remote_Token_Proxy : public ACE_Token_Proxy diff --git a/ACE/ace/SOCK_Dgram_Bcast.cpp b/ACE/ace/SOCK_Dgram_Bcast.cpp index 07a1961eea8..1a44ce597b5 100644 --- a/ACE/ace/SOCK_Dgram_Bcast.cpp +++ b/ACE/ace/SOCK_Dgram_Bcast.cpp @@ -181,7 +181,7 @@ ACE_SOCK_Dgram_Bcast::mk_broadcast (const ACE_TCHAR *host_name) // Silently skip link interfaces if (ifr->ifr_addr.sa_family == AF_LINK) continue; -#endif /* __QNX__ */ +#endif /* __QNX__ || ACE_VXWORKS */ // Compare host ip address with interface ip address. if (host_name) { diff --git a/ACE/ace/Select_Reactor_T.h b/ACE/ace/Select_Reactor_T.h index f7648793a33..27305a1c272 100644 --- a/ACE/ace/Select_Reactor_T.h +++ b/ACE/ace/Select_Reactor_T.h @@ -60,7 +60,7 @@ public: /// If @a disable_notify_pipe is non-0 then the reactor will /// not create a notification pipe, which will save two I/O handles - /// but will elide the <notify()> feature. If @a mask_signals is + /// but will elide the notify() feature. If @a mask_signals is /// true the reactor is "signal-safe" when dispatching handlers to /// signal events, whereas if @a mask_signals is false the reactor will /// be more efficient, but not signal-safe (which may be perfectly @@ -106,7 +106,7 @@ public: * timer queue, respectively. If @arg disable_notify_pipe is non-0 the * notification pipe is not created, thereby saving two I/O handles. * - * @note On Unix platforms, the maximum_number_of_handles parameter + * @note On Unix platforms, the @a maximum_number_of_handles parameter * should be as large as the maximum number of file * descriptors allowed for a given process. This is necessary * since a file descriptor is used to directly index the array @@ -148,6 +148,7 @@ public: */ virtual int work_pending (const ACE_Time_Value &max_wait_time = ACE_Time_Value::zero); + //@{ /** * This event loop driver that blocks for @a max_wait_time before * returning. It will return earlier if timer events, I/O events, @@ -165,12 +166,14 @@ public: * that were dispatched, 0 if the @a max_wait_time elapsed without * dispatching any handlers, or -1 if something goes wrong. * - * Current <alertable_handle_events> is identical to - * <handle_events>. + * Current alertable_handle_events() is identical to + * handle_events(). */ virtual int handle_events (ACE_Time_Value *max_wait_time = 0); virtual int alertable_handle_events (ACE_Time_Value *max_wait_time = 0); + //@} + //@{ /** * This method is just like the one above, except the * @a max_wait_time value is a reference and can therefore never be @@ -181,6 +184,7 @@ public: */ virtual int handle_events (ACE_Time_Value &max_wait_time); virtual int alertable_handle_events (ACE_Time_Value &max_wait_time); + //@} // = Event handling control. @@ -599,7 +603,7 @@ protected: virtual int any_ready (ACE_Select_Reactor_Handle_Set &handle_set); /// Implement the <any_ready> method, assuming that the Sig_Guard is - /// beign held + /// being held virtual int any_ready_i (ACE_Select_Reactor_Handle_Set &handle_set); /// Take corrective action when errors occur. diff --git a/ACE/ace/Sock_Connect.cpp b/ACE/ace/Sock_Connect.cpp index 95e3cdffd52..a4ef6a54b8c 100644 --- a/ACE/ace/Sock_Connect.cpp +++ b/ACE/ace/Sock_Connect.cpp @@ -37,25 +37,12 @@ # endif /*ACE_VXWORKS */ # endif /* ACE_HAS_GETIFADDRS */ -#if defined (ACE_VXWORKS) && (ACE_VXWORKS < 0x600) -#include /**/ <inetLib.h> -#include /**/ <netinet/in_var.h> -#if defined (ACE_HAS_IPV6) -#include /**/ <ifLib.h> -extern "C" { - extern struct in_ifaddr* in_ifaddr; - extern LIST_HEAD(in_ifaddrhashhead, in_ifaddr) *in_ifaddrhashtbl; -} -#endif /* ACE_HAS_IPV6 */ -#include "ace/OS_NS_stdio.h" -#endif /* ACE_VXWORKS < 0x600 */ - -#if defined (ACE_VXWORKS) && ((ACE_VXWORKS >= 0x630) && (ACE_VXWORKS <= 0x670)) && defined (__RTP__) && defined (ACE_HAS_IPV6) +#if defined (ACE_VXWORKS) && (ACE_VXWORKS <= 0x670) && defined (__RTP__) && defined (ACE_HAS_IPV6) const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT; const struct in6_addr in6addr_nodelocal_allnodes = IN6ADDR_NODELOCAL_ALLNODES_INIT; const struct in6_addr in6addr_linklocal_allnodes = IN6ADDR_LINKLOCAL_ALLNODES_INIT; const struct in6_addr in6addr_linklocal_allrouters = IN6ADDR_LINKLOCAL_ALLROUTERS_INIT; -#endif /* ACE_VXWORKS >= 0x630 && <= 0x670 && __RTP__ && ACE_HAS_IPV6 */ +#endif /* ACE_VXWORKS <= 0x670 && __RTP__ && ACE_HAS_IPV6 */ #if defined (ACE_HAS_WINCE) #include /**/ <iphlpapi.h> @@ -1094,64 +1081,7 @@ get_ip_interfaces_aix (size_t &count, return 0; } -#elif defined (ACE_VXWORKS) && (ACE_VXWORKS < 0x600) && !defined (ACE_HAS_VXWORKS551_MEDUSA) -int -get_ip_interfaces_vxworks_lt600 (size_t &count, - ACE_INET_Addr *&addrs) -{ - count = 0; - // Loop through each address structure - -# if defined (ACE_HAS_IPV6) && defined (TAILQ_ENTRY) -# define ia_next ia_link.tqe_next -# endif /* TAILQ_ENTRY */ - - for (struct in_ifaddr* ia = in_ifaddr; ia != 0; ia = ia->ia_next) - { - ++count; - } - - // Now create and initialize output array. - ACE_NEW_RETURN (addrs, - ACE_INET_Addr[count], - -1); // caller must free - count = 0; - for (struct in_ifaddr* ia = in_ifaddr; ia != 0; ia = ia->ia_next) - { - struct ifnet* ifp = ia->ia_ifa.ifa_ifp; - if (ifp != 0) - { - // Get the current interface name - char interface[64]; - ACE_OS::sprintf(interface, "%s%d", ifp->if_name, ifp->if_unit); - - // Get the address for the current interface - char address [INET_ADDR_LEN]; - STATUS status = ifAddrGet(interface, address); - - if (status == OK) - { - // Concatenate a ':' at the end. This is because in - // ACE_INET_Addr::string_to_addr, the ip_address is - // obtained using ':' as the delimiter. Since, using - // ifAddrGet(), we just get the IP address, I am adding - // a ":" to get with the general case. - ACE_OS::strcat (address, ":"); - addrs[count].set (address); - } - else - { - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("ACE::get_ip_interface failed\n") - ACE_TEXT ("Couldnt get the IP Address\n")), - -1); - } - ++count; - } - } - return 0; -} -#endif // ACE_WIN32 || ACE_HAS_GETIFADDRS || __hpux || _AIX || ACE_VXWORKS < 0x600 +#endif // ACE_WIN32 || ACE_HAS_GETIFADDRS || __hpux || _AIX // return an array of all configured IP interfaces on this host, count @@ -1174,8 +1104,6 @@ ACE::get_ip_interfaces (size_t &count, ACE_INET_Addr *&addrs) return get_ip_interfaces_hpux (count, addrs); #elif defined (_AIX) return get_ip_interfaces_aix (count, addrs); -#elif defined (ACE_VXWORKS) && (ACE_VXWORKS < 0x600) && !defined (ACE_HAS_VXWORKS551_MEDUSA) - return get_ip_interfaces_vxworks_lt600 (count, addrs); #elif (defined (__unix) || defined (__unix__) || defined (ACE_OPENVMS) || (defined (ACE_VXWORKS) && !defined (ACE_HAS_GETIFADDRS)) || defined (ACE_HAS_RTEMS)) && !defined (ACE_LACKS_NETWORKING) // COMMON (SVR4 and BSD) UNIX CODE diff --git a/ACE/ace/TLI.inl b/ACE/ace/TLI.inl index 2485cdc5557..418ed0c02ed 100644 --- a/ACE/ace/TLI.inl +++ b/ACE/ace/TLI.inl @@ -1,10 +1,8 @@ // -*- C++ -*- -// // $Id$ #include "ace/TLI.h" - ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE diff --git a/ACE/ace/Time_Value.cpp b/ACE/ace/Time_Value.cpp index 8c7405d7e4d..614105abd15 100644 --- a/ACE/ace/Time_Value.cpp +++ b/ACE/ace/Time_Value.cpp @@ -213,13 +213,13 @@ ACE_Time_Value::normalize (bool saturate) this->tv_.tv_usec += ACE_ONE_SECOND_IN_USECS; } // tv_sec in qnxnto is unsigned -#if !defined ( __QNXNTO__) +#if !defined ( __QNX__) else if (this->tv_.tv_sec < 0 && this->tv_.tv_usec > 0) { ++this->tv_.tv_sec; this->tv_.tv_usec -= ACE_ONE_SECOND_IN_USECS; } -#endif /* __QNXNTO__ */ +#endif /* __QNX__ */ } diff --git a/ACE/ace/Time_Value.h b/ACE/ace/Time_Value.h index 75bb998f598..cb33f1aa121 100644 --- a/ACE/ace/Time_Value.h +++ b/ACE/ace/Time_Value.h @@ -250,7 +250,7 @@ public: /// Subtract @a tv to this. ACE_Time_Value &operator -= (const ACE_Time_Value &tv); - /// Substract @a tv to this. + /// Subtract @a tv to this. ACE_Time_Value &operator -= (time_t tv); /** diff --git a/ACE/ace/config-doxygen.h b/ACE/ace/config-doxygen.h deleted file mode 100644 index 039abb3a090..00000000000 --- a/ACE/ace/config-doxygen.h +++ /dev/null @@ -1,119 +0,0 @@ -// -*- C++ -*- - -/** - * This is a configuration file to define all the macros that Doxygen - * needs - * - * @file config-doxygen.h - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - * @author Darrell Brunsch <brunsch@uci.edu> - * - */ -#ifndef ACE_CONFIG_DOXYGEN_H -#define ACE_CONFIG_DOXYGEN_H - -/// Make sure that we always turn inlining on. -#define __ACE_INLINE__ - -/// Make the wchar_t interfaces available. -#define ACE_HAS_WCHAR - -/// Make all the emulation versions of string operations visible -// #define ACE_LACKS_WCSTOK -#define ACE_LACKS_ITOW -#define ACE_LACKS_STRCASECMP -#define ACE_LACKS_STRRCHR -#define ACE_LACKS_WCSCAT -#define ACE_LACKS_WCSCHR -#define ACE_LACKS_WCSCMP -#define ACE_LACKS_WCSCPY -#define ACE_LACKS_WCSICMP -#define ACE_LACKS_WCSLEN -#define ACE_LACKS_WCSNCAT -#define ACE_LACKS_WCSNCMP -#define ACE_LACKS_WCSNCPY -#define ACE_LACKS_WCSNICMP -#define ACE_LACKS_WCSPBRK -#define ACE_LACKS_WCSRCHR -#define ACE_LACKS_WCSCSPN -#define ACE_LACKS_WCSSPN -#define ACE_LACKS_WCSSTR - -/// Support for threads enables several important classes -#define ACE_HAS_THREADS - -/// Support for Win32 enables the WFMO_Reactor and several Async I/O -/// classes -#define ACE_WIN32 - -/// Enable support for POSIX Asynchronous I/O calls -#define ACE_HAS_AIO_CALLS - -/// Enable support for TLI interfaces -#define ACE_HAS_TLI - -/// Enable support for the SSL wrappers -#define ACE_HAS_SSL 1 - -/// Enable timeprobes -#define ACE_COMPILE_TIMEPROBES - -/// Enable unicode to generate ACE_Registry_Name_Space -#define UNICODE - -/// These defines make sure that Svc_Conf_y.cpp and Svc_Conf_l.cpp are correctly -/// parsed -#define __cplusplus -#define ACE_YY_USE_PROTOS - -/// TAO features that should be documented too -#define TAO_HAS_RT_CORBA 1 -#define TAO_HAS_MINIMUM_CORBA 0 -#define TAO_HAS_AMI 1 -#define TAO_HAS_INTERCEPTORS 1 -#define TAO_HAS_SCIOP 1 -#define TAO_HAS_COIOP 1 -#define TAO_HAS_TRANSPORT_CURRENT 1 - -/// Generate token library documentation -#define ACE_HAS_TOKENS_LIBRARY - -/// Generate ACE ATM classes documentation -#define ACE_HAS_ATM - -/// Generate ACE XTI ATM class documentation -#define ACE_HAS_XTI_ATM - -/// Generate ACE_Dev_Poll_Reactor documentation -#define ACE_HAS_DEV_POLL - -/// Generate ACE_Log_Msg_NT_Event_Log documentation -#define ACE_HAS_LOG_MSG_NT_EVENT_LOG - -/// Generate icmp documentation -#define ACE_HAS_ICMP_SUPPORT 1 - -/// Parse some ACE_SSL classes that depend on recent versions of -/// OpenSSL. -#define OPENSSL_VERSION_NUMBER 0x00905820L - -/// Enable IPv6 -#define ACE_HAS_IPV6 - -/// Enable netlink socket support -#define ACE_HAS_NETLINK - -#define ACE_HAS_IP_MULTICAST - -#define ACE_INLINE -#define ACE_BEGIN_VERSIONED_NAMESPACE_DECL -#define ACE_END_VERSIONED_NAMESPACE_DECL -#define TAO_BEGIN_VERSIONED_NAMESPACE_DECL -#define TAO_END_VERSIONED_NAMESPACE_DECL - -#define ACE_HAS_POSITION_INDEPENDENT_POINTERS 1 - -#endif /* ACE_CONFIG_DOXYGEN_H */ diff --git a/ACE/ace/config-ghs-common.h b/ACE/ace/config-ghs-common.h deleted file mode 100644 index 8ffa331d8fd..00000000000 --- a/ACE/ace/config-ghs-common.h +++ /dev/null @@ -1,43 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// This configuration file is designed to be included by another, -// specific configuration file. It provides config information common -// to all Green Hills platforms. - -#ifndef ACE_GHS_COMMON_H -#define ACE_GHS_COMMON_H -#include /**/ "ace/pre.h" - -#if !defined (ACE_CONFIG_INCLUDE_GHS_COMMON) -# error ace/config-ghs-common.h: ACE configuration error! Do not #include this file directly! -#endif - -#if defined (ghs) - -# if defined (sun) - // Need nonstatic Object_Manager on Solaris to prevent seg fault - // on startup. -# define ACE_HAS_NONSTATIC_OBJECT_MANAGER -# endif /* sun */ - -# if defined (__STANDARD_CXX) - // Green Hills 1.8.9, but not 1.8.8. -# define ACE_HAS_STANDARD_CPP_LIBRARY 1 -# define ACE_LACKS_AUTO_PTR -# define ACE_LACKS_CHAR_RIGHT_SHIFTS -# define ACE_LACKS_UNBUFFERED_STREAMBUF -# else -# define ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA -# endif /* __STANDARD_CXX */ - -# define ACE_LACKS_LINEBUFFERED_STREAMBUF -# define ACE_LACKS_LONGLONG_T -# define ACE_LACKS_SIGNED_CHAR - -#else /* ! ghs */ -# error ace/config-ghs-common.h can only be used with Green Hills compilers! -#endif /* ! ghs */ - -#include /**/ "ace/post.h" -#endif /* ACE_GHS_COMMON_H */ diff --git a/ACE/ace/config-macosx.h b/ACE/ace/config-macosx.h index 8b04ff7e195..25444af91a3 100644 --- a/ACE/ace/config-macosx.h +++ b/ACE/ace/config-macosx.h @@ -51,6 +51,8 @@ #define ACE_LACKS_GETPGID #define ACE_LACKS_RWLOCK_T +#define ACE_HAS_SIOCGIFCONF + // Optimize ACE_Handle_Set for select(). #define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT diff --git a/ACE/ace/config-minimal.h b/ACE/ace/config-minimal.h deleted file mode 100644 index e7937690ee5..00000000000 --- a/ACE/ace/config-minimal.h +++ /dev/null @@ -1,39 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// This configuration file is designed to build only the minimal -// ACE_OS adaptation layer. - -#ifndef ACE_CONFIG_MINIMAL_H -#define ACE_CONFIG_MINIMAL_H -#include /**/ "ace/pre.h" - -#define ACE_HAS_MINIMAL_ACE_OS - -// Only instantiate the ACE_OS_Object_Manager. -#define ACE_MAIN_OBJECT_MANAGER \ - ACE_OS_Object_Manager ace_os_object_manager; - -#if !defined(ACE_USE_THREAD_MANAGER_ADAPTER) - // To prevent use of ACE_Thread_Exit functions in - // ACE_Thread_Adapter::invoke (). -# define ACE_USE_THREAD_MANAGER_ADAPTER -#endif /* ! ACE_USE_THREAD_MANAGER_ADAPTER */ - -#if defined (ACE_ASSERT) -# undef ACE_ASSERT -#endif /* ACE_ASSERT */ -#define ACE_ASSERT(x) - -#if defined (ACE_DEBUG) -# undef ACE_DEBUG -#endif /* ACE_DEBUG */ -#define ACE_DEBUG(x) - -#if defined (ACE_ERROR) -# undef ACE_ERROR -#endif /* ACE_ERROR */ -#define ACE_ERROR(x) - -#include /**/ "ace/post.h" -#endif /* ACE_CONFIG_MINIMAL_H */ diff --git a/ACE/ace/config-netbsd.h b/ACE/ace/config-netbsd.h index e60bf3974b0..200149c89d9 100644 --- a/ACE/ace/config-netbsd.h +++ b/ACE/ace/config-netbsd.h @@ -69,7 +69,6 @@ #define ACE_HAS_SOCKLEN_T 1 #define ACE_HAS_SSIZE_T 1 #define ACE_HAS_STANDARD_CPP_LIBRARY 1 -#define ACE_HAS_STDEXCEPT_NO_H 1 #define ACE_HAS_STRINGS 1 #define ACE_HAS_STRING_CLASS 1 #define ACE_HAS_SVR4_DYNAMIC_LINKING 1 diff --git a/ACE/ace/config-openbsd.h b/ACE/ace/config-openbsd.h index 78d03547e9a..8cf2d6927ba 100644 --- a/ACE/ace/config-openbsd.h +++ b/ACE/ace/config-openbsd.h @@ -137,6 +137,7 @@ #define ACE_HAS_VOID_UNSETENV #define ACE_HAS_WCHAR #define ACE_HAS_XPG4_MULTIBYTE_CHAR +#define ACE_HAS_SYS_SIGINFO_H #define ACE_LACKS_CONDATTR_PSHARED #define ACE_LACKS_GETIPNODEBYADDR diff --git a/ACE/ace/config-qnx-neutrino.h b/ACE/ace/config-qnx-neutrino.h index 5def543440a..71f89f1f3fc 100644 --- a/ACE/ace/config-qnx-neutrino.h +++ b/ACE/ace/config-qnx-neutrino.h @@ -10,20 +10,6 @@ #define _POSIX_C_SOURCE 199506 #define _QNX_SOURCE -// These constants are in i386-nto/include/limits.h, but egcs -// picks up its own limits.h instead: -#define _POSIX_NAME_MAX 14 /* Max bytes in a filename */ -#define _POSIX_PATH_MAX 256 /* Num. bytes in pathname (excl. NULL) */ - -#if defined(__OPTIMIZE__) -# if defined(__X86__) - // string.h can't be used by ACE with __OPTIMIZE__. -# undef __OPTIMIZE__ -# include <string.h> -# define __OPTIMIZE__ -# endif /* __X86__ */ -#endif /* __OPTIMIZE__ */ - // The following defines the Neutrino compiler. // gcc should know to call g++ as necessary #ifdef __GNUC__ @@ -34,15 +20,6 @@ #include "ace/config-g++-common.h" -// /usr/nto/include/float.h defines -// FLT_MAX_EXP 127 -// DBL_MAX_EXP 1023 -// ace expects 128 & 1024 respectively -// to set the following macros in ace/Basic_Types.h -// These macros are: -// #define ACE_SIZEOF_DOUBLE 8 -// #define ACE_SIZEOF_FLOAT 4 - #define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R #define ACE_HAS_4_4BSD_SENDMSG_RECVMSG // Although ACE does have alloca() on this compiler/platform combination, it is diff --git a/ACE/ace/config-qnx-rtp-62x.h b/ACE/ace/config-qnx-rtp-62x.h deleted file mode 100644 index c4b47749a38..00000000000 --- a/ACE/ace/config-qnx-rtp-62x.h +++ /dev/null @@ -1,131 +0,0 @@ -// -*- C++ -*- -// $Id$ -// The following configuration file is designed to work for QNX RTP 621 -// GNU C++ and the POSIX (pthread) threads package. You can get QNX -// RTP at http://get.qnx.com -#ifndef ACE_CONFIG_QNX_RTP_62x_H -#define ACE_CONFIG_QNX_RTP_62x_H -#include /**/ "ace/pre.h" -#include /**/ "ace/config-qnx-rtp-common.h" - -///////////////////////////////////////////////////////////////// -// Definition of the features that are available. -// -// ACE_HAS Section -///////////////////////////////////////////////////////////////// -#define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R -#define ACE_HAS_3_PARAM_WCSTOK -#define ACE_HAS_3_PARAM_READDIR_R -#define ACE_HAS_4_4BSD_SENDMSG_RECVMSG -// Although ACE does have alloca() on this compiler/platform combination, it is -// disabled by default since it can be dangerous. Uncomment the following line -// if you ACE to use it. -//#define ACE_HAS_ALLOCA -#define ACE_HAS_ALLOCA_H -#define ACE_HAS_ALT_CUSERID -#define ACE_HAS_AUTOMATIC_INIT_FINI -#define ACE_HAS_CLOCK_GETTIME -#define ACE_HAS_CLOCK_SETTIME -#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES -#define ACE_HAS_DIRENT -#define ACE_HAS_GETPAGESIZE -#define ACE_HAS_GETIFADDRS -// Enable gperf, this is a hosted configuration. -#define ACE_HAS_GPERF -#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT -//#define ACE_HAS_NONSTATIC_OBJECT_MANAGER -#define ACE_HAS_IP_MULTICAST -#define ACE_HAS_MSG -#define ACE_HAS_MT_SAFE_MKTIME -#define ACE_HAS_MUTEX_TIMEOUTS -#define ACE_HAS_NONCONST_SELECT_TIMEVAL -#define ACE_HAS_NONCONST_SWAB -#define ACE_HAS_POSIX_SEM -#define ACE_HAS_POSIX_TIME -#define ACE_HAS_PTHREADS -#define ACE_HAS_P_READ_WRITE -#define ACE_HAS_REENTRANT_FUNCTIONS -#define ACE_HAS_SELECT_H -#define ACE_HAS_SHM_OPEN -#define ACE_HAS_SIGINFO_T -#define ACE_HAS_SIGISMEMBER_BUG -#define ACE_HAS_SIGWAIT -#define ACE_HAS_SIG_ATOMIC_T -#define ACE_HAS_SOCKADDR_IN_SIN_LEN -#define ACE_HAS_SOCKLEN_T -#define ACE_HAS_SSIZE_T -#define ACE_HAS_STRINGS -#define ACE_HAS_SVR4_DYNAMIC_LINKING -#define ACE_HAS_SVR4_GETTIMEOFDAY -#define ACE_HAS_TERMIOS -#define ACE_HAS_THREADS -#define ACE_HAS_THREAD_SPECIFIC_STORAGE -#define ACE_HAS_THR_C_DEST -#define ACE_HAS_THR_C_FUNC -#define ACE_HAS_TIMEZONE_GETTIMEOFDAY -#define ACE_HAS_UALARM -#define ACE_HAS_UCONTEXT_T -#define ACE_HAS_VOIDPTR_MMAP -#define ACE_HAS_VOIDPTR_SOCKOPT - -///////////////////////////////////////////////////////////////// -// Definition of the features that are not available. -// -// ACE_LACKS Section -///////////////////////////////////////////////////////////////// -#define ACE_LACKS_CONST_TIMESPEC_PTR -#define ACE_LACKS_LINEBUFFERED_STREAMBUF -#define ACE_LACKS_MADVISE -// lacks mqueue mgr or speed-up named sem by shm emulation -#define ACE_LACKS_NAMED_POSIX_SEM -#define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS -// Multicast_Tests reports for NTO 621 frames from unsubscribed groups -#define ACE_LACKS_PERFECT_MULTICAST_FILTERING 1 -#define ACE_LACKS_POLL_H -#define ACE_LACKS_PTHREAD_THR_SIGSETMASK -#define ACE_LACKS_RWLOCK_T -#define ACE_LACKS_SO_SNDBUF -#define ACE_LACKS_SO_RCVBUF -#define ACE_LACKS_STREAM_MODULES -#define ACE_LACKS_STROPTS_H -#define ACE_LACKS_STRPTIME -#define ACE_LACKS_STRRECVFD -#define ACE_LACKS_SYSCALL -#define ACE_LACKS_SYS_MSG_H -#define ACE_LACKS_SYSV_SHMEM -#define ACE_LACKS_SYS_SHM_H -#define ACE_LACKS_TIMESPEC_T -#define ACE_LACKS_T_ERRNO -#define ACE_LACKS_U_LONGLONG_T -#define ACE_LACKS_ALPHASORT -#define ACE_LACKS_FD_MASK -#define ACE_LACKS_NFDBITS -#define ACE_LACKS_ISCTYPE - -#define ACE_LACKS_RLIMIT // QNX rlimit syscalls don't work properly with ACE. - -#define ACE_MT_SAFE 1 -#define ACE_NEEDS_FUNC_DEFINITIONS -#define ACE_NEEDS_HUGE_THREAD_STACKSIZE 64000 -#define ACE_THR_PRI_FIFO_DEF 10 -#define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB 1 -#define ACE_HAS_SIGTIMEDWAIT -#define ACE_HAS_SIGSUSPEND - -#define ACE_HAS_BROKEN_PREALLOCATED_OBJECTS_AFTER_FORK 1 - -#define ACE_SIZEOF_WCHAR 4 - -// No prototypes -#define ACE_LACKS_ITOW -#define ACE_LACKS_WCSICMP -#define ACE_LACKS_WCSNICMP -#define ACE_LACKS_WCSDUP -// The default value of FD_SETSIZE is 32, but actually x86 NTO -// supports by default at least 1000 descriptors in fd_set. -#if defined( FD_SETSIZE ) -#undef FD_SETSIZE -#endif -#define FD_SETSIZE 1000 -#include /**/ "ace/post.h" -#endif /* ACE_CONFIG_QNX_RTP_62x_H*/ diff --git a/ACE/ace/config-qnx-rtp-common.h b/ACE/ace/config-qnx-rtp-common.h index 0b100765f87..ebd4b30dc5b 100644 --- a/ACE/ace/config-qnx-rtp-common.h +++ b/ACE/ace/config-qnx-rtp-common.h @@ -9,20 +9,6 @@ #define _POSIX_C_SOURCE 199506 #define _QNX_SOURCE -// These constants are in i386-nto/include/limits.h, but egcs -// picks up its own limits.h instead: -#define _POSIX_NAME_MAX 14 /* Max bytes in a filename */ -#define _POSIX_PATH_MAX 256 /* Num. bytes in pathname (excl. NULL) */ - -#if defined(__OPTIMIZE__) -# if defined(__X86__) - // string.h can't be used by ACE with __OPTIMIZE__. -# undef __OPTIMIZE__ -# include <string.h> -# define __OPTIMIZE__ -# endif /* __X86__ */ -#endif /* __OPTIMIZE__ */ - // The following defines the Neutrino compiler. // gcc should know to call g++ as necessary #ifdef __GNUC__ diff --git a/ACE/ace/config-qnx-rtp-pre62x.h b/ACE/ace/config-qnx-rtp-pre62x.h deleted file mode 100644 index 57db93435df..00000000000 --- a/ACE/ace/config-qnx-rtp-pre62x.h +++ /dev/null @@ -1,152 +0,0 @@ -// -*- C++ -*- -// $Id$ -// The following configuration file is designed to work for QNX RTP -// GNU C++ and the POSIX (pthread) threads package. You can get QNX -// RTP at http://get.qnx.com - -#ifndef ACE_CONFIG_RTP_PRE62x_H -#define ACE_CONFIG_RTP_PRE62x_H -#include /**/ "ace/pre.h" -#include /**/ "ace/config-qnx-rtp-common.h" - -///////////////////////////////////////////////////////////////// -// Definition of the features that are available. -// -// ACE_HAS Section -///////////////////////////////////////////////////////////////// - -#define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R -#define ACE_HAS_4_4BSD_SENDMSG_RECVMSG -// Although ACE does have alloca() on this compiler/platform combination, it is -// disabled by default since it can be dangerous. Uncomment the following line -// if you ACE to use it. -//#define ACE_HAS_ALLOCA -#define ACE_HAS_ALLOCA_H -#define ACE_HAS_AUTOMATIC_INIT_FINI -#define ACE_HAS_CLOCK_GETTIME -#define ACE_HAS_CLOCK_SETTIME -#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES -#define ACE_HAS_DIRENT -#define ACE_HAS_GETPAGESIZE -// Enable gperf, this is a hosted configuration. -#define ACE_HAS_GPERF -#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT -//#define ACE_HAS_NONSTATIC_OBJECT_MANAGER -#define ACE_HAS_INLINED_OSCALLS -#define ACE_HAS_IP_MULTICAST -#define ACE_HAS_MSG -#define ACE_HAS_MT_SAFE_MKTIME -#define ACE_HAS_MUTEX_TIMEOUTS -#define ACE_HAS_NONCONST_SELECT_TIMEVAL -#define ACE_HAS_POSIX_SEM -#define ACE_HAS_POSIX_TIME -#define ACE_HAS_PTHREADS -#define ACE_HAS_P_READ_WRITE -#define ACE_HAS_REENTRANT_FUNCTIONS -#define ACE_HAS_SELECT_H -#define ACE_HAS_SIGINFO_T -#define ACE_HAS_SIGISMEMBER_BUG -#define ACE_HAS_SIGWAIT -#define ACE_HAS_SIG_ATOMIC_T -#define ACE_HAS_SOCKADDR_IN_SIN_LEN -// #define ACE_HAS_SIZET_SOCKET_LEN -#define ACE_HAS_SOCKLEN_T -#define ACE_HAS_SSIZE_T -#define ACE_HAS_STRINGS -#define ACE_HAS_SVR4_GETTIMEOFDAY -#define ACE_HAS_TERMIOS -#define ACE_HAS_THREADS -#define ACE_HAS_THREAD_SPECIFIC_STORAGE -#define ACE_HAS_THR_C_DEST -#define ACE_HAS_THR_C_FUNC -#define ACE_HAS_TIMEZONE_GETTIMEOFDAY -#define ACE_HAS_UALARM -#define ACE_HAS_UCONTEXT_T -#define ACE_HAS_VOIDPTR_MMAP -#define ACE_HAS_VOIDPTR_SOCKOPT - -///////////////////////////////////////////////////////////////// -// Definition of the features that are not available. -// -// ACE_LACKS Section -///////////////////////////////////////////////////////////////// -#define ACE_LACKS_CONDATTR_PSHARED -#define ACE_LACKS_CONST_TIMESPEC_PTR -#define ACE_LACKS_LINEBUFFERED_STREAMBUF -#define ACE_LACKS_MADVISE -#define ACE_LACKS_MUTEXATTR_PSHARED -#define ACE_LACKS_NAMED_POSIX_SEM -#define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS -#define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS -#define ACE_LACKS_PTHREAD_THR_SIGSETMASK -#define ACE_LACKS_RWLOCK_T -#define ACE_LACKS_SBRK -#define ACE_LACKS_SEEKDIR -#define ACE_LACKS_SO_SNDBUF -#define ACE_LACKS_SO_RCVBUF -#define ACE_LACKS_SOCKETPAIR -// Even if the QNX RTP docs says that socket pair are -// available, there is actually no implementation of -// soket-pairs. -#define ACE_LACKS_STREAM_MODULES -#define ACE_LACKS_STRRECVFD -#define ACE_LACKS_SYSCALL -#define ACE_LACKS_SYS_MSG_H -#define ACE_LACKS_SYSV_SHMEM -#define ACE_LACKS_ALPHASORT -//#define ACE_LACKS_TCP_NODELAY // Based on the QNX RTP documentation, this option seems to - // to be supported. -#define ACE_LACKS_TELLDIR -#define ACE_LACKS_TIMESPEC_T -#define ACE_LACKS_TRUNCATE -#define ACE_LACKS_T_ERRNO -#define ACE_LACKS_UALARM_PROTOTYPE -#define ACE_LACKS_UCONTEXT_H -#define ACE_LACKS_UNIX_DOMAIN_SOCKETS -#define ACE_LACKS_U_LONGLONG_T -#define ACE_LACKS_FD_MASK -#define ACE_LACKS_NFDBITS - -#define ACE_LACKS_RLIMIT // QNX rlimit syscalls don't work properly with ACE. - -#define ACE_MT_SAFE 1 -#define ACE_NEEDS_FUNC_DEFINITIONS -#define ACE_NEEDS_HUGE_THREAD_STACKSIZE 64000 -#define ACE_TEMPLATES_REQUIRE_SOURCE -#define ACE_THR_PRI_FIFO_DEF 10 -#define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB 1 -#define ACE_HAS_SIGTIMEDWAIT -#define ACE_HAS_SIGSUSPEND - -#define ACE_HAS_BROKEN_PREALLOCATED_OBJECTS_AFTER_FORK 1 - -#define ACE_SIZEOF_WCHAR 4 - -// Not really, but the prototype returns wchar_t instead of wchar_t * -#define ACE_LACKS_WCSSTR - -// No prototypes -#define ACE_LACKS_ITOW -#define ACE_LACKS_WCSICMP -#define ACE_LACKS_WCSNICMP -#define ACE_LACKS_WCSDUP - -// And these have prototypes but no implementation -#define ACE_LACKS_WCSLEN -#define ACE_LACKS_WCSNCMP -#define ACE_LACKS_WCSCPY -#define ACE_LACKS_WCSNCPY -#define ACE_LACKS_TOWLOWER -#define ACE_LACKS_TOWUPPER -#define ACE_LACKS_WCSCMP -#define ACE_LACKS_WCSCAT -#define ACE_LACKS_WCSNCAT -#define ACE_LACKS_WCSSPN -#define ACE_LACKS_WCSCHR -#define ACE_LACKS_WCSPBRK -#define ACE_LACKS_WCSRCHR - -#define ACE_LACKS_ACE_IOSTREAM - -#include /**/ "ace/post.h" -#endif /* ACE_CONFIG_RTP_PRE62x_H */ diff --git a/ACE/ace/config-qnx-rtp.h b/ACE/ace/config-qnx-rtp.h index ea4c3902b60..9b1cfae96f7 100644 --- a/ACE/ace/config-qnx-rtp.h +++ b/ACE/ace/config-qnx-rtp.h @@ -12,14 +12,130 @@ #include <sys/neutrino.h> #if !defined(_NTO_VERSION) # error "Could not detect QNX version from macro _NTO_VERSION" -#else -# define ACE_NTO_VERS _NTO_VERSION -# if ACE_NTO_VERS < 620 -# include /**/ "ace/config-qnx-rtp-pre62x.h" -# else -# include /**/ "ace/config-qnx-rtp-62x.h" -# endif #endif +#include /**/ "ace/config-qnx-rtp-common.h" + +///////////////////////////////////////////////////////////////// +// Definition of the features that are available. +// +// ACE_HAS Section +///////////////////////////////////////////////////////////////// +#define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R +#define ACE_HAS_3_PARAM_WCSTOK +#define ACE_HAS_3_PARAM_READDIR_R +#define ACE_HAS_4_4BSD_SENDMSG_RECVMSG +// Although ACE does have alloca() on this compiler/platform combination, it is +// disabled by default since it can be dangerous. Uncomment the following line +// if you ACE to use it. +//#define ACE_HAS_ALLOCA +#define ACE_HAS_ALLOCA_H +#define ACE_HAS_ALT_CUSERID +#define ACE_HAS_AUTOMATIC_INIT_FINI +#define ACE_HAS_CLOCK_GETTIME +#define ACE_HAS_CLOCK_SETTIME +#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES +#define ACE_HAS_DIRENT +#define ACE_HAS_GETPAGESIZE +#define ACE_HAS_GETIFADDRS +// Enable gperf, this is a hosted configuration. +#define ACE_HAS_GPERF +#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT +//#define ACE_HAS_NONSTATIC_OBJECT_MANAGER +#define ACE_HAS_IP_MULTICAST +#define ACE_HAS_MSG +#define ACE_HAS_MT_SAFE_MKTIME +#define ACE_HAS_MUTEX_TIMEOUTS +#define ACE_HAS_NONCONST_SELECT_TIMEVAL +#define ACE_HAS_NONCONST_SWAB +#define ACE_HAS_POSIX_SEM +#define ACE_HAS_POSIX_TIME +#define ACE_HAS_PTHREADS +#define ACE_HAS_P_READ_WRITE +#define ACE_HAS_REENTRANT_FUNCTIONS +#define ACE_HAS_SELECT_H +#define ACE_HAS_SHM_OPEN +#define ACE_HAS_SIGINFO_T +#define ACE_HAS_SIGISMEMBER_BUG +#define ACE_HAS_SIGWAIT +#define ACE_HAS_SIG_ATOMIC_T +#define ACE_HAS_SOCKADDR_IN_SIN_LEN +#define ACE_HAS_SOCKLEN_T +#define ACE_HAS_SSIZE_T +#define ACE_HAS_STRINGS +#define ACE_HAS_SVR4_DYNAMIC_LINKING +#define ACE_HAS_SVR4_GETTIMEOFDAY +#define ACE_HAS_TERMIOS +#define ACE_HAS_THREADS +#define ACE_HAS_THREAD_SPECIFIC_STORAGE +#define ACE_HAS_THR_C_DEST +#define ACE_HAS_THR_C_FUNC +#define ACE_HAS_TIMEZONE_GETTIMEOFDAY +#define ACE_HAS_UALARM +#define ACE_HAS_UCONTEXT_T +#define ACE_HAS_VOIDPTR_MMAP +#define ACE_HAS_VOIDPTR_SOCKOPT + +///////////////////////////////////////////////////////////////// +// Definition of the features that are not available. +// +// ACE_LACKS Section +///////////////////////////////////////////////////////////////// +#define ACE_LACKS_CONST_TIMESPEC_PTR +#define ACE_LACKS_LINEBUFFERED_STREAMBUF +#define ACE_LACKS_MADVISE +// lacks mqueue mgr or speed-up named sem by shm emulation +#define ACE_LACKS_NAMED_POSIX_SEM +#define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS +// Multicast_Tests reports for NTO 621 frames from unsubscribed groups +#define ACE_LACKS_PERFECT_MULTICAST_FILTERING 1 +#define ACE_LACKS_POLL_H +#define ACE_LACKS_PTHREAD_THR_SIGSETMASK +#define ACE_LACKS_RWLOCK_T +#define ACE_LACKS_SO_SNDBUF +#define ACE_LACKS_SO_RCVBUF +#define ACE_LACKS_STREAM_MODULES +#define ACE_LACKS_STROPTS_H +#define ACE_LACKS_STRPTIME +#define ACE_LACKS_STRRECVFD +#define ACE_LACKS_SYSCALL +#define ACE_LACKS_SYS_MSG_H +#define ACE_LACKS_SYSV_SHMEM +#define ACE_LACKS_SYS_SHM_H +#define ACE_LACKS_TIMESPEC_T +#define ACE_LACKS_T_ERRNO +#define ACE_LACKS_U_LONGLONG_T +#define ACE_LACKS_ALPHASORT +#define ACE_LACKS_FD_MASK +#define ACE_LACKS_NFDBITS +#define ACE_LACKS_ISCTYPE + +#define ACE_LACKS_RLIMIT // QNX rlimit syscalls don't work properly with ACE. + +#define ACE_MT_SAFE 1 +#define ACE_NEEDS_FUNC_DEFINITIONS +#define ACE_NEEDS_HUGE_THREAD_STACKSIZE 64000 +#define ACE_THR_PRI_FIFO_DEF 10 +#define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB 1 +#define ACE_HAS_SIGTIMEDWAIT +#define ACE_HAS_SIGSUSPEND + +#define ACE_HAS_BROKEN_PREALLOCATED_OBJECTS_AFTER_FORK 1 + +#define ACE_SIZEOF_WCHAR 4 + +// No prototypes +#define ACE_LACKS_ITOW +#define ACE_LACKS_WCSICMP +#define ACE_LACKS_WCSNICMP +#define ACE_LACKS_WCSDUP + +// The default value of FD_SETSIZE is 32, but actually x86 NTO +// supports by default at least 1000 descriptors in fd_set. +#if defined( FD_SETSIZE ) +#undef FD_SETSIZE +#endif +#define FD_SETSIZE 1000 + #include /**/ "ace/post.h" #endif /* ACE_CONFIG_QNX_RTP_H */ diff --git a/ACE/ace/config-tandem-nsk-mips-v3.h b/ACE/ace/config-tandem-nsk-mips-v3.h index fa745a45a95..0fb12f5f9ff 100644 --- a/ACE/ace/config-tandem-nsk-mips-v3.h +++ b/ACE/ace/config-tandem-nsk-mips-v3.h @@ -417,7 +417,7 @@ typedef enum CMA_T_SCHED_POLICY { #if defined(USE_EXPLICIT_EXPORT) #define ACE_LACKS_INLINE_FUNCTIONS -#define ACE_HAS_CUSTOM_EXPORT_MACROS +#define ACE_HAS_CUSTOM_EXPORT_MACROS 1 #define ACE_Proper_Export_Flag export$ #define ACE_Proper_Import_Flag import$ #define ACE_EXPORT_SINGLETON_DECLARATION(T) template class export$ T diff --git a/ACE/ace/config-tandem.h b/ACE/ace/config-tandem.h deleted file mode 100644 index 2d17799aa90..00000000000 --- a/ACE/ace/config-tandem.h +++ /dev/null @@ -1,188 +0,0 @@ -/* -*- C++ -*- */ -// Testing TANDEM -// $Id$ - -// The following configuration file is designed to work for Tandems NonStop-UX -// 4.2MP platforms using the NCC 3.20 compiler. - -// Note this is a test version it might include several errors I -// have done a test and set/unset until I errors disappered. -// Some of the options that should be set aren't because of the simple fact -// that i haven't the time to check what is wrong. -// e.g. widecharacter are supported but a wcstok which only take 2 parameters -// are included by the compiler, to get the correct wcstok that takes 3 params -// we must set _XOPEN_SOURCE and we get ALOT of errors and warnings. -// So this config is done to get things to start to work it isn't finished. -// Janne (Jan.Perman@osd.Ericsson.se) - -#ifndef ACE_CONFIG_H -#define ACE_CONFIG_H -#include /**/ "ace/pre.h" - -#if ! defined (__ACE_INLINE__) -# define __ACE_INLINE__ -#endif /* ! __ACE_INLINE__ */ - -#define ACE_HAS_IDTYPE_T -// Optimize ACE_Handle_Set for select(). -#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT - -// Tandem doesn't include this although they are defined -// in sys/time.h and sys/resource.h -#define ACE_LACKS_RLIMIT_PROTOTYPE // jjpp -// Tandem has a function to set t_errno (set_t_errno) -#define ACE_HAS_SET_T_ERRNO // jjpp - -//Platform supports System V IPC (most versions of UNIX, but not Win32) -#define ACE_HAS_SYSV_IPC - -// OS/compiler omits the const from the sendmsg() prototype. -#define ACE_HAS_NONCONST_SENDMSG - -//Platform supports system configuration information -#define ACE_HAS_SYS_SYSTEMINFO_H -#define ACE_HAS_SYSV_SYSINFO - -//Platform supports the POSIX regular expression library -#define ACE_HAS_REGEX - -// Platform supports recvmsg and sendmsg -#define ACE_HAS_MSG - -//Compiler/platform contains the <sys/syscall.h> file. -#define ACE_HAS_SYS_SYSCALL_H - -//Platform provides <sysent.h> header -#define ACE_HAS_SYSENT_H - -// Platform has POSIX terminal interface. -#define ACE_HAS_TERMIOS - -//Platform supports POSIX O_NONBLOCK semantics -#define ACE_HAS_POSIX_NONBLOCK - -// Compiler/platform has correctly prototyped header files -#define ACE_HAS_CPLUSPLUS_HEADERS - -//Compiler/platform supports alloca() -// Although ACE does have alloca() on this compiler/platform combination, it is -// disabled by default since it can be dangerous. Uncomment the following line -// if you ACE to use it. -//#define ACE_HAS_ALLOCA - -//Compiler/platform has <alloca.h> -#define ACE_HAS_ALLOCA_H - -//Platform contains <poll.h> -#define ACE_HAS_POLL - -// Platform supports the POSIX struct timespec type -#define ACE_HAS_POSIX_TIME // As i understand it, but i'm in deep water -//Platform supports the SVR4 timestruc_t type - -// To get this to work a patch in sys/signal must be made -// typedef void SIG_FUNC_TYPE(int); -//#if defined (__cplusplus) -// void (*sa_handler)(int); -//#else -// ... -//#endif -#define ACE_HAS_TANDEM_SIGNALS -//Compiler/platform defines the sig_atomic_t typedef -#define ACE_HAS_SIG_ATOMIC_T -//Platform supports SVR4 extended signals -#define ACE_HAS_SIGINFO_T -//Platform supports ucontext_t (which is used in the extended signal API). -#define ACE_HAS_UCONTEXT_T - -// Platform/compiler has the sigwait(2) prototype -#define ACE_HAS_SIGWAIT - -//Compiler/platform provides the sockio.h file -#define ACE_HAS_SYS_SOCKIO_H - -// Compiler supports the ssize_t typedef -#define ACE_HAS_SSIZE_T // Limits.h must be included - -//Platform supports STREAMS -#define ACE_HAS_STREAMS - -#define ACE_HAS_STREAM_PIPES -//Platform supports STREAM pipes - -//Compiler/platform supports struct strbuf -#define ACE_HAS_STRBUF_T - -//Compiler/platform supports SVR4 dynamic linking semantics -#define ACE_HAS_SVR4_DYNAMIC_LINKING - -//Compiler/platform supports SVR4 TLI (in particular, T_GETNAME stuff)... -#define ACE_HAS_SVR4_TLI - -//Platform provides <sys/filio.h> header -#define ACE_HAS_SYS_FILIO_H - -//Platform supports TLI timod STREAMS module -#define ACE_HAS_TIMOD_H -//Platform supports TLI tiuser header -#define ACE_HAS_TIUSER_H - -//Platform supports TLI -#define ACE_HAS_TLI -//Platform provides TLI function prototypes -#define ACE_HAS_TLI_PROTOTYPES - -//Platform lacks streambuf "linebuffered ()". -#define ACE_LACKS_LINEBUFFERED_STREAMBUF - -// Platform lacks "signed char" type (broken!) -#define ACE_LACKS_SIGNED_CHAR - - -#define ACE_PAGE_SIZE 4096 -// Defines the page size of the system (not used on Win32 or -// with ACE_HAS_GETPAGESIZE). - -/****** THREAD SPECIFIC **********/ -/* If you want to remove threading then comment out the following four #defines .*/ -#if !defined (ACE_MT_SAFE) - #define ACE_MT_SAFE 1 //Compile using multi-thread libraries -#endif -#define ACE_HAS_THREADS //Platform supports threads -#define ACE_HAS_STHREADS //Platform supports Solaris threads - -// Compiler/platform has threadspecific storage -#define ACE_HAS_THREAD_SPECIFIC_STORAGE - -#define ACE_HAS_THR_MINSTACK // Tandem uses thr_minstack instead of thr_min_stack -#define ACE_LACKS_PRI_T // Tandem lacks pri_t -#define ACE_HAS_THR_KEYDELETE - -//************************************* - -/*********************************/ - -/******* SIGNAL STUFF *******/ - -//Platform uses non-const char * in calls to gethostbyaddr, gethostbyname, -// getservbyname -#define ACE_HAS_NONCONST_GETBY -#define ACE_HAS_NONCONST_INET_ADDR -// Platform's select() uses non-const timeval* (only found on Linux right now) -#define ACE_HAS_NONCONST_SELECT_TIMEVAL -// And on Tandem :-) -//Uses ctime_r & asctime_r with only two parameters vs. three. -#define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R -//Platform has special header for select(). -#define ACE_HAS_SELECT_H -// Platform/compiler supports Standard C++ Library -#define ACE_HAS_STANDARD_CPP_LIBRARY -//Platform lacks madvise() (e.g., Linux) -#define ACE_LACKS_MADVISE -#define ACE_LACKS_STRCASECMP - -// Defines the page size of the system. -#define ACE_PAGE_SIZE 4096 - -#include /**/ "ace/post.h" -#endif /* ACE_CONFIG_H */ diff --git a/ACE/ace/config-win32-interix.h b/ACE/ace/config-win32-interix.h index f824274d79f..ce8042e0fcb 100644 --- a/ACE/ace/config-win32-interix.h +++ b/ACE/ace/config-win32-interix.h @@ -11,6 +11,7 @@ #include "ace/config-g++-common.h" +#define ACE_HAS_SYS_SIGINFO_H #define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R #define ACE_HAS_3_PARAM_READDIR_R #define ACE_HAS_4_4BSD_SENDMSG_RECVMSG diff --git a/ACE/ace/os_include/os_dirent.h b/ACE/ace/os_include/os_dirent.h index 78238100f70..327b5810901 100644 --- a/ACE/ace/os_include/os_dirent.h +++ b/ACE/ace/os_include/os_dirent.h @@ -27,10 +27,6 @@ #include "ace/os_include/sys/os_types.h" #include "ace/os_include/os_limits.h" -#if defined (ACE_VXWORKS) && (ACE_VXWORKS < 0x620) -# include "ace/os_include/os_unistd.h" // VxWorks needs this to compile -#endif /* ACE_VXWORKS */ - #if !defined (ACE_LACKS_DIRENT_H) # include /**/ <dirent.h> #endif /* !ACE_LACKS_DIRENT_H */ diff --git a/ACE/ace/os_include/os_fcntl.h b/ACE/ace/os_include/os_fcntl.h index f86da548716..b387f850100 100644 --- a/ACE/ace/os_include/os_fcntl.h +++ b/ACE/ace/os_include/os_fcntl.h @@ -31,11 +31,6 @@ # include /**/ <fcntl.h> #endif /* !ACE_LACKS_FCNTL_H */ -#if defined (ACE_VXWORKS) && (ACE_VXWORKS < 0x620) -// for creat(), open() -# include /**/ <ioLib.h> -#endif /* ACE_VXWORKS */ - // Place all additions (especially function declarations) within extern "C" {} #ifdef __cplusplus extern "C" diff --git a/ACE/ace/os_include/os_limits.h b/ACE/ace/os_include/os_limits.h index 8a0c14ae798..c4726e3d1f3 100644 --- a/ACE/ace/os_include/os_limits.h +++ b/ACE/ace/os_include/os_limits.h @@ -35,11 +35,6 @@ # include /**/ <sys/param.h> #endif /* ACE_LACKS_SYS_PARAM_H */ -// On VxWorks 5.5.1 _POSIX_TIMER_MAX is defined in time.h -#if defined (ACE_VXWORKS) && (ACE_VXWORKS < 0x620) -# include /**/ <time.h> -#endif /* ACE_VXWORKS */ - // Place all additions (especially function declarations) within extern "C" {} #ifdef __cplusplus extern "C" @@ -102,7 +97,7 @@ extern "C" # define ACE_IOV_MAX IOV_MAX #endif /* ACE_IOV_MAX */ -#if defined (ACE_VXWORKS) && ((ACE_VXWORKS >= 0x620) && (ACE_VXWORKS <= 0x670)) && !defined (__RTP__) +#if defined (ACE_VXWORKS) && (ACE_VXWORKS <= 0x670) && !defined (__RTP__) # if defined (PIPE_BUF) && (PIPE_BUF == -1) # undef PIPE_BUF # endif diff --git a/ACE/ace/os_include/os_netdb.h b/ACE/ace/os_include/os_netdb.h index 9a53cf5dd54..71a038424cd 100644 --- a/ACE/ace/os_include/os_netdb.h +++ b/ACE/ace/os_include/os_netdb.h @@ -27,10 +27,6 @@ #include "ace/os_include/netinet/os_in.h" #include "ace/os_include/os_limits.h" -#if defined (ACE_VXWORKS) && (ACE_VXWORKS < 0x620) -# include /**/ <hostLib.h> -#endif /* ACE_VXWORKS */ - // Place all additions (especially function declarations) within extern "C" {} #ifdef __cplusplus extern "C" diff --git a/ACE/ace/os_include/os_stdio.h b/ACE/ace/os_include/os_stdio.h index ee0d779445b..6ed41a49a0e 100644 --- a/ACE/ace/os_include/os_stdio.h +++ b/ACE/ace/os_include/os_stdio.h @@ -37,7 +37,7 @@ # include /**/ <ioLib.h> // for remCurIdGet() # include /**/ <remLib.h> -# if defined (__RTP__) && ((ACE_VXWORKS >= 0x620) && (ACE_VXWORKS <= 0x650)) +# if defined (__RTP__) && (ACE_VXWORKS <= 0x650) # define L_cuserid _PARM_L_cuserid # endif #endif /* ACE_VXWORKS */ diff --git a/ACE/ace/os_include/sys/os_select.h b/ACE/ace/os_include/sys/os_select.h index bf436a67bf5..7f0d16891e9 100644 --- a/ACE/ace/os_include/sys/os_select.h +++ b/ACE/ace/os_include/sys/os_select.h @@ -44,7 +44,7 @@ extern "C" #if defined (ACE_LACKS_FD_MASK) typedef long fd_mask; -#endif /* __QNX__ */ +#endif /* ACE_LACKS_FD_MASK */ #if defined (ACE_WIN32) // This will help until we figure out everything: diff --git a/ACE/ace/os_include/sys/os_time.h b/ACE/ace/os_include/sys/os_time.h index 491dc209b69..12ee9ad0379 100644 --- a/ACE/ace/os_include/sys/os_time.h +++ b/ACE/ace/os_include/sys/os_time.h @@ -30,10 +30,6 @@ # include /**/ <sys/time.h> #endif /* !ACE_LACKS_SYS_TIME_H */ -#if defined (ACE_VXWORKS) && (ACE_VXWORKS == 0x620) -# include /**/ <time.h> // VxWorks 6.2 defined timeval in time.h -#endif - // Place all additions (especially function declarations) within extern "C" {} #ifdef __cplusplus extern "C" diff --git a/ACE/apps/gperf/src/Bool_Array.cpp b/ACE/apps/gperf/src/Bool_Array.cpp index e70695ee3cf..7cd51adcced 100644 --- a/ACE/apps/gperf/src/Bool_Array.cpp +++ b/ACE/apps/gperf/src/Bool_Array.cpp @@ -27,11 +27,6 @@ #include "Bool_Array.h" #include "ace/OS_NS_string.h" - - - -#if defined (ACE_HAS_GPERF) - #include "ace/OS_Memory.h" // Prints out debugging diagnostics. @@ -106,5 +101,3 @@ Bool_Array::reset (void) "done\n")); } } - -#endif /* ACE_HAS_GPERF */ diff --git a/ACE/apps/gperf/src/Bool_Array.h b/ACE/apps/gperf/src/Bool_Array.h index b8274d84ba9..01d06288d19 100644 --- a/ACE/apps/gperf/src/Bool_Array.h +++ b/ACE/apps/gperf/src/Bool_Array.h @@ -34,8 +34,6 @@ #include "Options.h" -#if defined (ACE_HAS_GPERF) - /** * Efficient lookup table abstraction implemented as a "Generation * Number" Array. @@ -72,5 +70,4 @@ private: unsigned long size_; }; -#endif /* ACE_HAS_GPERF */ #endif /* BOOL_ARRAY_H */ diff --git a/ACE/apps/gperf/src/Gen_Perf.cpp b/ACE/apps/gperf/src/Gen_Perf.cpp index 28d4b800fed..27f58d0f19b 100644 --- a/ACE/apps/gperf/src/Gen_Perf.cpp +++ b/ACE/apps/gperf/src/Gen_Perf.cpp @@ -24,11 +24,6 @@ */ #include "Gen_Perf.h" - - - -#if defined (ACE_HAS_GPERF) - #include "Vectors.h" #include "ace/OS_NS_stdlib.h" #include "ace/OS_NS_time.h" @@ -472,4 +467,3 @@ Gen_Perf::~Gen_Perf (void) delete [] this->union_set; } -#endif /* ACE_HAS_GPERF */ diff --git a/ACE/apps/gperf/src/Gen_Perf.h b/ACE/apps/gperf/src/Gen_Perf.h index 39bcdc5e7c6..ad9a0d34a87 100644 --- a/ACE/apps/gperf/src/Gen_Perf.h +++ b/ACE/apps/gperf/src/Gen_Perf.h @@ -31,8 +31,6 @@ #include "Bool_Array.h" #include "ace/Copy_Disabled.h" -#if defined (ACE_HAS_GPERF) - /* * Provides high-level routines to manipulate the keyword list * structures the code generation output. @@ -80,5 +78,4 @@ private: Bool_Array char_search; }; -#endif /* ACE_HAS_GPERF */ #endif /* GEN_PERF_H */ diff --git a/ACE/apps/gperf/src/Hash_Table.cpp b/ACE/apps/gperf/src/Hash_Table.cpp index 75ca25431b7..2fdc38a2dd3 100644 --- a/ACE/apps/gperf/src/Hash_Table.cpp +++ b/ACE/apps/gperf/src/Hash_Table.cpp @@ -24,11 +24,6 @@ */ #include "Hash_Table.h" - - - -#if defined (ACE_HAS_GPERF) - #include "ace/ACE.h" #include "ace/OS_NS_string.h" #include "ace/OS_Memory.h" @@ -119,4 +114,3 @@ Hash_Table::find (List_Node *item, } } -#endif /* ACE_HAS_GPERF */ diff --git a/ACE/apps/gperf/src/Hash_Table.h b/ACE/apps/gperf/src/Hash_Table.h index f8bd8c5c1fa..536f9952ddc 100644 --- a/ACE/apps/gperf/src/Hash_Table.h +++ b/ACE/apps/gperf/src/Hash_Table.h @@ -36,8 +36,6 @@ #include "List_Node.h" #include "ace/Copy_Disabled.h" -#if defined (ACE_HAS_GPERF) - /** * Hash table used to check for duplicate keyword entries. * @@ -69,5 +67,4 @@ private: int collisions_; }; -#endif /* ACE_HAS_GPERF */ #endif /* HASH_TABLE_H */ diff --git a/ACE/apps/gperf/src/Iterator.cpp b/ACE/apps/gperf/src/Iterator.cpp index 425cc79ec5b..9bf6189b6d8 100644 --- a/ACE/apps/gperf/src/Iterator.cpp +++ b/ACE/apps/gperf/src/Iterator.cpp @@ -24,11 +24,6 @@ */ #include "Iterator.h" - - - -#if defined (ACE_HAS_GPERF) - #include "ace/OS_NS_ctype.h" /// Constructor for Iterator. @@ -104,5 +99,3 @@ Iterator::operator() (void) return end; } } - -#endif /* ACE_HAS_GPERF */ diff --git a/ACE/apps/gperf/src/Iterator.h b/ACE/apps/gperf/src/Iterator.h index 58c779c5852..f5dcd7a925c 100644 --- a/ACE/apps/gperf/src/Iterator.h +++ b/ACE/apps/gperf/src/Iterator.h @@ -35,8 +35,6 @@ #include "Options.h" #include "ace/Copy_Disabled.h" -#if defined (ACE_HAS_GPERF) - /** * Provides an Iterator that expands and decodes a control string * containing digits and ranges, returning an integer every time the @@ -80,5 +78,4 @@ private: int lo_bound; }; -#endif /* ACE_HAS_GPERF */ #endif /* ITERATOR_H */ diff --git a/ACE/apps/gperf/src/Key_List.cpp b/ACE/apps/gperf/src/Key_List.cpp index b30a45c258c..45ad1b5230b 100644 --- a/ACE/apps/gperf/src/Key_List.cpp +++ b/ACE/apps/gperf/src/Key_List.cpp @@ -24,11 +24,6 @@ */ #include "Key_List.h" - - - -#if defined (ACE_HAS_GPERF) - #include "Hash_Table.h" #include "ace/Read_Buffer.h" #include "ace/Auto_Ptr.h" @@ -1959,4 +1954,3 @@ Key_List::max_key_length (void) return max_key_len; } -#endif /* ACE_HAS_GPERF */ diff --git a/ACE/apps/gperf/src/Key_List.h b/ACE/apps/gperf/src/Key_List.h index 8be31b80b9f..15f9c0aab74 100644 --- a/ACE/apps/gperf/src/Key_List.h +++ b/ACE/apps/gperf/src/Key_List.h @@ -28,8 +28,6 @@ #include "Options.h" -#if defined (ACE_HAS_GPERF) - #include "List_Node.h" #include "Vectors.h" #include "ace/Copy_Disabled.h" @@ -173,5 +171,4 @@ private: static int determined_[ACE_STANDARD_CHARACTER_SET_SIZE]; }; -#endif /* ACE_HAS_GPERF */ #endif /* KEY_LIST_H */ diff --git a/ACE/apps/gperf/src/List_Node.cpp b/ACE/apps/gperf/src/List_Node.cpp index ca626d7b7af..1b9e6b8646d 100644 --- a/ACE/apps/gperf/src/List_Node.cpp +++ b/ACE/apps/gperf/src/List_Node.cpp @@ -24,11 +24,6 @@ */ #include "List_Node.h" - - - -#if defined (ACE_HAS_GPERF) - #include "Vectors.h" #include "ace/OS_NS_ctype.h" @@ -131,4 +126,3 @@ List_Node::~List_Node (void) delete [] this->keysig; } -#endif /* ACE_HAS_GPERF */ diff --git a/ACE/apps/gperf/src/List_Node.h b/ACE/apps/gperf/src/List_Node.h index 25f36553c80..eb9fb68260b 100644 --- a/ACE/apps/gperf/src/List_Node.h +++ b/ACE/apps/gperf/src/List_Node.h @@ -35,8 +35,6 @@ #include "Options.h" #include "ace/Copy_Disabled.h" -#if defined (ACE_HAS_GPERF) - /** * Data and function members for defining values and operations of * a list node. @@ -80,5 +78,4 @@ public: int slot; }; -#endif /* ACE_HAS_GPERF */ #endif /* LIST_NODE_H */ diff --git a/ACE/apps/gperf/src/Options.cpp b/ACE/apps/gperf/src/Options.cpp index 06c3376d1c6..e85e50bcfd7 100644 --- a/ACE/apps/gperf/src/Options.cpp +++ b/ACE/apps/gperf/src/Options.cpp @@ -24,11 +24,6 @@ */ #include "Options.h" - - - -#if defined (ACE_HAS_GPERF) - #include "ace/Get_Opt.h" #include "Iterator.h" #include "ace/OS_NS_stdio.h" @@ -848,4 +843,3 @@ Options::total_switches (void) return total_switches_; } -#endif /* ACE_HAS_GPERF */ diff --git a/ACE/apps/gperf/src/Options.h b/ACE/apps/gperf/src/Options.h index c76a7037661..2def2514200 100644 --- a/ACE/apps/gperf/src/Options.h +++ b/ACE/apps/gperf/src/Options.h @@ -34,8 +34,6 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#if defined (ACE_HAS_GPERF) - /// Enumerate the potential debugging Options. enum Option_Type { @@ -190,5 +188,4 @@ private: /// Global option coordinator for the entire program. extern Options option; -#endif /* ACE_HAS_GPERF */ #endif /* OPTIONS_H */ diff --git a/ACE/apps/gperf/src/Vectors.cpp b/ACE/apps/gperf/src/Vectors.cpp index f40f774dc66..c01b4736e29 100644 --- a/ACE/apps/gperf/src/Vectors.cpp +++ b/ACE/apps/gperf/src/Vectors.cpp @@ -25,14 +25,8 @@ #include "Vectors.h" - - -#if defined (ACE_HAS_GPERF) - /// Counts occurrences of each key set character. int Vectors::occurrences[ACE_STANDARD_CHARACTER_SET_SIZE]; /// Value associated with each character. int Vectors::asso_values[ACE_STANDARD_CHARACTER_SET_SIZE]; - -#endif /* ACE_HAS_GPERF */ diff --git a/ACE/apps/gperf/src/Vectors.h b/ACE/apps/gperf/src/Vectors.h index d6a9dc4bcfe..e7326faffec 100644 --- a/ACE/apps/gperf/src/Vectors.h +++ b/ACE/apps/gperf/src/Vectors.h @@ -32,8 +32,6 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#if defined (ACE_HAS_GPERF) - // Do not change these values wantonly since GPERF depends on them.. #define ACE_ASCII_SIZE 128 #define ACE_EBCDIC_SIZE 256 @@ -60,5 +58,4 @@ public: static int asso_values[ACE_STANDARD_CHARACTER_SET_SIZE]; }; -#endif /* ACE_HAS_GPERF */ #endif /* VECTORS_H */ diff --git a/ACE/apps/gperf/src/gperf.cpp b/ACE/apps/gperf/src/gperf.cpp index 33dc9b5c6ba..d31bf95e65a 100644 --- a/ACE/apps/gperf/src/gperf.cpp +++ b/ACE/apps/gperf/src/gperf.cpp @@ -26,11 +26,6 @@ */ #include "Gen_Perf.h" - - - -#if defined (ACE_HAS_GPERF) - #include "Options.h" #include "ace/OS_NS_time.h" #include "ace/OS_NS_stdio.h" @@ -70,13 +65,3 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) tm->tm_sec); return status; } -#else /* ! ACE_HAS_GPERF */ -int -ACE_TMAIN (int, ACE_TCHAR *[]) -{ - ACE_ERROR_RETURN ((LM_ERROR, - "gperf is not operational because " - "ACE_HAS_GPERF was not enabled for the build\n"), - 1); -} -#endif /* ! ACE_HAS_GPERF */ diff --git a/ACE/bin/MakeProjectCreator/config/ace_qt3.mpb b/ACE/bin/MakeProjectCreator/config/ace_qt3.mpb deleted file mode 100644 index a4238d6dbf9..00000000000 --- a/ACE/bin/MakeProjectCreator/config/ace_qt3.mpb +++ /dev/null @@ -1,5 +0,0 @@ -// -*- MPC -*- -// $Id$ - -project: ace_qt { -} diff --git a/ACE/bin/MakeProjectCreator/config/ace_qtreactor.mpb b/ACE/bin/MakeProjectCreator/config/ace_qtreactor.mpb deleted file mode 100644 index e46c7dd6ea6..00000000000 --- a/ACE/bin/MakeProjectCreator/config/ace_qtreactor.mpb +++ /dev/null @@ -1,8 +0,0 @@ -// -*- MPC -*- -// $Id$ - -project : acelib, ace_qt3 { - requires += ace_qtreactor - after += ACE_QtReactor - libs += ACE_QtReactor -} diff --git a/ACE/bin/fuzz.pl b/ACE/bin/fuzz.pl index 710e86f21c6..b90aab741f3 100755 --- a/ACE/bin/fuzz.pl +++ b/ACE/bin/fuzz.pl @@ -42,6 +42,7 @@ use PerlACE::Run_Test; @files_gnu = (); @files_idl = (); @files_pl = (); +@files_py = (); @files_changelog = (); @files_makefile = (); @files_mpc = (); @@ -128,6 +129,9 @@ sub store_file ($) push @files_run_pl, ($name); } } + elsif ($name =~ /\.py$/i) { + push @files_py, ($name); + } elsif ($name =~ /\.vcproj$/i) { push @files_vcproj, ($name); } @@ -211,7 +215,7 @@ sub check_for_id_string () { print "Running \$Id\$ string check\n"; foreach $file (@files_cpp, @files_inl, @files_h, @files_mpc, @files_bor, @files_gnu, - @files_html, @files_idl, @files_pl, @makefile_files, @files_cdp) { + @files_html, @files_idl, @files_pl, @makefile_files, @files_cdp, @files_py) { my $found = 0; if (open (FILE, $file)) { print "Looking at file $file\n" if $opt_d; diff --git a/ACE/bin/sets-manager.py b/ACE/bin/sets-manager.py index c3dc10d842e..09bb5213dd6 100755 --- a/ACE/bin/sets-manager.py +++ b/ACE/bin/sets-manager.py @@ -1,5 +1,5 @@ #!/usr/bin/env python - +# $Id$ """ This script implements branching and tagging in the DOC group repository, and automates the process of creating sets. """ diff --git a/ACE/bin/svn_props.py b/ACE/bin/svn_props.py index da1a6d62df9..10e48ba6964 100755 --- a/ACE/bin/svn_props.py +++ b/ACE/bin/svn_props.py @@ -1,4 +1,5 @@ #!/usr/bin/python +#$Id$ import sys import re diff --git a/ACE/etc/ace.doxygen b/ACE/etc/ace.doxygen index 07d02156d79..b9844af5db1 100644 --- a/ACE/etc/ace.doxygen +++ b/ACE/etc/ace.doxygen @@ -138,11 +138,23 @@ PREDEFINED = __ACE_INLINE__= \ ACE_INLINE=inline \ ACE_NAMESPACE_INLINE_FUNCTION=inline \ ACE_Export= \ - ACE_HAS_THREADS= + ACE_HAS_THREADS= \ + ACE_HAS_AIO_CALLS= \ + ACE_WIN32= \ + ACE_HAS_WIN32_OVERLAPPED_IO= \ + ACE_HAS_ATM= \ + ACE_HAS_IPV6= \ + ACE_HAS_ATM= \ + ACE_HAS_DEV_POLL= \ + ACE_HAS_ICMP_SUPPORT=1 \ + ACE_HAS_TOKENS_LIBRARY= \ + ACE_HAS_WCHAR= \ + ACE_HAS_LOG_MSG_NT_EVENT_LOG= \ + ACE_HAS_TLI= \ + ACE_HAS_POSITION_INDEPENDENT_POINTERS=1 \ + ACE_HAS_MONITOR_FRAMEWORK=1 EXPAND_AS_DEFINED = ACE_UNIMPLEMENTED_FUNC \ - ACE_CACHE_MAP_MANAGER \ - ACE_T1 \ - ACE_T2 + ACE_CACHE_MAP_MANAGER #--------------------------------------------------------------------------- # Configuration::additions related to external references diff --git a/ACE/etc/ace_qos.doxygen b/ACE/etc/ace_qos.doxygen index 82f2aacc7b7..d1e04b25310 100644 --- a/ACE/etc/ace_qos.doxygen +++ b/ACE/etc/ace_qos.doxygen @@ -133,7 +133,7 @@ EXPAND_AS_DEFINED = ACE_UNIMPLEMENTED_FUNC \ # Configuration::additions related to external references #--------------------------------------------------------------------------- -TAGFILES = html/libace-doc/ACE.tag=.. +TAGFILES = html/libace-doc/ACE.tag=.. html/libace-doc/ssl/ACE_SSL.tag=.. GENERATE_TAGFILE = html/libace-doc/QoS/ACE_QoS.tag ALLEXTERNALS = NO PERL_PATH = /usr/bin/perl diff --git a/ACE/examples/Reactor/Misc/notification.cpp b/ACE/examples/Reactor/Misc/notification.cpp index 639ce5e1b21..af1f5aac845 100644 --- a/ACE/examples/Reactor/Misc/notification.cpp +++ b/ACE/examples/Reactor/Misc/notification.cpp @@ -11,12 +11,7 @@ #if defined (ACE_HAS_THREADS) -#if defined (CHORUS) -// Chorus does not have signal, so we'll stop after a number of rounds. -#define MAX_ITERATIONS 3 -#else #define MAX_ITERATIONS 10000 -#endif /* CHORUS */ class Thread_Handler : public ACE_Event_Handler { diff --git a/ACE/examples/Reactor/Misc/pingpong.cpp b/ACE/examples/Reactor/Misc/pingpong.cpp index 5d17495b21e..e207fb385cf 100644 --- a/ACE/examples/Reactor/Misc/pingpong.cpp +++ b/ACE/examples/Reactor/Misc/pingpong.cpp @@ -43,13 +43,11 @@ #include "ace/OS_NS_string.h" #include "ace/Null_Mutex.h" #include "ace/OS_NS_unistd.h" -#if defined (ACE_WIN32) || defined (CHORUS) +#if defined (ACE_WIN32) # include "ace/Barrier.h" # include "ace/Thread.h" #endif - - class Ping_Pong : public ACE_Test_and_Set<ACE_Null_Mutex, sig_atomic_t> { public: @@ -211,10 +209,8 @@ run_svc (ACE_HANDLE handle) if (reactor.register_handler (callback, ACE_Event_Handler::READ_MASK | ACE_Event_Handler::WRITE_MASK) == -1 -#if !defined (CHORUS) || reactor.register_handler (SIGINT, callback) == -1 -#endif /* CHORUS */ || reactor.schedule_timer (callback, 0, SHUTDOWN_TIME) == -1) @@ -234,7 +230,7 @@ run_svc (ACE_HANDLE handle) ACE_TEXT ("handle_events"))); } -#if defined (ACE_WIN32) || defined (CHORUS) +#if defined (ACE_WIN32) static ACE_Barrier barrier (3); static void * @@ -272,7 +268,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) ACE_Pipe pipe (handles); //FUZZ: enable check_for_lack_ACE_OS -#if defined (ACE_WIN32) || defined (CHORUS) +#if defined (ACE_WIN32) if (ACE_Thread::spawn (ACE_THR_FUNC (worker), (void *) handles[0], THR_DETACHED) == -1 diff --git a/ACE/include/makeinclude/platform_aix_g++.GNU b/ACE/include/makeinclude/platform_aix_g++.GNU index ac08dafc180..d101c53c7b4 100644 --- a/ACE/include/makeinclude/platform_aix_g++.GNU +++ b/ACE/include/makeinclude/platform_aix_g++.GNU @@ -91,4 +91,4 @@ RANLIB = ranlib # include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU -CCFLAGS += $(CFLAGS) $(TEMPLATES_FLAG) +CCFLAGS += $(CFLAGS) diff --git a/ACE/include/makeinclude/platform_cegcc.GNU b/ACE/include/makeinclude/platform_cegcc.GNU index a04d56dab38..a5502a40167 100644 --- a/ACE/include/makeinclude/platform_cegcc.GNU +++ b/ACE/include/makeinclude/platform_cegcc.GNU @@ -28,7 +28,7 @@ qos ?= 1 # See https://sourceforge.net/tracker/?func=detail&atid=102435&aid=683455&group_id=2435 # for the details why to do this. LDFLAGS += -Wl,--enable-auto-import -CPPFLAGS += -DACE_HAS_CEGCC +CPPFLAGS += -DACE_HAS_CEGCC CPPFLAGS += -D_WIN32_WCE=$(ACE_CE_VER) -DUNICODE -D_UNICODE -D_WINDOWS -DCEVER -DWIN32 -D_WINSOCKAPI_ RCFLAGS += -D_WIN32_WCE=$(ACE_CE_VER) -DUNICODE -D_UNICODE -D_WINDOWS -DCEVER -DWIN32 -D_WINSOCKAPI_ -D_WIN32_IE=0x0500 @@ -36,8 +36,7 @@ RCFLAGS += -D_WIN32_WCE=$(ACE_CE_VER) -DUNICODE -D_UNICODE -D_WINDOWS -DCEVER -D cpumodelflag=0 tunemodelflag=0 -COMPARCH ?= i386-mingw32ce- -#COMPARCH ?= arm-wince-mingw32ce- +CROSS_COMPILE ?= i386-mingw32ce- LIBS += -lcoredll -lmingw32 -lmingwex -lws2 -lsupc++ -liphlpapi diff --git a/ACE/include/makeinclude/platform_freebsd.GNU b/ACE/include/makeinclude/platform_freebsd.GNU index 3f637056de3..6f87c6c9fce 100644 --- a/ACE/include/makeinclude/platform_freebsd.GNU +++ b/ACE/include/makeinclude/platform_freebsd.GNU @@ -103,4 +103,4 @@ LDFLAGS+=-L/usr/local/lib # include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU -CCFLAGS += $(CFLAGS) $(TEMPLATES_FLAG) +CCFLAGS += $(CFLAGS) diff --git a/ACE/include/makeinclude/platform_g++_common.GNU b/ACE/include/makeinclude/platform_g++_common.GNU index 742f0a04ba1..646c69c467b 100644 --- a/ACE/include/makeinclude/platform_g++_common.GNU +++ b/ACE/include/makeinclude/platform_g++_common.GNU @@ -7,9 +7,9 @@ ifeq ($(insure),1) else ifneq ($(CROSS_COMPILE),) # Build using the cross-tools - CC = ${CROSS_COMPILE}gcc - CXX = ${CROSS_COMPILE}g++ - AR = ${CROSS_COMPILE}ar + CC = ${CROSS_COMPILE}gcc{$CROSS_COMPILE_POSTFIX} + CXX = ${CROSS_COMPILE}g++{$CROSS_COMPILE_POSTFIX} + AR = ${CROSS_COMPILE}ar{$CROSS_COMPILE_POSTFIX} # Cross-linker requires this for linked in shared libs that depend # themselves on other shared libs (not directly linked in) LDFLAGS += -Wl,-rpath-link,$(ACE_ROOT)/lib @@ -42,6 +42,15 @@ ifneq ($(TCPU),) endif endif +ifeq ($(gprof),1) + FLAGS_C_CC += -pg + LDFLAGS += -pg +endif + +ifeq ($(gcov),1) + FLAGS_C_CC += -fprofile-arcs -ftest-coverage +endif + ifeq ($(CXX),insure) # insure does not pass through the -dumpversion option. CXX_FOR_VERSION_TEST ?= g++ diff --git a/ACE/include/makeinclude/platform_hpux_gcc.GNU b/ACE/include/makeinclude/platform_hpux_gcc.GNU index 7fc87b4936d..04cbae62ac2 100644 --- a/ACE/include/makeinclude/platform_hpux_gcc.GNU +++ b/ACE/include/makeinclude/platform_hpux_gcc.GNU @@ -102,4 +102,4 @@ endif # include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU -CCFLAGS += $(CFLAGS) $(TEMPLATES_FLAG) -DHPUX_VERS=$(HPUX_VERS) $(THR_DEFS) +CCFLAGS += $(CFLAGS) -DHPUX_VERS=$(HPUX_VERS) $(THR_DEFS) diff --git a/ACE/include/makeinclude/platform_linux.GNU b/ACE/include/makeinclude/platform_linux.GNU index 37d999903b3..127abec9ab6 100644 --- a/ACE/include/makeinclude/platform_linux.GNU +++ b/ACE/include/makeinclude/platform_linux.GNU @@ -101,7 +101,7 @@ else endif CFLAGS += $(FLAGS_C_CC) -CCFLAGS += $(FLAGS_C_CC) $(TEMPLATES_FLAG) +CCFLAGS += $(FLAGS_C_CC) # Added line below to support "Executable Shared Object" files (as # needed by the service configurator). diff --git a/ACE/include/makeinclude/platform_linux_icc.GNU b/ACE/include/makeinclude/platform_linux_icc.GNU index 1afd19c729f..adee04d31d3 100644 --- a/ACE/include/makeinclude/platform_linux_icc.GNU +++ b/ACE/include/makeinclude/platform_linux_icc.GNU @@ -39,6 +39,10 @@ endif ifeq (11.0,$(findstring 11.0,$(CXX_VERSION))) CFLAGS += -wd1684 endif +ifeq (12.0,$(findstring 12.0,$(CXX_VERSION))) + CPPFLAGS += -std=c++0x + no_hidden_visibility ?= 0 +endif no_hidden_visibility ?= 1 @@ -54,12 +58,13 @@ ifeq ($(ipo),1) CPPFLAGS += -ipo endif + CFLAGS += -w1 ifeq ($(threads),1) CPPFLAGS += -D_REENTRANT $(PLATFORM_AIO_SUPPORT) endif # threads -CCFLAGS += $(CFLAGS) $(IMPLICIT_TEMPLATES_FLAG) -ip +CCFLAGS += $(CFLAGS) -ip DCFLAGS += -g -debug full DLD = $(CXX) LD = $(CXX) @@ -94,7 +99,7 @@ ifeq ($(shared_libs), 1) ifneq ($static_libs_only), 1) LDFLAGS += -Wl,-E ifneq ($(no_hidden_visibility),1) - CCFLAGS += -fvisibility=hidden + CCFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden else CPPFLAGS += -DACE_HAS_CUSTOM_EXPORT_MACROS=0 endif # no_hidden_visibility diff --git a/ACE/include/makeinclude/platform_linux_pgi.GNU b/ACE/include/makeinclude/platform_linux_pgi.GNU index 38c9a454cba..3c0674d9866 100644 --- a/ACE/include/makeinclude/platform_linux_pgi.GNU +++ b/ACE/include/makeinclude/platform_linux_pgi.GNU @@ -14,7 +14,7 @@ ifeq ($(threads),1) CPPFLAGS += -D_REENTRANT $(PLATFORM_AIO_SUPPORT) endif # threads -CCFLAGS += $(CFLAGS) $(IMPLICIT_TEMPLATES_FLAG) +CCFLAGS += $(CFLAGS) DCFLAGS += -g DLD = $(CXX) LD = $(CXX) diff --git a/ACE/include/makeinclude/platform_linux_suncc.GNU b/ACE/include/makeinclude/platform_linux_suncc.GNU index 18771a3a4d2..8f89a198920 100644 --- a/ACE/include/makeinclude/platform_linux_suncc.GNU +++ b/ACE/include/makeinclude/platform_linux_suncc.GNU @@ -22,7 +22,7 @@ ifeq (NPTL, $(word 1,$(GNU_LIBPTHREAD_VERSION))) CPPFLAGS += -DACE_HAS_LINUX_NPTL endif -CCFLAGS += $(CFLAGS) $(IMPLICIT_TEMPLATES_FLAG) +CCFLAGS += $(CFLAGS) DCFLAGS += -g DLD = $(CXX) LD = $(CXX) diff --git a/ACE/include/makeinclude/platform_lynxos.GNU b/ACE/include/makeinclude/platform_lynxos.GNU index ebcebe8ad08..6c1b7fc0835 100644 --- a/ACE/include/makeinclude/platform_lynxos.GNU +++ b/ACE/include/makeinclude/platform_lynxos.GNU @@ -89,7 +89,7 @@ PRELIB = @true # include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU -CCFLAGS += $(CFLAGS) $(TEMPLATES_FLAG) +CCFLAGS += $(CFLAGS) ifeq ($(CXX_MAJOR_VERSION), 3) LDFLAGS += -L/usr/lib/thread diff --git a/ACE/include/makeinclude/platform_macosx.GNU b/ACE/include/makeinclude/platform_macosx.GNU index 6d97044285b..4784270986a 100644 --- a/ACE/include/makeinclude/platform_macosx.GNU +++ b/ACE/include/makeinclude/platform_macosx.GNU @@ -42,4 +42,4 @@ SOBUILD = -o $(VSHDIR)$*.dylib $< # include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU -CCFLAGS += $(CFLAGS) $(TEMPLATES_FLAG) +CCFLAGS += $(CFLAGS) diff --git a/ACE/include/makeinclude/platform_macosx_common.GNU b/ACE/include/makeinclude/platform_macosx_common.GNU index 3b15e1167ac..b8193e94963 100644 --- a/ACE/include/makeinclude/platform_macosx_common.GNU +++ b/ACE/include/makeinclude/platform_macosx_common.GNU @@ -29,14 +29,14 @@ CFLAGS += $(FLAGS_C_CC) CC ?= gcc CXX ?= g++ -CFLAGS += -Wall -Wpointer-arith +CFLAGS += -Wall -Wpointer-arith DCFLAGS += -g DLD = $(CXX) LD = $(CXX) #LIBS += -lstdc++.6 -lSystem -lSystemStubs -OCFLAGS += -O2 +OCFLAGS += -O2 RANLIB = ranlib SOEXT = dylib SOFLAGS += -dynamiclib @@ -51,7 +51,7 @@ else endif LDFLAGS += -flat_namespace -CCFLAGS += $(CFLAGS) $(TEMPLATES_FLAG) +CCFLAGS += $(CFLAGS) ifeq ($(universal),1) CFLAGS += -arch i386 -arch ppc diff --git a/ACE/include/makeinclude/platform_macosx_icc.GNU b/ACE/include/makeinclude/platform_macosx_icc.GNU index 05fb528c3dd..0516f945126 100644 --- a/ACE/include/makeinclude/platform_macosx_icc.GNU +++ b/ACE/include/makeinclude/platform_macosx_icc.GNU @@ -45,7 +45,7 @@ ifeq ($(threads),1) CPPFLAGS += -D_REENTRANT $(PLATFORM_AIO_SUPPORT) endif # threads -CCFLAGS += $(CFLAGS) $(IMPLICIT_TEMPLATES_FLAG) -ip +CCFLAGS += $(CFLAGS) -ip DCFLAGS += -g -debug full DLD = $(CXX) LD = $(CXX) diff --git a/ACE/include/makeinclude/platform_macosx_panther.GNU b/ACE/include/makeinclude/platform_macosx_panther.GNU index daf25409b68..a15b3dfa055 100644 --- a/ACE/include/makeinclude/platform_macosx_panther.GNU +++ b/ACE/include/makeinclude/platform_macosx_panther.GNU @@ -31,4 +31,4 @@ SOBUILD = -o $(VSHDIR)$*.dylib $< include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU LDFLAGS += -flat_namespace -undefined warning -CCFLAGS += $(CFLAGS) $(TEMPLATES_FLAG) +CCFLAGS += $(CFLAGS) diff --git a/ACE/include/makeinclude/platform_netbsd.GNU b/ACE/include/makeinclude/platform_netbsd.GNU index f584ce8a239..59fb9463f92 100644 --- a/ACE/include/makeinclude/platform_netbsd.GNU +++ b/ACE/include/makeinclude/platform_netbsd.GNU @@ -39,5 +39,5 @@ endif # threads # include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU -CCFLAGS += $(CFLAGS) $(TEMPLATES_FLAG) +CCFLAGS += $(CFLAGS) diff --git a/ACE/include/makeinclude/platform_openbsd.GNU b/ACE/include/makeinclude/platform_openbsd.GNU index 93d0ce95087..aec44deab96 100644 --- a/ACE/include/makeinclude/platform_openbsd.GNU +++ b/ACE/include/makeinclude/platform_openbsd.GNU @@ -53,4 +53,4 @@ LDFLAGS+=-L/usr/local/lib # include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU -CCFLAGS += $(CFLAGS) $(TEMPLATES_FLAG) +CCFLAGS += $(CFLAGS) diff --git a/ACE/include/makeinclude/platform_sunos5_g++.GNU b/ACE/include/makeinclude/platform_sunos5_g++.GNU index 03bf3c0c750..95234c357cb 100644 --- a/ACE/include/makeinclude/platform_sunos5_g++.GNU +++ b/ACE/include/makeinclude/platform_sunos5_g++.GNU @@ -58,7 +58,7 @@ include $(ACE_ROOT)/include/makeinclude/platform_sunos5_common.GNU include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU CFLAGS += $(FLAGS_C_CC) -CCFLAGS += $(FLAGS_C_CC) $(TEMPLATES_FLAG) +CCFLAGS += $(FLAGS_C_CC) # Make sure we resolve all symbols at link time, see bugzilla 2710 LDFLAGS += -z now diff --git a/ACE/include/makeinclude/platform_sunos5_sunc++.GNU b/ACE/include/makeinclude/platform_sunos5_sunc++.GNU index 9fec72e6c60..dfec78d3892 100644 --- a/ACE/include/makeinclude/platform_sunos5_sunc++.GNU +++ b/ACE/include/makeinclude/platform_sunos5_sunc++.GNU @@ -161,8 +161,6 @@ ifeq (C++ 5,$(findstring C++ 5,$(CC_VERSION))) endif # compat4 requested endif # CC 5.0 or later -CCFLAGS += $(TEMPLATES_FLAG) - ifeq ($(shared_libs), 1) ifneq ($(static_libs_only), 1) diff --git a/ACE/include/makeinclude/platform_vxworks6.2.GNU b/ACE/include/makeinclude/platform_vxworks6.2.GNU index 37080a0382c..bb07b38ecff 100644 --- a/ACE/include/makeinclude/platform_vxworks6.2.GNU +++ b/ACE/include/makeinclude/platform_vxworks6.2.GNU @@ -298,11 +298,6 @@ else endif endif endif - -# TEMPLATES_FLAG is set by platform_g++_common.GNU -ifneq ($(TEMPLATES_FLAG),) # If specified, add it to the CCFLAGS - CPPFLAGS += $(TEMPLATES_FLAG) -endif endif # TOOL_FAMILY == gnu ifeq ("$(TOOL_FAMILY)","diab") diff --git a/ACE/include/makeinclude/platform_vxworks6.3.GNU b/ACE/include/makeinclude/platform_vxworks6.3.GNU index 902c1a875e0..96e51916942 100644 --- a/ACE/include/makeinclude/platform_vxworks6.3.GNU +++ b/ACE/include/makeinclude/platform_vxworks6.3.GNU @@ -332,11 +332,6 @@ else endif endif endif - -# TEMPLATES_FLAG is set by platform_g++_common.GNU -ifneq ($(TEMPLATES_FLAG),) # If specified, add it to the CCFLAGS - CPPFLAGS += $(TEMPLATES_FLAG) -endif endif # TOOL_FAMILY == gnu ifeq ("$(TOOL_FAMILY)","diab") diff --git a/ACE/include/makeinclude/platform_win32_dmc.GNU b/ACE/include/makeinclude/platform_win32_dmc.GNU index 2c6c3abfcf0..63b484aa365 100644 --- a/ACE/include/makeinclude/platform_win32_dmc.GNU +++ b/ACE/include/makeinclude/platform_win32_dmc.GNU @@ -35,7 +35,7 @@ SOBUILD = $(COMPILE.cc) $(PIC) -o $(VSHDIR)$*.so $< PRELIB = @true -CCFLAGS += $(CFLAGS) $(TEMPLATES_FLAG) +CCFLAGS += $(CFLAGS) # Dmc doesn't have rwho rwho = 0 diff --git a/ACE/include/makeinclude/platform_win32_icc.GNU b/ACE/include/makeinclude/platform_win32_icc.GNU index 28d68f630fc..80291e34f9a 100644 --- a/ACE/include/makeinclude/platform_win32_icc.GNU +++ b/ACE/include/makeinclude/platform_win32_icc.GNU @@ -42,4 +42,4 @@ OBJEXT = obj SOFLAGS += $(MODEL_FLAGS) $(CPPFLAGS) SOBUILD = $(COMPILE.cc) $(PIC) -o $(VSHDIR)$*.so $< -CCFLAGS += $(CFLAGS) $(TEMPLATES_FLAG) +CCFLAGS += $(CFLAGS) diff --git a/ACE/include/makeinclude/platform_win32_interix.GNU b/ACE/include/makeinclude/platform_win32_interix.GNU index 18a9461b2e0..407441614c5 100644 --- a/ACE/include/makeinclude/platform_win32_interix.GNU +++ b/ACE/include/makeinclude/platform_win32_interix.GNU @@ -43,4 +43,4 @@ PLATFORM_X11_LDFLAGS=-L/usr/X11R6/lib # #include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU -CCFLAGS += $(CFLAGS) $(TEMPLATES_FLAG) +CCFLAGS += $(CFLAGS) diff --git a/ACE/include/makeinclude/rules.bin.GNU b/ACE/include/makeinclude/rules.bin.GNU index fe6fb0a83b1..5fb5d8c76af 100644 --- a/ACE/include/makeinclude/rules.bin.GNU +++ b/ACE/include/makeinclude/rules.bin.GNU @@ -34,7 +34,6 @@ PSRC += $(addsuffix .cpp, $(CLEANUP_BIN)) CLEANUP_INSTALL += $(CLEANUP_BIN:%=$(INSBIN)/%$(VAR)$(EXEEXT)) -CHORUSLINK ?= VXWORKSLINK ?= using_aix_vacpp ?= diff --git a/ACE/include/makeinclude/wrapper_macros.GNU b/ACE/include/makeinclude/wrapper_macros.GNU index 7ba9aea4deb..63d7f252163 100644 --- a/ACE/include/makeinclude/wrapper_macros.GNU +++ b/ACE/include/makeinclude/wrapper_macros.GNU @@ -117,9 +117,6 @@ # DLD Name of dynamic linker # LD Name of linker # IDL Name of the CORBA IDL compiler -# TEMPLATES_FLAG -# Flag to pass to the compiler to control the instantiation of -# templates. # INSBIN Binary (executable) installation directory # INSINC Include file installation directory # INSMAN Manpage installation directory @@ -217,7 +214,6 @@ endif # alternate_platform_macros # Define some variables to silence warnings GHS ?= -CHORUS ?= AIX_TEMPLATE_HACK ?= # $(ACE_PLATFORM_CONFIG) is used in dependency rules and corresponds to the @@ -917,7 +913,6 @@ PTDIRS ?= PRELINK ?= POSTLINK ?= PURELINK ?= -TEMPLATES_FLAG ?= MVCMD ?= COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c diff --git a/ACE/tests/Atomic_Op_Test.cpp b/ACE/tests/Atomic_Op_Test.cpp index 739531d009f..c59fe00c576 100644 --- a/ACE/tests/Atomic_Op_Test.cpp +++ b/ACE/tests/Atomic_Op_Test.cpp @@ -199,7 +199,7 @@ int test (const ACE_TCHAR* type, int iterations) if (foo != 0) { ++retval; - ACE_ERROR ((LM_ERROR, ACE_TEXT ("Error: Substraction failed\n"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("Error: Subtraction failed\n"))); } return retval; diff --git a/ACE/tests/Dirent_Test.cpp b/ACE/tests/Dirent_Test.cpp index 98d1ec3f048..497d2bd8126 100644 --- a/ACE/tests/Dirent_Test.cpp +++ b/ACE/tests/Dirent_Test.cpp @@ -31,16 +31,11 @@ #include "ace/OS_NS_unistd.h" #include "ace/SString.h" -#if (defined (ACE_VXWORKS) && (ACE_VXWORKS < 0x600)) -# define TEST_DIR "log" -# define TEST_ENTRY ".." +#if defined (ACE_HAS_TCHAR_DIRENT) +# define TEST_ENTRY ACE_TEXT ("run_test.lst") #else -# if defined (ACE_HAS_TCHAR_DIRENT) -# define TEST_ENTRY ACE_TEXT ("run_test.lst") -# else -# define TEST_ENTRY "run_test.lst" -# endif /* ACE_HAS_TCHAR_DIRENT */ -#endif /* ACE_VXWORKS < 0x600 */ +# define TEST_ENTRY "run_test.lst" +#endif /* ACE_HAS_TCHAR_DIRENT */ // Directory to scan - we need to figure it out based on environment. static ACE_TString TestDir; @@ -219,31 +214,11 @@ dirent_count (const ACE_TCHAR *dir_path, int recursion_level) { #if !defined (ACE_LACKS_CHDIR) - -# if (defined (ACE_VXWORKS) && (ACE_VXWORKS < 0x600)) - // VxWorks only allows full paths (incl. device spec if applicable) to be specified - ACE_TCHAR full_path[MAXPATHLEN]; - if (ACE_OS::getcwd (full_path, sizeof(full_path)) == 0) - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("getcwd: failed\n")), - -1); - if ((ACE_OS::strlen (full_path) + 1 + ACE_OS::strlen (dir_path)) >= sizeof(full_path)) - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("getcwd: too long\n")), - -1); - ACE_OS::strcat (ACE_OS::strcat (full_path, "/"), dir_path); - if (ACE_OS::chdir (full_path) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("chdir: %p\n"), - full_path), - -1); -# else if (ACE_OS::chdir (dir_path) == -1) ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("chdir: %p\n"), dir_path), -1); -# endif #else ACE_UNUSED_ARG (dir_path); #endif /* !ACE_LACKS_CHDIR */ diff --git a/ACE/tests/SSL/SSL_Asynch_Stream_Test.cpp b/ACE/tests/SSL/SSL_Asynch_Stream_Test.cpp index da1b7ae2ab5..ebae71d365b 100644 --- a/ACE/tests/SSL/SSL_Asynch_Stream_Test.cpp +++ b/ACE/tests/SSL/SSL_Asynch_Stream_Test.cpp @@ -123,18 +123,11 @@ static const ACE_TCHAR *rendezvous = \ // Total number of proactor threads. static size_t num_threads = ACE_MAX_THREADS; -#if defined (CHORUS) // Add platforms that can't handle too many - // connection simultaneously here. -#define ACE_LOAD_FACTOR /2 -#else -#define ACE_LOAD_FACTOR -#endif - // Number of client connections to attempt. -static size_t cli_conn_no = ACE_MAX_ITERATIONS ACE_LOAD_FACTOR; +static size_t cli_conn_no = ACE_MAX_ITERATIONS; // Number of requests each client connection sends. -static size_t cli_req_no = ACE_MAX_THREADS ACE_LOAD_FACTOR; +static size_t cli_req_no = ACE_MAX_THREADS; // Delay before a thread sending the next request (in msec.) static int req_delay = 0; diff --git a/ACE/tests/SSL/Thread_Pool_Reactor_SSL_Test.cpp b/ACE/tests/SSL/Thread_Pool_Reactor_SSL_Test.cpp index 5c2c4117342..94d41c85999 100644 --- a/ACE/tests/SSL/Thread_Pool_Reactor_SSL_Test.cpp +++ b/ACE/tests/SSL/Thread_Pool_Reactor_SSL_Test.cpp @@ -66,21 +66,14 @@ static const ACE_TCHAR *rendezvous = ACE_TEXT ("127.0.0.1:10010"); // Total number of server threads. static size_t svr_thrno = ACE_MAX_THREADS; -#if defined (CHORUS) // Add platforms that can't handle too many - // connection simultaneously here. -#define ACE_LOAD_FACTOR /2 -#else -#define ACE_LOAD_FACTOR -#endif - // Total number of client threads. -static size_t cli_thrno = ACE_MAX_THREADS ACE_LOAD_FACTOR; +static size_t cli_thrno = ACE_MAX_THREADS; // Total connection attemps of a client thread. -static size_t cli_conn_no = ACE_MAX_ITERATIONS ACE_LOAD_FACTOR; +static size_t cli_conn_no = ACE_MAX_ITERATIONS; // Total requests a client thread sends. -static size_t cli_req_no = ACE_MAX_THREADS ACE_LOAD_FACTOR; +static size_t cli_req_no = ACE_MAX_THREADS; // Delay before a thread sending the next request (in msec.) static int req_delay = 50; diff --git a/ACE/tests/Thread_Manager_Test.cpp b/ACE/tests/Thread_Manager_Test.cpp index 697b645685d..ba9fb260c15 100644 --- a/ACE/tests/Thread_Manager_Test.cpp +++ b/ACE/tests/Thread_Manager_Test.cpp @@ -402,13 +402,8 @@ run_main (int, ACE_TCHAR *[]) thr_mgr->kill_grp (grp_id, SIGINT); #elif !defined (ACE_HAS_PTHREADS_DRAFT4) && !defined(ACE_LACKS_PTHREAD_KILL) -#if defined (CHORUS) - ACE_TEST_ASSERT (thr_mgr->kill_grp (grp_id, - SIGTHREADKILL) != -1); -#else ACE_TEST_ASSERT (thr_mgr->kill_grp (grp_id, SIGINT) != -1); -#endif /* CHORUS */ #else if (thr_mgr->kill_grp (grp_id, SIGINT) == -1) diff --git a/ACE/tests/Thread_Pool_Reactor_Resume_Test.cpp b/ACE/tests/Thread_Pool_Reactor_Resume_Test.cpp index aae9b72f1a7..36455983a4a 100644 --- a/ACE/tests/Thread_Pool_Reactor_Resume_Test.cpp +++ b/ACE/tests/Thread_Pool_Reactor_Resume_Test.cpp @@ -63,7 +63,7 @@ static size_t svr_thrno = ACE_MAX_THREADS; // Default network parameters (MAX_BINDS and system buffers) are too small // for full test on some platforms; add platforms that can't handle too many // connection simultaneously here. -#if defined (CHORUS) || defined (ACE_VXWORKS) || defined (ACE_HAS_PHARLAP) +#if defined (ACE_VXWORKS) || defined (ACE_HAS_PHARLAP) #define ACE_LOAD_FACTOR /2 #else #define ACE_LOAD_FACTOR diff --git a/ACE/tests/tests.mpc b/ACE/tests/tests.mpc index a0322a47c8a..a39e4494b8a 100644 --- a/ACE/tests/tests.mpc +++ b/ACE/tests/tests.mpc @@ -1834,7 +1834,7 @@ project(SOCK_SEQPACK_SCTP_Test) : acetest { } } -project(QtReactor Test) : acetest, ace_qtreactor { +project(QtReactor Test) : acetest, ace_qt4reactor { exename = QtReactor_Test MOC_Files { QtReactor_Test.h diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog index 92809af0389..f155169cc0b 100644 --- a/CIAO/ChangeLog +++ b/CIAO/ChangeLog @@ -1,3 +1,594 @@ +Fri Feb 11 11:16:00 UTC 2011 Martin Corino <mcorino@remedy.nl> + + Merged changes from Remedy work branch. + + === start changelog === + + Thu Feb 10 09:59:48 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * bin/generate_component_mpc.pl: + Fixed the afters for the servants. + + * tutorials/Quoter/Simple/Broker/StockBroker.mpc: + * tutorials/Quoter/Simple/Distributor/StockDistributor.mpc: + Regenerated using the latest generate_component_mpc + + Wed Feb 9 12:27:18 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * bin/generate_component_mpc.pl: + Fixed some layout issues in the generated MPC code. + + * tutorials/Quoter/Simple/01.html: + Added additional information regarding generate_component_mpc. + + * tutorials/Quoter/Simple/Broker/StockBroker.mpc: + * tutorials/Quoter/Simple/Distributor/StockDistributor.mpc: + * tutorials/Quoter/Simple/Stock_Base/Stock_Base.mpc: + Regenerated. + + Wed Feb 9 09:43:20 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * bin/generate_component_mpc.pl: + * tutorials/Quoter/Simple/Broker/StockBroker.mpc: + * tutorials/Quoter/Simple/Distributor/StockDistributor.mpc: + Resolved unresolved externals on windows when the generated mpc + files are run on windows. + + Wed Feb 9 09:18:28 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * bin/generate_component_mpc.pl: + Optimized. + + * tutorials/Quoter/Simple/01.html: + Extra remarks regarding generate_component_mpc. + + * tutorials/Quoter/Simple/Broker/StockBroker.mpc: + * tutorials/Quoter/Simple/Distributor/StockDistributor.mpc: + * tutorials/Quoter/Simple/Stock_Base/Stock_Base.mpc: + Fully generated by the generate_componet_mpc script. + + * tutorials/Quoter/Simple/descriptors/run_test.pl: + Added a forgotten new line character. + + Wed Feb 9 07:12:33 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * bin/generate_component_mpc.pl: + Optimized reading command line parameters. + + * ciao/Deployment/Handlers/Connection_Handler.cpp: + Improved disconnect_emitter. + + Tue Feb 8 14:15:09 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * ciao/Deployment/Handlers/Connection_Handler.h: + * ciao/Deployment/Handlers/Connection_Handler.cpp: + Resolve issues regarding lw ccm. + + Tue Feb 8 13:35:35 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * bin/generate_component_mpc.pl: + Optimized reading the command line options. + Added -e option, meaning that events are uses within the + components. + + * tutorials/Quoter/Simple/01.html: + Changed regarding generate_component script. + + Tue Feb 8 13:32:53 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * connectors/dds4ccm/impl/DDS_TopicBase_Connector_T.h: + * connectors/dds4ccm/impl/PublisherListener.cpp: + Layout changes + + * bin/valgrind_nodedaemon.py: + Removed this file, not used and very old + + Tue Feb 8 10:25:20 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * ciao/Deployment/Handlers/Connection_Handler.cpp: + Optimized disconnect_consumer. + + Tue Feb 8 10:08:39 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * ciao/Deployment/Handlers/Connection_Handler.cpp: + Optimized logging. + + Tue Feb 8 09:27:58 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * connectors/dds4ccm/performance-tests/DDSLatency/DDS_Sender/Latency_Sender.cpp: + * connectors/dds4ccm/performance-tests/DDSLatency/DDS_Sender/NDDS_Latency_Sender.cpp: + Listening on the right entity. + + Tue Feb 8 09:14:17 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * CIAO_TAO_DAnCE.mwc: + Reverted last changes. + + * connectors/dds4ccm/performance-tests/DDSLatency/DDS_Sender/Latency_Sender.cpp: + * connectors/dds4ccm/performance-tests/Latency/Sender/LatencyTT_Test_Sender_exec.h: + * connectors/dds4ccm/performance-tests/Latency/Sender/LatencyTT_Test_Sender_exec.cpp: + Checking the number of unexpected_status callbacks. In order to get the + same results on dds4ccm and plain dds, a publisher listener has been added + to the plain dds test. + + Mon Feb 7 18:14:19 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * ciao/Deployment/Handlers/Connection_Handler.cpp: + Resolved compile error on windows. + + Mon Feb 7 13:54:44 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * connectors/dds4ccm/impl/DDS_Base_Connector_T.cpp: + * connectors/dds4ccm/impl/DDS_Event_Connector_T.cpp: + * connectors/dds4ccm/impl/DDS_State_Connector_T.cpp: + * connectors/dds4ccm/impl/DDS_TopicBase_Connector_T.h: + * connectors/dds4ccm/impl/DDS_TopicBase_Connector_T.cpp: + No ACE_Reactor as input parameter for ccm_activate in TopicBase_Connector. + ccm_activate in TopicBase_Connector now determines his own + reactor. Therefor changed the reactor method to throw an exception + when the returned reactor seems nil (while it shouldn't). + Optimized logging regarding late binding. + + Mon Feb 7 12:07:13 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * ciao/Deployment/Handlers/Connection_Handler.h: + * ciao/Deployment/Handlers/Connection_Handler.cpp: + Optimized logging. Optimized disconnect_consumer. Need to distinguish + between an emitter and a publisher here. + + Mon Feb 7 09:34:18 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * ciao/Deployment/Handlers/Connection_Handler.cpp: + Rewritten deployment kind as string method. Optimized disconnect + consumer method. + + Mon Feb 7 09:07:07 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * bin/generate_component_mpc.pl: + Commandline option -o and -l should work again. + + * ciao/Deployment/Handlers/Connection_Handler.cpp: + Optimized logging. + + * tutorials/Quoter/Simple/01.html: + Mentioned the -o and -l command line parameters. + + * tutorials/Quoter/Simple/descriptors/run_test.pl: + Added a forgotten \n + + Fri Feb 4 12:18:06 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * ciao/Deployment/Handlers/Connection_Handler.cpp: + Removed some unnecessary checks. + + Fri Feb 4 12:15:28 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * ciao/Deployment/Handlers/Connection_Handler.h: + * ciao/Deployment/Handlers/Connection_Handler.cpp: + Refactored in order to prevent double code. + + Fri Feb 4 10:42:01 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * ciao/Deployment/Handlers/Connection_Handler.h: + * ciao/Deployment/Handlers/Connection_Handler.cpp: + Optimizing. Passing the connection instead of the connectionRef + to the underlying methods. + + Fri Feb 4 10:02:10 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * ciao/Deployment/Interceptors/Deployment_Interceptors.h: + * ciao/Deployment/Interceptors/Deployment_Interceptors.cpp: + * ciao/Base/Server_init.h: + Doxygen changes + + * ciao/Containers/Container_Base_T.h: + * ciao/Containers/Container_Base_T.cpp: + * ciao/Servants/Connector_Servant_Impl_Base.cpp: + * ciao/Servants/Home_Servant_Impl_T.cpp: + * ciao/Servants/Servant_Impl_Base.cpp: + Changed the_POA and the_port_POA to follow the IDL to C++ refcounting + rules + + Fri Feb 4 09:38:59 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * tests/DAnCE/Components/SimpleEmitter_exec.cpp: + * tests/DAnCE/Components/SimplePublisher_exec.cpp: + Resolved valgrind errors. + + * tests/DAnCE/ExecutionManager-Deployments/PublishConnectionExplicitHome_NS_PL_DP.cdp: + * tests/DAnCE/ExecutionManager-Deployments/PublishConnectionExplicitHome_NS_PL_SP.cdp: + Added some more tests. Also added locality constraints. + + Fri Feb 4 09:01:03 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * tests/DAnCE/ExecutionManager-Deployments/PublishConnectionExplicitHome_NS_PL_DP.cdp: + Provide a new test for connect_consumer. + + Fri Feb 4 08:55:34 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * ciao/Deployment/Handlers/Connection_Handler.cpp: + Determine whether provided reference is an emitter or a publisher. + Call subscribe in case a publisher is provided, connect_consumer when + an emitter is provided. + + Fri Feb 4 07:37:59 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * ciao/Deployment/Handlers/Connection_Handler.cpp: + * tests/DAnCE/ExecutionManager-Deployments/PublishConnectionExplicitHome_NS.cdp: + The connect_publisher is able to handle external consumers. + + Thu Feb 3 15:07:22 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * tests/DAnCE/ExecutionManager-Deployments/PublishConnectionExplicitHome_NS.cdp: + Added more test cases. + + Thu Feb 3 13:23:41 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * ciao/Deployment/Handlers/Connection_Handler.h: + * ciao/Deployment/Handlers/Connection_Handler.cpp: + Optimized disconnect_non_local. Portname should be provided. + + Thu Feb 3 12:44:38 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * ciao/Base/CIAO_Properties.idl: + Removed not used property + + Thu Feb 3 11:09:49 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * ciao/Deployment/Handlers/Connection_Handler.h: + * ciao/Deployment/Handlers/Connection_Handler.cpp: + Implemented (dis)connect_consumer. This was needed in case an external + Reference was available in the deployment plan. + + * tests/DAnCE/ExecutionManager-Deployments/EmitsConnectionExplicitHome_NS.cdp: + Added in onder to test connect_consumer. + + Wed Feb 2 09:08:26 UTC 2011 Martin Corino <corino_m@remedy.nl> + + * connectors/ami4ccm/examples/Quoter/Client/Quoter_Client_exec.cpp: + Fixed compile problem. + + Wed Feb 2 09:03:24 UTC 2011 Martin Corino <corino_m@remedy.nl> + + * connectors/ami4ccm/examples/Quoter/Client/Quoter_Client.mpc: + * connectors/ami4ccm/examples/Quoter/Producer/Quoter_Producer.mpc: + Fixed fuzz errors. + + Tue Feb 1 15:00:49 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * ciao/Deployment/Handlers/Connection_Handler.h: + * ciao/Deployment/Handlers/Connection_Handler.cpp: + Removed connect and disconnect consumer methods since these are + implemented in the servant code. + + Tue Feb 1 13:44:52 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * tests/CIF/Events/client.cpp: + In case no exception is caught, disconnect the correct consumer + + Tue Feb 1 12:52:58 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * ciao/Servants/Connector_Servant_Impl_Base.h: + * ciao/Servants/Connector_Servant_Impl_Base.cpp: + Fixed default implementations + + Tue Feb 1 10:04:07 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * ciao/Servants/Connector_Servant_Impl_Base.h: + * ciao/Servants/Connector_Servant_Impl_Utils_T.cpp: + Updated describe_multiplex + + Mon Jan 31 09:13:12 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * connectors/dds4ccm/examples/IDL2CPPWrapper/Shapes/Receiver/I2C_Shapes_Receiver.cpp: + * connectors/dds4ccm/examples/IDL2CPPWrapper/Shapes/Sender/I2C_Shapes_Sender.cpp: + + * connectors/dds4ccm/impl/DDS_Subscriber_Base_T.cpp: + * connectors/dds4ccm/impl/DDS_Update_T.cpp: + * connectors/dds4ccm/impl/DDS_Write_T.cpp: + + * connectors/dds4ccm/impl/ndds/Publisher.cpp: + * connectors/dds4ccm/impl/ndds/Subscriber.cpp: + Need to enable the datareader/datawriter since this is removed from + the create_datareader/create_datawriter methods in the C++ wrapper + + * tests/CIF/Receptacle/client.cpp: + Always run test_multiple_facets. + + Fri Jan 28 17:41:28 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * ciao/Deployment/Handlers/Connection_Handler.h: + * ciao/Deployment/Handlers/Connection_Handler.cpp: + Refactored a few parts of this class. + + * connectors/dds4ccm/impl/ndds/DomainParticipant.cpp: + * connectors/dds4ccm/impl/ndds/DomainParticipantFactory.cpp: + * connectors/dds4ccm/impl/ndds/Publisher.cpp: + * connectors/dds4ccm/impl/ndds/Subscriber.cpp: + Checking the return value of the enable method of the DDS entities. + When not DDS_RETCODE_OK, a internal exception is thrown. + + * tests/CIF/Common/CIF_Common.cpp: + Using the in method of _var variables. + + Fri Jan 28 16:29:59 UTC 2011 Martin Corino <corino_m@remedy.nl> + + * bin/ciao_tests.lst: + * connectors/ami4ccm/examples/Quoter: + * connectors/ami4ccm/examples/Quoter/Base: + * connectors/ami4ccm/examples/Quoter/Base/Quoter.idl: + * connectors/ami4ccm/examples/Quoter/Base/Quoter.mpc: + * connectors/ami4ccm/examples/Quoter/Client: + * connectors/ami4ccm/examples/Quoter/Client/Quoter_Client.idl: + * connectors/ami4ccm/examples/Quoter/Client/Quoter_Client.mpc: + * connectors/ami4ccm/examples/Quoter/Client/Quoter_Client_exec.h: + * connectors/ami4ccm/examples/Quoter/Client/Quoter_Client_exec.cpp: + * connectors/ami4ccm/examples/Quoter/Producer: + * connectors/ami4ccm/examples/Quoter/Producer/Quoter_Producer.idl: + * connectors/ami4ccm/examples/Quoter/Producer/Quoter_Producer.mpc: + * connectors/ami4ccm/examples/Quoter/Producer/Quoter_Producer_exec.h: + * connectors/ami4ccm/examples/Quoter/Producer/Quoter_Producer_exec.cpp: + * connectors/ami4ccm/examples/Quoter/descriptors: + * connectors/ami4ccm/examples/Quoter/descriptors/Plan.cdp: + * connectors/ami4ccm/examples/Quoter/descriptors/run_test.pl: + Added Quoter example based on the latest AMI4CCM spec. + + Fri Jan 28 14:33:42 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * ciao/Servants/Connector_Servant_Impl_Base.h: + * ciao/Servants/Connector_Servant_Impl_Utils_T.cpp: + Updated because of changes in generated code + + * tests/CIF/Events/client.cpp: + * tests/CIF/Receptacle/client.cpp: + Fixed memory leaks in test code + + Thu Jan 27 14:13:36 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * examples/Hello/descriptors/svc_em.conf: + * performance-tests/Benchmark/RoundTrip/svc.conf: + * performance-tests/Benchmark/svc.conf: + Removed some -ORB options + + Thu Jan 27 10:41:25 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * ciao/Servants/Connector_Servant_Impl_Base.h: + Doxygen fix + + * examples/Hello/descriptors/svc_em.conf: + * performance-tests/Benchmark/RoundTrip/svc.conf: + * performance-tests/Benchmark/svc.conf: + Removed -ORBPOALock, it is risky and is removed from TAO + + Thu Jan 27 09:13:17 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * tests/CIF/Receptacle/client.cpp: + Explicitly test multiple. + + Wed Jan 26 16:23:17 UTC 2011 Martin Corino <corino_m@remedy.nl> + + * bin/ciao_tests.lst: + Added new AMI4CCM test. + + Wed Jan 26 15:23:29 UTC 2011 Martin Corino <corino_m@remedy.nl> + + * connectors/ami4ccm/tests/NoConnection: + * connectors/ami4ccm/tests/NoConnection/Base: + * connectors/ami4ccm/tests/NoConnection/Base/HelloT.idl: + * connectors/ami4ccm/tests/NoConnection/Base/HelloT.mpc: + * connectors/ami4ccm/tests/NoConnection/Receiver: + * connectors/ami4ccm/tests/NoConnection/Receiver/HelloT_Receiver.idl: + * connectors/ami4ccm/tests/NoConnection/Receiver/HelloT_Receiver.mpc: + * connectors/ami4ccm/tests/NoConnection/Receiver/HelloT_Receiver_exec.h: + * connectors/ami4ccm/tests/NoConnection/Receiver/HelloT_Receiver_exec.cpp: + * connectors/ami4ccm/tests/NoConnection/Sender: + * connectors/ami4ccm/tests/NoConnection/Sender/HelloT_Sender.idl: + * connectors/ami4ccm/tests/NoConnection/Sender/HelloT_Sender.mpc: + * connectors/ami4ccm/tests/NoConnection/Sender/HelloT_Sender_exec.h: + * connectors/ami4ccm/tests/NoConnection/Sender/HelloT_Sender_exec.cpp: + * connectors/ami4ccm/tests/NoConnection/descriptors: + * connectors/ami4ccm/tests/NoConnection/descriptors/Plan.cdp: + * connectors/ami4ccm/tests/NoConnection/descriptors/run_test.pl: + Added new test to verify required exception when AMI facet + not connected. + + Wed Jan 26 13:28:18 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * tests/CIF/Events/client.cpp: + Resolved some issues regarding LW CCM. + + Wed Jan 26 13:12:27 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * tests/CIF/Events/client.cpp: + Resolve some compile issues on windows. + + Wed Jan 26 13:00:31 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * tests/CIF/Events/client.cpp: + Added some more additional tests. + + Wed Jan 26 12:23:15 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * ciao/Servants/Servant_Impl_Base.cpp: + Finished implementation of lookup_publish_description. + + * tests/CIF/Events/client.cpp: + * tests/CIF/Navigation/client.cpp: + * tests/CIF/Receptacle/client.cpp: + Optimized test output. + + Wed Jan 26 11:29:44 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * tests/DAnCE/Components/SimpleConsumer_exec.h: + * tests/DAnCE/Components/SimpleConsumer_exec.cpp: + * tests/DAnCE/Components/SimpleEmitter_exec.cpp: + Due to renaming of some ports. + + Wed Jan 26 11:21:00 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * ciao/Servants/Servant_Impl_Base.cpp: + Implemented lookup_publisher_description + + * tests/CIF/Component/CIF_Component.idl: + Layout changes. + + * tests/CIF/Events/client.cpp: + implemented publisher tests. + + Wed Jan 26 07:57:05 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * ciao/Servants/Servant_Impl_Base.cpp: + * tests/CIF/Events/client.cpp: + Implemented and test get_named_emitters. + + Tue Jan 25 14:31:26 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * tests/CIF/Events/client.cpp: + Added some more tests. + + * tests/CIF/Receptacle/client.cpp: + Changed the order of the names in the get_named_xxx tests. + + Tue Jan 25 14:06:16 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * tests/CIF/Events/client.cpp: + Expanded tests (get_all_consumers, get_named_consumers and + get_all_emitters). + + Tue Jan 25 13:06:03 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * tests/CIF/Events/client.cpp: + Optimized logging. + + Tue Jan 25 12:42:45 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * tests/CIF/Component/CIF_Component.idl: + * tests/CIF/Component/CIF_Component_exec.h: + * tests/CIF/Component/CIF_Component_exec.cpp: + Added a consumer in order to run some more tests. + + * tests/CIF/Events/client.cpp: + Added get_all_consumers test. + + * tests/CIF/Navigation/client.cpp: + * tests/CIF/Receptacle/client.cpp: + Changed the number of expected consumers. + + * tests/CIF/descriptors/run_test.pl: + Sleep message didn't log the correct client. + + * tests/DAnCE/Components/SimpleConsumer.idl: + * tests/DAnCE/Components/SimpleConsumer_exec.h: + * tests/DAnCE/Components/SimpleConsumer_exec.cpp: + * tests/DAnCE/Components/SimpleEmitter.idl: + * tests/DAnCE/Components/SimpleEmitter_exec.cpp: + * tests/DAnCE/Components/SimpleLocalProvider.idl: + * tests/DAnCE/Components/SimpleLocalProvider_exec.h: + * tests/DAnCE/Components/SimpleLocalProvider_exec.cpp: + * tests/DAnCE/Components/SimpleLocalUser.idl: + * tests/DAnCE/Components/SimpleLocalUser_exec.cpp: + * tests/DAnCE/Components/SimpleMultipleUser.idl: + * tests/DAnCE/Components/SimpleMultipleUser_exec.cpp: + * tests/DAnCE/Components/SimpleNilFacetProvider.idl: + * tests/DAnCE/Components/SimpleNilFacetProvider_exec.h: + * tests/DAnCE/Components/SimpleNilFacetProvider_exec.cpp: + * tests/DAnCE/Components/SimpleNilFacetUser.idl: + * tests/DAnCE/Components/SimpleNilFacetUser_exec.cpp: + * tests/DAnCE/Components/SimpleProvider.idl: + * tests/DAnCE/Components/SimpleProvider_exec.h: + * tests/DAnCE/Components/SimpleProvider_exec.cpp: + * tests/DAnCE/Components/SimplePublisher.idl: + * tests/DAnCE/Components/SimplePublisher_exec.cpp: + * tests/DAnCE/Components/SimpleUser.idl: + * tests/DAnCE/Components/SimpleUser_exec.cpp: + * tests/DAnCE/ExecutionManager-Deployments/EmitsConnectionExplicitHome.cdp: + * tests/DAnCE/ExecutionManager-Deployments/MultiplexConnectionExplicitHome.cdp: + * tests/DAnCE/ExecutionManager-Deployments/MultiplexConnectionExplicitHome_NS.cdp: + * tests/DAnCE/ExecutionManager-Deployments/MultiplexConnectionExplicitHome_NS_PL_DP.cdp: + * tests/DAnCE/ExecutionManager-Deployments/MultiplexConnectionExplicitHome_NS_PL_SP.cdp: + * tests/DAnCE/ExecutionManager-Deployments/PublishConnectionExplicitHome.cdp: + * tests/DAnCE/ExecutionManager-Deployments/SimplexConnectionExplicitHome.cdp: + * tests/DAnCE/ExecutionManager-Deployments/SimplexConnectionExplicitHome_NS.cdp: + * tests/DAnCE/ExecutionManager-Deployments/SimplexConnectionExplicitHome_NS_PL_DP.cdp: + * tests/DAnCE/ExecutionManager-Deployments/SimplexConnectionExplicitHome_NS_PL_SP.cdp: + * tests/DAnCE/ExecutionManager-Deployments/SimplexConnectionExplicitHome_NilFacet.cdp: + * tests/DAnCE/NodeManager-Deployments/EmitsConnectionExplicitHome.cdp: + * tests/DAnCE/NodeManager-Deployments/LocalSimplexConnectionExplicitHome.cdp: + * tests/DAnCE/NodeManager-Deployments/MultiplexConnectionExplicitHome.cdp: + * tests/DAnCE/NodeManager-Deployments/PublishConnectionExplicitHome.cdp: + * tests/DAnCE/NodeManager-Deployments/SimplexConnectionExplicitHome.cdp: + * tests/DAnCE/NodeManager-Deployments/TwoComponentsOneHome.cdp: + * tests/DAnCE/Progressive_Deployments/Plan_C.cdp: + Renamed portnames of facets, receptacle, event sources and event sinks in order to get + a more realistic test. + + Mon Jan 24 08:00:12 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * ccm/CCM_Events.idl: + Fixed compile errors on windows. + + Sun Jan 23 19:49:15 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * ciao/Containers/Container_Base_T.cpp: + Fixed problem in disconnect, nil facet executor is allowd + + * ciao/Deployment/Handlers/Connection_Handler.cpp: + Const changes + + Fri Jan 21 15:42:58 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * NEWS: + Reverted. + + Fri Jan 21 15:39:04 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * NEWS: + Updated for the upcoming release. + + Fri Jan 21 14:03:15 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * tests/CIF/Navigation/client.cpp: + changed the number of emitters. + + Thu Jan 20 15:00:12 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * tests/CIF/Component/CIF_Component.idl: + Added new emitter. + + * tests/CIF/Events/client.cpp: + Expanded tests. + + Thu Jan 20 13:48:44 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * ccm/CCM_Events.idl: + Code alignment. + + * ciao/Deployment/Handlers/Connection_Handler.cpp: + Implemented disconnect_emitter. + + * tests/CIF/Common/CIF_Common.h: + * tests/CIF/Common/CIF_Common.cpp: + * tests/CIF/Events: + * tests/CIF/Events/Events.mpc: + * tests/CIF/Events/client.cpp: + * tests/CIF/descriptors/run_test.pl: + Added new test to the CIF test framework. + + * tests/CIF/Navigation/client.cpp: + * tests/CIF/Receptacle/client.cpp: + Optimized logging. + + * tests/DAnCE/EM-Redeployment/run_test.pl: + * tests/DAnCE/ExecutionManager-Deployments/run_test.pl: + * tests/DAnCE/ExecutionManager-Deployments/run_test_cdr.pl: + * tests/DAnCE/Executor-Destructor/run_test.pl: + * tests/DAnCE/NodeManager-Deployments/run_test.pl: + * tests/DAnCE/NodeManager-Deployments/run_test_cdr.pl: + * tests/DAnCE/Progressive_Deployments/run_test.pl: + Added CIAO_LOG_LEVEL in order to an insight on the errors. + + === end changelog === + Fri Jan 28 11:21:05 CET 2011 Johnny Willemsen <jwillemsen@remedy.nl> * CIAO version 1.0.1 released. diff --git a/CIAO/NEWS b/CIAO/NEWS index b2eb61d3b1d..3dd86ae94cc 100644 --- a/CIAO/NEWS +++ b/CIAO/NEWS @@ -1,6 +1,13 @@ USER VISIBLE CHANGES BETWEEN CIAO-1.0.1 and CIAO-1.0.2 ======================================================= +. Generate servant code for facets and receptacles is now thread safe, the + code for consumers/publishers/emitters still have some thread safety issues + and a possible deadlock + +. Improved disconnect of connections in general and extended our test suite + for that + USER VISIBLE CHANGES BETWEEN CIAO-1.0.0 and CIAO-1.0.1 ======================================================= diff --git a/CIAO/bin/ciao_tests.lst b/CIAO/bin/ciao_tests.lst index b5e70c9c146..1030e0bb207 100644 --- a/CIAO/bin/ciao_tests.lst +++ b/CIAO/bin/ciao_tests.lst @@ -41,7 +41,9 @@ TAO/CIAO/tests/Cookies/run_test.pl #TAO/CIAO/tests/COPI/Registration/Stub/descriptors/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST TAO/CIAO/connectors/tests/AMIDDS/descriptors/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST NDDS TAO/CIAO/connectors/ami4ccm/examples/Hello/descriptors/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST +TAO/CIAO/connectors/ami4ccm/examples/Quoter/descriptors/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST TAO/CIAO/connectors/ami4ccm/tests/Exceptions/descriptors/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST +TAO/CIAO/connectors/ami4ccm/tests/NoConnection/descriptors/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST TAO/CIAO/connectors/ami4ccm/tests/NoReplyH/descriptors/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST TAO/CIAO/connectors/ami4ccm/tests/InterInArgs/descriptors/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST TAO/CIAO/connectors/ami4ccm/tests/InterOutArgs/descriptors/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST diff --git a/CIAO/bin/generate_component_mpc.pl b/CIAO/bin/generate_component_mpc.pl index 65d0b6b8450..f62bd72a9a5 100755 --- a/CIAO/bin/generate_component_mpc.pl +++ b/CIAO/bin/generate_component_mpc.pl @@ -1,6 +1,6 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' & eval 'exec perl -S $0 $argv:q' - if 0; + if 0; # $Id$ # Create a MPC file content for a single component implementation. @@ -12,7 +12,9 @@ use Getopt::Std; $flags = join (" ", @ARGV); -if (!getopts ('np:l:c:u:b:ho:') || $opt_h) { +%options=(); + +if (!getopts ('henp:o:c:u:b:l:', \%options) || $opt_h) { print "generate_component_mpc.pl [-h] component_name\n"; print "\n"; print " -h print help message explaining various options\n"; @@ -23,6 +25,7 @@ if (!getopts ('np:l:c:u:b:ho:') || $opt_h) { print " -c Create a client makefile\n"; print " -u Unique project name prefix (if not defined, name for -p flag will be used). \n"; print " -b common base project(s) for all generated projects\n"; + print " -e Use events\n"; print "\n"; print "generate_component_mpc creates and save a minimum mpc file\n"; print "called $com_name.mpc that is needed for a single component implementation\n"; @@ -40,13 +43,30 @@ $UCOM_NAME = uc $com_name; ############################################################################## # Prologue -if (defined $opt_b) { - $base_projs = ", $opt_b "; +if (defined $options{l}) { + $lib_paths = 'libpaths += ' . "$options{l}"; +} + +if (defined $options{o}) { + $lib_out = 'libout = ' . "$options{o}"; + $exe_out = 'exeout = ' . "$options{o}"; +} + +if (defined $options{b}) { + if (defined $options{e}){ + $base_projs = ", avoids_ccm_noevent, $options{b} "; + } else { + $base_projs = ", $options{b} "; + } } else { - $base_projs = " "; + if (defined $options{e}) { + $base_projs = ", avoids_ccm_noevent "; + } else { + $base_projs = " "; + } } -if (defined $opt_n) { +if (defined $options{n}) { $svr_suffix = "_skel"; } else { @@ -55,13 +75,13 @@ else { $USVR_SUFFIX = uc $svr_suffix; -if (defined $opt_p) { - $stub_depend = "$opt_p".'_stub'; - $lib_depend = "$opt_p".'_skel '."$opt_p".'_stub'; +if (defined $options{p}) { + $stub_depend = "$options{p}".'_stub ' . "$options{p}".'_lem_stub'; $svr_plibs ='\ - '."$opt_p".'_skel \ - '."$opt_p".'_stub'; + '."$options{p}".'_skel \ + '."$options{p}".'_stub \ + '."$options{p}".'_lem_stub'; } else { $svr_plibs = ""; @@ -69,38 +89,31 @@ else { $unique_prefix = ""; -if (defined $opt_u) { - $unique_prefix = "$opt_u" . "_"; +if (defined $options{u}) { + $unique_prefix = "$options{u}" . "_"; } -elsif (defined $opt_p) { - $unique_prefix = "$opt_p" . "_"; +elsif (defined $options{p}) { + $unique_prefix = "$options{p}" . "_"; } -if (defined $opt_p) { - $svr_p_after = "$opt_p".'_skel'; +$svr_p_after = ""; +if (defined $options{p}) { + $svr_p_after = "$options{p}".'_skel ' . "$options{p}" . '_lem_stub'; } -if (defined $opt_l) { - $lib_paths = "libpaths += $opt_l"; -} - -if (defined $opt_o) { - $lib_out = "libout = $opt_o"; -} - -if (defined $opt_c) { +if (defined $options{c}) { $client_def = -'project ('."$unique_prefix"."$opt_c".') : ccm_stub, valuetype ' . "$base_projs" . ' { - exename = '."$opt_c".' +'project ('."$unique_prefix"."$options{c}".') : ccm_stub, valuetype' . "$base_projs" . ' { + exename = '."$options{c}".' after += '."$unique_prefix"."$com_name".'_stub libs += '."$com_name".'_stub '."$stub_depend"." $lib_paths"." - $lib_out".' + $exe_out".' IDL_Files { } Source_Files { - '."$opt_c".'.cpp + '."$options{c}".'.cpp } Header_Files { @@ -112,10 +125,9 @@ if (defined $opt_c) { '; } -if (! defined $opt_n) { $lem_gen = ' -project('."$unique_prefix"."$com_name".'_lem_gen) : ciaoidldefaults ' . "$base_projs" . ' { +project('."$unique_prefix"."$com_name".'_lem_gen) : ciaoidldefaults' . "$base_projs" . '{ after += '."$unique_prefix"."$com_name".'_idl_gen custom_only = 1 idlflags += -Wb,stub_export_macro='."$UCOM_NAME".'_LEM_STUB_Export \ @@ -127,7 +139,7 @@ project('."$unique_prefix"."$com_name".'_lem_gen) : ciaoidldefaults ' . "$base_p } } '.' -project('."$unique_prefix"."$com_name".'_lem_stub) : ccm_svnt ' . "$base_projs" . ' { +project('."$unique_prefix"."$com_name".'_lem_stub) : ccm_svnt' . "$base_projs" . '{ after += '."$unique_prefix"."$com_name".'_lem_gen '."$unique_prefix"."$com_name".'_stub '."$stub_depend".' libs += '."$stub_depend".' '."$com_name".'_stub'." $lib_paths"." @@ -153,12 +165,13 @@ project('."$unique_prefix"."$com_name".'_lem_stub) : ccm_svnt ' . "$base_projs" } '; +if (!defined $options{n}) { $component_def = ' -project('."$unique_prefix"."$com_name".'_exec) : ciao_executor ' . "$base_projs" . ' { - after += '."$unique_prefix"."$com_name".'_lem_stub '."$unique_prefix"."$com_name".'_stub +project('."$unique_prefix"."$com_name".'_exec) : ciao_executor' . "$base_projs" . '{ + after += '. "$options{p}" . '_lem_stub ' . "$unique_prefix"."$com_name".'_lem_stub '."$unique_prefix"."$com_name".'_stub sharedname = '."$com_name".'_exec - libs += '."$com_name".'_stub '."$com_name".'_lem_stub '."$stub_depend + libs += '."$options{p}" . '_lem_stub ' . "$com_name".'_stub '."$com_name".'_lem_stub '."$stub_depend $lib_paths"." $lib_out".' dynamicflags += '."$UCOM_NAME".'_EXEC_BUILD_DLL @@ -179,10 +192,9 @@ project('."$unique_prefix"."$com_name".'_exec) : ciao_executor ' . "$base_projs" } } '; -} - -$cli_idlflags = - 'idlflags += -Wb,stub_export_macro='."$UCOM_NAME".'_STUB_Export \ + $cli_idlflags = +' + idlflags += -Wb,stub_export_macro='."$UCOM_NAME".'_STUB_Export \ -Wb,stub_export_include='."$com_name".'_stub_export.h \ -Wb,skel_export_macro='."$UCOM_NAME"."$USVR_SUFFIX".'_Export \ -Wb,skel_export_include='."$com_name"."$svr_suffix".'_export.h \ @@ -190,6 +202,17 @@ $cli_idlflags = -Wb,exec_export_include='."$com_name".'_exec_export.h \ -Gxhex -Gxhsk -Gxhst' ; +} +else { + $cli_idlflags = +' + idlflags += -Wb,stub_export_macro='."$UCOM_NAME".'_STUB_Export \ + -Wb,stub_export_include='."$com_name".'_stub_export.h \ + -Wb,skel_export_macro='."$UCOM_NAME"."$USVR_SUFFIX".'_Export \ + -Wb,skel_export_include='."$com_name"."$svr_suffix".'_export.h \ + -Gxhex -Gxhsk -Gxhst' + ; +} $cli_base = "ccm_stub"; $svr_base = "ciao_servant"; @@ -197,7 +220,7 @@ $svr_after = ""; $svr_libs = "$com_name".'_stub '. "$com_name".'_lem_stub '; -if (defined $opt_n) { +if (defined $options{n}) { $svr_after = "$unique_prefix"."$com_name".'_stub'; $svr_libs = "$com_name".'_stub @@ -237,7 +260,7 @@ else { $mpc_template = '// $Id$ // This file is generated with "'."generate_component_mpc.pl $flags".'" -project('."$unique_prefix"."$com_name".'_idl_gen) : componentidldefaults ' . "$base_projs" . ' { +project('."$unique_prefix"."$com_name".'_idl_gen) : componentidldefaults' . "$base_projs" . '{ custom_only = 1 '."$cli_idlflags".' @@ -246,7 +269,7 @@ project('."$unique_prefix"."$com_name".'_idl_gen) : componentidldefaults ' . "$b } } '."$lem_gen".' -project('."$unique_prefix"."$com_name".'_stub) : '."$cli_base ". "$base_projs" . ' { +project('."$unique_prefix"."$com_name".'_stub) : '."$cli_base". "$base_projs" . '{ after += '."$unique_prefix"."$com_name".'_idl_gen '."$stub_depend".' libs += '."$stub_depend"." $lib_paths"." @@ -272,7 +295,7 @@ project('."$unique_prefix"."$com_name".'_stub) : '."$cli_base ". "$base_projs" . } '."$component_def".' -project('."$unique_prefix"."$com_name"."$svr_suffix".') : '."$svr_base ". "$base_projs" . ' { +project('."$unique_prefix"."$com_name"."$svr_suffix".') : '."$svr_base". "$base_projs" . ' { after += '."$svr_p_after "."$svr_after".' '."$unique_prefix"."$com_name".'_lem_stub'.' sharedname = '."$com_name"."$svr_suffix".' libs += '."$svr_libs $svr_plibs diff --git a/CIAO/bin/update_package.py b/CIAO/bin/update_package.py index 5719b0c7627..ed3bf38e4a9 100755 --- a/CIAO/bin/update_package.py +++ b/CIAO/bin/update_package.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# $Id$ """ This script facilitates the update of binaries in a given DAnCE package. Note that it DOES NOT modify meta-data, only blindly replacing existing binaries that match by name EXACTLY""" diff --git a/CIAO/bin/valgrind_nodedaemon.py b/CIAO/bin/valgrind_nodedaemon.py deleted file mode 100755 index a0845864370..00000000000 --- a/CIAO/bin/valgrind_nodedaemon.py +++ /dev/null @@ -1,87 +0,0 @@ -#!/usr/bin/python -# $Id$ -# -# Runs a NodeManager (optionally) under valgrind with the NodeApplication (optionally) under valgrind. - -from optparse import OptionParser -from os import system -from os import environ - -def parse_args (): - - parser = OptionParser (usage="usage: valgrind_nodemanager [options] <port_number>") - - parser.add_option ("-v", "--verbose", dest="verbose", action="store_true", - help="Output the command that is to be executed.", - default=False) - parser.add_option ("-l","--log", dest="log_file", action="store", - help="Log all output to a given file.", - default="") - parser.add_option ("-t", "--tool", dest="valgrind_tool", action="store", - help="Specify the valgrind tool to run", - default="memcheck") - parser.add_option ("--nm", dest="node_manager", action="store_true", - help="Run valgrind on the NodeManager", - default=False) - parser.add_option ("--na", dest="node_application", action="store_true", - help="Run valgrind on the NodeApplication", - default=False) - parser.add_option ("--valgrind_args", dest="valgrind_args", action="store", - help="Additional arguments to pass to valgrind", - default="") - parser.add_option ("-g", dest="gen_supp", action="store_true", - help="Generate suppression lines", - default=False) - parser.add_option ("-s", dest="supp_file", action="store", - help="Suppression file for Valgrind to use", - default="") - parser.add_option ("--lc", dest="leak_check", action="store_true", - help="Perform a full leak check", - default=False) - - return parser.parse_args () - -import os - -def main (): - (option, args) = parse_args () - - ciao_root = environ['CIAO_ROOT'] - - # Build the valgrind command - valgrind_command = "valgrind --tool=" + option.valgrind_tool + ' ' +\ - option.valgrind_args + ' ' - - if option.gen_supp: - valgrind_command += "--gen-suppressions=all " - - if option.supp_file != "": - valgrind_command += "--suppressions=\"" + options.supp_file + '" ' - - if option.leak_check: - valgrind_command += "--leak-check=full " - - # Build the actual command - command = "" - - if option.node_manager: - command += valgrind_command - - command += ciao_root + "/DAnCE/NodeManager/NodeManager " +\ - "-ORBEndpoint iiop://localhost:" + args[0] + ' ' - - if option.node_application: - command += "-d 60 -s\"" + valgrind_command - else: - command += " -s \"" - - command += ciao_root + "/DAnCE/NodeApplication/NodeApplication" + '"' - - print command - - system (command) - -if __name__ == "__main__": - main () - - diff --git a/CIAO/ciao/Base/CIAO_Properties.idl b/CIAO/ciao/Base/CIAO_Properties.idl index b6cc7c9658d..31028553201 100644 --- a/CIAO/ciao/Base/CIAO_Properties.idl +++ b/CIAO/ciao/Base/CIAO_Properties.idl @@ -2,7 +2,7 @@ * @file CIAO_Properties.idl * @author William R. Otte * $Id$ - * Standardizes names of configvalues used by CIAO. + * Standardizes names of config values used by CIAO. */ #ifndef CIAO_PROPERTIES_IDL @@ -19,7 +19,6 @@ module CIAO const string HOME_FACTORY = "home factory"; const string COMPONENT_HOME = "edu.vanderbilt.dre.CIAO.ComponentHomeId"; const string CONTAINER_ID = "edu.vanderbilt.dre.CIAO.ContainerId"; - const string REGISTER_NAMING = "edu.vanderbilt.dre.CIAO.RegisterNaming"; const string CCM_CONTAINER = "edu.dre.vanderbilt.dre.CCM.Container"; const string CCM_HOME = "edu.dre.vanderbilt.dre.CCM.Home"; diff --git a/CIAO/ciao/Base/Server_init.h b/CIAO/ciao/Base/Server_init.h index 975d867d71a..3f1901907de 100644 --- a/CIAO/ciao/Base/Server_init.h +++ b/CIAO/ciao/Base/Server_init.h @@ -4,7 +4,7 @@ * @file Server_init.h * * Initializing CIAO Server side ORB, if they need to. - * I'm also puting some utilities functions here. + * I'm also putting some utilities functions here. * * @author Nanbor Wang <nanbor@cs.wustl.edu> * @author Gan Deng <dengg@dre.vanderbilt.edu> diff --git a/CIAO/ciao/Containers/Container_Base_T.cpp b/CIAO/ciao/Containers/Container_Base_T.cpp index 2a53bc662bc..65f2b028b9e 100644 --- a/CIAO/ciao/Containers/Container_Base_T.cpp +++ b/CIAO/ciao/Containers/Container_Base_T.cpp @@ -119,13 +119,13 @@ namespace CIAO switch (y) { - case Container_Types::COMPONENT_t: - case Container_Types::HOME_t: - svnt = this->component_poa_->reference_to_servant (objref); - break; - default: - svnt = this->facet_cons_poa_->reference_to_servant (objref); - break; + case Container_Types::COMPONENT_t: + case Container_Types::HOME_t: + svnt = this->component_poa_->reference_to_servant (objref); + break; + default: + svnt = this->facet_cons_poa_->reference_to_servant (objref); + break; } PortableServer::ObjectId_var oid; @@ -135,13 +135,13 @@ namespace CIAO template <typename BASE> void Container_i<BASE>::prepare_installation (const char *entity, - const char *primary_artifact, - const char *entry_point, - const char *servant_artifact, - const char *servant_entrypoint, - const char *name, - ACE_DLL &executor_dll, - ACE_DLL &servant_dll) + const char *primary_artifact, + const char *entry_point, + const char *servant_artifact, + const char *servant_entrypoint, + const char *name, + ACE_DLL &executor_dll, + ACE_DLL &servant_dll) { CIAO_TRACE ("Container_i::prepare_installation"); @@ -223,8 +223,8 @@ namespace CIAO } if (executor_dll.open (ACE_TEXT_CHAR_TO_TCHAR (primary_artifact), - ACE_DEFAULT_SHLIB_MODE, - false) != 0) + ACE_DEFAULT_SHLIB_MODE, + false) != 0) { const ACE_TCHAR* error = executor_dll.error (); @@ -245,10 +245,10 @@ namespace CIAO CIAO_DEBUG (9, (LM_TRACE, CLINFO - "Container_i::prepare_installation <%C> - " - "Executor DLL [%C] successfully opened\n", - entity, - primary_artifact)); + "Container_i::prepare_installation <%C> - " + "Executor DLL [%C] successfully opened\n", + entity, + primary_artifact)); } if (servant_dll.open (ACE_TEXT_CHAR_TO_TCHAR (servant_artifact), @@ -405,6 +405,9 @@ namespace CIAO } catch (...) { + CIAO_ERROR (1, (LM_ERROR, CLINFO + "Container_i::activate_component - " + "Caught unknown while retrieving servant\n")); throw InvalidComponent (); } @@ -479,6 +482,9 @@ namespace CIAO } catch (...) { + CIAO_ERROR (1, (LM_ERROR, CLINFO + "Container_i::passivate_component - " + "Caught unknown while retrieving servant\n")); throw InvalidComponent (); } @@ -640,14 +646,14 @@ namespace CIAO PortableServer::POA_ptr Container_i<BASE>::the_POA (void) { - return this->component_poa_.in (); + return ::PortableServer::POA::_duplicate (this->component_poa_.in ()); } template <typename BASE> PortableServer::POA_ptr Container_i<BASE>::the_port_POA (void) { - return this->facet_cons_poa_.in (); + return ::PortableServer::POA::_duplicate (this->facet_cons_poa_.in ()); } template <typename BASE> @@ -975,7 +981,7 @@ namespace CIAO ::CORBA::Object_ptr Container_i<BASE>::get_objref (PortableServer::Servant p) { - return this->the_POA ()->servant_to_reference (p); + return this->component_poa_->servant_to_reference (p); } template <typename BASE> diff --git a/CIAO/ciao/Containers/Container_Base_T.h b/CIAO/ciao/Containers/Container_Base_T.h index 8bc3ae4176a..008522be09d 100644 --- a/CIAO/ciao/Containers/Container_Base_T.h +++ b/CIAO/ciao/Containers/Container_Base_T.h @@ -56,10 +56,6 @@ namespace CIAO virtual void fini (void); /// Get component's POA. - /** - * This operation does *NOT* increase the reference count of the - * POA. Look at the const qualifier in the method. - */ virtual PortableServer::POA_ptr the_POA (void); virtual PortableServer::POA_ptr the_port_POA (void); diff --git a/CIAO/ciao/Deployment/Handlers/Connection_Handler.cpp b/CIAO/ciao/Deployment/Handlers/Connection_Handler.cpp index 99a58894707..2e5c0a2e614 100644 --- a/CIAO/ciao/Deployment/Handlers/Connection_Handler.cpp +++ b/CIAO/ciao/Deployment/Handlers/Connection_Handler.cpp @@ -6,6 +6,24 @@ namespace CIAO { + const char * kind_as_string (const ::Deployment::CCMComponentPortKind & kind) + { +#define DEPLOYMENT_KIND_AS_STRING(X) case X: return #X + switch (kind) + { + DEPLOYMENT_KIND_AS_STRING (Deployment::Facet); + DEPLOYMENT_KIND_AS_STRING (Deployment::SimplexReceptacle); + DEPLOYMENT_KIND_AS_STRING (Deployment::MultiplexReceptacle); + DEPLOYMENT_KIND_AS_STRING (Deployment::EventEmitter); + DEPLOYMENT_KIND_AS_STRING (Deployment::EventPublisher); + DEPLOYMENT_KIND_AS_STRING (Deployment::EventConsumer); + DEPLOYMENT_KIND_AS_STRING (Deployment::ExtendedPort); + DEPLOYMENT_KIND_AS_STRING (Deployment::MirrorPort); + } + return "***Unknown enum value, deployment kind as string"; +#undef DEPLOYMENT_KIND_AS_STRING + } + void Connection_Handler::provide_endpoint_reference (const ::Deployment::DeploymentPlan & plan, ::CORBA::ULong connectionRef, @@ -92,8 +110,8 @@ namespace CIAO "Caught CORBA Exception <%C> while fetching reference for " "connection <%C>\n", ex._info ().c_str (), - plan.connection[connectionRef].name.in ())); - throw ::Deployment::InvalidConnection (plan.connection[connectionRef].name.in (), + conn.name.in ())); + throw ::Deployment::InvalidConnection (conn.name.in (), ex._info ().c_str ()); } @@ -102,8 +120,8 @@ namespace CIAO CIAO_ERROR (1, (LM_ERROR, CLINFO "Connection_Handler::provide_endpoint_reference - " "Caught unknown C++ exception on instance %C", - plan.connection[connectionRef].name.in ())); - throw ::Deployment::InvalidConnection (plan.connection[connectionRef].name.in (), + conn.name.in ())); + throw ::Deployment::InvalidConnection (conn.name.in (), "Unknown C++ exception whilst establishing " "connection"); } @@ -117,88 +135,110 @@ namespace CIAO { CIAO_TRACE ("Connection_Handler::connect_instance"); - const ::Deployment::PlanConnectionDescription &conn = plan.connection[c_id]; - const char *name = conn.name.in (); - - if (conn.internalEndpoint.length () == 0) - { - CIAO_ERROR (1, (LM_ERROR, CLINFO - "Connection_Handler::connect_instance - " - "Connection <%C> lacks an internalEndpoint.\n", - name)); - throw ::Deployment::InvalidConnection (name, - "No internal endpoint for connection\n"); - } + const ::Deployment::PlanConnectionDescription &conn = + plan.connection[c_id]; - CORBA::ULong endpoint (0); + CORBA::ULong endpointRef = this->retrieve_endpoint (conn); - if (conn.internalEndpoint.length () > 1) - { - for (CORBA::ULong i = 0; - i < conn.internalEndpoint.length (); - ++i) - { - if (!conn.internalEndpoint[i].provider) - endpoint = i; - } - } + const ::Deployment::PlanSubcomponentPortEndpoint &endpoint = + conn.internalEndpoint[endpointRef]; + CIAO_DEBUG (6, (LM_DEBUG, CLINFO + "Connection_Handler::connect_instance - " + "Connecting %C connection <%C> on instance <%C>\n", + CIAO::kind_as_string (conn.internalEndpoint[endpointRef].kind), + conn.name.in (), + plan.instance[endpoint.instanceRef].name.in ())); try { - switch (conn.internalEndpoint[endpoint].kind) + switch (conn.internalEndpoint[endpointRef].kind) { + case Deployment::Facet: - this->connect_facet (plan, c_id, endpoint, provided_reference); + + if (this->is_local_connection (conn)) + { + this->connect_local_port (plan, conn, endpointRef, endpoint); + } + else + { + this->connect_non_local_facet (plan, + conn, + endpoint, + provided_reference); + } break; case Deployment::SimplexReceptacle: case Deployment::MultiplexReceptacle: - this->connect_receptacle (plan, c_id, endpoint, provided_reference); + + if (this->is_local_connection (conn)) + { + this->connect_local_port (plan, conn, endpointRef, endpoint); + } + else + { + this->connect_non_local_receptacle (plan, + conn, + endpoint, + provided_reference); + } break; + #if !defined (CCM_NOEVENT) - case Deployment::EventEmitter: - this->connect_emitter (plan, c_id, endpoint, provided_reference); + case Deployment::EventConsumer: + this->connect_consumer (plan, conn, endpoint, provided_reference); break; - case Deployment::EventPublisher: - this->connect_publisher (plan, c_id, endpoint, provided_reference); + case Deployment::EventEmitter: + this->connect_emitter (plan, conn, endpoint, provided_reference); break; - case Deployment::EventConsumer: - this->connect_consumer (plan, c_id, endpoint, provided_reference); + case Deployment::EventPublisher: + this->connect_publisher (plan, conn, endpoint, provided_reference); break; #endif default: CIAO_ERROR (1, (LM_ERROR, CLINFO "Connection_Handler::connect_instance - " "Unsupported port type.\n")); - throw ::Deployment::InvalidConnection (name, + throw ::Deployment::InvalidConnection (conn.name.in (), "Unsupported port type"); } } - catch (const ::Deployment::InvalidConnection &) + catch (const ::Deployment::InvalidConnection &ex) { - // pass through + CIAO_ERROR (1, (LM_ERROR, CLINFO + "Connection_Handler::connect_instance - " + "Caught InvalidConnection exception whilst " + "connecting %C connection <%C>: %C. Reason: %C\n", + CIAO::kind_as_string (conn.internalEndpoint[endpointRef].kind), + conn.name.in (), + ex.name.in (), + ex.reason.in ())); + throw; } catch (CORBA::Exception &ex) { CIAO_ERROR (1, (LM_ERROR, CLINFO "Connection_Handler::connect_instance - " - "Caught CORBA exception whilst connecting <%C>: %C\n", - name, + "Caught CORBA exception whilst connecting %C connection <%C>: %C\n", + CIAO::kind_as_string (conn.internalEndpoint[endpointRef].kind), + conn.name.in (), ex._info ().c_str ())); - throw ::Deployment::InvalidConnection (name, + throw ::Deployment::InvalidConnection (conn.name.in (), ex._info ().c_str ()); } catch (...) { CIAO_ERROR (1, (LM_ERROR, CLINFO "Connection_Handler::connect_instance - " - "Caught C++ exception whilst connecting <%C>\n", - name)); - throw ::Deployment::InvalidConnection (name, + "Caught C++ exception whilst connecting %C connection <%C>\n", + CIAO::kind_as_string (conn.internalEndpoint[endpointRef].kind), + conn.name.in ())); + throw ::Deployment::InvalidConnection (conn.name.in (), "Unknown C++ Exception"); } } @@ -209,86 +249,68 @@ namespace CIAO { CIAO_TRACE ("Connection_Handler::disconnect_instance"); - const ::Deployment::PlanConnectionDescription &conn = plan.connection[c_id]; - const char *name = conn.name.in (); + const ::Deployment::PlanConnectionDescription &conn = + plan.connection[c_id]; - if (conn.internalEndpoint.length () == 0) - { - CIAO_ERROR (1, (LM_ERROR, CLINFO - "Connection_Handler::disconnect_instance - " - "Connection <%C> lacks an internalEndpoint.\n", - name)); - throw ::Deployment::InvalidConnection (name, - "No internal endpoint for connection\n"); - } + CORBA::ULong endpointRef = this->retrieve_endpoint (conn); - CORBA::ULong endpoint (0); + const ::Deployment::PlanSubcomponentPortEndpoint &endpoint = + conn.internalEndpoint[endpointRef]; - if (conn.internalEndpoint.length () > 1) + CIAO_DEBUG (6, (LM_DEBUG, CLINFO + "Connection_Handler::disconnect_instance - " + "Disconnecting %C connection <%C> on instance <%C>\n", + CIAO::kind_as_string (conn.internalEndpoint[endpointRef].kind), + conn.name.in (), + plan.instance[endpoint.instanceRef].name.in ())); + + try { - for (CORBA::ULong i = 0; - i < conn.internalEndpoint.length (); - ++i) + switch (conn.internalEndpoint[endpointRef].kind) { - if (!this->is_local_connection (conn)) + case Deployment::Facet: + + if (this->is_local_connection (conn)) { - if (!conn.internalEndpoint[i].provider) - { - endpoint = i; - break; - } + this->disconnect_local_port (plan, conn, endpointRef, endpoint); } else { - if (conn.internalEndpoint[i].kind == Deployment::EventEmitter || - conn.internalEndpoint[i].kind == Deployment::EventPublisher || - conn.internalEndpoint[i].kind == Deployment::EventConsumer) - { - if (!conn.internalEndpoint[i].provider) - { - endpoint = i; - break; - } - } - else if (conn.internalEndpoint[i].provider) - { - endpoint = i; - break; - } + //only because of the receptacle is an external endpoint + this->disconnect_non_local (conn, conn.externalReference[0].portName.in ()); } - } - } - - try - { - switch (conn.internalEndpoint[endpoint].kind) - { - case Deployment::Facet: - this->disconnect_facet (plan, c_id, endpoint); break; case Deployment::SimplexReceptacle: case Deployment::MultiplexReceptacle: - this->disconnect_receptacle (plan, c_id, endpoint); + + if (this->is_local_connection (conn)) + { + this->disconnect_local_port (plan, conn, endpointRef, endpoint); + } + else + { + this->disconnect_non_local (conn, endpoint.portName.in ()); + } break; #if !defined (CCM_NOEVENT) - case Deployment::EventEmitter: - this->disconnect_emitter (plan, c_id, endpoint); + case Deployment::EventConsumer: + this->disconnect_consumer (conn, endpoint); break; - case Deployment::EventPublisher: - this->disconnect_publisher (plan, c_id, endpoint); + case Deployment::EventEmitter: + this->disconnect_emitter (conn, endpoint); break; - case Deployment::EventConsumer: - this->disconnect_consumer (plan, c_id, endpoint); + case Deployment::EventPublisher: + this->disconnect_publisher (conn, endpoint); break; #endif default: CIAO_ERROR (1, (LM_ERROR, CLINFO "Connection_Handler::disconnect_instance - " "Unsupported port type.\n")); - throw ::Deployment::InvalidConnection (name, + throw ::Deployment::InvalidConnection (conn.name.in (), "Unsupported port type"); } @@ -307,34 +329,41 @@ namespace CIAO { CIAO_DEBUG (2, (LM_WARNING, CLINFO "Connection_Handler::disconnect_instance - " - "Caught COMM_FAILURE exception whilst disconnecting\n")); - throw ::Deployment::InvalidConnection (name, + "Caught COMM_FAILURE exception whilst disconnecting %C connection <%C>\n", + CIAO::kind_as_string (conn.internalEndpoint[endpointRef].kind), + conn.name.in ())); + throw ::Deployment::InvalidConnection (conn.name.in (), ex._info ().c_str ()); } catch (const CORBA::OBJECT_NOT_EXIST &ex) { CIAO_DEBUG (2, (LM_WARNING, CLINFO "Connection_Handler::disconnect_instance - " - "Caught OBJECT_NOT_EXIST exception whilst disconnecting\n")); - throw ::Deployment::InvalidConnection (name, + "Caught OBJECT_NOT_EXIST exception whilst disconnecting %C connection <%C>\n", + CIAO::kind_as_string (conn.internalEndpoint[endpointRef].kind), + conn.name.in ())); + throw ::Deployment::InvalidConnection (conn.name.in (), ex._info ().c_str ()); } catch (const CORBA::TRANSIENT &ex) { CIAO_DEBUG (2, (LM_WARNING, CLINFO "Connection_Handler::disconnect_instance - " - "Caught TRANSIENT exception whilst disconnecting\n")); - throw ::Deployment::InvalidConnection (name, + "Caught TRANSIENT exception whilst disconnecting %C connection <%C>\n", + CIAO::kind_as_string (conn.internalEndpoint[endpointRef].kind), + conn.name.in ())); + throw ::Deployment::InvalidConnection (conn.name.in (), ex._info ().c_str ()); } catch (CORBA::Exception &ex) { CIAO_ERROR (1, (LM_ERROR, CLINFO "Connection_Handler::disconnect_instance - " - "Caught CORBA exception whilst disconnecting <%C>: %C\n", - name, + "Caught CORBA exception whilst disconnecting %C connection <%C>: %C\n", + CIAO::kind_as_string (conn.internalEndpoint[endpointRef].kind), + conn.name.in (), ex._info ().c_str ())); - throw ::Deployment::InvalidConnection (name, + throw ::Deployment::InvalidConnection (conn.name.in (), ex._info ().c_str ()); } catch (...) @@ -342,78 +371,23 @@ namespace CIAO CIAO_ERROR (1, (LM_ERROR, CLINFO "Connection_Handler::disconnect_instance - " "Caught C++ exception whilst disconnecting <%C>\n", - name)); - throw ::Deployment::InvalidConnection (name, + conn.name.in ())); + throw ::Deployment::InvalidConnection (conn.name.in (), "Unknown C++ Exception"); } } void - Connection_Handler::connect_facet (const ::Deployment::DeploymentPlan & plan, - ::CORBA::ULong connectionRef, - ::CORBA::ULong endpointRef, - const ::CORBA::Any & provided_reference) - { - CIAO_TRACE ("Connection_Handler::connect_facet"); - - const ::Deployment::PlanConnectionDescription &conn = - plan.connection[connectionRef]; - const ::Deployment::PlanSubcomponentPortEndpoint &endpoint = - conn.internalEndpoint[endpointRef]; - - CIAO_DEBUG (6, (LM_DEBUG, CLINFO - "Connection_Handler::connect_facet - " - "Connecting connection <%C> on instance <%C>\n", - conn.name.in (), - plan.instance[endpoint.instanceRef].name.in ())); - - if (this->is_local_connection (conn)) - { - CORBA::ULong other_endpointRef = (endpointRef + 1) % 2; - if (conn.internalEndpoint.length () == 2 && - (conn.internalEndpoint[other_endpointRef].kind == ::Deployment::MultiplexReceptacle || - conn.internalEndpoint[other_endpointRef].kind == ::Deployment::SimplexReceptacle)) - { - const ::Deployment::PlanSubcomponentPortEndpoint &other_endpoint = - conn.internalEndpoint[other_endpointRef]; - this->connect_local_port (plan.instance[endpoint.instanceRef].name.in (), - endpoint.portName.in (), - plan.instance[other_endpoint.instanceRef].name.in (), - other_endpoint.portName.in (), - conn.name.in ()); - return; - } - else - { - CIAO_ERROR (1, (LM_ERROR, CLINFO - "Connection_Handler::connect_facet - " - "Error: Wrong number of internal endpoints for local facet connection: " - "expected <2> - found <%d>\n", - conn.internalEndpoint.length ())); - - throw ::Deployment::InvalidConnection (conn.name.in (), - "Local facet connections require exactly 2 internalEndpoints"); - } - } - this->connect_non_local_facet (plan, - connectionRef, - endpointRef, - provided_reference); - } - - void Connection_Handler::connect_non_local_facet (const ::Deployment::DeploymentPlan & plan, - ::CORBA::ULong connectionRef, - ::CORBA::ULong endpointRef, + const ::Deployment::PlanConnectionDescription &conn, + const ::Deployment::PlanSubcomponentPortEndpoint &endpoint, const ::CORBA::Any & provided_reference) { CIAO_TRACE ("Connection_Handler::connect_non_local_facet"); - const ::Deployment::PlanConnectionDescription &conn = - plan.connection[connectionRef]; - const ::Deployment::PlanSubcomponentPortEndpoint &endpoint = - conn.internalEndpoint[endpointRef]; + // provided_reference is a receptacle. We need to call 'connect' on this reference + // and pass the facet. if (conn.externalReference.length () == 0) { CIAO_ERROR (1, (LM_ERROR, CLINFO @@ -436,8 +410,8 @@ namespace CIAO "While connecting <%C>:" "Provided reference for connection where primary is Facet must be " "non-nil.\n", - plan.connection[connectionRef].name.in ())); - throw ::Deployment::InvalidConnection (plan.connection[connectionRef].name.in (), + conn.name.in ())); + throw ::Deployment::InvalidConnection (conn.name.in (), "Provided reference for connection where primary is Facet must " "be non-nil."); @@ -452,8 +426,8 @@ namespace CIAO "Connection_Handler::connect_non_local_facet - " "While connecting <%C>:" "Providing component not deployed.", - plan.connection[connectionRef].name.in ())); - throw ::Deployment::InvalidConnection (plan.connection[connectionRef].name.in (), + conn.name.in ())); + throw ::Deployment::InvalidConnection (conn.name.in (), "Providing component not deployed."); } @@ -473,68 +447,14 @@ namespace CIAO } void - Connection_Handler::connect_receptacle (const ::Deployment::DeploymentPlan & plan, - ::CORBA::ULong connectionRef, - ::CORBA::ULong endpointRef, - const ::CORBA::Any & provided_reference) - { - CIAO_TRACE ("Component_Handler_i::connect_receptacle"); - - const ::Deployment::PlanConnectionDescription &conn = - plan.connection[connectionRef]; - const ::Deployment::PlanSubcomponentPortEndpoint &endpoint = - conn.internalEndpoint[endpointRef]; - - CIAO_DEBUG (6, (LM_DEBUG, CLINFO - "Connection_Handler::connect_receptacle - " - "Connecting connection <%C> on instance <%C>\n", - conn.name.in (), - plan.instance[endpoint.instanceRef].name.in ())); - - if (this->is_local_connection (conn)) - { - CORBA::ULong other_endpointRef = (endpointRef + 1) % 2; - if (conn.internalEndpoint.length () == 2 && - (conn.internalEndpoint[other_endpointRef].kind == ::Deployment::Facet)) - { - const ::Deployment::PlanSubcomponentPortEndpoint &other_endpoint = - conn.internalEndpoint[other_endpointRef]; - this->connect_local_port (plan.instance[other_endpoint.instanceRef].name.in (), - other_endpoint.portName.in (), - plan.instance[endpoint.instanceRef].name.in (), - endpoint.portName.in (), - conn.name.in ()); - return; - } - else - { - CIAO_ERROR (1, (LM_ERROR, CLINFO - "Connection_Handler::connect_receptacle - " - "Error: Wrong number of internal endpoints for local receptacle connection: " - "expected <2> - found <%d>\n", - conn.internalEndpoint.length ())); - throw ::Deployment::InvalidConnection (conn.name.in (), - "Local receptacle connections require exactly 2 internalEndpoints"); - } - } - this->connect_non_local_receptacle (plan, - connectionRef, - endpointRef, - provided_reference); - } - - void Connection_Handler::connect_non_local_receptacle (const ::Deployment::DeploymentPlan & plan, - ::CORBA::ULong connectionRef, - ::CORBA::ULong endpointRef, + const ::Deployment::PlanConnectionDescription &conn, + const ::Deployment::PlanSubcomponentPortEndpoint &endpoint, const ::CORBA::Any & provided_reference) { CIAO_TRACE ("Component_Handler_i::connect_non_local_receptacle"); - const ::Deployment::PlanConnectionDescription &conn = - plan.connection[connectionRef]; - const ::Deployment::PlanSubcomponentPortEndpoint &endpoint = - conn.internalEndpoint[endpointRef]; + //provided_reference is a facet. We need to pass this reference to the receptacle, using the connect method ::CORBA::Object_var provided; @@ -543,8 +463,8 @@ namespace CIAO CIAO_ERROR (1, (LM_ERROR, CLINFO "Connection_Handler::connect_non_local_receptacle - " "Unable to extract provided reference to CORBA::Object\n", - plan.connection[connectionRef].name.in ())); - throw ::Deployment::InvalidConnection (plan.connection[connectionRef].name.in (), + conn.name.in ())); + throw ::Deployment::InvalidConnection (conn.name.in (), "Unable to extract provided reference to CORBA Object."); } @@ -581,9 +501,9 @@ namespace CIAO "Connection_Handler::connect_non_local_receptacle - " "While connecting <%C>:" "Receptacle component <%C> not deployed.\n", - plan.connection[connectionRef].name.in (), + conn.name.in (), plan.instance[endpoint.instanceRef].name.in ())); - throw ::Deployment::InvalidConnection (plan.connection[connectionRef].name.in (), + throw ::Deployment::InvalidConnection (conn.name.in (), "Receptacle component not deployed."); } @@ -602,38 +522,65 @@ namespace CIAO #if !defined (CCM_NOEVENT) void Connection_Handler::connect_publisher (const ::Deployment::DeploymentPlan & plan, - ::CORBA::ULong connectionRef, - ::CORBA::ULong endpointRef, + const ::Deployment::PlanConnectionDescription &conn, + const ::Deployment::PlanSubcomponentPortEndpoint &endpoint, const ::CORBA::Any & provided_reference) { CIAO_TRACE ("Connection_Handler::connect_publisher"); - const ::Deployment::PlanConnectionDescription &conn = - plan.connection[connectionRef]; - const ::Deployment::PlanSubcomponentPortEndpoint &endpoint = - conn.internalEndpoint[endpointRef]; - CIAO_DEBUG (6, (LM_DEBUG, CLINFO "Connection_Handler::connect_publisher - " "Connecting connection <%C> on instance <%C>\n", conn.name.in (), plan.instance[endpoint.instanceRef].name.in ())); - ::CORBA::Object_var consumer; + ::CORBA::Object_var provided; - if (!(provided_reference >>= CORBA::Any::to_object (consumer)) || - CORBA::is_nil (consumer.in ())) + if (!(provided_reference >>= CORBA::Any::to_object (provided)) || + CORBA::is_nil (provided.in ())) { CIAO_ERROR (1, (LM_ERROR, CLINFO "Connection_Handler::connect_publisher - " "Unable to extract provided reference to CORBA::Object\n", - plan.connection[connectionRef].name.in ())); - throw ::Deployment::InvalidConnection (plan.connection[connectionRef].name.in (), + conn.name.in ())); + throw ::Deployment::InvalidConnection (conn.name.in (), "Unable to extract provided reference to CORBA Object."); } - Components::EventConsumerBase_var event = - Components::EventConsumerBase::_unchecked_narrow (consumer); + Components::EventConsumerBase_var event; + if (conn.externalReference.length () == 0) + { + event = Components::EventConsumerBase::_unchecked_narrow (provided); + } + else + { + ::Components::CCMObject_var consumer = ::Components::CCMObject::_narrow (provided.in ()); + + if (CORBA::is_nil (consumer.in ())) + { + CIAO_ERROR (1, (LM_ERROR, CLINFO + "Connection_Handler::connect_publisher - " + "Unable to extract provided reference to Components::CCMObject\n", + conn.name.in ())); + throw ::Deployment::InvalidConnection (conn.name.in (), + "Unable to extract provided reference to " + "Components::CCMObject."); + } + ::CORBA::Object_var event_obj = consumer->get_consumer (conn.externalReference[0].portName.in ()); + event = ::Components::EventConsumerBase::_narrow (event_obj.in ()); + } + + if (CORBA::is_nil (event.in ())) + { + CIAO_ERROR (1, (LM_ERROR, CLINFO + "Connection_Handler::connect_publisher - " + "Unable to extract provided reference to " + "Components::EventConsumerBase\n", + conn.name.in ())); + throw ::Deployment::InvalidConnection (conn.name.in (), + "Unable to extract provided reference to " + "Components::EventConsumerBase."); + } ::Components::CCMObject_var publisher = DEPLOYMENT_STATE::instance ()->fetch_component (plan.instance[endpoint.instanceRef].name.in ()); @@ -644,7 +591,7 @@ namespace CIAO "Connection_Handler::connect_publisher - " "While connecting <%C>:" "Publishing component not deployed.", - plan.connection[connectionRef].name.in ())); + conn.name.in ())); throw ::Deployment::InvalidConnection (conn.name.in (), "Publisher component not deployed."); } @@ -665,42 +612,120 @@ namespace CIAO #if !defined (CCM_NOEVENT) void Connection_Handler::connect_consumer (const ::Deployment::DeploymentPlan & plan, - ::CORBA::ULong connectionRef, - ::CORBA::ULong endpointRef, - const ::CORBA::Any &) + const ::Deployment::PlanConnectionDescription &conn, + const ::Deployment::PlanSubcomponentPortEndpoint &endpoint, + const ::CORBA::Any & provided_reference) { CIAO_TRACE ("Connection_Handler::connect_consumer"); - const ::Deployment::PlanConnectionDescription &conn = - plan.connection[connectionRef]; - const ::Deployment::PlanSubcomponentPortEndpoint &endpoint = - conn.internalEndpoint[endpointRef]; + // provided_reference is an emitter or a publisher. CIAO_DEBUG (6, (LM_DEBUG, CLINFO + "Connection_Handler::connect_consumer - " + "Connecting connection <%C> on instance <%C>\n", + conn.name.in (), + plan.instance[endpoint.instanceRef].name.in ())); + + if (conn.externalReference.length () == 0) + { + CIAO_ERROR (1, (LM_ERROR, CLINFO + "Connection_Handler::connect_consumer - " + "Error: Expected external reference endpoint for connection <%C>", + conn.name.in ())); + throw ::Deployment::InvalidConnection (conn.name.in (), + "Expected external reference connection."); + } + + ::CORBA::Object_var obj; + + if (!(provided_reference >>= CORBA::Any::to_object (obj)) || + CORBA::is_nil (obj.in ())) + { + CIAO_ERROR (1, (LM_ERROR, CLINFO + "Connection_Handler::connect_consumer - " + "Unable to extract provided reference to CORBA::Object\n", + conn.name.in ())); + throw ::Deployment::InvalidConnection (conn.name.in (), + "Unable to extract provided reference to CORBA Object."); + } + + ::Components::CCMObject_var other_endpoint = + ::Components::CCMObject::_narrow (obj.in ()); + + if (::CORBA::is_nil (other_endpoint.in ())) + { + CIAO_ERROR (1, (LM_ERROR, CLINFO + "Connection_Handler::connect_consumer - " + "Error: Unable to fetch emitter component for connection <%C>\n", + conn.name.in ())); + throw ::Deployment::InvalidConnection (conn.name.in (), + "Unable to get reference to the emitter."); + } + + //find the consumer. + ::Components::CCMObject_var consumer_provider = + DEPLOYMENT_STATE::instance ()->fetch_component (plan.instance[endpoint.instanceRef].name.in ()); + + if (CORBA::is_nil (consumer_provider)) + { + CIAO_ERROR (1, (LM_ERROR, CLINFO + "Connection_Handler::connect_consumer - " + "While connecting <%C>:" + "Providing component not deployed.", + conn.name.in ())); + throw ::Deployment::InvalidConnection (conn.name.in (), + "Providing component not deployed."); + } + + CORBA::Object_var consumer = + consumer_provider->get_consumer (endpoint.portName.in ()); + + ::Components::EventConsumerBase_var event = ::Components::EventConsumerBase::_narrow (consumer.in ()); + + //assume it's an emitter. + ::Components::Cookie_var cookie; + try + { + other_endpoint->connect_consumer (conn.externalReference[0].portName.in (), + event.in ()); + CIAO_DEBUG (5, (LM_DEBUG, CLINFO + "Connection_Handler::connect_consumer - " + "Succesfully connected to %C\n", + conn.externalReference[0].portName.in ())); + } + catch (const ::Components::InvalidName &) + { + // we now assume it's a publisher + cookie = other_endpoint->subscribe (conn.externalReference[0].portName.in (), + event.in ()); + CIAO_DEBUG (5, (LM_DEBUG, CLINFO + "Connection_Handler::connect_consumer - " + "Succesfully subscribed to %C\n", + conn.externalReference[0].portName.in ())); + } + + CIAO_DEBUG (5, (LM_INFO, CLINFO "Connection_Handler::connect_consumer - " - "Connecting connection <%C> on instance <%C>\n", - conn.name.in (), - plan.instance[endpoint.instanceRef].name.in ())); + "Connection <%C> successfully established.\n", + conn.name.in ())); - throw ::Deployment::InvalidConnection (conn.name.in (), - "ExternalReference connection of consumers " - "currently unsupported.\n"); + CONNECTION_INFO conn_info = CONNECTION_INFO (cookie._retn (), + ::Components::CCMObject::_duplicate (other_endpoint.in ())); + this->insert_cookie (conn.name.in (), conn_info); } #endif #if !defined (CCM_NOEVENT) void Connection_Handler::connect_emitter (const ::Deployment::DeploymentPlan & plan, - ::CORBA::ULong connectionRef, - ::CORBA::ULong endpointRef, + const ::Deployment::PlanConnectionDescription &conn, + const ::Deployment::PlanSubcomponentPortEndpoint &endpoint, const ::CORBA::Any & provided_reference) { CIAO_TRACE ("Connection_Handler::connect_emitter"); - const ::Deployment::PlanConnectionDescription &conn = - plan.connection[connectionRef]; - const ::Deployment::PlanSubcomponentPortEndpoint &endpoint = - conn.internalEndpoint[endpointRef]; + // provided_reference is a consumer. + // We need to pass this to the emitter, using the connect_consumer CIAO_DEBUG (6, (LM_DEBUG, CLINFO "Connection_Handler::connect_emitter - " @@ -716,11 +741,10 @@ namespace CIAO CIAO_ERROR (1, (LM_ERROR, CLINFO "Connection_Handler::connect_emitter - " "Unable to extract provided reference to CORBA::Object\n", - plan.connection[connectionRef].name.in ())); - throw ::Deployment::InvalidConnection (plan.connection[connectionRef].name.in (), + conn.name.in ())); + throw ::Deployment::InvalidConnection (conn.name.in (), "Unable to extract provided reference to CORBA Object."); } - Components::EventConsumerBase_var event = Components::EventConsumerBase::_unchecked_narrow (consumer); @@ -733,11 +757,22 @@ namespace CIAO "Connection_Handler::connect_emitter - " "While connecting <%C>:" "Emitting component not deployed.", - plan.connection[connectionRef].name.in ())); + conn.name.in ())); throw ::Deployment::InvalidConnection (conn.name.in (), "Emitting component not deployed."); } + if (CORBA::is_nil (event)) + { + CIAO_ERROR (1, (LM_ERROR, CLINFO + "Connection_Handler::connect_emitter - " + "While connecting <%C>:" + "Consuming component not deployed.", + conn.name.in ())); + throw ::Deployment::InvalidConnection (conn.name.in (), + "Consumer component not deployed."); + } + emitter->connect_consumer (endpoint.portName.in (), event.in ()); @@ -755,246 +790,171 @@ namespace CIAO #endif void - Connection_Handler::disconnect_facet (const ::Deployment::DeploymentPlan &plan, - ::CORBA::ULong connectionRef, - ::CORBA::ULong endpointRef) - + Connection_Handler::disconnect_non_local (const ::Deployment::PlanConnectionDescription &conn, + const char * port_name) { - CIAO_TRACE ("Connection_Handler::disconnect_facet"); - - const ::Deployment::PlanConnectionDescription &conn = - plan.connection[connectionRef]; - const ::Deployment::PlanSubcomponentPortEndpoint &endpoint = - conn.internalEndpoint[endpointRef]; - - CIAO_DEBUG (6, (LM_DEBUG, CLINFO - "Connection_Handler::disconnect_facet - " - "Disconnecting connection <%C> on instance <%C>\n", - conn.name.in (), - plan.instance[endpoint.instanceRef].name.in ())); - - if (this->is_local_connection (conn)) - { - CORBA::ULong other_endpointRef = (endpointRef + 1) % 2; - if (conn.internalEndpoint.length () == 2 && - (conn.internalEndpoint[other_endpointRef].kind == ::Deployment::MultiplexReceptacle || - conn.internalEndpoint[other_endpointRef].kind == ::Deployment::SimplexReceptacle)) - { - const ::Deployment::PlanSubcomponentPortEndpoint &other_endpoint = - conn.internalEndpoint[other_endpointRef]; - - - this->disconnect_local_port (plan.instance[endpoint.instanceRef].name.in (), - endpoint.portName.in (), - plan.instance[other_endpoint.instanceRef].name.in (), - other_endpoint.portName.in (), - conn.name.in ()); - return; - } - else - { - CIAO_ERROR (1, (LM_ERROR, CLINFO - "Connection_Handler::disconnect_facet - " - "Error: Wrong number of internal endpoints for local facet " - "connection: expected <2> - found <%d>\n", - conn.internalEndpoint.length ())); + CIAO_TRACE ("Connection_Handler::disconnect_non_local"); - throw ::Deployment::InvalidConnection (conn.name.in (), - "Local facet connections require exactly 2 " - "internalEndpoints"); - } - } - this->disconnect_non_local (conn, endpoint); + ::Components::CCMObject_var obj = this->get_ccm_object (conn.name.in ()); + ::CORBA::Object_var safe_tmp = + obj->disconnect (port_name, + this->get_cookie (conn.name.in ())); + this->remove_cookie (conn.name.in ()); } +#if !defined (CCM_NOEVENT) void - Connection_Handler::disconnect_non_local (const ::Deployment::PlanConnectionDescription &conn, + Connection_Handler::disconnect_publisher (const ::Deployment::PlanConnectionDescription &conn, const ::Deployment::PlanSubcomponentPortEndpoint &endpoint) - { - CIAO_TRACE ("Connection_Handler::disconnect_non_local"); - if (conn.internalEndpoint.length () == 0) - { - CIAO_ERROR (1, (LM_ERROR, CLINFO - "Connection_Handler::disconnect_non_local - " - "Error: Expected internal endpoints for connection <%C>\n", - conn.name.in ())); - throw ::Deployment::InvalidConnection (conn.name.in (), - "Expected internal endpoints."); - } + { + CIAO_TRACE ("Connection_Handler::disconnect_publisher"); ::Components::CCMObject_var obj = this->get_ccm_object (conn.name.in ()); - ::CORBA::Object_var safe_tmp = - obj->disconnect (endpoint.portName.in (), - this->get_cookie (conn.name.in ())); + + ::Components::EventConsumerBase_var safe_temp = + obj->unsubscribe (endpoint.portName.in (), + this->get_cookie (conn.name.in ())); this->remove_cookie (conn.name.in ()); } +#endif + +#if !defined (CCM_NOEVENT) void - Connection_Handler::disconnect_receptacle (const ::Deployment::DeploymentPlan &plan, - ::CORBA::ULong connectionRef, - ::CORBA::ULong endpointRef) + Connection_Handler::disconnect_consumer (const ::Deployment::PlanConnectionDescription &conn, + const ::Deployment::PlanSubcomponentPortEndpoint &endpoint) { - CIAO_TRACE ("Connection_Handler::disconnect_receptacle"); + CIAO_TRACE ("Connection_Handler::disconnect_consumer"); - const ::Deployment::PlanConnectionDescription &conn = - plan.connection[connectionRef]; - const ::Deployment::PlanSubcomponentPortEndpoint &endpoint = - conn.internalEndpoint[endpointRef]; + ::Components::CCMObject_var obj = this->get_ccm_object (conn.name.in ()); - CIAO_DEBUG (6, (LM_DEBUG, CLINFO - "Connection_Handler::disconnect_receptacle - " - "Disconnecting connection <%C> on instance <%C>\n", - conn.name.in (), - plan.instance[endpoint.instanceRef].name.in ())); - if (this->is_local_connection (conn)) + ::Components::EventConsumerBase_var safe_temp; + try { - CORBA::ULong other_endpointRef = (endpointRef + 1) % 2; - if (conn.internalEndpoint.length () == 2 && - conn.internalEndpoint[other_endpointRef].kind == ::Deployment::Facet) - { - const ::Deployment::PlanSubcomponentPortEndpoint &other_endpoint = - conn.internalEndpoint[other_endpointRef]; - - - this->disconnect_local_port (plan.instance[endpoint.instanceRef].name.in (), - endpoint.portName.in (), - plan.instance[other_endpoint.instanceRef].name.in (), - other_endpoint.portName.in (), - conn.name.in ()); - return; + const char * name (0); + if (conn.externalReference[0].provider) + { // determine the port name of the publisher or emitter. + name = endpoint.portName.in (); } else { - CIAO_ERROR (1, (LM_ERROR, CLINFO - "Connection_Handler::disconnect_receptacle - " - "Error: Wrong number of internal endpoints for local receptacle " - "connection: expected <2> - found <%d>\n", - conn.internalEndpoint.length ())); - - throw ::Deployment::InvalidConnection (conn.name.in (), - "Local receptacle connections require exactly 2 " - "internalEndpoints"); + name = conn.externalReference[0].portName.in (); + } + if (this->get_cookie (conn.name.in ()) == 0) + { //emitter + CIAO_DEBUG (5, (LM_DEBUG, CLINFO + "Connection_Handler::disconnect_consumer - " + "Disconnecting %C on the emitter.\n", + name)); + safe_temp = obj->disconnect_consumer (name); + } + else + { //publisher + CIAO_DEBUG (5, (LM_DEBUG, CLINFO + "Connection_Handler::disconnect_consumer - " + "Disconnecting %C on the publisher.\n", + name)); + safe_temp = obj->unsubscribe (name, this->get_cookie (conn.name.in ())); } } - this->disconnect_non_local (conn, endpoint); - } - -#if !defined (CCM_NOEVENT) - void - Connection_Handler::disconnect_publisher (const ::Deployment::DeploymentPlan &plan, - ::CORBA::ULong connectionRef, - ::CORBA::ULong endpointRef) - - { - CIAO_TRACE ("Connection_Handler::disconnect_publisher"); - - const ::Deployment::PlanConnectionDescription &conn = - plan.connection[connectionRef]; - const ::Deployment::PlanSubcomponentPortEndpoint &endpoint = - conn.internalEndpoint[endpointRef]; - - CIAO_DEBUG (6, (LM_DEBUG, CLINFO - "Connection_Handler::disconnect_publisher - " - "Disconnecting connection <%C> on instance <%C>. " - "Portname: [%C]\n", - conn.name.in (), - plan.instance[endpoint.instanceRef].name.in (), - endpoint.portName. in ())); - - if (conn.internalEndpoint.length () == 0) + // it could be that the emmitter or publisher is already shut down. In that + // case we got a COMM_FAILURE or a TRANSIENT exception. + catch (const ::CORBA::OBJECT_NOT_EXIST &) { - CIAO_ERROR (1, (LM_ERROR, CLINFO - "Connection_Handler::disconnect_event_port - " - "Error: Expected internal endpoints for connection <%C>\n", - conn.name.in ())); - throw ::Deployment::InvalidConnection (conn.name.in (), - "Expected internal endpoints."); + CIAO_DEBUG (2, (LM_WARNING, CLINFO + "Connection_Handler::disconnect_consumer - " + "Caught OBJECT_NOT_EXIST exception during disconnecting %C\n", + conn.name.in ())); } - ::Components::CCMObject_var obj = this->get_ccm_object (conn.name.in ()); - - ::Components::EventConsumerBase_var safe_temp = - obj->unsubscribe (endpoint.portName.in (), - this->get_cookie (conn.name.in ())); + catch (const ::CORBA::COMM_FAILURE &) + { + CIAO_DEBUG (2, (LM_WARNING, CLINFO + "Connection_Handler::disconnect_consumer - " + "Caught COMM_FAILURE exception during disconnecting %C\n", + conn.name.in ())); + } + catch (const ::CORBA::TRANSIENT &) + { + CIAO_DEBUG (2, (LM_WARNING, CLINFO + "Connection_Handler::disconnect_consumer - " + "Caught TRANSIENT exception during disconnecting %C\n", + conn.name.in ())); + } + catch (const ::CORBA::Exception &ex) + { + ex._tao_print_exception ("Connection_Handler::disconnect_consumer"); + } + // still need to remove the cookie. + this->remove_cookie (conn.name.in ()); } #endif #if !defined (CCM_NOEVENT) void - Connection_Handler::disconnect_emitter (const ::Deployment::DeploymentPlan &, - ::CORBA::ULong, - ::CORBA::ULong) + Connection_Handler::disconnect_emitter (const ::Deployment::PlanConnectionDescription &conn, + const ::Deployment::PlanSubcomponentPortEndpoint &endpoint) { CIAO_TRACE ("Connection_Handler::disconnect_emitter"); + ::Components::CCMObject_var obj = this->get_ccm_object (conn.name.in ()); + obj->disconnect_consumer (endpoint.portName.in ()); + this->remove_cookie (conn.name.in ()); } #endif -#if !defined (CCM_NOEVENT) void - Connection_Handler::disconnect_consumer (const ::Deployment::DeploymentPlan &plan, - ::CORBA::ULong connectionRef, - ::CORBA::ULong endpointRef) - + Connection_Handler::connect_local_port (const ::Deployment::DeploymentPlan & plan, + const ::Deployment::PlanConnectionDescription &conn, + ::CORBA::ULong endpointRef, + const ::Deployment::PlanSubcomponentPortEndpoint &receptacle_endpoint) { - CIAO_TRACE ("Connection_Handler::disconnect_consumer"); + CIAO_TRACE ("Connection_Handler::connect_local_port"); - const ::Deployment::PlanConnectionDescription &conn = - plan.connection[connectionRef]; - const ::Deployment::PlanSubcomponentPortEndpoint &endpoint = - conn.internalEndpoint[endpointRef]; CIAO_DEBUG (6, (LM_DEBUG, CLINFO - "Connection_Handler::disconnect_consumer - " - "Disconnecting connection <%C> on instance <%C>. " - "Portname: [%C]\n", - conn.name.in (), - plan.instance[endpoint.instanceRef].name.in (), - endpoint.portName. in ())); + "Connection_Handler::connect_local_port - " + "Connecting connection <%C> on instance <%C>\n", + conn.name.in (), + plan.instance[receptacle_endpoint.instanceRef].name.in ())); - if (conn.internalEndpoint.length () == 0) + CORBA::ULong facet_endpointRef = (endpointRef + 1) % 2; + if (conn.internalEndpoint.length () != 2 || + conn.internalEndpoint[facet_endpointRef].kind != ::Deployment::Facet) { CIAO_ERROR (1, (LM_ERROR, CLINFO - "Connection_Handler::disconnect_event_port - " - "Error: Expected internal endpoints for connection <%C>\n", - conn.name.in ())); + "Connection_Handler::connect_local_port - " + "Error: Wrong number of internal endpoints for local connection: " + "expected <2> - found <%d>\n", + conn.internalEndpoint.length ())); + throw ::Deployment::InvalidConnection (conn.name.in (), - "Expected internal endpoints."); + "Local connections require exactly 2 internalEndpoints"); } - ::Components::CCMObject_var obj = this->get_ccm_object (conn.name.in ()); - - ::Components::EventConsumerBase_var safe_temp = - obj->disconnect_consumer (endpoint.portName.in ()); - } -#endif - void - Connection_Handler::connect_local_port (const char *facet_id, - const char *facet_port, - const char *receptacle_id, - const char *receptacle_port, - const char *connection_name) - { - CIAO_TRACE ("Connection_Handler::connect_local_port"); + const ::Deployment::PlanSubcomponentPortEndpoint &facet_endpoint = + conn.internalEndpoint[facet_endpointRef]; const char *facet_cont = - DEPLOYMENT_STATE::instance ()->instance_to_container (facet_id); + DEPLOYMENT_STATE::instance ()->instance_to_container ( + plan.instance[facet_endpoint.instanceRef].name.in ()); const char *recep_cont = - DEPLOYMENT_STATE::instance ()->instance_to_container (receptacle_id); + DEPLOYMENT_STATE::instance ()->instance_to_container ( + plan.instance[receptacle_endpoint.instanceRef].name.in ()); if (facet_cont && recep_cont && ACE_OS::strcmp (facet_cont, recep_cont) != 0) { CIAO_ERROR (1, (LM_ERROR, CLINFO "Connection_Handler::connect_local_port - " - "Ports <%C> and <%C> participate in local facet/receptacle connection, " + "Ports <%C> and <%C> participate in local connection, " "but are installed in differing containers <%C> and <%C>\n", - facet_id, - receptacle_id, + plan.instance[facet_endpoint.instanceRef].name.in (), + plan.instance[receptacle_endpoint.instanceRef].name.in (), facet_cont, recep_cont)); - throw ::Deployment::InvalidConnection (facet_id, + throw ::Deployment::InvalidConnection (plan.instance[facet_endpoint.instanceRef].name.in (), "Component instance participates in a local connection with " "a non-local entity."); } @@ -1003,50 +963,74 @@ namespace CIAO DEPLOYMENT_STATE::instance ()->fetch_container (facet_cont); Components::CCMObject_var - facet = DEPLOYMENT_STATE::instance ()->fetch_component (facet_id), - receptacle = DEPLOYMENT_STATE::instance ()->fetch_component (receptacle_id); + facet = DEPLOYMENT_STATE::instance ()->fetch_component ( + plan.instance[facet_endpoint.instanceRef].name.in ()), + receptacle = DEPLOYMENT_STATE::instance ()->fetch_component ( + plan.instance[receptacle_endpoint.instanceRef].name.in ()); ::Components::Cookie_var cookie = cont->connect_local_facet (facet, - facet_port, + facet_endpoint.portName.in (), receptacle, - receptacle_port); + receptacle_endpoint.portName.in ()); CIAO_DEBUG (5, (LM_INFO, CLINFO "Connection_Handler::connect_local_port - " "Connected local port <%C>:<%C> to <%C>:<%C>\n", - facet_id, facet_port, - receptacle_id, receptacle_port)); + plan.instance[facet_endpoint.instanceRef].name.in (), + facet_endpoint.portName.in (), + plan.instance[receptacle_endpoint.instanceRef].name.in (), + receptacle_endpoint.portName.in ())); CONNECTION_INFO conn_info = CONNECTION_INFO (cookie._retn (), ::Components::CCMObject::_duplicate (receptacle.in ())); - this->insert_cookie (connection_name, conn_info); + this->insert_cookie (conn.name.in (), conn_info); } void - Connection_Handler::disconnect_local_port (const char *facet_id, - const char *facet_port, - const char *receptacle_id, - const char *receptacle_port, - const char *connection_name) + Connection_Handler::disconnect_local_port (const ::Deployment::DeploymentPlan & plan, + const ::Deployment::PlanConnectionDescription &conn, + ::CORBA::ULong endpointRef, + const ::Deployment::PlanSubcomponentPortEndpoint &receptacle_endpoint) { CIAO_TRACE ("Connection_Handler::disconnect_local_port"); + + CORBA::ULong facet_endpointRef = (endpointRef + 1) % 2; + if (conn.internalEndpoint.length () != 2 || + conn.internalEndpoint[facet_endpointRef].kind != ::Deployment::Facet) + { + CIAO_ERROR (1, (LM_ERROR, CLINFO + "Connection_Handler::disconnect_local_port - " + "Error: Wrong number of internal endpoints for local " + "connection: expected <2> - found <%d>\n", + conn.internalEndpoint.length ())); + + throw ::Deployment::InvalidConnection (conn.name.in (), + "Local connections require exactly 2 " + "internalEndpoints"); + + } + const ::Deployment::PlanSubcomponentPortEndpoint &facet_endpoint = + conn.internalEndpoint[facet_endpointRef]; + const char *facet_cont = - DEPLOYMENT_STATE::instance ()->instance_to_container (facet_id); + DEPLOYMENT_STATE::instance ()->instance_to_container ( + plan.instance[facet_endpoint.instanceRef].name.in ()); const char *recep_cont = - DEPLOYMENT_STATE::instance ()->instance_to_container (receptacle_id); + DEPLOYMENT_STATE::instance ()->instance_to_container ( + plan.instance[receptacle_endpoint.instanceRef].name.in ()); if (facet_cont && recep_cont && ACE_OS::strcmp (facet_cont, recep_cont) != 0) { CIAO_ERROR (1, (LM_ERROR, CLINFO "Connection_Handler::disconnect_local_port - " - "Ports <%C> and <%C> participate in local facet/receptacle connection, " + "Ports <%C> and <%C> participate in local connection, " "but are installed in differing containers <%C> and <%C>\n", - facet_id, - receptacle_id, + plan.instance[facet_endpoint.instanceRef].name.in (), + plan.instance[receptacle_endpoint.instanceRef].name.in (), facet_cont, recep_cont)); - throw ::Deployment::InvalidConnection (facet_id, + throw ::Deployment::InvalidConnection (plan.instance[facet_endpoint.instanceRef].name.in (), "Component instance participates in a local connection with " "a non-local entity."); } @@ -1055,23 +1039,27 @@ namespace CIAO DEPLOYMENT_STATE::instance ()->fetch_container (facet_cont); Components::CCMObject_var - facet = DEPLOYMENT_STATE::instance ()->fetch_component (facet_id), - receptacle = DEPLOYMENT_STATE::instance ()->fetch_component (receptacle_id); + facet = DEPLOYMENT_STATE::instance ()->fetch_component ( + plan.instance[facet_endpoint.instanceRef].name.in ()), + receptacle = DEPLOYMENT_STATE::instance ()->fetch_component ( + plan.instance[receptacle_endpoint.instanceRef].name.in ()); cont->disconnect_local_facet ( - this->get_cookie (connection_name), + this->get_cookie (conn.name.in ()), facet, - facet_port, + facet_endpoint.portName.in (), receptacle, - receptacle_port); + receptacle_endpoint.portName.in ()); - this->remove_cookie (connection_name); + this->remove_cookie (conn.name.in ()); CIAO_DEBUG (5, (LM_INFO, CLINFO "Connection_Handler::disconnect_local_port - " "Disconnected local port <%C>:<%C> to <%C>:<%C>\n", - facet_id, facet_port, - receptacle_id, receptacle_port)); + plan.instance[facet_endpoint.instanceRef].name.in (), + facet_endpoint.portName.in (), + plan.instance[receptacle_endpoint.instanceRef].name.in (), + receptacle_endpoint.portName.in ())); } bool @@ -1191,4 +1179,33 @@ namespace CIAO } return ::Components::CCMObject::_duplicate (ret.in ()); } + + ::CORBA::ULong + Connection_Handler::retrieve_endpoint (const ::Deployment::PlanConnectionDescription &conn) + { + if (conn.internalEndpoint.length () == 0) + { + CIAO_ERROR (1, (LM_ERROR, CLINFO + "Connection_Handler::retrieve_endpoint - " + "Connection <%C> lacks an internalEndpoint.\n", + conn.name.in ())); + throw ::Deployment::InvalidConnection (conn.name.in (), + "No internal endpoint for connection\n"); + } + // When two internal endpoints defined, get the 'consuming' endpoint + // (Publisher, Emitter, Receptacle). + // In case the the 'consuming' endpoint is external, we need to connect, + // using the providing endpoint. Therfor returning nil. + if (conn.internalEndpoint.length () > 1) + { + for (CORBA::ULong i = 0; + i < conn.internalEndpoint.length (); + ++i) + { + if (!conn.internalEndpoint[i].provider) + return i; + } + } + return 0; + } } diff --git a/CIAO/ciao/Deployment/Handlers/Connection_Handler.h b/CIAO/ciao/Deployment/Handlers/Connection_Handler.h index 036a89d3bff..8238f2fe9a6 100644 --- a/CIAO/ciao/Deployment/Handlers/Connection_Handler.h +++ b/CIAO/ciao/Deployment/Handlers/Connection_Handler.h @@ -10,6 +10,7 @@ #define CONNECTION_HANDLER_H #include "dance/Deployment/Deployment_DeploymentPlanC.h" +#include "ciao/Containers/Container_BaseC.h" #include "ccm/CCM_ObjectC.h" #include <map> @@ -33,91 +34,70 @@ namespace CIAO ::CORBA::ULong c_id); private: - void connect_facet (const ::Deployment::DeploymentPlan & plan, - ::CORBA::ULong connectionRef, - ::CORBA::ULong endpoint, - const ::CORBA::Any & provided_reference); - - void connect_receptacle (const ::Deployment::DeploymentPlan & plan, - ::CORBA::ULong connectionRef, - ::CORBA::ULong endpoint, - const ::CORBA::Any & provided_reference); #if !defined (CCM_NOEVENT) void connect_publisher (const ::Deployment::DeploymentPlan & plan, - ::CORBA::ULong connectionRef, - ::CORBA::ULong endpoint, + const ::Deployment::PlanConnectionDescription &conn, + const ::Deployment::PlanSubcomponentPortEndpoint &endpoint, const ::CORBA::Any & provided_reference); #endif #if !defined (CCM_NOEVENT) - void connect_emitter (const ::Deployment::DeploymentPlan & plan, - ::CORBA::ULong connectionRef, - ::CORBA::ULong endpoint, - const ::CORBA::Any & provided_reference); + void connect_consumer (const ::Deployment::DeploymentPlan & plan, + const ::Deployment::PlanConnectionDescription &conn, + const ::Deployment::PlanSubcomponentPortEndpoint &endpoint, + const ::CORBA::Any & provided_reference); #endif #if !defined (CCM_NOEVENT) - void connect_consumer (const ::Deployment::DeploymentPlan & plan, - ::CORBA::ULong connectionRef, - ::CORBA::ULong endpoint, - const ::CORBA::Any & provided_reference); + void connect_emitter (const ::Deployment::DeploymentPlan & plan, + const ::Deployment::PlanConnectionDescription &conn, + const ::Deployment::PlanSubcomponentPortEndpoint &endpoint, + const ::CORBA::Any & provided_reference); #endif - void disconnect_facet (const ::Deployment::DeploymentPlan & plan, - ::CORBA::ULong connectionRef, - ::CORBA::ULong endpoint); - - - void disconnect_receptacle (const ::Deployment::DeploymentPlan & plan, - ::CORBA::ULong connectionRef, - ::CORBA::ULong endpoint); - #if !defined (CCM_NOEVENT) - void disconnect_publisher (const ::Deployment::DeploymentPlan & plan, - ::CORBA::ULong connectionRef, - ::CORBA::ULong endpoint); + void disconnect_publisher (const ::Deployment::PlanConnectionDescription &conn, + const ::Deployment::PlanSubcomponentPortEndpoint &endpoint); #endif #if !defined (CCM_NOEVENT) - void disconnect_emitter (const ::Deployment::DeploymentPlan & plan, - ::CORBA::ULong connectionRef, - ::CORBA::ULong endpoint); + void disconnect_consumer (const ::Deployment::PlanConnectionDescription &conn, + const ::Deployment::PlanSubcomponentPortEndpoint &endpoint); #endif #if !defined (CCM_NOEVENT) - void disconnect_consumer (const ::Deployment::DeploymentPlan & plan, - ::CORBA::ULong connectionRef, - ::CORBA::ULong endpoint); + void disconnect_emitter (const ::Deployment::PlanConnectionDescription &conn, + const ::Deployment::PlanSubcomponentPortEndpoint &endpoint); #endif - void connect_local_port (const char *facet_id, - const char *facet_port, - const char *receptacle_id, - const char *receptacle_port, - const char *connection_name); + void connect_local_port (const ::Deployment::DeploymentPlan & plan, + const ::Deployment::PlanConnectionDescription &conn, + ::CORBA::ULong endpointRef, + const ::Deployment::PlanSubcomponentPortEndpoint &receptacle_endpoint); - void disconnect_local_port (const char *facet_id, - const char *facet_port, - const char *receptacle_id, - const char *receptacle_port, - const char *connection_name); + void disconnect_local_port (const ::Deployment::DeploymentPlan & plan, + const ::Deployment::PlanConnectionDescription &conn, + ::CORBA::ULong endpointRef, + const ::Deployment::PlanSubcomponentPortEndpoint &receptacle_endpoint); void connect_non_local_receptacle (const ::Deployment::DeploymentPlan & plan, - ::CORBA::ULong connectionRef, - ::CORBA::ULong endpoint, + const ::Deployment::PlanConnectionDescription &conn, + const ::Deployment::PlanSubcomponentPortEndpoint &endpoint, const ::CORBA::Any & provided_reference); void connect_non_local_facet (const ::Deployment::DeploymentPlan & plan, - ::CORBA::ULong connectionRef, - ::CORBA::ULong endpointRef, + const ::Deployment::PlanConnectionDescription &conn, + const ::Deployment::PlanSubcomponentPortEndpoint &endpoint, const ::CORBA::Any & provided_reference); void disconnect_non_local (const ::Deployment::PlanConnectionDescription &conn, - const ::Deployment::PlanSubcomponentPortEndpoint &endpoint); + const char * port_name); bool is_local_connection (const ::Deployment::PlanConnectionDescription &conn); + ::CORBA::ULong retrieve_endpoint (const ::Deployment::PlanConnectionDescription &conn); + typedef std::pair < ::Components::Cookie_var, ::Components::CCMObject_var> CONNECTION_INFO; typedef std::map <std::string, diff --git a/CIAO/ciao/Deployment/Interceptors/Deployment_Interceptors.cpp b/CIAO/ciao/Deployment/Interceptors/Deployment_Interceptors.cpp index 4104b3f2f04..a0ccfe183c9 100644 --- a/CIAO/ciao/Deployment/Interceptors/Deployment_Interceptors.cpp +++ b/CIAO/ciao/Deployment/Interceptors/Deployment_Interceptors.cpp @@ -11,7 +11,7 @@ namespace CIAO { - // Implementation skeleton constructor + /// Implementation skeleton constructor CIAO_StoreReferences_i::CIAO_StoreReferences_i (void) { this->orb_ = DAnCE::PLUGIN_MANAGER::instance ()->get_orb (); @@ -26,7 +26,7 @@ namespace CIAO } } - // Implementation skeleton destructor + /// Implementation skeleton destructor CIAO_StoreReferences_i::~CIAO_StoreReferences_i (void) { } @@ -121,12 +121,12 @@ namespace CIAO } } - // Implementation skeleton constructor + /// Implementation skeleton constructor CIAO_ReferenceLookup_i::CIAO_ReferenceLookup_i (void) { } - // Implementation skeleton destructor + /// Implementation skeleton destructor CIAO_ReferenceLookup_i::~CIAO_ReferenceLookup_i (void) { } @@ -136,14 +136,12 @@ namespace CIAO ::CORBA::ULong, ::CORBA::Any &) { - // Add your implementation here } void CIAO_ReferenceLookup_i::post_connect (const ::Deployment::DeploymentPlan &, ::CORBA::ULong, const ::CORBA::Any &) { - // Add your implementation here } void diff --git a/CIAO/ciao/Deployment/Interceptors/Deployment_Interceptors.h b/CIAO/ciao/Deployment/Interceptors/Deployment_Interceptors.h index 9edd017a589..5b792119e19 100644 --- a/CIAO/ciao/Deployment/Interceptors/Deployment_Interceptors.h +++ b/CIAO/ciao/Deployment/Interceptors/Deployment_Interceptors.h @@ -1,11 +1,11 @@ // $Id$ + /** * @file Deployment_Interceptors.h * @author William R. Otte <wotte@dre.vanderbilt.edu> * * Initial deployment interceptors for use in DAnCE. */ - #ifndef DEPLOYMENT_INTERCEPTORS_H #define DEPLOYMENT_INTERCEPTORS_H @@ -25,11 +25,10 @@ namespace CIAO : public virtual DAnCE::DeploymentInterceptor_Base { public: - // Constructor - + /// Constructor CIAO_StoreReferences_i (void); - // Destructor + /// Destructor virtual ~CIAO_StoreReferences_i (void); virtual void pre_install (::Deployment::DeploymentPlan & plan, @@ -51,10 +50,10 @@ namespace CIAO : public virtual DAnCE::DeploymentInterceptor_Base { public: - // Constructor + /// Constructor CIAO_ReferenceLookup_i (void); - // Destructor + /// Destructor virtual ~CIAO_ReferenceLookup_i (void); virtual diff --git a/CIAO/ciao/Servants/Connector_Servant_Impl_Base.cpp b/CIAO/ciao/Servants/Connector_Servant_Impl_Base.cpp index df27d171f4c..d9155d9a286 100644 --- a/CIAO/ciao/Servants/Connector_Servant_Impl_Base.cpp +++ b/CIAO/ciao/Servants/Connector_Servant_Impl_Base.cpp @@ -33,6 +33,9 @@ namespace CIAO try { + PortableServer::POA_var port_poa = + this->container_->the_port_POA (); + // Removing Facets for (FacetTable::const_iterator iter = this->facet_table_.begin (); @@ -40,11 +43,9 @@ namespace CIAO ++iter) { PortableServer::ObjectId_var facet_id = - this->container_->the_port_POA ()->reference_to_id ( - iter->second); + port_poa->reference_to_id (iter->second); - this->container_->the_port_POA ()->deactivate_object ( - facet_id); + port_poa->deactivate_object (facet_id); CIAO::Servant_Activator_var sa = this->container_->ports_servant_activator (); @@ -207,6 +208,23 @@ namespace CIAO #endif #if !defined (CCM_LW) + ::Components::ReceptacleDescriptions * + Connector_Servant_Impl_Base::get_all_receptacles (void) + { + CIAO_TRACE ("Connector_Servant_Impl_Base::get_all_receptacles (void)"); + + ::Components::ReceptacleDescriptions * retval = 0; + ACE_NEW_THROW_EX (retval, + ::Components::ReceptacleDescriptions, + ::CORBA::NO_MEMORY ()); + ::Components::ReceptacleDescriptions_var safe_retval = retval; + safe_retval->length (0UL); + + return safe_retval._retn (); + } +#endif + +#if !defined (CCM_LW) ::Components::PrimaryKeyBase * Connector_Servant_Impl_Base::get_primary_key (void) { @@ -270,7 +288,15 @@ namespace CIAO ::Components::EmitterDescriptions * Connector_Servant_Impl_Base::get_all_emitters (void) { - return 0; + ::Components::EmitterDescriptions *retval = 0; + ACE_NEW_THROW_EX (retval, + ::Components::EmitterDescriptions, + ::CORBA::NO_MEMORY ()); + + ::Components::EmitterDescriptions_var safe_retval = retval; + safe_retval->length (0UL); + + return safe_retval._retn (); } #endif @@ -323,7 +349,15 @@ namespace CIAO ::Components::PublisherDescriptions * Connector_Servant_Impl_Base::get_all_publishers (void) { - return 0; + ::Components::PublisherDescriptions *retval = 0; + ACE_NEW_THROW_EX (retval, + ::Components::PublisherDescriptions, + ::CORBA::NO_MEMORY ()); + + ::Components::PublisherDescriptions_var safe_retval = retval; + safe_retval->length (0UL); + + return safe_retval._retn (); } #endif @@ -444,7 +478,7 @@ namespace CIAO Connector_Servant_Impl_Base::_default_POA (void) { CIAO_TRACE("Connector_Servant_Impl_Base::_default_POA (void)"); - return PortableServer::POA::_duplicate (container_->the_POA ()); + return container_->the_POA (); } ::CORBA::Object_ptr diff --git a/CIAO/ciao/Servants/Connector_Servant_Impl_Base.h b/CIAO/ciao/Servants/Connector_Servant_Impl_Base.h index fb08d1e25ac..b843fa7596d 100644 --- a/CIAO/ciao/Servants/Connector_Servant_Impl_Base.h +++ b/CIAO/ciao/Servants/Connector_Servant_Impl_Base.h @@ -38,26 +38,26 @@ namespace CIAO #if !defined (CCM_LW) namespace Servant { - template<typename T_var> + template<typename T> void describe_simplex_receptacle ( const char *port_name, const char *port_type_repo_id, - T_var &connection, + typename T::_ptr_type connection, ::Components::ReceptacleDescriptions_var &descriptions, CORBA::ULong slot); - template<typename T_var> + template<typename T> void describe_multiplex_receptacle ( const char *port_name, const char *port_type_repo_id, - std::map<ptrdiff_t, T_var> &objrefs, + const T &objrefs, ::Components::ReceptacleDescriptions_var &descriptions, CORBA::ULong slot); } /* Servant */ #endif /** - * @class Servant_Impl_Base + * @class Connector_Servant_Impl * * @brief Non-template base class for Connector_Servant_Impl. * @@ -102,6 +102,10 @@ namespace CIAO #endif #if !defined (CCM_LW) + virtual ::Components::ReceptacleDescriptions * get_all_receptacles (void); +#endif + +#if !defined (CCM_LW) virtual ::Components::PrimaryKeyBase * get_primary_key (void); #endif diff --git a/CIAO/ciao/Servants/Connector_Servant_Impl_Utils_T.cpp b/CIAO/ciao/Servants/Connector_Servant_Impl_Utils_T.cpp index bb6f93e2423..013ab16bbe6 100644 --- a/CIAO/ciao/Servants/Connector_Servant_Impl_Utils_T.cpp +++ b/CIAO/ciao/Servants/Connector_Servant_Impl_Utils_T.cpp @@ -11,12 +11,12 @@ namespace CIAO { - template<typename T_var> + template<typename T> void Servant::describe_simplex_receptacle ( const char *port_name, const char *port_type_repo_id, - T_var &connection, + typename T::_ptr_type connection, ::Components::ReceptacleDescriptions_var &descriptions, CORBA::ULong slot) { @@ -39,18 +39,18 @@ namespace CIAO ::Components::ConnectionDescription_var safe_conn = conn; conn->ck (0); - conn->objref (connection.in ()); + conn->objref (connection); elem->connections ()[0UL] = safe_conn._retn (); descriptions[slot] = safe_elem._retn (); } - template<typename T_var> + template<typename T> void Servant::describe_multiplex_receptacle ( const char *port_name, const char *port_type_repo_id, - std::map<ptrdiff_t, T_var> &objrefs, + const T &objrefs, ::Components::ReceptacleDescriptions_var &descriptions, CORBA::ULong slot) { @@ -66,34 +66,19 @@ namespace CIAO elem->name (port_name); elem->type_id (port_type_repo_id); elem->is_multiple (true); - elem->connections ().length (objrefs.size ()); + elem->connections ().length (objrefs.length ()); - CORBA::ULong seq_slot = 0UL; - ::Components::ConnectionDescription *conn = 0; - - typedef typename std::map<ptrdiff_t, T_var>::const_iterator - CONST_ITERATOR; - - for (CONST_ITERATOR iter = objrefs.begin (); - iter != objrefs.end (); - ++iter, ++seq_slot) + for (CORBA::ULong i = 0UL; i < objrefs.length (); ++i) { + ::Components::ConnectionDescription *conn = 0; ACE_NEW_THROW_EX (conn, ::OBV_Components::ConnectionDescription, CORBA::NO_MEMORY ()); ::Components::ConnectionDescription_var safe_conn = conn; - ::Components::Cookie_var key_cookie; - - ACE_NEW_THROW_EX (key_cookie, - CIAO::Cookie_Impl (iter->first), - CORBA::NO_MEMORY ()); - - conn->ck (key_cookie.in ()); - - conn->objref (iter->second.in ()); - - elem->connections ()[seq_slot] = safe_conn._retn (); + safe_conn->ck (objrefs[i].ck.in ()); + safe_conn->objref (objrefs[i].objref); + elem->connections ()[i] = safe_conn._retn (); } descriptions[slot] = safe_elem._retn (); diff --git a/CIAO/ciao/Servants/Home_Servant_Impl_T.cpp b/CIAO/ciao/Servants/Home_Servant_Impl_T.cpp index d7bd835ac62..4d9ee76f6ff 100644 --- a/CIAO/ciao/Servants/Home_Servant_Impl_T.cpp +++ b/CIAO/ciao/Servants/Home_Servant_Impl_T.cpp @@ -69,8 +69,10 @@ namespace CIAO { CIAO_TRACE ("Home_Servant_Impl<>::remove_component"); + PortableServer::POA_var poa = + this->container_->the_POA (); PortableServer::ObjectId_var oid = - this->container_->the_POA ()->reference_to_id (comp); + poa->reference_to_id (comp); Components::CCMObject_var ccm_obj_var = Components::CCMObject::_nil (); if (objref_map_.find (oid.in (), ccm_obj_var) != 0) diff --git a/CIAO/ciao/Servants/Servant_Impl_Base.cpp b/CIAO/ciao/Servants/Servant_Impl_Base.cpp index 39daf4c1e44..ad9096a23af 100644 --- a/CIAO/ciao/Servants/Servant_Impl_Base.cpp +++ b/CIAO/ciao/Servants/Servant_Impl_Base.cpp @@ -22,19 +22,21 @@ namespace CIAO { CIAO_TRACE("Servant_Impl_Base::remove (void)"); #if !defined (CCM_NOEVENT) + try { + PortableServer::POA_var port_poa = + this->container_->the_port_POA (); + for (ConsumerTable::const_iterator iter = this->consumer_table_.begin (); iter != this->consumer_table_.end (); ++iter) { PortableServer::ObjectId_var cons_id = - this->container_->the_port_POA ()->reference_to_id ( - iter->second); + port_poa->reference_to_id (iter->second); - this->container_->the_port_POA ()->deactivate_object ( - cons_id); + port_poa->deactivate_object (cons_id); CIAO::Servant_Activator_var sa = this->container_->ports_servant_activator (); @@ -193,30 +195,28 @@ namespace CIAO const ::Components::NameList & names) { CIAO_TRACE("Servant_Impl_Base::get_named_emitters"); - ::Components::EmitterDescriptions_var retval; + ::Components::EmitterDescriptions *retval = 0; ACE_NEW_THROW_EX (retval, ::Components::EmitterDescriptions, ::CORBA::NO_MEMORY ()); - retval->length (names.length ()); - ::CORBA::ULong count = 0UL; + ::Components::EmitterDescriptions_var safe_retval = retval; + const ::CORBA::ULong len = names.length (); + safe_retval->length (len); - for (::CORBA::ULong name = 0UL; - name < names.length (); - ++name) + for (::CORBA::ULong i = 0UL; i < len; ++i) { ::Components::EmitterDescription * desc = - this->lookup_emitter_description (names[name].in ()); + this->lookup_emitter_description (names[i].in ()); if (desc) { - retval[count++] = desc; + safe_retval[i] = desc; } else { throw ::Components::InvalidName (); } } - ::Components::EmitterDescriptions_var safe_retval = retval; return safe_retval._retn (); } #endif @@ -377,10 +377,12 @@ namespace CIAO if (::ACE_OS::strcmp (publisher_name, publisher_desc->name ()) == 0) { ::Components::PublisherDescription *pd = 0; - ACE_NEW_THROW_EX (pd, ::OBV_Components::PublisherDescription (), CORBA::NO_MEMORY ()); + pd->name (publisher_desc->name ()); + pd->type_id (publisher_desc->type_id ()); + pd->consumers (publisher_desc->consumers ()); ::Components::PublisherDescription_var safe = pd; return safe._retn (); } @@ -416,7 +418,13 @@ namespace CIAO ACE_NEW_THROW_EX (ed, ::OBV_Components::EmitterDescription (), CORBA::NO_MEMORY ()); - ::Components::EmitterDescription_var safe = ed; + + ed->name (emitter_desc->name ()); + ed->type_id (emitter_desc->type_id ()); + ed->consumer (emitter_desc->consumer()); + + ::Components::EmitterDescription_var safe = ed; + return safe._retn (); } } diff --git a/CIAO/connectors/ami4ccm/examples/Quoter/Base/Quoter.idl b/CIAO/connectors/ami4ccm/examples/Quoter/Base/Quoter.idl new file mode 100644 index 00000000000..a6f5ca403b7 --- /dev/null +++ b/CIAO/connectors/ami4ccm/examples/Quoter/Base/Quoter.idl @@ -0,0 +1,31 @@ +// $Id$ + +#ifndef QUOTER_IDL +#define QUOTER_IDL + +#pragma ciao lem "Base/QuoterE.idl" +#pragma ciao ami4ccm interface "Quoter::StockManager" +#pragma ciao lem "Base/QuoterAE.idl" +#pragma ciao ami4ccm idl "Base/QuoterA.idl" + +module Quoter +{ + exception InvalidStock { string sym; }; + + interface StockManager { + attribute string stock_exchange_name; + + boolean add_stock(in string symbol, in double quote); + void edit_stock(in string symbol, in double new_quote) + raises(InvalidStock); + void remove_stock(in string symbol, out double quote) + raises(InvalidStock); + + boolean find_closest_symbol(inout string symbol); + double get_quote(in string symbol) raises(InvalidStock); + }; + +}; + +#endif + diff --git a/CIAO/connectors/ami4ccm/examples/Quoter/Base/Quoter.mpc b/CIAO/connectors/ami4ccm/examples/Quoter/Base/Quoter.mpc new file mode 100644 index 00000000000..0d3bd227aed --- /dev/null +++ b/CIAO/connectors/ami4ccm/examples/Quoter/Base/Quoter.mpc @@ -0,0 +1,194 @@ +// $Id$ + +project(AMI_Quoter_idl_gen) : componentidldefaults, ami, ami4ccm_stub { + custom_only = 1 + idlflags += -Wb,stub_export_macro=QUOTER_STUB_Export \ + -Wb,stub_export_include=Quoter_stub_export.h \ + -Wb,skel_export_macro=QUOTER_SKEL_Export \ + -Wb,skel_export_include=Quoter_skel_export.h \ + -Wb,conn_export_macro=QUOTER_CONN_Export \ + -Wb,conn_export_include=Quoter_conn_export.h \ + -Wb,exec_export_macro=QUOTER_EXEC_Export \ + -Wb,exec_export_include=Quoter_exec_export.h \ + -I.. -GM -Gxhcn + idlflags -= -Gsv + + IDL_Files { + Quoter.idl + } +} + +project(AMI_Quoter_lem_gen) : ciaoidldefaults { + after += AMI_Quoter_idl_gen AMI_Quoter_lema_gen + custom_only = 1 + idlflags += -Wb,export_macro=QUOTER_LEM_STUB_Export \ + -Wb,export_include=Quoter_lem_stub_export.h \ + -I.. -SS -Gxhst + + IDL_Files { + QuoterE.idl + } +} + +project(AMI_Quoter_lema_gen) : ciaoidldefaults { + after += AMI_Quoter_idl_gen + custom_only = 1 + idlflags += -Wb,stub_export_macro=QUOTER_STUB_Export \ + -Wb,stub_export_include=Quoter_stub_export.h \ + -Wb,conn_export_macro=QUOTER_CONN_Export \ + -Wb,conn_export_include=Quoter_conn_export.h \ + -Wb,svnt_export_macro=QUOTER_SVNT_Export \ + -Wb,svnt_export_include=Quoter_svnt_export.h \ + -Wb,skel_export_macro=QUOTER_SKEL_Export \ + -Wb,skel_export_include=Quoter_skel_export.h \ + -I.. -Gsv -Gcn -Glem -GC -Gxhst -Gxhsv + + IDL_Files { + QuoterA.idl + } +} + +project(AMI_Quoter_lemae_gen) : ciaoidldefaults { + after += AMI_Quoter_lema_gen + custom_only = 1 + idlflags += -Wb,stub_export_macro=QUOTER_LEM_STUB_Export \ + -Wb,stub_export_include=Quoter_lem_stub_export.h \ + -I.. -SS + + IDL_Files { + QuoterAE.idl + } +} + +project(AMI_Quoter_stub) : ccm_stub, ami, ami4ccm_stub { + after += AMI_Quoter_lem_gen + libs += + libout = ../lib + libpaths += ../lib + includes += .. + + sharedname = Quoter_stub + dynamicflags += QUOTER_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + QuoterC.cpp + QuoterAC.cpp + } + + Header_Files { + QuoterC.h + Quoter_stub_export.h +} + + Inline_Files { + QuoterC.inl + } +} + +project(AMI_Quoter_lem_stub) : ccm_executor, ami, ami4ccm_lem_stub { + after += AMI_Quoter_lem_gen AMI_Quoter_stub AMI_Quoter_lemae_gen AMI_Quoter_skel + libs += Quoter_stub Quoter_skel + libout = ../lib + libpaths += ../lib + includes += .. + + sharedname = Quoter_lem_stub + dynamicflags += QUOTER_LEM_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + QuoterEC.cpp + QuoterAEC.cpp + } + + Header_Files { + QuoterEC.h + Quoter_lem_stub_export.h +} + + Inline_Files { + QuoterEC.inl + } +} + +project(AMI_Quoter_skel) : ciao_executor, ami, ami4ccm_servant { + after += AMI_Quoter_stub + sharedname = Quoter_skel + libs += Quoter_stub + libout = ../lib + libpaths += ../lib + includes += .. + + dynamicflags += QUOTER_SKEL_BUILD_DLL + + IDL_Files { + } + + Source_Files { + QuoterS.cpp + QuoterAS.cpp + } + + Header_Files { + QuoterS.h + Quoter_skel_export.h + } + + Inline_Files { + QuoterS.inl + } +} + +project(AMI_Quoter_conn) : ciao_executor, ami, ami4ccm_lem_stub { + after += AMI_Quoter_lem_stub Quoter_Base_AMI_stub AMI_Quoter_skel AMI_Quoter_lema_gen AMI_Quoter_lemae_gen + sharedname = Quoter_conn + libs += Quoter_stub Quoter_skel Quoter_lem_stub + libpaths += ../lib + libout = ../lib + dynamicflags += QUOTER_CONN_BUILD_DLL + includes += .. + IDL_Files { + } + + Source_Files { + QuoterA_conn.cpp + } + + Header_Files { + QuoterA_conn.h + Quoter_conn_export.h + } + + Inline_Files { + } +} + +project(AMI_Quoter_svnt) : ciao_servant, ami, ami4ccm_servant { + after += AMI_Quoter_lem_stub Quoter_Base_AMI_stub AMI_Quoter_skel AMI_Quoter_lema_gen AMI_Quoter_lemae_gen AMI_Quoter_conn + sharedname = Quoter_svnt + libs += Quoter_stub Quoter_skel Quoter_lem_stub Quoter_conn + libpaths += ../lib + libout = ../lib + dynamicflags += QUOTER_SVNT_BUILD_DLL + includes += .. + IDL_Files { + } + + Source_Files { + QuoterA_svnt.cpp + } + + Header_Files { + QuoterA_svnt.h + QuoterA_svnt_export.h + } + + Inline_Files { + } +} + diff --git a/CIAO/connectors/ami4ccm/examples/Quoter/Client/Quoter_Client.idl b/CIAO/connectors/ami4ccm/examples/Quoter/Client/Quoter_Client.idl new file mode 100644 index 00000000000..f9e571166d6 --- /dev/null +++ b/CIAO/connectors/ami4ccm/examples/Quoter/Client/Quoter_Client.idl @@ -0,0 +1,21 @@ +// $Id$ + +#ifndef QUOTER_CLIENT_IDL +#define QUOTER_CLIENT_IDL + +#include <Components.idl> + +#include "Base/Quoter.idl" + +#pragma ciao ami4ccm receptacle "Quoter::Client::my_quoter" + +module Quoter +{ + component Client + { + /// For synchronous invocation + uses StockManager my_quoter; + }; +}; + +#endif diff --git a/CIAO/connectors/ami4ccm/examples/Quoter/Client/Quoter_Client.mpc b/CIAO/connectors/ami4ccm/examples/Quoter/Client/Quoter_Client.mpc new file mode 100644 index 00000000000..f3dd3c341dc --- /dev/null +++ b/CIAO/connectors/ami4ccm/examples/Quoter/Client/Quoter_Client.mpc @@ -0,0 +1,135 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl -p Quoter_Base Quoter_Client" + +project(AMI_Quoter_Client_idl_gen) : componentidldefaults { + after += AMI_Quoter_idl_gen + custom_only = 1 + idlflags += -Wb,stub_export_macro=QUOTER_CLIENT_STUB_Export \ + -Wb,stub_export_include=Quoter_Client_stub_export.h \ + -Wb,skel_export_macro=QUOTER_CLIENT_SVNT_Export \ + -Wb,skel_export_include=Quoter_Client_svnt_export.h \ + -Wb,exec_export_macro=QUOTER_CLIENT_EXEC_Export \ + -Wb,exec_export_include=Quoter_Client_exec_export.h \ + -I.. -GC + + IDL_Files { + Quoter_Client.idl + } +} + +project(AMI_Quoter_Client_lem_gen) : ciaoidldefaults { + after += AMI_Quoter_Client_idl_gen + custom_only = 1 + idlflags += -Wb,stub_export_macro=QUOTER_CLIENT_LEM_STUB_Export \ + -Wb,stub_export_include=Quoter_Client_lem_stub_export.h \ + -SS -Gxhst -I.. + + IDL_Files { + Quoter_ClientE.idl + } +} + +project(AMI_Quoter_Client_lem_stub) : ccm_svnt, ami { + after += AMI_Quoter_Client_lem_gen AMI_Quoter_stub + libs += Quoter_stub + libpaths += ../lib + libout = ../lib + sharedname = Quoter_Client_lem_stub + dynamicflags += QUOTER_CLIENT_LEM_STUB_BUILD_DLL + includes += .. + IDL_Files { + } + + Source_Files { + Quoter_ClientEC.cpp + } + + Header_Files { + Quoter_ClientEC.h + Quoter_Client_lem_stub_export.h + } + + Inline_Files { + Quoter_ClientEC.inl + } +} + +project(AMI_Quoter_Client_stub) : ccm_stub, ami { + after += AMI_Quoter_Client_idl_gen AMI_Quoter_stub + libs += Quoter_stub + libpaths += ../lib + libout = ../lib + sharedname = Quoter_Client_stub + dynamicflags += QUOTER_CLIENT_STUB_BUILD_DLL + includes += .. + IDL_Files { + } + + Source_Files { + Quoter_ClientC.cpp + } + + Header_Files { + Quoter_ClientC.h + Quoter_Client_stub_export.h + } + + Inline_Files { + Quoter_ClientC.inl + } +} + +project(AMI_Quoter_Client_exec) : ciao_executor, ami, ami4ccm_stub { + after += AMI_Quoter_Client_lem_stub AMI_Quoter_Client_stub AMI_Quoter_lem_stub + sharedname = Quoter_Client_exec + libs += Quoter_Client_stub Quoter_Client_lem_stub Quoter_stub Quoter_lem_stub + libpaths += ../lib + libout = ../lib + dynamicflags += QUOTER_CLIENT_EXEC_BUILD_DLL + includes += .. + IDL_Files { + } + + Source_Files { + Quoter_Client_exec.cpp + } + + Header_Files { + Quoter_Client_exec.h + Quoter_Client_exec_export.h + } + + Inline_Files { + } +} + +project(AMI_Quoter_Client_svnt) : ciao_servant, ami { + after += AMI_Quoter_skel AMI_Quoter_Client_lem_stub AMI_Quoter_Client_stub AMI_Quoter_exec AMI_Quoter_skel + sharedname = Quoter_Client_svnt + libs += Quoter_Client_stub Quoter_Client_lem_stub \ + Quoter_skel \ + Quoter_stub + libpaths += ../lib + libout = ../lib + dynamicflags += QUOTER_CLIENT_SVNT_BUILD_DLL + includes += .. + IDL_Files { + } + + Source_Files { + Quoter_ClientS.cpp + Quoter_Client_svnt.cpp + } + + Header_Files { + Quoter_ClientS.h + Quoter_Client_svnt.h + Quoter_Client_svnt_export.h + } + + Inline_Files { + Quoter_ClientS.inl + } +} + + diff --git a/CIAO/connectors/ami4ccm/examples/Quoter/Client/Quoter_Client_exec.cpp b/CIAO/connectors/ami4ccm/examples/Quoter/Client/Quoter_Client_exec.cpp new file mode 100644 index 00000000000..35d9f310ff1 --- /dev/null +++ b/CIAO/connectors/ami4ccm/examples/Quoter/Client/Quoter_Client_exec.cpp @@ -0,0 +1,303 @@ +// -*- C++ -*- +// $Id$ + +/** + * Code generated by the The ACE ORB (TAO) IDL Compiler v2.0.0 + * TAO and the TAO IDL Compiler have been developed by: + * Center for Distributed Object Computing + * Washington University + * St. Louis, MO + * USA + * http://www.cs.wustl.edu/~schmidt/doc-center.html + * and + * Distributed Object Computing Laboratory + * University of California at Irvine + * Irvine, CA + * USA + * and + * Institute for Software Integrated Systems + * Vanderbilt University + * Nashville, TN + * USA + * http://www.isis.vanderbilt.edu/ + * + * Information about TAO is available at: + * http://www.cs.wustl.edu/~schmidt/TAO.html + **/ + +#include "Quoter_Client_exec.h" + +#include "ace/OS_NS_unistd.h" + +namespace CIAO_Quoter_Client_Impl +{ + + //============================================================ + // Worker thread for asynchronous invocations + //============================================================ + asynch_quoter_generator::asynch_quoter_generator ( + ::Quoter::CCM_Client_Context_ptr context) + : context_(::Quoter::CCM_Client_Context::_duplicate (context)) + { + } + + int asynch_quoter_generator::svc () + { + ACE_OS::sleep (3); + ::Quoter::AMI4CCM_StockManager_var my_quoter_ami_ = + context_->get_connection_sendc_my_quoter(); + + if (CORBA::is_nil (my_quoter_ami_)) + { + ACE_ERROR ((LM_ERROR, + ACE_TEXT("ERROR Client (ASYNCH) :") + ACE_TEXT("\tmy_quoter_ami_ is NIL !!!\n"))); + return 1; + } + ::Quoter::CCM_AMI4CCM_StockManagerReplyHandler_var cb = + new AMI4CCM_StockManagerReplyHandler_my_quoter_i (); + + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT("Client (ASYNCH) :") + ACE_TEXT("\tInvoke Asynchronous calls\n"))); + + my_quoter_ami_->sendc_get_stock_exchange_name (cb.in ()); + + my_quoter_ami_->sendc_add_stock (cb.in (), "Google", 10.46); + + my_quoter_ami_->sendc_edit_stock (cb.in (), "Google", 11.13); + + my_quoter_ami_->sendc_remove_stock (cb.in (), "Microsoft"); + + my_quoter_ami_->sendc_find_closest_symbol (cb.in (), "Micro"); + + my_quoter_ami_->sendc_get_quote (cb.in (), "Google"); + + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT("Client (ASYNCH) :\tInvoked Asynchronous calls\n"))); + + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT("Client (ASYNCH) :\tInvoke Asynchronous call ") + ACE_TEXT("to test except handling\n"))); + + my_quoter_ami_->sendc_get_quote (cb.in (), "Microsoft"); + + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT("Client (ASYNCH) :\tInvoked Asynchronous call.\n"))); + return 0; + } + + /** + * Component Executor Implementation Class: Client_exec_i + */ + + Client_exec_i::Client_exec_i (void){ + } + + Client_exec_i::~Client_exec_i (void) + { + } + + // Supported operations and attributes. + + // Component attributes and port operations. + + // Operations from Components::SessionComponent. + + void + Client_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx) + { + this->context_ = + ::Quoter::CCM_Client_Context::_narrow (ctx); + if ( ::CORBA::is_nil (this->context_.in ())) + { + throw ::CORBA::INTERNAL (); + } + } + + void + Client_exec_i::configuration_complete (void) + { + /* Your code here. */ + } + + void + Client_exec_i::ccm_activate (void) + { + this->asynch_quoter_gen_ = + new asynch_quoter_generator (this->context_.in ()); + this->asynch_quoter_gen_->activate (THR_NEW_LWP | THR_JOINABLE, 1); + } + + void + Client_exec_i::ccm_passivate (void) + { + /* Your code here. */ + } + + void + Client_exec_i::ccm_remove (void) + { + delete this->asynch_quoter_gen_; + this->asynch_quoter_gen_ = 0; + } + + AMI4CCM_StockManagerReplyHandler_my_quoter_i::AMI4CCM_StockManagerReplyHandler_my_quoter_i (void) + { + } + + AMI4CCM_StockManagerReplyHandler_my_quoter_i::~AMI4CCM_StockManagerReplyHandler_my_quoter_i (void) + { + } + + void + AMI4CCM_StockManagerReplyHandler_my_quoter_i::get_stock_exchange_name ( + const char * stock_exchange_name) + { + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT ("Client - StockManagerReplyHandler : get_stock_exchange_name = %C\n"), + stock_exchange_name)); + } + + void + AMI4CCM_StockManagerReplyHandler_my_quoter_i::get_stock_exchange_name_excep ( + ::CCM_AMI::ExceptionHolder_ptr /* excep_holder */) + { + ACE_DEBUG ((LM_ERROR, + ACE_TEXT ("ERROR Client - StockManagerReplyHandler : get_stock_exchange_name threw exception\n"))); + } + + void + AMI4CCM_StockManagerReplyHandler_my_quoter_i::set_stock_exchange_name (void) + { + /* Your code here. */ + } + + void + AMI4CCM_StockManagerReplyHandler_my_quoter_i::set_stock_exchange_name_excep ( + ::CCM_AMI::ExceptionHolder_ptr /* excep_holder */) + { + ACE_DEBUG ((LM_ERROR, + ACE_TEXT ("ERROR Client - StockManagerReplyHandler : set_stock_exchange_name threw exception\n"))); + } + + void + AMI4CCM_StockManagerReplyHandler_my_quoter_i::add_stock ( + ::CORBA::Boolean ami_return_val) + { + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT ("Client - StockManagerReplyHandler : add_stock returned %C\n"), + ami_return_val ? "true" : "false")); + } + + void + AMI4CCM_StockManagerReplyHandler_my_quoter_i::add_stock_excep ( + ::CCM_AMI::ExceptionHolder_ptr /* excep_holder */) + { + ACE_DEBUG ((LM_ERROR, + ACE_TEXT ("ERROR Client - StockManagerReplyHandler : add_stock threw exception\n"))); + } + + void + AMI4CCM_StockManagerReplyHandler_my_quoter_i::edit_stock (void) + { + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT ("Client - StockManagerReplyHandler : edit_stock returned successfully\n"))); + } + + void + AMI4CCM_StockManagerReplyHandler_my_quoter_i::edit_stock_excep ( + ::CCM_AMI::ExceptionHolder_ptr /* excep_holder */) + { + ACE_DEBUG ((LM_ERROR, + ACE_TEXT ("ERROR Client - StockManagerReplyHandler : edit_stock threw exception\n"))); + } + + void + AMI4CCM_StockManagerReplyHandler_my_quoter_i::remove_stock ( + ::CORBA::Double quote) + { + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT ("Client - StockManagerReplyHandler : remove_stock returned %f\n"), + quote)); + } + + void + AMI4CCM_StockManagerReplyHandler_my_quoter_i::remove_stock_excep ( + ::CCM_AMI::ExceptionHolder_ptr /* excep_holder */) + { + ACE_DEBUG ((LM_ERROR, + ACE_TEXT ("ERROR Client - StockManagerReplyHandler : remove_stock threw exception\n"))); + } + + void + AMI4CCM_StockManagerReplyHandler_my_quoter_i::find_closest_symbol ( + ::CORBA::Boolean ami_return_val, + const char * symbol) + { + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT ("Client - StockManagerReplyHandler : find_closest_symbol returned %C; ") + ACE_TEXT ("symbol found = %C\n"), + ami_return_val ? "true" : "false", + ami_return_val ? symbol : "(none)")); + } + + void + AMI4CCM_StockManagerReplyHandler_my_quoter_i::find_closest_symbol_excep ( + ::CCM_AMI::ExceptionHolder_ptr /* excep_holder */) + { + ACE_DEBUG ((LM_ERROR, + ACE_TEXT ("ERROR Client - StockManagerReplyHandler : find_closest_symbol threw exception\n"))); + } + + void + AMI4CCM_StockManagerReplyHandler_my_quoter_i::get_quote ( + ::CORBA::Double ami_return_val) + { + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT ("Client - StockManagerReplyHandler : get_quote returned %f\n"), + ami_return_val)); + } + + void + AMI4CCM_StockManagerReplyHandler_my_quoter_i::get_quote_excep ( + ::CCM_AMI::ExceptionHolder_ptr excep_holder) + { + try + { + excep_holder->raise_exception (); + } + catch (const Quoter::InvalidStock& ex) + { + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT("Client - StockManagerReplyHandler : get_quote threw correct exception type\n"))); + + if (ACE_OS::strcmp (ex.sym.in (), "Microsoft") == 0) + { + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT("Client - StockManagerReplyHandler : get_quote could not find quote for %C\n"), + ex.sym.in ())); + return; + } + } + catch (const CORBA::Exception& /*ex*/) + { + ACE_DEBUG ((LM_ERROR, + ACE_TEXT ("ERROR Client - StockManagerReplyHandler : get_quote threw unexpected exception\n"))); + } + } + + extern "C" QUOTER_CLIENT_EXEC_Export ::Components::EnterpriseComponent_ptr + create_Quoter_Client_Impl (void) + { + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_NORETURN ( + retval, + Client_exec_i); + + return retval; + } +} diff --git a/CIAO/connectors/ami4ccm/examples/Quoter/Client/Quoter_Client_exec.h b/CIAO/connectors/ami4ccm/examples/Quoter/Client/Quoter_Client_exec.h new file mode 100644 index 00000000000..b8424d54ec9 --- /dev/null +++ b/CIAO/connectors/ami4ccm/examples/Quoter/Client/Quoter_Client_exec.h @@ -0,0 +1,181 @@ +// -*- C++ -*- +// $Id$ + +/** + * Code generated by the The ACE ORB (TAO) IDL Compiler v2.0.0 + * TAO and the TAO IDL Compiler have been developed by: + * Center for Distributed Object Computing + * Washington University + * St. Louis, MO + * USA + * http://www.cs.wustl.edu/~schmidt/doc-center.html + * and + * Distributed Object Computing Laboratory + * University of California at Irvine + * Irvine, CA + * USA + * and + * Institute for Software Integrated Systems + * Vanderbilt University + * Nashville, TN + * USA + * http://www.isis.vanderbilt.edu/ + * + * Information about TAO is available at: + * http://www.cs.wustl.edu/~schmidt/TAO.html + **/ +#ifndef CIAO_QUOTER_CLIENT_EXEC_RCQDNE_H_ +#define CIAO_QUOTER_CLIENT_EXEC_RCQDNE_H_ + +#include /**/ "ace/pre.h" + +#include "Quoter_ClientEC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include /**/ "Quoter_Client_exec_export.h" +#include "tao/LocalObject.h" +#include "ace/Task.h" + +namespace CIAO_Quoter_Client_Impl +{ + + /// Worker thread for asynchronous invocations + class asynch_quoter_generator : public virtual ACE_Task_Base + { + public: + asynch_quoter_generator (::Quoter::CCM_Client_Context_ptr context); + + virtual int svc (void); + + private: + ::Quoter::CCM_Client_Context_var context_; + }; + + /** + * Component Executor Implementation Class: Client_exec_i + */ + + class Client_exec_i + : public virtual Client_Exec, + public virtual ::CORBA::LocalObject + { + public: + Client_exec_i (void); + virtual ~Client_exec_i (void); + + /** @name Supported operations and attributes. */ + //@{ + + //@} + + /** @name Component attributes and port operations. */ + //@{ + //@} + + /** @name Operations from Components::SessionComponent. */ + //@{ + virtual void set_session_context (::Components::SessionContext_ptr ctx); + virtual void configuration_complete (void); + virtual void ccm_activate (void); + virtual void ccm_passivate (void); + virtual void ccm_remove (void); + //@} + + /** @name User defined public operations. */ + //@{ + + //@} + + private: + ::Quoter::CCM_Client_Context_var ciao_context_; + + /** @name Component attributes. */ + //@{ + //@} + + /** @name User defined members. */ + //@{ + ::Quoter::CCM_Client_Context_var context_; + asynch_quoter_generator* asynch_quoter_gen_; + //@} + + /** @name User defined private operations. */ + //@{ + + //@} + }; + + class AMI4CCM_StockManagerReplyHandler_my_quoter_i + : public ::Quoter::CCM_AMI4CCM_StockManagerReplyHandler, + public virtual ::CORBA::LocalObject + { + public: + AMI4CCM_StockManagerReplyHandler_my_quoter_i (void); + virtual ~AMI4CCM_StockManagerReplyHandler_my_quoter_i (void); + + virtual void + get_stock_exchange_name ( + const char * stock_exchange_name); + + virtual void + get_stock_exchange_name_excep ( + ::CCM_AMI::ExceptionHolder_ptr excep_holder); + + virtual void + set_stock_exchange_name (void); + + virtual void + set_stock_exchange_name_excep ( + ::CCM_AMI::ExceptionHolder_ptr excep_holder); + + virtual void + add_stock ( + ::CORBA::Boolean ami_return_val); + + virtual void + add_stock_excep ( + ::CCM_AMI::ExceptionHolder_ptr excep_holder); + + virtual void + edit_stock (void); + + virtual void + edit_stock_excep ( + ::CCM_AMI::ExceptionHolder_ptr excep_holder); + + virtual void + remove_stock ( + ::CORBA::Double quote); + + virtual void + remove_stock_excep ( + ::CCM_AMI::ExceptionHolder_ptr excep_holder); + + virtual void + find_closest_symbol ( + ::CORBA::Boolean ami_return_val, + const char * symbol); + + virtual void + find_closest_symbol_excep ( + ::CCM_AMI::ExceptionHolder_ptr excep_holder); + + virtual void + get_quote ( + ::CORBA::Double ami_return_val); + + virtual void + get_quote_excep ( + ::CCM_AMI::ExceptionHolder_ptr excep_holder); + }; + + extern "C" QUOTER_CLIENT_EXEC_Export ::Components::EnterpriseComponent_ptr + create_Quoter_Client_Impl (void); + } + +#include /**/ "ace/post.h" + +#endif /* ifndef */ diff --git a/CIAO/connectors/ami4ccm/examples/Quoter/Producer/Quoter_Producer.idl b/CIAO/connectors/ami4ccm/examples/Quoter/Producer/Quoter_Producer.idl new file mode 100644 index 00000000000..16c4ec98aad --- /dev/null +++ b/CIAO/connectors/ami4ccm/examples/Quoter/Producer/Quoter_Producer.idl @@ -0,0 +1,18 @@ +// $Id$ + +#ifndef QUOTER_PRODUCER_IDL +#define QUOTER_PRODUCER_IDL + +#include <Components.idl> + +#include "Base/Quoter.idl" + +module Quoter +{ + component Producer + { + /// Provides + provides StockManager my_quoter; + }; +}; +#endif diff --git a/CIAO/connectors/ami4ccm/examples/Quoter/Producer/Quoter_Producer.mpc b/CIAO/connectors/ami4ccm/examples/Quoter/Producer/Quoter_Producer.mpc new file mode 100644 index 00000000000..4787ee59949 --- /dev/null +++ b/CIAO/connectors/ami4ccm/examples/Quoter/Producer/Quoter_Producer.mpc @@ -0,0 +1,134 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl -p Quoter_Base Quoter_Producer" + +project(AMI_Quoter_Producer_idl_gen) : componentidldefaults { + custom_only = 1 + after += AMI_Quoter_idl_gen + idlflags += -Wb,stub_export_macro=QUOTER_PRODUCER_STUB_Export \ + -Wb,stub_export_include=Quoter_Producer_stub_export.h \ + -Wb,skel_export_macro=QUOTER_PRODUCER_SVNT_Export \ + -Wb,skel_export_include=Quoter_Producer_svnt_export.h \ + -Wb,exec_export_macro=QUOTER_PRODUCER_EXEC_Export \ + -Wb,exec_export_include=Quoter_Producer_exec_export.h \ + -Glem -I.. + + IDL_Files { + Quoter_Producer.idl + } +} + +project(AMI_Quoter_Producer_lem_gen) : ciaoidldefaults { + after += AMI_Quoter_Producer_idl_gen + custom_only = 1 + idlflags += -Wb,stub_export_macro=QUOTER_PRODUCER_LEM_STUB_Export \ + -Wb,stub_export_include=Quoter_Producer_lem_stub_export.h \ + -SS -Gxhst -I.. + + IDL_Files { + Quoter_ProducerE.idl + } +} + +project(AMI_Quoter_Producer_lem_stub) : ccm_svnt, messaging { + after += AMI_Quoter_Producer_lem_gen AMI_Quoter_Producer_stub AMI_Quoter_stub + libs += Quoter_stub Quoter_Producer_stub + libpaths += ../lib + libout = ../lib + sharedname = Quoter_Producer_lem_stub + dynamicflags += QUOTER_PRODUCER_LEM_STUB_BUILD_DLL + includes += .. + IDL_Files { + } + + Source_Files { + Quoter_ProducerEC.cpp + } + + Header_Files { + Quoter_ProducerEC.h + Quoter_Producer_lem_stub_export.h + } + + Inline_Files { + Quoter_ProducerEC.inl + } +} + +project(AMI_Quoter_Producer_stub) : ccm_stub, messaging { + after += AMI_Quoter_Producer_idl_gen AMI_Quoter_stub + libs += Quoter_stub + libpaths += ../lib + libout = ../lib + sharedname = Quoter_Producer_stub + dynamicflags += QUOTER_PRODUCER_STUB_BUILD_DLL + includes += .. + IDL_Files { + } + + Source_Files { + Quoter_ProducerC.cpp + } + + Header_Files { + Quoter_ProducerC.h + Quoter_Producer_stub_export.h + } + + Inline_Files { + Quoter_ProducerC.inl + } +} + +project(AMI_Quoter_Producer_exec) : ciao_executor, messaging { + after += AMI_Quoter_Producer_lem_stub AMI_Quoter_Producer_stub AMI_Quoter_stub AMI_Quoter_lem_stub + sharedname = Quoter_Producer_exec + libs += Quoter_Producer_stub Quoter_Producer_lem_stub Quoter_stub Quoter_lem_stub + libpaths += ../lib + libout = ../lib + dynamicflags += QUOTER_PRODUCER_EXEC_BUILD_DLL + includes += .. + IDL_Files { + } + + Source_Files { + Quoter_Producer_exec.cpp + } + + Header_Files { + Quoter_Producer_exec.h + Quoter_Producer_exec_export.h + } + + Inline_Files { + } +} + +project(AMI_Quoter_Producer_svnt) : ciao_servant, messaging { + after += AMI_Quoter_Base_skel AMI_Quoter_Producer_lem_stub AMI_Quoter_stub AMI_Quoter_skel AMI_Quoter_lem_stub + sharedname = Quoter_Producer_svnt + libs += Quoter_Producer_stub Quoter_Producer_lem_stub \ + Quoter_skel \ + Quoter_stub Quoter_lem_stub + libpaths += ../lib + libout = ../lib + dynamicflags += QUOTER_PRODUCER_SVNT_BUILD_DLL + includes += .. + IDL_Files { + } + + Source_Files { + Quoter_ProducerS.cpp + Quoter_Producer_svnt.cpp + } + + Header_Files { + Quoter_ProducerS.h + Quoter_Producer_svnt.h + Quoter_Producer_svnt_export.h + } + + Inline_Files { + Quoter_ProducerS.inl + } +} + diff --git a/CIAO/connectors/ami4ccm/examples/Quoter/Producer/Quoter_Producer_exec.cpp b/CIAO/connectors/ami4ccm/examples/Quoter/Producer/Quoter_Producer_exec.cpp new file mode 100644 index 00000000000..2de724bb0eb --- /dev/null +++ b/CIAO/connectors/ami4ccm/examples/Quoter/Producer/Quoter_Producer_exec.cpp @@ -0,0 +1,188 @@ +// -*- C++ -*- +// $Id$ + +/** + * Code generated by the The ACE ORB (TAO) IDL Compiler v2.0.0 + * TAO and the TAO IDL Compiler have been developed by: + * Center for Distributed Object Computing + * Washington University + * St. Louis, MO + * USA + * http://www.cs.wustl.edu/~schmidt/doc-center.html + * and + * Distributed Object Computing Laboratory + * University of California at Irvine + * Irvine, CA + * USA + * and + * Institute for Software Integrated Systems + * Vanderbilt University + * Nashville, TN + * USA + * http://www.isis.vanderbilt.edu/ + * + * Information about TAO is available at: + * http://www.cs.wustl.edu/~schmidt/TAO.html + **/ + +#include "Quoter_Producer_exec.h" + +namespace CIAO_Quoter_Producer_Impl +{ + + /** + * Facet Executor Implementation Class: my_quoter_exec_i + */ + + my_quoter_exec_i::my_quoter_exec_i ( + ::Quoter::CCM_Producer_Context_ptr ctx) + : ciao_context_ ( + ::Quoter::CCM_Producer_Context::_duplicate (ctx)) + { + } + + my_quoter_exec_i::~my_quoter_exec_i (void) + { + } + + // Operations from ::Quoter::StockManager + + char * + my_quoter_exec_i::stock_exchange_name (void) + { + return CORBA::string_dup ("EuroNext"); + } + + void + my_quoter_exec_i::stock_exchange_name (const char * /* stock_exchange_name */) + { + /* Your code here. */ + } + + ::CORBA::Boolean + my_quoter_exec_i::add_stock (const char * /* symbol */, + ::CORBA::Double /* quote */) + { + /* Your code here. */ + return true; + } + + void + my_quoter_exec_i::edit_stock (const char * /* symbol */, + ::CORBA::Double /* new_quote */) + { + /* Your code here. */ + } + + void + my_quoter_exec_i::remove_stock (const char * /* symbol */, + ::CORBA::Double_out quote) + { + quote = 13.66; + } + + ::CORBA::Boolean + my_quoter_exec_i::find_closest_symbol (char *& symbol) + { + symbol = CORBA::string_dup ("Windoze"); + return true; + } + + ::CORBA::Double + my_quoter_exec_i::get_quote (const char * symbol) + { + if (ACE_OS::strcmp (symbol, "Google") == 0) + return 11.13; + + ::Quoter::InvalidStock ex_; + ex_.sym = CORBA::string_dup (symbol); + throw ex_; + } + + /** + * Component Executor Implementation Class: Producer_exec_i + */ + + Producer_exec_i::Producer_exec_i (void){ + } + + Producer_exec_i::~Producer_exec_i (void) + { + } + + // Supported operations and attributes. + + // Component attributes and port operations. + + ::Quoter::CCM_StockManager_ptr + Producer_exec_i::get_my_quoter (void) + { + if ( ::CORBA::is_nil (this->ciao_my_quoter_.in ())) + { + my_quoter_exec_i *tmp = 0; + ACE_NEW_RETURN ( + tmp, + my_quoter_exec_i ( + this->ciao_context_.in ()), + ::Quoter::CCM_StockManager::_nil ()); + + this->ciao_my_quoter_ = tmp; + } + + return + ::Quoter::CCM_StockManager::_duplicate ( + this->ciao_my_quoter_.in ()); + } + + // Operations from Components::SessionComponent. + + void + Producer_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx) + { + this->ciao_context_ = + ::Quoter::CCM_Producer_Context::_narrow (ctx); + + if ( ::CORBA::is_nil (this->ciao_context_.in ())) + { + throw ::CORBA::INTERNAL (); + } + } + + void + Producer_exec_i::configuration_complete (void) + { + /* Your code here. */ + } + + void + Producer_exec_i::ccm_activate (void) + { + /* Your code here. */ + } + + void + Producer_exec_i::ccm_passivate (void) + { + /* Your code here. */ + } + + void + Producer_exec_i::ccm_remove (void) + { + /* Your code here. */ + } + + extern "C" QUOTER_PRODUCER_EXEC_Export ::Components::EnterpriseComponent_ptr + create_Quoter_Producer_Impl (void) + { + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_NORETURN ( + retval, + Producer_exec_i); + + return retval; + } +} diff --git a/CIAO/connectors/ami4ccm/examples/Quoter/Producer/Quoter_Producer_exec.h b/CIAO/connectors/ami4ccm/examples/Quoter/Producer/Quoter_Producer_exec.h new file mode 100644 index 00000000000..12a62789845 --- /dev/null +++ b/CIAO/connectors/ami4ccm/examples/Quoter/Producer/Quoter_Producer_exec.h @@ -0,0 +1,152 @@ +// -*- C++ -*- +// $Id$ + +/** + * Code generated by the The ACE ORB (TAO) IDL Compiler v2.0.0 + * TAO and the TAO IDL Compiler have been developed by: + * Center for Distributed Object Computing + * Washington University + * St. Louis, MO + * USA + * http://www.cs.wustl.edu/~schmidt/doc-center.html + * and + * Distributed Object Computing Laboratory + * University of California at Irvine + * Irvine, CA + * USA + * and + * Institute for Software Integrated Systems + * Vanderbilt University + * Nashville, TN + * USA + * http://www.isis.vanderbilt.edu/ + * + * Information about TAO is available at: + * http://www.cs.wustl.edu/~schmidt/TAO.html + **/ +#ifndef CIAO_QUOTER_PRODUCER_EXEC_FI8FAR_H_ +#define CIAO_QUOTER_PRODUCER_EXEC_FI8FAR_H_ + +#include /**/ "ace/pre.h" + +#include "Quoter_ProducerEC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include /**/ "Quoter_Producer_exec_export.h" +#include "tao/LocalObject.h" + +namespace CIAO_Quoter_Producer_Impl +{ + + /** + * Provider Executor Implementation Class: my_quoter_exec_i + */ + + class my_quoter_exec_i + : public virtual ::Quoter::CCM_StockManager, + public virtual ::CORBA::LocalObject + { + public: + my_quoter_exec_i ( + ::Quoter::CCM_Producer_Context_ptr ctx); + virtual ~my_quoter_exec_i (void); + + /** @name Operations and attributes from Quoter::StockManager */ + //@{ + + virtual + char * stock_exchange_name (void); + + virtual + void stock_exchange_name (const char * stock_exchange_name); + + virtual + ::CORBA::Boolean add_stock (const char * symbol, + ::CORBA::Double quote); + + virtual + void edit_stock (const char * symbol, + ::CORBA::Double new_quote); + + virtual + void remove_stock (const char * symbol, + ::CORBA::Double_out quote); + + virtual + ::CORBA::Boolean find_closest_symbol (char *& symbol); + + virtual + ::CORBA::Double get_quote (const char * symbol); + //@} + + private: + ::Quoter::CCM_Producer_Context_var ciao_context_; + }; + + /** + * Component Executor Implementation Class: Producer_exec_i + */ + + class Producer_exec_i + : public virtual Producer_Exec, + public virtual ::CORBA::LocalObject + { + public: + Producer_exec_i (void); + virtual ~Producer_exec_i (void); + + /** @name Supported operations and attributes. */ + //@{ + + //@} + + /** @name Component attributes and port operations. */ + //@{ + + virtual ::Quoter::CCM_StockManager_ptr + get_my_quoter (void); + //@} + + /** @name Operations from Components::SessionComponent. */ + //@{ + virtual void set_session_context (::Components::SessionContext_ptr ctx); + virtual void configuration_complete (void); + virtual void ccm_activate (void); + virtual void ccm_passivate (void); + virtual void ccm_remove (void); + //@} + + /** @name User defined public operations. */ + //@{ + + //@} + + private: + ::Quoter::CCM_Producer_Context_var ciao_context_; + + /** @name Component attributes. */ + //@{ + ::Quoter::CCM_StockManager_var ciao_my_quoter_; + //@} + + /** @name User defined members. */ + //@{ + + //@} + + /** @name User defined private operations. */ + //@{ + + //@} + }; + + extern "C" QUOTER_PRODUCER_EXEC_Export ::Components::EnterpriseComponent_ptr + create_Quoter_Producer_Impl (void); +} + +#include /**/ "ace/post.h" + +#endif /* ifndef */ diff --git a/CIAO/connectors/ami4ccm/examples/Quoter/descriptors/Plan.cdp b/CIAO/connectors/ami4ccm/examples/Quoter/descriptors/Plan.cdp new file mode 100644 index 00000000000..ceda53f377e --- /dev/null +++ b/CIAO/connectors/ami4ccm/examples/Quoter/descriptors/Plan.cdp @@ -0,0 +1,374 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no" ?> +<!-- $Id$ --> +<Deployment:DeploymentPlan xmlns:Deployment="http://www.omg.org/Deployment" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd"> + + <UUID>6D382DAE-9024-4C4D-B91B-A0F9176AFACF</UUID> + + <implementation xmi:id="Quoter_ProducerHomeImplementation"> + <name>Quoter_ProducerHomeImplementation</name> + <source/> + <artifact xmi:idref="Quoter_Producer_ExecArtifact"/> + <artifact xmi:idref="Quoter_Producer_SvntArtifact"/> + <execParameter> + <name>component factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Quoter_Producer_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Quoter.ImplementationArtifacts.ProducerArtifacts.Producer_exec</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Quoter_Producer_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Quoter.ImplementationArtifacts.ProducerArtifacts.Producer_svnt</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="Quoter_ClientHomeImplementation"> + <name>Quoter_ClientHomeImplementation</name> + <source/> + <artifact xmi:idref="Quoter_Client_ExecArtifact"/> + <artifact xmi:idref="Quoter_Client_SvntArtifact"/> + <execParameter> + <name>component factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Quoter_Client_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Quoter.ImplementationArtifacts.ClientArtifacts.Client_exec</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Quoter_Client_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Quoter.ImplementationArtifacts.ClientArtifacts.Client_svnt</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="Quoter_AMIHomeImplementation"> + <name>Quoter_AMIHomeImplementation</name> + <source/> + <artifact xmi:idref="Quoter_AMI_ExecArtifact"/> + <artifact xmi:idref="Quoter_AMI_SvntArtifact"/> + <execParameter> + <name>component factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Quoter_AMI4CCM_StockManager_Connector_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Quoter.ImplementationArtifacts.AMIArtifacts.AMI_exec</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Quoter_AMI4CCM_StockManager_Connector_AMI4CCM_Connector_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Quoter.ImplementationArtifacts.AMIArtifacts.AMI_svnt</string> + </value> + </value> + </execParameter> + </implementation> + + <instance xmi:id="Quoter.ComponentImplementations.QuoterImplementation.Quoter.Producer"> + <name>Quoter.ComponentImplementations.QuoterImplementation.Quoter.Producer</name> + <node>Producer</node> + <source/> + <implementation xmi:idref="Quoter_ProducerHomeImplementation"/> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.InstanceIOR</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Producer.ior</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="Quoter.ComponentImplementations.QuoterImplementation.Quoter.Client"> + <name>Quoter.ComponentImplementations.QuoterImplementation.Quoter.Client</name> + <node>Client</node> + <source/> + <implementation xmi:idref="Quoter_ClientHomeImplementation"/> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.InstanceIOR</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Client.ior</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="Quoter.ComponentImplementations.QuoterImplementation.Quoter.AMI"> + <name>Quoter.ComponentImplementations.QuoterImplementation.Quoter.AMI</name> + <node>Client</node> + <source/> + <implementation xmi:idref="Quoter_AMIHomeImplementation"/> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.InstanceIOR</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>AMI.ior</string> + </value> + </value> + </configProperty> + </instance> + + <connection> + <name>run_asynch_quoter_connection</name> + <deployRequirement> + <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> + <resourceType>Local_Interface</resourceType> + </deployRequirement> + <internalEndpoint> + <portName>sendc_my_quoter</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="Quoter.ComponentImplementations.QuoterImplementation.Quoter.Client" /> + </internalEndpoint> + <internalEndpoint> + <portName>ami4ccm_port_ami4ccm_provides</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="Quoter.ComponentImplementations.QuoterImplementation.Quoter.AMI" /> + </internalEndpoint> + </connection> + + <connection> + <name>do_quoter_connection</name> + <internalEndpoint> + <portName>my_quoter</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="Quoter.ComponentImplementations.QuoterImplementation.Quoter.Producer" /> + </internalEndpoint> + <internalEndpoint> + <portName>ami4ccm_port_ami4ccm_uses</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="Quoter.ComponentImplementations.QuoterImplementation.Quoter.AMI" /> + </internalEndpoint> + </connection> + + <connection> + <name>synch_quoter_connection</name> + <internalEndpoint> + <portName>my_quoter</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="Quoter.ComponentImplementations.QuoterImplementation.Quoter.Producer" /> + </internalEndpoint> + <internalEndpoint> + <portName>my_quoter</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="Quoter.ComponentImplementations.QuoterImplementation.Quoter.Client" /> + </internalEndpoint> + </connection> + + <artifact xmi:id="Quoter_AMI_SvntArtifact"> + <name>Quoter.ImplementationArtifacts.AMIArtifacts.AMI_svnt</name> + <source/> + <node/> + <location>Quoter_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Quoter_AMI4CCM_StockManager_Connector_AMI4CCM_Connector_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact xmi:id="Quoter_AMI_ExecArtifact"> + <name>Quoter.ImplementationArtifacts.AMIArtifacts.AMI_exec</name> + <source/> + <node/> + <location>Quoter_conn</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Quoter_AMI4CCM_StockManager_Connector_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact xmi:id="Quoter_Producer_SvntArtifact"> + <name>Quoter.ImplementationArtifacts.ProducerArtifacts.Producer_svnt</name> + <source/> + <node/> + <location>Quoter_Producer_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Quoter_AMI_ProducerHome_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact xmi:id="Quoter_Producer_ExecArtifact"> + <name>Quoter.ImplementationArtifacts.ProducerArtifacts.Producer_exec</name> + <source/> + <node/> + <location>Quoter_Producer_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Quoter_AMI_ProducerHome_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact xmi:id="Quoter_Client_SvntArtifact"> + <name>Quoter.ImplementationArtifacts.ClientArtifacts.Client_svnt</name> + <source/> + <node/> + <location>Quoter_Client_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Quoter_AMI_ClientHome_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact xmi:id="Quoter_Client_ExecArtifact"> + <name>Quoter.ImplementationArtifacts.ClientArtifacts.Client_exec</name> + <source/> + <node/> + <location>Quoter_Client_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Quoter_AMI_ClientHome_Impl</string> + </value> + </value> + </execParameter> + </artifact> + +</Deployment:DeploymentPlan> diff --git a/CIAO/connectors/ami4ccm/examples/Quoter/descriptors/run_test.pl b/CIAO/connectors/ami4ccm/examples/Quoter/descriptors/run_test.pl new file mode 100755 index 00000000000..78861301560 --- /dev/null +++ b/CIAO/connectors/ami4ccm/examples/Quoter/descriptors/run_test.pl @@ -0,0 +1,244 @@ +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; + +$CIAO_ROOT = "$ENV{'CIAO_ROOT'}"; +$TAO_ROOT = "$ENV{'TAO_ROOT'}"; +$DANCE_ROOT = "$ENV{'DANCE_ROOT'}"; + +$daemons_running = 0; +$em_running = 0; +$ns_running = 0; + +$nr_daemon = 2; +@ports = ( 60000, 60001 ); +@iorbases = ( "Client.ior", "Producer.ior"); +@iorfiles = 0; +@nodenames = ( "Client", "Producer" ); + +# ior files other than daemon +$ior_nsbase = "ns.ior"; +$ior_nsfile = 0; +$ior_embase = "EM.ior"; +$ior_emfile = 0; + +# Processes +$E = 0; +$EM = 0; +$NS = 0; +@DEAMONS = 0; + +# targets +@tg_daemons = 0; +$tg_naming = 0; +$tg_exe_man = 0; +$tg_executor = 0; + +$status = 0; +$cdp_file = "Plan.cdp"; + +sub create_targets { + # naming service + $tg_naming = PerlACE::TestTarget::create_target (1) || die "Create target for ns failed\n"; + $tg_naming->AddLibPath ('../lib'); + # daemon + for ($i = 0; $i < $nr_daemon; ++$i) { + $tg_daemons[$i] = PerlACE::TestTarget::create_target ($i+1) || die "Create target for daemon $i failed\n"; + $tg_daemons[$i]->AddLibPath ('../lib'); + } + # execution manager + $tg_exe_man = PerlACE::TestTarget::create_target (1) || die "Create target for EM failed\n"; + $tg_exe_man->AddLibPath ('../lib'); + # executor (plan_launcher) + $tg_executor = PerlACE::TestTarget::create_target (1) || die "Create target for executor failed\n"; + $tg_executor->AddLibPath ('../lib'); +} + +sub init_ior_files { + $ior_nsfile = $tg_naming->LocalFile ($ior_nsbase); + $ior_emfile = $tg_exe_man->LocalFile ($ior_embase); + for ($i = 0; $i < $nr_daemon; ++$i) { + $iorfiles[$i] = $tg_daemons[$i]->LocalFile ($iorbases[$i]); + } + delete_ior_files (); +} + +# Delete if there are any .ior files. +sub delete_ior_files { + for ($i = 0; $i < $nr_daemon; ++$i) { + $tg_daemons[$i]->DeleteFile ($iorbases[$i]); + } + $tg_naming->DeleteFile ($ior_nsbase); + $tg_exe_man->DeleteFile ($ior_embase); + for ($i = 0; $i < $nr_daemon; ++$i) { + $iorfiles[$i] = $tg_daemons[$i]->LocalFile ($iorbases[$i]); + } +} + +sub kill_node_daemon { + for ($i = 0; $i < $nr_daemon; ++$i) { + $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1); + } +} + +sub kill_open_processes { + if ($daemons_running == 1) { + kill_node_daemon (); + } + + if ($em_running == 1) { + $EM->Kill (); $EM->TimedWait (1); + } + + if ($ns_running == 1) { + $NS->Kill (); $NS->TimedWait (1); + } + # in case shutdown did not perform as expected + $tg_executor->KillAll ('dance_locality_manager'); +} + +sub run_node_daemons { + for ($i = 0; $i < $nr_daemon; ++$i) { + $iorbase = $iorbases[$i]; + $iorfile = $iorfiles[$i]; + $port = $ports[$i]; + $nodename = $nodenames[$i]; + $iiop = "iiop://localhost:$port"; + $node_app = $tg_daemons[$i]->GetArchDir("$DANCE_ROOT/bin/") . "dance_locality_manager"; + + $d_cmd = "$DANCE_ROOT/bin/dance_node_manager"; + $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30 --domain-nc corbaloc:rir:/NameService"; + + print "Run dance_node_manager with $d_param\n"; + + $DEAMONS[$i] = $tg_daemons[$i]->CreateProcess ($d_cmd, $d_param); + $DEAMONS[$i]->Spawn (); + + if ($tg_daemons[$i]->WaitForFileTimed($iorbase, + $tg_daemons[$i]->ProcessStartWaitInterval ()) == -1) { + print STDERR + "ERROR: The ior $iorfile file of node daemon $i could not be found\n"; + for (; $i >= 0; --$i) { + $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1); + } + return -1; + } + } + return 0; +} + +create_targets (); +init_ior_files (); + +# Invoke naming service + +$NS = $tg_naming->CreateProcess ("$TAO_ROOT/orbsvcs/Naming_Service/tao_cosnaming", " -ORBEndpoint iiop://localhost:60003 -o $ior_nsfile"); + +print STDERR "Starting Naming Service with -ORBEndpoint iiop://localhost:60003 -o ns.ior\n"; + +$ns_status = $NS->Spawn (); + +if ($ns_status != 0) { + print STDERR "ERROR: Unable to execute the naming service\n"; + kill_open_processes (); + exit 1; +} + +if ($tg_naming->WaitForFileTimed ($ior_nsbase, + $tg_naming->ProcessStartWaitInterval ()) == -1) { + print STDERR "ERROR: cannot find naming service IOR file\n"; + $NS->Kill (); $NS->TimedWait (1); + exit 1; +} + +$ns_running = 1; +# Set up NamingService environment +$ENV{"NameServiceIOR"} = "corbaloc:iiop:localhost:60003/NameService"; + +# Invoke node daemon. +print "Invoking node daemon\n"; +$status = run_node_daemons (); + +if ($status != 0) { + print STDERR "ERROR: Unable to execute the node daemon\n"; + kill_open_processes (); + exit 1; +} + +$daemons_running = 1; + +# Invoke execution manager. +print "Invoking execution manager (dance_execution_manager.exe) with -e$ior_emfile\n"; +$EM = $tg_exe_man->CreateProcess ("$DANCE_ROOT/bin/dance_execution_manager", + "-e$ior_emfile --domain-nc corbaloc:rir:/NameService"); +$em_status = $EM->Spawn (); + +if ($em_status != 0) { + print STDERR "ERROR: dance_execution_manager returned $em_status"; + exit 1; +} + +if ($tg_exe_man->WaitForFileTimed ($ior_embase, + $tg_exe_man->ProcessStartWaitInterval ()) == -1) { + print STDERR + "ERROR: The ior file of execution manager could not be found\n"; + kill_open_processes (); + exit 1; +} + +$em_running = 1; + +# Invoke executor - start the application -. +print "Invoking executor - launch the application -\n"; + +print "Start dance_plan_launcher.exe with -x $cdp_file -k file://$ior_emfile\n"; +$E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher", + "-x $cdp_file -k file://$ior_emfile"); + +$pl_status = $E->SpawnWaitKill (2 * $tg_executor->ProcessStartWaitInterval ()); + +if ($pl_status != 0) { + print STDERR "ERROR: dance_plan_launcher returned $pl_status\n"; + kill_open_processes (); + exit 1; +} + +for ($i = 0; $i < $nr_daemon; ++$i) { + if ($tg_daemons[$i]->WaitForFileTimed ($iorbases[$i], + $tg_daemons[$i]->ProcessStopWaitInterval ()) == -1) { + print STDERR "ERROR: The ior file of daemon $i could not be found\n"; + kill_open_processes (); + exit 1; + } +} + +print "Sleeping 30 seconds to allow task to complete\n"; +sleep (30); + +# Invoke executor - stop the application -. +print "Invoking executor - stop the application -\n"; +print "by running dance_plan_launcher.exe with -k file://$ior_emfile -x $cdp_file\n"; + +$E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher", + "-k file://$ior_emfile -x $cdp_file -s"); +$pl_status = $E->SpawnWaitKill ($tg_executor->ProcessStartWaitInterval ()); + +if ($pl_status != 0) { + print STDERR "ERROR: dance_plan_launcher returned $pl_status\n"; + kill_open_processes (); + exit 1; +} + +print "Executor returned.\n"; +print "Shutting down rest of the processes.\n"; + +delete_ior_files (); +kill_open_processes (); + +exit $status; diff --git a/CIAO/connectors/ami4ccm/tests/NoConnection/Base/HelloT.idl b/CIAO/connectors/ami4ccm/tests/NoConnection/Base/HelloT.idl new file mode 100644 index 00000000000..c58b0556635 --- /dev/null +++ b/CIAO/connectors/ami4ccm/tests/NoConnection/Base/HelloT.idl @@ -0,0 +1,25 @@ +// $Id$ + +#ifndef HELLO_T_IDL +#define HELLO_T_IDL + +#pragma ciao lem "Base/HelloTE.idl" +#pragma ciao ami4ccm interface "HelloT::MyFoo" +#pragma ciao lem "Base/HelloTAE.idl" +#pragma ciao ami4ccm idl "Base/HelloTA.idl" + +module HelloT +{ + // Sender/Receiver interface + interface MyFoo + { + void hello (out string answer); + + attribute short rw_attrib; + + readonly attribute short ro_attrib; + }; +}; + +#endif + diff --git a/CIAO/connectors/ami4ccm/tests/NoConnection/Base/HelloT.mpc b/CIAO/connectors/ami4ccm/tests/NoConnection/Base/HelloT.mpc new file mode 100644 index 00000000000..5decdb9facd --- /dev/null +++ b/CIAO/connectors/ami4ccm/tests/NoConnection/Base/HelloT.mpc @@ -0,0 +1,196 @@ +// $Id$ + +project(AMI_HelloT_idl_gen) : componentidldefaults, ami, ami4ccm_stub { + custom_only = 1 + idlflags += -Wb,stub_export_macro=HELLO_T_STUB_Export \ + -Wb,stub_export_include=HelloT_stub_export.h \ + -Wb,skel_export_macro=HELLO_T_SKEL_Export \ + -Wb,skel_export_include=HelloT_skel_export.h \ + -Wb,conn_export_macro=HELLO_T_CONN_Export \ + -Wb,conn_export_include=HelloT_conn_export.h \ + -Wb,exec_export_macro=HELLO_T_EXEC_Export \ + -Wb,exec_export_include=HelloT_exec_export.h \ + -I.. -GM -Gxhcn + idlflags -= -Gsv + + IDL_Files { + HelloT.idl + } +} + +project(AMI_HelloT_lem_gen) : ciaoidldefaults { + after += AMI_HelloT_idl_gen AMI_HelloT_lema_gen + custom_only = 1 + idlflags += -Wb,export_macro=HELLO_T_LEM_STUB_Export \ + -Wb,export_include=HelloT_lem_stub_export.h \ + -I.. -SS -Gxhst + + IDL_Files { + HelloTE.idl + } +} + +project(AMI_HelloT_lema_gen) : ciaoidldefaults, typecode { + after += AMI_HelloT_idl_gen + custom_only = 1 + idlflags += -Wb,stub_export_macro=HELLO_T_STUB_Export \ + -Wb,stub_export_include=HelloT_stub_export.h \ + -Wb,conn_export_macro=HELLO_T_CONN_Export \ + -Wb,conn_export_include=HelloT_conn_export.h \ + -Wb,svnt_export_macro=HELLO_T_SVNT_Export \ + -Wb,svnt_export_include=HelloT_svnt_export.h \ + -Wb,skel_export_macro=HELLO_T_SKEL_Export \ + -Wb,skel_export_include=HelloT_skel_export.h \ + -I.. -Gsv -Gcn -Glem -GC -Gxhst -Gxhsv + + IDL_Files { + HelloTA.idl + } +} + +project(AMI_HelloT_lemae_gen) : ciaoidldefaults { + after += AMI_HelloT_lema_gen + custom_only = 1 + idlflags += -Wb,stub_export_macro=HELLO_T_LEM_STUB_Export \ + -Wb,stub_export_include=HelloT_lem_stub_export.h \ + -I.. -SS + + IDL_Files { + HelloTAE.idl + } +} + +project(AMI_HelloT_stub) : ccm_stub, ami, ami4ccm_stub { + after += AMI_HelloT_lem_gen + libs += + libout = ../lib + libpaths += ../lib + includes += .. + + sharedname = HelloT_stub + dynamicflags += HELLO_T_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + HelloTC.cpp + HelloTAC.cpp + } + + Header_Files { + HelloTC.h + HelloT_stub_export.h +} + + Inline_Files { + HelloTC.inl + } +} + +project(AMI_HelloT_lem_stub) : ccm_executor, ami, ami4ccm_lem_stub { + after += AMI_HelloT_lem_gen AMI_HelloT_stub AMI_HelloT_lemae_gen AMI_HelloT_skel + libs += HelloT_stub HelloT_skel + libout = ../lib + libpaths += ../lib + includes += .. + + sharedname = HelloT_lem_stub + dynamicflags += HELLO_T_LEM_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + HelloTEC.cpp + HelloTAEC.cpp + } + + Header_Files { + HelloTEC.h + HelloT_lem_stub_export.h +} + + Inline_Files { + HelloTEC.inl + } +} + +project(AMI_HelloT_skel) : ciao_executor, ami, ami4ccm_servant { + after += AMI_HelloT_stub + sharedname = HelloT_skel + libs += HelloT_stub + libout = ../lib + libpaths += ../lib + includes += .. + + dynamicflags += HELLO_T_SKEL_BUILD_DLL + + IDL_Files { + } + + Source_Files { + HelloTS.cpp + HelloTAS.cpp + } + + Header_Files { + HelloTS.h + + HelloT_skel_export.h + } + + Inline_Files { + HelloTS.inl + + } +} + +project(AMI_HelloT_conn) : ciao_executor, ami, ami4ccm_lem_stub { + after += AMI_HelloT_lem_stub HelloT_Base_AMI_stub AMI_HelloT_skel AMI_HelloT_lema_gen AMI_HelloT_lemae_gen + sharedname = HelloT_conn + libs += HelloT_stub HelloT_skel HelloT_lem_stub + libpaths += ../lib + libout = ../lib + dynamicflags += HELLO_T_CONN_BUILD_DLL + includes += .. + IDL_Files { + } + + Source_Files { + HelloTA_conn.cpp + } + + Header_Files { + HelloTA_conn.h + HelloT_conn_export.h + } + + Inline_Files { + } +} + +project(AMI_HelloT_svnt) : ciao_servant, ami, ami4ccm_servant { + after += AMI_HelloT_lem_stub HelloT_Base_AMI_stub AMI_HelloT_skel AMI_HelloT_lema_gen AMI_HelloT_lemae_gen AMI_HelloT_conn + sharedname = HelloT_svnt + libs += HelloT_stub HelloT_skel HelloT_lem_stub HelloT_conn + libpaths += ../lib + libout = ../lib + dynamicflags += HELLO_T_SVNT_BUILD_DLL + includes += .. + IDL_Files { + } + + Source_Files { + HelloTA_svnt.cpp + } + + Header_Files { + HelloTA_svnt.h + HelloTA_svnt_export.h + } + + Inline_Files { + } +} + diff --git a/CIAO/connectors/ami4ccm/tests/NoConnection/Receiver/HelloT_Receiver.idl b/CIAO/connectors/ami4ccm/tests/NoConnection/Receiver/HelloT_Receiver.idl new file mode 100644 index 00000000000..74f6e90f055 --- /dev/null +++ b/CIAO/connectors/ami4ccm/tests/NoConnection/Receiver/HelloT_Receiver.idl @@ -0,0 +1,18 @@ +// $Id$ + +#ifndef HELLO_T_RECEIVER_IDL +#define HELLO_T_RECEIVER_IDL + +#include <Components.idl> + +#include "Base/HelloT.idl" + +module HelloT +{ + component Receiver + { + /// Provides + provides MyFoo do_my_foo; + }; +}; +#endif diff --git a/CIAO/connectors/ami4ccm/tests/NoConnection/Receiver/HelloT_Receiver.mpc b/CIAO/connectors/ami4ccm/tests/NoConnection/Receiver/HelloT_Receiver.mpc new file mode 100644 index 00000000000..ee3155b11ad --- /dev/null +++ b/CIAO/connectors/ami4ccm/tests/NoConnection/Receiver/HelloT_Receiver.mpc @@ -0,0 +1,134 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl -p HelloT_Base HelloT_Receiver" + +project(AMI_HelloT_Base_Receiver_idl_gen) : componentidldefaults { + custom_only = 1 + after += AMI_HelloT_idl_gen + idlflags += -Wb,stub_export_macro=HELLO_T_RECEIVER_STUB_Export \ + -Wb,stub_export_include=HelloT_Receiver_stub_export.h \ + -Wb,skel_export_macro=HELLO_T_RECEIVER_SVNT_Export \ + -Wb,skel_export_include=HelloT_Receiver_svnt_export.h \ + -Wb,exec_export_macro=HELLO_T_RECEIVER_EXEC_Export \ + -Wb,exec_export_include=HelloT_Receiver_exec_export.h \ + -Glem -I.. + + IDL_Files { + HelloT_Receiver.idl + } +} + +project(AMI_HelloT_Base_Receiver_lem_gen) : ciaoidldefaults { + after += AMI_HelloT_Base_Receiver_idl_gen + custom_only = 1 + idlflags += -Wb,stub_export_macro=HELLO_T_RECEIVER_LEM_STUB_Export \ + -Wb,stub_export_include=HelloT_Receiver_lem_stub_export.h \ + -SS -Gxhst -I.. + + IDL_Files { + HelloT_ReceiverE.idl + } +} + +project(AMI_HelloT_Base_Receiver_l_stub) : ccm_svnt, messaging { + after += AMI_HelloT_Base_Receiver_lem_gen AMI_HelloT_Base_Receiver_stub AMI_HelloT_stub + libs += HelloT_stub HelloT_Receiver_stub + libpaths += ../lib + libout = ../lib + sharedname = HelloT_Receiver_lem_stub + dynamicflags += HELLO_T_RECEIVER_LEM_STUB_BUILD_DLL + includes += .. + IDL_Files { + } + + Source_Files { + HelloT_ReceiverEC.cpp + } + + Header_Files { + HelloT_ReceiverEC.h + HelloT_Receiver_lem_stub_export.h + } + + Inline_Files { + HelloT_ReceiverEC.inl + } +} + +project(AMI_HelloT_Base_Receiver_stub) : ccm_stub, messaging { + after += AMI_HelloT_Base_Receiver_idl_gen AMI_HelloT_stub + libs += HelloT_stub + libpaths += ../lib + libout = ../lib + sharedname = HelloT_Receiver_stub + dynamicflags += HELLO_T_RECEIVER_STUB_BUILD_DLL + includes += .. + IDL_Files { + } + + Source_Files { + HelloT_ReceiverC.cpp + } + + Header_Files { + HelloT_ReceiverC.h + HelloT_Receiver_stub_export.h + } + + Inline_Files { + HelloT_ReceiverC.inl + } +} + +project(AMI_HelloT_Base_Receiver_exec) : ciao_executor, messaging { + after += AMI_HelloT_Base_Receiver_l_stub AMI_HelloT_Base_Receiver_stub AMI_HelloT_stub AMI_HelloT_lem_stub + sharedname = HelloT_Receiver_exec + libs += HelloT_Receiver_stub HelloT_Receiver_lem_stub HelloT_stub HelloT_lem_stub + libpaths += ../lib + libout = ../lib + dynamicflags += HELLO_T_RECEIVER_EXEC_BUILD_DLL + includes += .. + IDL_Files { + } + + Source_Files { + HelloT_Receiver_exec.cpp + } + + Header_Files { + HelloT_Receiver_exec.h + HelloT_Receiver_exec_export.h + } + + Inline_Files { + } +} + +project(AMI_HelloT_Base_Receiver_svnt) : ciao_servant, messaging { + after += AMI_HelloT_Base_skel AMI_HelloT_Base_Receiver_l_stub AMI_HelloT_stub AMI_HelloT_skel AMI_HelloT_lem_stub + sharedname = HelloT_Receiver_svnt + libs += HelloT_Receiver_stub HelloT_Receiver_lem_stub \ + HelloT_skel \ + HelloT_stub HelloT_lem_stub + libpaths += ../lib + libout = ../lib + dynamicflags += HELLO_T_RECEIVER_SVNT_BUILD_DLL + includes += .. + IDL_Files { + } + + Source_Files { + HelloT_ReceiverS.cpp + HelloT_Receiver_svnt.cpp + } + + Header_Files { + HelloT_ReceiverS.h + HelloT_Receiver_svnt.h + HelloT_Receiver_svnt_export.h + } + + Inline_Files { + HelloT_ReceiverS.inl + } +} + diff --git a/CIAO/connectors/ami4ccm/tests/NoConnection/Receiver/HelloT_Receiver_exec.cpp b/CIAO/connectors/ami4ccm/tests/NoConnection/Receiver/HelloT_Receiver_exec.cpp new file mode 100644 index 00000000000..8d993797835 --- /dev/null +++ b/CIAO/connectors/ami4ccm/tests/NoConnection/Receiver/HelloT_Receiver_exec.cpp @@ -0,0 +1,162 @@ +// -*- C++ -*- +// $Id$ + +/** + * Code generated by the The ACE ORB (TAO) IDL Compiler v1.8.3 + * TAO and the TAO IDL Compiler have been developed by: + * Center for Distributed Object Computing + * Washington University + * St. Louis, MO + * USA + * http://www.cs.wustl.edu/~schmidt/doc-center.html + * and + * Distributed Object Computing Laboratory + * University of California at Irvine + * Irvine, CA + * USA + * and + * Institute for Software Integrated Systems + * Vanderbilt University + * Nashville, TN + * USA + * http://www.isis.vanderbilt.edu/ + * + * Information about TAO is available at: + * http://www.cs.wustl.edu/~schmidt/TAO.html + **/ + +#include "HelloT_Receiver_exec.h" +#include "ace/OS_NS_unistd.h" + +namespace CIAO_HelloT_Receiver_Impl +{ + + /** + * Facet Executor Implementation Class: do_my_foo_exec_i + */ + + do_my_foo_exec_i::do_my_foo_exec_i ( + ::HelloT::CCM_Receiver_Context_ptr ctx) + : ciao_context_ ( + ::HelloT::CCM_Receiver_Context::_duplicate (ctx)), + rw_attrib_ (-1) + { + } + + do_my_foo_exec_i::~do_my_foo_exec_i (void) + { + } + + // Operations from ::HelloT::MyFoo + + void + do_my_foo_exec_i::hello (::CORBA::String_out answer) + { + answer = CORBA::string_dup ("This is my answer : Hi"); + } + + ::CORBA::Short + do_my_foo_exec_i::rw_attrib (void) + { + return this->rw_attrib_; + } + + void + do_my_foo_exec_i::rw_attrib(::CORBA::Short new_value) + { + this->rw_attrib_ = new_value; + } + + ::CORBA::Short + do_my_foo_exec_i::ro_attrib (void) + { + return ACE_OS::rand () % 100; + } + + /** + * Component Executor Implementation Class: Receiver_exec_i + */ + + Receiver_exec_i::Receiver_exec_i (void){ + } + + Receiver_exec_i::~Receiver_exec_i (void) + { + } + + // Supported operations and attributes. + + // Component attributes and port operations. + + ::HelloT::CCM_MyFoo_ptr + Receiver_exec_i::get_do_my_foo (void) + { + if ( ::CORBA::is_nil (this->ciao_do_my_foo_.in ())) + { + do_my_foo_exec_i *tmp = 0; + ACE_NEW_RETURN ( + tmp, + do_my_foo_exec_i ( + this->ciao_context_.in ()), + ::HelloT::CCM_MyFoo::_nil ()); + + this->ciao_do_my_foo_ = tmp; + } + + return + ::HelloT::CCM_MyFoo::_duplicate ( + this->ciao_do_my_foo_.in ()); + } + + // Operations from Components::SessionComponent. + + void + Receiver_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx) + { + this->ciao_context_ = + ::HelloT::CCM_Receiver_Context::_narrow (ctx); + + if ( ::CORBA::is_nil (this->ciao_context_.in ())) + { + throw ::CORBA::INTERNAL (); + } + } + + void + Receiver_exec_i::configuration_complete (void) + { + /* Your code here. */ + } + + void + Receiver_exec_i::ccm_activate (void) + { + /* Your code here. */ + } + + void + Receiver_exec_i::ccm_passivate (void) + { + /* Your code here. */ + } + + void + Receiver_exec_i::ccm_remove (void) + { + /* Your code here. */ + } + + extern "C" ::Components::EnterpriseComponent_ptr + create_HelloT_Receiver_Impl (void) + { + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_NORETURN ( + retval, + Receiver_exec_i); + + return retval; + } +} diff --git a/CIAO/connectors/ami4ccm/tests/NoConnection/Receiver/HelloT_Receiver_exec.h b/CIAO/connectors/ami4ccm/tests/NoConnection/Receiver/HelloT_Receiver_exec.h new file mode 100644 index 00000000000..4813732da66 --- /dev/null +++ b/CIAO/connectors/ami4ccm/tests/NoConnection/Receiver/HelloT_Receiver_exec.h @@ -0,0 +1,134 @@ +// -*- C++ -*- +// $Id$ + +/** + * Code generated by the The ACE ORB (TAO) IDL Compiler v1.8.3 + * TAO and the TAO IDL Compiler have been developed by: + * Center for Distributed Object Computing + * Washington University + * St. Louis, MO + * USA + * http://www.cs.wustl.edu/~schmidt/doc-center.html + * and + * Distributed Object Computing Laboratory + * University of California at Irvine + * Irvine, CA + * USA + * and + * Institute for Software Integrated Systems + * Vanderbilt University + * Nashville, TN + * USA + * http://www.isis.vanderbilt.edu/ + * + * Information about TAO is available at: + * http://www.cs.wustl.edu/~schmidt/TAO.html + **/ +#ifndef CIAO_HELLOT_RECEIVER_EXEC_LMPZLZ_H_ +#define CIAO_HELLOT_RECEIVER_EXEC_LMPZLZ_H_ + +#include "HelloT_ReceiverEC.h" +#include "HelloT_Receiver_exec_export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/LocalObject.h" + +namespace CIAO_HelloT_Receiver_Impl +{ + + /** + * Provider Executor Implementation Class: do_my_foo_exec_i + */ + class do_my_foo_exec_i + : public virtual ::HelloT::CCM_MyFoo, + public virtual ::CORBA::LocalObject + { + public: + do_my_foo_exec_i ( + ::HelloT::CCM_Receiver_Context_ptr ctx); + virtual ~do_my_foo_exec_i (void); + + //@{ + /** Operations and attributes from HelloT::MyFoo. */ + + virtual + void hello (::CORBA::String_out answer); + + virtual + ::CORBA::Short rw_attrib (void); + + virtual + void rw_attrib (::CORBA::Short rw_attrib); + + virtual + ::CORBA::Short ro_attrib (void); + //@} + + private: + ::HelloT::CCM_Receiver_Context_var ciao_context_; + ::CORBA::Short rw_attrib_; + }; + + /** + * Component Executor Implementation Class: Receiver_exec_i + */ + + class Receiver_exec_i + : public virtual Receiver_Exec, + public virtual ::CORBA::LocalObject + { + public: + Receiver_exec_i (void); + virtual ~Receiver_exec_i (void); + + //@{ + /** Supported operations and attributes. */ + + //@} + + //@{ + /** Component attributes and port operations. */ + + virtual ::HelloT::CCM_MyFoo_ptr + get_do_my_foo (void); + //@} + + //@{ + /** Operations from Components::SessionComponent. */ + virtual void set_session_context (::Components::SessionContext_ptr ctx); + virtual void configuration_complete (void); + virtual void ccm_activate (void); + virtual void ccm_passivate (void); + virtual void ccm_remove (void); + //@} + + //@{ + /** User defined public operations. */ + + //@} + + private: + ::HelloT::CCM_Receiver_Context_var ciao_context_; + + //@{ + /** Component attributes. */ + ::HelloT::CCM_MyFoo_var ciao_do_my_foo_; + //@} + + //@{ + /** User defined members. */ + //@} + + //@{ + /** User defined private operations. */ + //@} + }; + + extern "C" HELLO_T_RECEIVER_EXEC_Export ::Components::EnterpriseComponent_ptr + create_HelloT_Receiver_Impl (void); +} + +#endif /* ifndef */ diff --git a/CIAO/connectors/ami4ccm/tests/NoConnection/Sender/HelloT_Sender.idl b/CIAO/connectors/ami4ccm/tests/NoConnection/Sender/HelloT_Sender.idl new file mode 100644 index 00000000000..5c8c6c37b11 --- /dev/null +++ b/CIAO/connectors/ami4ccm/tests/NoConnection/Sender/HelloT_Sender.idl @@ -0,0 +1,21 @@ +// $Id$ + +#ifndef HELLO_T_SENDER_IDL +#define HELLO_T_SENDER_IDL + +#include <Components.idl> + +#include "Base/HelloT.idl" + +#pragma ciao ami4ccm receptacle "HelloT::Sender::run_my_foo" + +module HelloT +{ + component Sender + { + /// For synchronous invocation + uses MyFoo run_my_foo; + }; +}; + +#endif diff --git a/CIAO/connectors/ami4ccm/tests/NoConnection/Sender/HelloT_Sender.mpc b/CIAO/connectors/ami4ccm/tests/NoConnection/Sender/HelloT_Sender.mpc new file mode 100644 index 00000000000..052a7eb741b --- /dev/null +++ b/CIAO/connectors/ami4ccm/tests/NoConnection/Sender/HelloT_Sender.mpc @@ -0,0 +1,135 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl -p HelloT_Base HelloT_Sender" + +project(AMI_HelloT_Base_Sender_idl_gen) : componentidldefaults { + after += AMI_HelloT_idl_gen + custom_only = 1 + idlflags += -Wb,stub_export_macro=HELLO_T_SENDER_STUB_Export \ + -Wb,stub_export_include=HelloT_Sender_stub_export.h \ + -Wb,skel_export_macro=HELLO_T_SENDER_SVNT_Export \ + -Wb,skel_export_include=HelloT_Sender_svnt_export.h \ + -Wb,exec_export_macro=HELLO_T_SENDER_EXEC_Export \ + -Wb,exec_export_include=HelloT_Sender_exec_export.h \ + -I.. -GC + + IDL_Files { + HelloT_Sender.idl + } +} + +project(AMI_HelloT_Base_Sender_lem_gen) : ciaoidldefaults { + after += AMI_HelloT_Base_Sender_idl_gen + custom_only = 1 + idlflags += -Wb,stub_export_macro=HELLO_T_SENDER_LEM_STUB_Export \ + -Wb,stub_export_include=HelloT_Sender_lem_stub_export.h \ + -SS -Gxhst -I.. + + IDL_Files { + HelloT_SenderE.idl + } +} + +project(AMI_HelloT_Base_Sender_lem_stub) : ccm_svnt, ami { + after += AMI_HelloT_Base_Sender_lem_gen AMI_HelloT_stub Conn_HelloT_Base_stub + libs += HelloT_stub + libpaths += ../lib + libout = ../lib + sharedname = HelloT_Sender_lem_stub + dynamicflags += HELLO_T_SENDER_LEM_STUB_BUILD_DLL + includes += .. + IDL_Files { + } + + Source_Files { + HelloT_SenderEC.cpp + } + + Header_Files { + HelloT_SenderEC.h + HelloT_Sender_lem_stub_export.h + } + + Inline_Files { + HelloT_SenderEC.inl + } +} + +project(AMI_HelloT_Base_Sender_stub) : ccm_stub, ami { + after += AMI_HelloT_Base_Sender_idl_gen AMI_HelloT_Base_stub AMI_HelloT_stub Conn_HelloT_Base_stub + libs += HelloT_stub + libpaths += ../lib + libout = ../lib + sharedname = HelloT_Sender_stub + dynamicflags += HELLO_T_SENDER_STUB_BUILD_DLL + includes += .. + IDL_Files { + } + + Source_Files { + HelloT_SenderC.cpp + } + + Header_Files { + HelloT_SenderC.h + HelloT_Sender_stub_export.h + } + + Inline_Files { + HelloT_SenderC.inl + } +} + +project(AMI_HelloT_Base_Sender_exec) : ciao_executor, ami, ami4ccm_stub { + after += AMI_HelloT_Base_Sender_lem_stub AMI_HelloT_Base_Sender_stub AMI_HelloT_Base_exec Conn_HelloT_Base_stub AMI_HelloT_lem_stub + sharedname = HelloT_Sender_exec + libs += HelloT_Sender_stub HelloT_Sender_lem_stub HelloT_stub HelloT_stub HelloT_lem_stub + libpaths += ../lib + libout = ../lib + dynamicflags += HELLO_T_SENDER_EXEC_BUILD_DLL + includes += .. + IDL_Files { + } + + Source_Files { + HelloT_Sender_exec.cpp + } + + Header_Files { + HelloT_Sender_exec.h + HelloT_Sender_exec_export.h + } + + Inline_Files { + } +} + +project(AMI_HelloT_Base_Sender_svnt) : ciao_servant, ami { + after += AMI_HelloT_Base_skel AMI_HelloT_Base_Sender_lem_stub AMI_HelloT_Base_Sender_stub AMI_HelloT_Base_exec AMI_HelloT_skel + sharedname = HelloT_Sender_svnt + libs += HelloT_Sender_stub HelloT_Sender_lem_stub \ + HelloT_skel \ + HelloT_stub + libpaths += ../lib + libout = ../lib + dynamicflags += HELLO_T_SENDER_SVNT_BUILD_DLL + includes += .. + IDL_Files { + } + + Source_Files { + HelloT_SenderS.cpp + HelloT_Sender_svnt.cpp + } + + Header_Files { + HelloT_SenderS.h + HelloT_Sender_svnt.h + HelloT_Sender_svnt_export.h + } + + Inline_Files { + HelloT_SenderS.inl + } +} + + diff --git a/CIAO/connectors/ami4ccm/tests/NoConnection/Sender/HelloT_Sender_exec.cpp b/CIAO/connectors/ami4ccm/tests/NoConnection/Sender/HelloT_Sender_exec.cpp new file mode 100644 index 00000000000..4f5d6fdfe95 --- /dev/null +++ b/CIAO/connectors/ami4ccm/tests/NoConnection/Sender/HelloT_Sender_exec.cpp @@ -0,0 +1,407 @@ +// -*- C++ -*- +// $Id$ + +/** + * Code generated by the The ACE ORB (TAO) IDL Compiler v1.8.3 + * TAO and the TAO IDL Compiler have been developed by: + * Center for Distributed Object Computing + * Washington University + * St. Louis, MO + * USA + * http://www.cs.wustl.edu/~schmidt/doc-center.html + * and + * Distributed Object Computing Laboratory + * University of California at Irvine + * Irvine, CA + * USA + * and + * Institute for Software Integrated Systems + * Vanderbilt University + * Nashville, TN + * USA + * http://www.isis.vanderbilt.edu/ + * + * Information about TAO is available at: + * http://www.cs.wustl.edu/~schmidt/TAO.html + **/ + +#include "HelloT_Sender_exec.h" +#include "ace/OS_NS_unistd.h" + +namespace CIAO_HelloT_Sender_Impl +{ + CORBA::Short nr_of_asyn_received = 0; + CORBA::Short nr_of_asyn_called = 0; + CORBA::Short nr_of_syn_failed = 0; + + /* + void HandleException ( + long id, + const char* error_string, + const char* test, + const char* func) + { + if (id != 42) + { + ACE_ERROR ((LM_ERROR, "ERROR Sender: unexpected ID received in except " + "handler <%u> <%C> (%C)\n", + id, error_string,func)); + return; + } + if (ACE_OS::strcmp (test, "thrown by receiver") != 0) + { + ACE_ERROR ((LM_ERROR, "ERROR Sender (%s): unexpected string received in" + " except handler <%s>\n", + func, test)); + return; + } + ACE_DEBUG ((LM_DEBUG, "Sender: Caught correct exception <%u," + "%C> for %C\n", + id, error_string, func)); + ++nr_of_received; + } + + void HandleException ( + ::CCM_AMI::ExceptionHolder_ptr excep_holder, + const char* func) + { + try + { + excep_holder->raise_exception (); + } + catch (const HelloT::InternalError& ex) + { + CIAO_HelloT_Sender_Impl::HandleException (ex.id, + ex.error_string.in (), + ex.test.in(), func); + } + catch (const CORBA::Exception& ex) + { + ex._tao_print_exception ("ERROR: Caught unexpected exception:"); + } + } + */ + + //============================================================ + // Worker thread for asynchronous invocations for MyFoo + //============================================================ + asynch_foo_generator::asynch_foo_generator ( + ::HelloT::CCM_Sender_Context_ptr context) + : context_(::HelloT::CCM_Sender_Context::_duplicate (context)) + { + } + + int asynch_foo_generator::svc () + { + ACE_OS::sleep (3); + ::HelloT::AMI4CCM_MyFoo_var my_foo_ami_ = + context_->get_connection_sendc_run_my_foo(); + + if (CORBA::is_nil (my_foo_ami_)) + { + ACE_ERROR ((LM_ERROR, "ERROR Sender (ASYNCH) :\tfoo_ami is NIL !\n")); + return 1; + } + else + { + ::HelloT::AMI4CCM_MyFooReplyHandler_var cb = + new AMI4CCM_MyFooReplyHandler_run_my_foo_i (); + + //Invoke Asynchronous calls + try + { + my_foo_ami_->sendc_hello (cb.in()); + ++nr_of_asyn_called; + } + catch (const CORBA::INV_OBJREF& ex) + { + if (ex.completed () != CORBA::COMPLETED_NO) + { + ex._tao_print_exception ("ERROR: Caught unexpected exception:"); + } + + // expected exception + } + try + { + my_foo_ami_->sendc_get_rw_attrib(cb.in()); + ++nr_of_asyn_called; + } + catch (const CORBA::INV_OBJREF& ex) + { + if (ex.completed () != CORBA::COMPLETED_NO) + { + ex._tao_print_exception ("ERROR: Caught unexpected exception:"); + } + + // expected exception + } + try + { + my_foo_ami_->sendc_get_ro_attrib(cb.in()); + ++nr_of_asyn_called; + } + catch (const CORBA::INV_OBJREF& ex) + { + if (ex.completed () != CORBA::COMPLETED_NO) + { + ex._tao_print_exception ("ERROR: Caught unexpected exception:"); + } + + // expected exception + } + try + { + my_foo_ami_->sendc_set_rw_attrib(cb.in(), 0); + ++nr_of_asyn_called; + } + catch (const CORBA::INV_OBJREF& ex) + { + if (ex.completed () != CORBA::COMPLETED_NO) + { + ex._tao_print_exception ("ERROR: Caught unexpected exception:"); + } + + // expected exception + } + } + return 0; + } + + //============================================================ + // Worker thread for synchronous invocations for MyFoo + //============================================================ + synch_foo_generator::synch_foo_generator ( + ::HelloT::CCM_Sender_Context_ptr context) + : context_(::HelloT::CCM_Sender_Context::_duplicate (context)) + { + } + + int synch_foo_generator::svc () + { + ACE_OS::sleep (3); + ::HelloT::MyFoo_var my_foo_ami_ = + context_->get_connection_run_my_foo (); + + if (CORBA::is_nil (my_foo_ami_)) + { + ACE_ERROR ((LM_ERROR, "ERROR - NO synchronous connection available.")); + return 0; + } + + CORBA::String_var out_str; + try + { + my_foo_ami_->hello (out_str.out ()); + } + catch (...) + { + ACE_ERROR ((LM_INFO, "Exception on sync call")); + ++nr_of_syn_failed; + } + try + { + my_foo_ami_->rw_attrib (); + } + catch (...) + { + ACE_ERROR ((LM_INFO, "Exception on sync call")); + ++nr_of_syn_failed; + } + try + { + my_foo_ami_->rw_attrib (0); + } + catch (...) + { + ACE_ERROR ((LM_INFO, "Exception on sync call")); + ++nr_of_syn_failed; + } + try + { + my_foo_ami_->ro_attrib (); + } + catch (...) + { + ACE_ERROR ((LM_INFO, "Exception on sync call")); + ++nr_of_syn_failed; + } + + return 0; + } + + /** + * Component Executor Implementation Class: Sender_exec_i + */ + + Sender_exec_i::Sender_exec_i (void){ + } + + Sender_exec_i::~Sender_exec_i (void) + { + } + + // Supported operations and attributes. + + // Component attributes and port operations. + + // Operations from Components::SessionComponent. + + void + Sender_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx) + { + this->ciao_context_ = + ::HelloT::CCM_Sender_Context::_narrow (ctx); + + if ( ::CORBA::is_nil (this->ciao_context_.in ())) + { + throw ::CORBA::INTERNAL (); + } + } + + void + Sender_exec_i::configuration_complete (void) + { + /* Your code here. */ + } + + void + Sender_exec_i::ccm_activate (void) + { + this->asynch_foo_gen = + new asynch_foo_generator (this->ciao_context_.in ()); + asynch_foo_gen->activate (THR_NEW_LWP | THR_JOINABLE, 1); + + this->synch_foo_gen = + new synch_foo_generator (this->ciao_context_.in ()); + synch_foo_gen->activate (THR_NEW_LWP | THR_JOINABLE, 1); + } + + void + Sender_exec_i::ccm_passivate (void) + { + /* Your code here. */ + } + + void + Sender_exec_i::ccm_remove (void) + { + if (nr_of_asyn_received > 0) + { + ACE_ERROR ((LM_ERROR, "ERROR: received unexpected asynchronous responses.\n")); + } + if (nr_of_asyn_called > 0) + { + ACE_ERROR ((LM_ERROR, "ERROR: unexpectedly succeeded calling asynchronously.\n")); + } + if (nr_of_syn_failed > 0) + { + ACE_ERROR ((LM_ERROR, "ERROR: unexpected failures calling synchronously.\n")); + } + + delete this->asynch_foo_gen; + this->asynch_foo_gen = 0; + delete this->synch_foo_gen; + this->synch_foo_gen = 0; + } + AMI4CCM_MyFooReplyHandler_run_my_foo_i::AMI4CCM_MyFooReplyHandler_run_my_foo_i (void) + { + } + + AMI4CCM_MyFooReplyHandler_run_my_foo_i::~AMI4CCM_MyFooReplyHandler_run_my_foo_i (void) + { + } + + void + AMI4CCM_MyFooReplyHandler_run_my_foo_i::hello ( + const char * /* answer */) + { + // never should come here in this test. + ACE_ERROR ((LM_ERROR, "ERROR: MyFoo_callback_exec_i::hello: " + "Unexpected return.\n")); + ++nr_of_asyn_received; + } + + void + AMI4CCM_MyFooReplyHandler_run_my_foo_i::hello_excep ( + ::CCM_AMI::ExceptionHolder_ptr /*excep_holder*/) + { + // never should come here in this test. + ACE_ERROR ((LM_ERROR, "ERROR: MyFoo_callback_exec_i::hello_excep: " + "Unexpected exception.\n")); + ++nr_of_asyn_received; + } + + void + AMI4CCM_MyFooReplyHandler_run_my_foo_i::get_rw_attrib ( + ::CORBA::Short /* rw_attrib */) + { + // never should come here in this test. + ACE_ERROR ((LM_ERROR, "ERROR: MyFoo_callback_exec_i::get_rw_attrib : " + "Unexpected return.\n")); + ++nr_of_asyn_received; + } + + void + AMI4CCM_MyFooReplyHandler_run_my_foo_i::get_rw_attrib_excep ( + ::CCM_AMI::ExceptionHolder_ptr /*excep_holder*/) + { + // never should come here in this test. + ACE_ERROR ((LM_ERROR, "ERROR: MyFoo_callback_exec_i::get_rw_attrib_excep: " + "Unexpected exception.\n")); + ++nr_of_asyn_received; + } + + void + AMI4CCM_MyFooReplyHandler_run_my_foo_i::set_rw_attrib (void) + { + // never should come here in this test. + ACE_ERROR ((LM_ERROR, "ERROR: MyFoo_callback_exec_i::set_rw_attrib: " + "Unexpected return.\n")); + ++nr_of_asyn_received; + } + + void + AMI4CCM_MyFooReplyHandler_run_my_foo_i::set_rw_attrib_excep ( + ::CCM_AMI::ExceptionHolder_ptr /*excep_holder*/) + { + // never should come here in this test. + ACE_ERROR ((LM_ERROR, "ERROR: MyFoo_callback_exec_i::set_rw_attrib_excep: " + "Unexpected exception.\n")); + ++nr_of_asyn_received; + } + + void + AMI4CCM_MyFooReplyHandler_run_my_foo_i::get_ro_attrib ( + ::CORBA::Short /* ro_attrib */) + { + // never should come here in this test. + ACE_ERROR ((LM_ERROR, "ERROR: MyFoo_callback_exec_i::get_ro_attrib: " + "Unexpected return.\n")); + ++nr_of_asyn_received; + } + + void + AMI4CCM_MyFooReplyHandler_run_my_foo_i::get_ro_attrib_excep ( + ::CCM_AMI::ExceptionHolder_ptr /*excep_holder*/) + { + // never should come here in this test. + ACE_ERROR ((LM_ERROR, "ERROR: MyFoo_callback_exec_i::get_ro_attrib_excep: " + "Unexpected exception.\n")); + ++nr_of_asyn_received; + } + + extern "C" HELLO_T_SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr + create_HelloT_Sender_Impl (void) + { + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_NORETURN ( + retval, + Sender_exec_i); + + return retval; + } +} diff --git a/CIAO/connectors/ami4ccm/tests/NoConnection/Sender/HelloT_Sender_exec.h b/CIAO/connectors/ami4ccm/tests/NoConnection/Sender/HelloT_Sender_exec.h new file mode 100644 index 00000000000..50d93587044 --- /dev/null +++ b/CIAO/connectors/ami4ccm/tests/NoConnection/Sender/HelloT_Sender_exec.h @@ -0,0 +1,169 @@ +// -*- C++ -*- +// $Id$ + +/** + * Code generated by the The ACE ORB (TAO) IDL Compiler v1.8.3 + * TAO and the TAO IDL Compiler have been developed by: + * Center for Distributed Object Computing + * Washington University + * St. Louis, MO + * USA + * http://www.cs.wustl.edu/~schmidt/doc-center.html + * and + * Distributed Object Computing Laboratory + * University of California at Irvine + * Irvine, CA + * USA + * and + * Institute for Software Integrated Systems + * Vanderbilt University + * Nashville, TN + * USA + * http://www.isis.vanderbilt.edu/ + * + * Information about TAO is available at: + * http://www.cs.wustl.edu/~schmidt/TAO.html + **/ +#ifndef CIAO_HELLOT_SENDER_EXEC_4QC1XJ_H_ +#define CIAO_HELLOT_SENDER_EXEC_4QC1XJ_H_ + +#include /**/ "ace/pre.h" + +#include "HelloT_SenderEC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include /**/ "HelloT_Sender_exec_export.h" +#include "tao/LocalObject.h" +#include "ace/Task.h" + +namespace CIAO_HelloT_Sender_Impl +{ + + /// Worker thread for asynchronous invocations + class asynch_foo_generator : public virtual ACE_Task_Base + { + public: + asynch_foo_generator (::HelloT::CCM_Sender_Context_ptr context); + + virtual int svc (void); + + private: + ::HelloT::CCM_Sender_Context_var context_; + }; + + /// Worker thread for synchronous invocations + class synch_foo_generator : public virtual ACE_Task_Base + { + public: + synch_foo_generator (::HelloT::CCM_Sender_Context_ptr context); + + virtual int svc (void); + + private: + ::HelloT::CCM_Sender_Context_var context_; + }; + /** + * Component Executor Implementation Class: Sender_exec_i + */ + + class Sender_exec_i + : public virtual Sender_Exec, + public virtual ::CORBA::LocalObject + { + public: + Sender_exec_i (void); + virtual ~Sender_exec_i (void); + + //@{ + /** Supported operations and attributes. */ + + //@} + + //@{ + /** Component attributes and port operations. */ + //@} + + //@{ + /** Operations from Components::SessionComponent. */ + virtual void set_session_context (::Components::SessionContext_ptr ctx); + virtual void configuration_complete (void); + virtual void ccm_activate (void); + virtual void ccm_passivate (void); + virtual void ccm_remove (void); + //@} + + //@{ + /** User defined public operations. */ + //@} + + private: + ::HelloT::CCM_Sender_Context_var ciao_context_; + asynch_foo_generator* asynch_foo_gen; + synch_foo_generator* synch_foo_gen; + + //@{ + /** Component attributes. */ + //@} + + //@{ + /** User defined members. */ + + //@} + + //@{ + /** User defined private operations. */ + + //@} + }; + + + class AMI4CCM_MyFooReplyHandler_run_my_foo_i + : public ::HelloT::CCM_AMI4CCM_MyFooReplyHandler, + public virtual ::CORBA::LocalObject + { + public: + AMI4CCM_MyFooReplyHandler_run_my_foo_i (void); + virtual ~AMI4CCM_MyFooReplyHandler_run_my_foo_i (void); + + virtual void + hello ( + const char * answer); + + virtual void + hello_excep ( + ::CCM_AMI::ExceptionHolder_ptr excep_holder); + + virtual void + get_rw_attrib ( + ::CORBA::Short rw_attrib); + + virtual void + get_rw_attrib_excep ( + ::CCM_AMI::ExceptionHolder_ptr excep_holder); + + virtual void + set_rw_attrib (void); + + virtual void + set_rw_attrib_excep ( + ::CCM_AMI::ExceptionHolder_ptr excep_holder); + + virtual void + get_ro_attrib ( + ::CORBA::Short ro_attrib); + + virtual void + get_ro_attrib_excep ( + ::CCM_AMI::ExceptionHolder_ptr excep_holder); + }; + + extern "C" HELLO_T_SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr + create_HelloT_Sender_Impl (void); + } + +#include /**/ "ace/post.h" + +#endif /* ifndef */ diff --git a/CIAO/connectors/ami4ccm/tests/NoConnection/descriptors/Plan.cdp b/CIAO/connectors/ami4ccm/tests/NoConnection/descriptors/Plan.cdp new file mode 100644 index 00000000000..198f18e4a8a --- /dev/null +++ b/CIAO/connectors/ami4ccm/tests/NoConnection/descriptors/Plan.cdp @@ -0,0 +1,376 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no" ?> +<!-- $Id$ --> +<Deployment:DeploymentPlan xmlns:Deployment="http://www.omg.org/Deployment" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd"> + + <UUID>6D382DAE-9024-4C4D-B91B-A0F9176AFACF</UUID> + + <implementation xmi:id="HelloT_ReceiverHomeImplementation"> + <name>HelloT_ReceiverHomeImplementation</name> + <source/> + <artifact xmi:idref="HelloT_Receiver_ExecArtifact"/> + <artifact xmi:idref="HelloT_Receiver_SvntArtifact"/> + <execParameter> + <name>component factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_HelloT_Receiver_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>HelloT.ImplementationArtifacts.ReceiverArtifacts.Receiver_exec</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_HelloT_Receiver_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>HelloT.ImplementationArtifacts.ReceiverArtifacts.Receiver_svnt</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="HelloT_SenderHomeImplementation"> + <name>HelloT_SenderHomeImplementation</name> + <source/> + <artifact xmi:idref="HelloT_Sender_ExecArtifact"/> + <artifact xmi:idref="HelloT_Sender_SvntArtifact"/> + <execParameter> + <name>component factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_HelloT_Sender_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>HelloT.ImplementationArtifacts.SenderArtifacts.Sender_exec</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_HelloT_Sender_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>HelloT.ImplementationArtifacts.SenderArtifacts.Sender_svnt</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="HelloT_AMIHomeImplementation"> + <name>HelloT_AMIHomeImplementation</name> + <source/> + <artifact xmi:idref="HelloT_AMI_ExecArtifact"/> + <artifact xmi:idref="HelloT_AMI_SvntArtifact"/> + <execParameter> + <name>component factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_HelloT_AMI4CCM_MyFoo_Connector_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>HelloT.ImplementationArtifacts.AMIArtifacts.AMI_exec</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_HelloT_AMI4CCM_MyFoo_Connector_AMI4CCM_Connector_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>HelloT.ImplementationArtifacts.AMIArtifacts.AMI_svnt</string> + </value> + </value> + </execParameter> + </implementation> + + <instance xmi:id="HelloT.ComponentImplementations.HelloTImplementation.HelloT.Receiver"> + <name>HelloT.ComponentImplementations.HelloTImplementation.HelloT.Receiver</name> + <node>Receiver</node> + <source/> + <implementation xmi:idref="HelloT_ReceiverHomeImplementation"/> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.InstanceIOR</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Receiver.ior</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="HelloT.ComponentImplementations.HelloTImplementation.HelloT.Sender"> + <name>HelloT.ComponentImplementations.HelloTImplementation.HelloT.Sender</name> + <node>Sender</node> + <source/> + <implementation xmi:idref="HelloT_SenderHomeImplementation"/> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.InstanceIOR</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Sender.ior</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="HelloT.ComponentImplementations.HelloTImplementation.HelloT.AMI"> + <name>HelloT.ComponentImplementations.HelloTImplementation.HelloT.AMI</name> + <node>Sender</node> + <source/> + <implementation xmi:idref="HelloT_AMIHomeImplementation"/> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.InstanceIOR</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>AMI.ior</string> + </value> + </value> + </configProperty> + </instance> + + <connection> + <name>run_asynch_foo_connection</name> + <deployRequirement> + <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> + <resourceType>Local_Interface</resourceType> + </deployRequirement> + <internalEndpoint> + <portName>sendc_run_my_foo</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="HelloT.ComponentImplementations.HelloTImplementation.HelloT.Sender" /> + </internalEndpoint> + <internalEndpoint> + <portName>ami4ccm_port_ami4ccm_provides</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="HelloT.ComponentImplementations.HelloTImplementation.HelloT.AMI" /> + </internalEndpoint> + </connection> + + <!-- THIS CONNECTION IS INTENTIONALLY COMMENTED OUT + <connection> + <name>do_foo_connection</name> + <internalEndpoint> + <portName>do_my_foo</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="HelloT.ComponentImplementations.HelloTImplementation.HelloT.Receiver" /> + </internalEndpoint> + <internalEndpoint> + <portName>ami4ccm_port_ami4ccm_uses</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="HelloT.ComponentImplementations.HelloTImplementation.HelloT.AMI" /> + </internalEndpoint> + </connection> + --> + + <connection> + <name>synch_foo_connection</name> + <internalEndpoint> + <portName>do_my_foo</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="HelloT.ComponentImplementations.HelloTImplementation.HelloT.Receiver" /> + </internalEndpoint> + <internalEndpoint> + <portName>run_my_foo</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="HelloT.ComponentImplementations.HelloTImplementation.HelloT.Sender" /> + </internalEndpoint> + </connection> + + <artifact xmi:id="HelloT_AMI_SvntArtifact"> + <name>HelloT.ImplementationArtifacts.AMIArtifacts.AMI_svnt</name> + <source/> + <node/> + <location>HelloT_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_HelloT_AMI4CCM_MyFoo_Connector_AMI4CCM_Connector_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact xmi:id="HelloT_AMI_ExecArtifact"> + <name>HelloT.ImplementationArtifacts.AMIArtifacts.AMI_exec</name> + <source/> + <node/> + <location>HelloT_conn</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_HelloT_AMI4CCM_MyFoo_Connector_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact xmi:id="HelloT_Receiver_SvntArtifact"> + <name>HelloT.ImplementationArtifacts.ReceiverArtifacts.Receiver_svnt</name> + <source/> + <node/> + <location>HelloT_Receiver_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_HelloT_AMI_ReceiverHome_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact xmi:id="HelloT_Receiver_ExecArtifact"> + <name>HelloT.ImplementationArtifacts.ReceiverArtifacts.Receiver_exec</name> + <source/> + <node/> + <location>HelloT_Receiver_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_HelloT_AMI_ReceiverHome_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact xmi:id="HelloT_Sender_SvntArtifact"> + <name>HelloT.ImplementationArtifacts.SenderArtifacts.Sender_svnt</name> + <source/> + <node/> + <location>HelloT_Sender_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_HelloT_AMI_SenderHome_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact xmi:id="HelloT_Sender_ExecArtifact"> + <name>HelloT.ImplementationArtifacts.SenderArtifacts.Sender_exec</name> + <source/> + <node/> + <location>HelloT_Sender_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_HelloT_AMI_SenderHome_Impl</string> + </value> + </value> + </execParameter> + </artifact> + +</Deployment:DeploymentPlan> diff --git a/CIAO/connectors/ami4ccm/tests/NoConnection/descriptors/run_test.pl b/CIAO/connectors/ami4ccm/tests/NoConnection/descriptors/run_test.pl new file mode 100755 index 00000000000..f5937b6527f --- /dev/null +++ b/CIAO/connectors/ami4ccm/tests/NoConnection/descriptors/run_test.pl @@ -0,0 +1,244 @@ +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; + +$CIAO_ROOT = "$ENV{'CIAO_ROOT'}"; +$TAO_ROOT = "$ENV{'TAO_ROOT'}"; +$DANCE_ROOT = "$ENV{'DANCE_ROOT'}"; + +$daemons_running = 0; +$em_running = 0; +$ns_running = 0; + +$nr_daemon = 3; +@ports = ( 60000, 60001 ); +@iorbases = ( "Sender.ior", "Receiver.ior", "AMI.ior" ); +@iorfiles = 0; +@nodenames = ( "Sender", "Receiver" ); + +# ior files other than daemon +$ior_nsbase = "ns.ior"; +$ior_nsfile = 0; +$ior_embase = "EM.ior"; +$ior_emfile = 0; + +# Processes +$E = 0; +$EM = 0; +$NS = 0; +@DEAMONS = 0; + +# targets +@tg_daemons = 0; +$tg_naming = 0; +$tg_exe_man = 0; +$tg_executor = 0; + +$status = 0; +$cdp_file = "Plan.cdp"; + +sub create_targets { + # naming service + $tg_naming = PerlACE::TestTarget::create_target (1) || die "Create target for ns failed\n"; + $tg_naming->AddLibPath ('../lib'); + # daemon + for ($i = 0; $i < $nr_daemon; ++$i) { + $tg_daemons[$i] = PerlACE::TestTarget::create_target ($i+1) || die "Create target for daemon $i failed\n"; + $tg_daemons[$i]->AddLibPath ('../lib'); + } + # execution manager + $tg_exe_man = PerlACE::TestTarget::create_target (1) || die "Create target for EM failed\n"; + $tg_exe_man->AddLibPath ('../lib'); + # executor (plan_launcher) + $tg_executor = PerlACE::TestTarget::create_target (1) || die "Create target for executor failed\n"; + $tg_executor->AddLibPath ('../lib'); +} + +sub init_ior_files { + $ior_nsfile = $tg_naming->LocalFile ($ior_nsbase); + $ior_emfile = $tg_exe_man->LocalFile ($ior_embase); + for ($i = 0; $i < $nr_daemon; ++$i) { + $iorfiles[$i] = $tg_daemons[$i]->LocalFile ($iorbases[$i]); + } + delete_ior_files (); +} + +# Delete if there are any .ior files. +sub delete_ior_files { + for ($i = 0; $i < $nr_daemon; ++$i) { + $tg_daemons[$i]->DeleteFile ($iorbases[$i]); + } + $tg_naming->DeleteFile ($ior_nsbase); + $tg_exe_man->DeleteFile ($ior_embase); + for ($i = 0; $i < $nr_daemon; ++$i) { + $iorfiles[$i] = $tg_daemons[$i]->LocalFile ($iorbases[$i]); + } +} + +sub kill_node_daemon { + for ($i = 0; $i < $nr_daemon; ++$i) { + $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1); + } +} + +sub kill_open_processes { + if ($daemons_running == 1) { + kill_node_daemon (); + } + + if ($em_running == 1) { + $EM->Kill (); $EM->TimedWait (1); + } + + if ($ns_running == 1) { + $NS->Kill (); $NS->TimedWait (1); + } + # in case shutdown did not perform as expected + $tg_executor->KillAll ('dance_locality_manager'); +} + +sub run_node_daemons { + for ($i = 0; $i < $nr_daemon; ++$i) { + $iorbase = $iorbases[$i]; + $iorfile = $iorfiles[$i]; + $port = $ports[$i]; + $nodename = $nodenames[$i]; + $iiop = "iiop://localhost:$port"; + $node_app = $tg_daemons[$i]->GetArchDir("$DANCE_ROOT/bin/") . "dance_locality_manager"; + + $d_cmd = "$DANCE_ROOT/bin/dance_node_manager"; + $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30 --domain-nc corbaloc:rir:/NameService"; + + print "Run dance_node_manager with $d_param\n"; + + $DEAMONS[$i] = $tg_daemons[$i]->CreateProcess ($d_cmd, $d_param); + $DEAMONS[$i]->Spawn (); + + if ($tg_daemons[$i]->WaitForFileTimed($iorbase, + $tg_daemons[$i]->ProcessStartWaitInterval ()) == -1) { + print STDERR + "ERROR: The ior $iorfile file of node daemon $i could not be found\n"; + for (; $i >= 0; --$i) { + $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1); + } + return -1; + } + } + return 0; +} + +create_targets (); +init_ior_files (); + +# Invoke naming service + +$NS = $tg_naming->CreateProcess ("$TAO_ROOT/orbsvcs/Naming_Service/tao_cosnaming", " -ORBEndpoint iiop://localhost:60003 -o $ior_nsfile"); + +print STDERR "Starting Naming Service with -ORBEndpoint iiop://localhost:60003 -o ns.ior\n"; + +$ns_status = $NS->Spawn (); + +if ($ns_status != 0) { + print STDERR "ERROR: Unable to execute the naming service\n"; + kill_open_processes (); + exit 1; +} + +if ($tg_naming->WaitForFileTimed ($ior_nsbase, + $tg_naming->ProcessStartWaitInterval ()) == -1) { + print STDERR "ERROR: cannot find naming service IOR file\n"; + $NS->Kill (); $NS->TimedWait (1); + exit 1; +} + +$ns_running = 1; +# Set up NamingService environment +$ENV{"NameServiceIOR"} = "corbaloc:iiop:localhost:60003/NameService"; + +# Invoke node daemon. +print "Invoking node daemon\n"; +$status = run_node_daemons (); + +if ($status != 0) { + print STDERR "ERROR: Unable to execute the node daemon\n"; + kill_open_processes (); + exit 1; +} + +$daemons_running = 1; + +# Invoke execution manager. +print "Invoking execution manager (dance_execution_manager.exe) with -e$ior_emfile\n"; +$EM = $tg_exe_man->CreateProcess ("$DANCE_ROOT/bin/dance_execution_manager", + "-e$ior_emfile --domain-nc corbaloc:rir:/NameService"); +$em_status = $EM->Spawn (); + +if ($em_status != 0) { + print STDERR "ERROR: dance_execution_manager returned $em_status"; + exit 1; +} + +if ($tg_exe_man->WaitForFileTimed ($ior_embase, + $tg_exe_man->ProcessStartWaitInterval ()) == -1) { + print STDERR + "ERROR: The ior file of execution manager could not be found\n"; + kill_open_processes (); + exit 1; +} + +$em_running = 1; + +# Invoke executor - start the application -. +print "Invoking executor - launch the application -\n"; + +print "Start dance_plan_launcher.exe with -x $cdp_file -k file://$ior_emfile\n"; +$E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher", + "-x $cdp_file -k file://$ior_emfile"); + +$pl_status = $E->SpawnWaitKill ($tg_executor->ProcessStartWaitInterval ()); + +if ($pl_status != 0) { + print STDERR "ERROR: dance_plan_launcher returned $pl_status\n"; + kill_open_processes (); + exit 1; +} + +for ($i = 0; $i < $nr_daemon; ++$i) { + if ($tg_daemons[$i]->WaitForFileTimed ($iorbases[$i], + $tg_daemons[$i]->ProcessStopWaitInterval ()) == -1) { + print STDERR "ERROR: The ior file of daemon $i could not be found\n"; + kill_open_processes (); + exit 1; + } +} + +print "Sleeping 20 seconds to allow task to complete\n"; +sleep (20); + +# Invoke executor - stop the application -. +print "Invoking executor - stop the application -\n"; +print "by running dance_plan_launcher.exe with -k file://$ior_emfile -x $cdp_file\n"; + +$E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher", + "-k file://$ior_emfile -x $cdp_file -s"); +$pl_status = $E->SpawnWaitKill ($tg_executor->ProcessStartWaitInterval ()); + +if ($pl_status != 0) { + print STDERR "ERROR: dance_plan_launcher returned $pl_status\n"; + kill_open_processes (); + exit 1; +} + +print "Executor returned.\n"; +print "Shutting down rest of the processes.\n"; + +delete_ior_files (); +kill_open_processes (); + +exit $status; diff --git a/CIAO/connectors/dds4ccm/examples/IDL2CPPWrapper/Shapes/Receiver/I2C_Shapes_Receiver.cpp b/CIAO/connectors/dds4ccm/examples/IDL2CPPWrapper/Shapes/Receiver/I2C_Shapes_Receiver.cpp index 5eb637a19fd..9aa1a847026 100755 --- a/CIAO/connectors/dds4ccm/examples/IDL2CPPWrapper/Shapes/Receiver/I2C_Shapes_Receiver.cpp +++ b/CIAO/connectors/dds4ccm/examples/IDL2CPPWrapper/Shapes/Receiver/I2C_Shapes_Receiver.cpp @@ -76,6 +76,11 @@ int ACE_TMAIN (int , ACE_TCHAR *[]) 0); TypedDataReader::_var_type shapes_dr = TypedDataReader::_narrow (dr.in ()); + if (shapes_dr->enable () != DDS_RETCODE_OK) + { + ACE_ERROR ((LM_ERROR, "ACE_TMAIN - Unable to enable the datareader.\n")); + throw ::CORBA::INTERNAL (); + } read (shapes_dr.in ()); } catch (::CORBA::Exception &e) diff --git a/CIAO/connectors/dds4ccm/examples/IDL2CPPWrapper/Shapes/Sender/I2C_Shapes_Sender.cpp b/CIAO/connectors/dds4ccm/examples/IDL2CPPWrapper/Shapes/Sender/I2C_Shapes_Sender.cpp index d849a80f1bb..5f561bd96e8 100755 --- a/CIAO/connectors/dds4ccm/examples/IDL2CPPWrapper/Shapes/Sender/I2C_Shapes_Sender.cpp +++ b/CIAO/connectors/dds4ccm/examples/IDL2CPPWrapper/Shapes/Sender/I2C_Shapes_Sender.cpp @@ -82,6 +82,11 @@ int ACE_TMAIN (int , ACE_TCHAR *[]) 0); TypedDataWriter::_var_type shapes_dw = TypedDataWriter::_narrow (dw.in ()); + if (shapes_dw->enable () != DDS_RETCODE_OK) + { + ACE_ERROR ((LM_ERROR, "ACE_TMAIN - Unable to enable the datawriter.\n")); + throw ::CORBA::INTERNAL (); + } write (shapes_dw); } catch (::CORBA::Exception &e) diff --git a/CIAO/connectors/dds4ccm/examples/Large_Deployment/descriptors/generate_large_plan.py b/CIAO/connectors/dds4ccm/examples/Large_Deployment/descriptors/generate_large_plan.py index 5cb30f832ff..3ba5dfb0703 100755 --- a/CIAO/connectors/dds4ccm/examples/Large_Deployment/descriptors/generate_large_plan.py +++ b/CIAO/connectors/dds4ccm/examples/Large_Deployment/descriptors/generate_large_plan.py @@ -1,4 +1,5 @@ #!/usr/bin/python +#$Id$ import sys, os, math sys.path.append (os.getenv ("DANCE_ROOT") + "/bin") diff --git a/CIAO/connectors/dds4ccm/impl/DDS_Base_Connector_T.cpp b/CIAO/connectors/dds4ccm/impl/DDS_Base_Connector_T.cpp index 10bae4190eb..453bdba18a2 100644 --- a/CIAO/connectors/dds4ccm/impl/DDS_Base_Connector_T.cpp +++ b/CIAO/connectors/dds4ccm/impl/DDS_Base_Connector_T.cpp @@ -199,6 +199,7 @@ DDS_Base_Connector_T<CCM_TYPE>::reactor (void) ACE_Reactor* reactor = 0; +#if (CIAO_DDS4CCM_CONTEXT_SWITCH == 1) ::CORBA::Object_var ccm_object = this->context_->get_CCM_object(); if (!::CORBA::is_nil (ccm_object.in ())) { @@ -206,9 +207,16 @@ DDS_Base_Connector_T<CCM_TYPE>::reactor (void) if (!::CORBA::is_nil (orb.in ())) { reactor = orb->orb_core ()->reactor (); + if (!reactor) + { + DDS4CCM_ERROR (DDS4CCM_LOG_LEVEL_ERROR, (LM_ERROR, DDS4CCM_INFO + "DDS_Event_Connector_T::ccm_activate - " + "No reactor to perform required context switch.\n")); + throw ::CORBA::INTERNAL (); + } } } - +#endif return reactor; } diff --git a/CIAO/connectors/dds4ccm/impl/DDS_Event_Connector_T.cpp b/CIAO/connectors/dds4ccm/impl/DDS_Event_Connector_T.cpp index 673079c1f32..e73d79acfe9 100644 --- a/CIAO/connectors/dds4ccm/impl/DDS_Event_Connector_T.cpp +++ b/CIAO/connectors/dds4ccm/impl/DDS_Event_Connector_T.cpp @@ -311,21 +311,9 @@ template <typename CCM_TYPE, typename DDS_TYPE, bool FIXED, typename SEQ_TYPE> void DDS_Event_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::do_ccm_activate (void) { - ACE_Reactor* reactor = 0; + ACE_Reactor *reactor = this->reactor (); -#if (CIAO_DDS4CCM_CONTEXT_SWITCH == 1) - reactor = this->reactor (); - - if (!reactor) - { - DDS4CCM_ERROR (DDS4CCM_LOG_LEVEL_ERROR, (LM_ERROR, DDS4CCM_INFO - "DDS_Event_Connector_T::ccm_activate - " - "No reactor to perform required context switch.\n")); - throw ::CORBA::INTERNAL (); - } -#endif - - TopicBaseConnector::ccm_activate (reactor); + TopicBaseConnector::ccm_activate (); if (this->push_consumer_obtained_) { diff --git a/CIAO/connectors/dds4ccm/impl/DDS_Listen_T.cpp b/CIAO/connectors/dds4ccm/impl/DDS_Listen_T.cpp index bf6fee61f0d..d6b6fb93c6f 100644 --- a/CIAO/connectors/dds4ccm/impl/DDS_Listen_T.cpp +++ b/CIAO/connectors/dds4ccm/impl/DDS_Listen_T.cpp @@ -34,8 +34,7 @@ DDS_Listen_T<CCM_TYPE, TYPED_DDS_READER, VALUE_TYPE, SEQ_VALUE_TYPE>::activate ( DDS4CCM_TRACE ("DDS_Listen_T<CCM_TYPE, TYPED_DDS_READER, VALUE_TYPE, SEQ_VALUE_TYPE>::activate"); ::DDS::StatusMask const mask = - DataReaderListener_type::get_mask (listener, - status); + DataReaderListener_type::get_mask (listener, status); if (mask != 0) { diff --git a/CIAO/connectors/dds4ccm/impl/DDS_State_Connector_T.cpp b/CIAO/connectors/dds4ccm/impl/DDS_State_Connector_T.cpp index 439edbab8e7..11dc771745b 100644 --- a/CIAO/connectors/dds4ccm/impl/DDS_State_Connector_T.cpp +++ b/CIAO/connectors/dds4ccm/impl/DDS_State_Connector_T.cpp @@ -418,21 +418,9 @@ DDS_State_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::do_ccm_activate (voi { DDS4CCM_TRACE ("DDS_State_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::do_ccm_activate"); - ACE_Reactor* reactor = 0; + ACE_Reactor *reactor = this->reactor (); -#if (CIAO_DDS4CCM_CONTEXT_SWITCH == 1) - reactor = this->reactor (); - - if (!reactor) - { - DDS4CCM_ERROR (DDS4CCM_LOG_LEVEL_ERROR, (LM_ERROR, DDS4CCM_INFO - "DDS_State_Connector_T::ccm_activate - " - "No reactor to perform required context switch.\n")); - throw ::CORBA::INTERNAL (); - } -#endif - - TopicBaseConnector::ccm_activate (reactor); + TopicBaseConnector::ccm_activate (); if (this->observable_obtained_) { diff --git a/CIAO/connectors/dds4ccm/impl/DDS_Subscriber_Base_T.cpp b/CIAO/connectors/dds4ccm/impl/DDS_Subscriber_Base_T.cpp index 47a6470f9b0..ada89637629 100644 --- a/CIAO/connectors/dds4ccm/impl/DDS_Subscriber_Base_T.cpp +++ b/CIAO/connectors/dds4ccm/impl/DDS_Subscriber_Base_T.cpp @@ -73,6 +73,16 @@ DDS_Subscriber_Base_T<CCM_TYPE, TYPED_DDS_READER, VALUE_TYPE, SEQ_VALUE_TYPE>::c ::DDS::DataReaderListener::_nil (), 0); } + ::DDS::ReturnCode_t retcode = dr->enable (); + if (retcode != ::DDS::RETCODE_OK) + { + DDS4CCM_ERROR (DDS4CCM_LOG_LEVEL_ERROR, (LM_ERROR, DDS4CCM_INFO + "DDS_Subscriber_Base_T::configuration_complete - " + "Error: Unable to enable the datareader: <%C>.\n", + ::CIAO::DDS4CCM::translate_retcode (retcode))); + throw ::CORBA::INTERNAL (); + } + this->condition_manager_.set_dds_entity (dr.in ()); this->dds_read_->set_dds_reader (dr.in (), &this->condition_manager_); diff --git a/CIAO/connectors/dds4ccm/impl/DDS_TopicBase_Connector_T.cpp b/CIAO/connectors/dds4ccm/impl/DDS_TopicBase_Connector_T.cpp index 9c5c635162e..adb28831efb 100644 --- a/CIAO/connectors/dds4ccm/impl/DDS_TopicBase_Connector_T.cpp +++ b/CIAO/connectors/dds4ccm/impl/DDS_TopicBase_Connector_T.cpp @@ -45,6 +45,9 @@ DDS_TopicBase_Connector_T<CCM_TYPE, DDS_TYPE, SEQ_TYPE>::late_binded ( ACE_OS::strlen (topic_name) > 0 && ACE_OS::strlen (this->topic_name_.in ()) == 0) { + DDS4CCM_DEBUG (DDS4CCM_LOG_LEVEL_ACTION, (LM_DEBUG, DDS4CCM_INFO + ACE_TEXT ("DDS_TopicBase_Connector_T::late_binded - ") + ACE_TEXT ("Topic %C is late binded.\n"), topic_name)); DDS_TopicBase_Connector_T::topic_name (topic_name); return true; } @@ -54,6 +57,9 @@ DDS_TopicBase_Connector_T<CCM_TYPE, DDS_TYPE, SEQ_TYPE>::late_binded ( } else { + DDS4CCM_DEBUG (DDS4CCM_LOG_LEVEL_ACTION, (LM_DEBUG, DDS4CCM_INFO + ACE_TEXT ("DDS_TopicBase_Connector_T::late_binded - ") + ACE_TEXT ("Topic %C is not late binded.\n"), topic_name)); DDS_TopicBase_Connector_T::topic_name (topic_name); } return false; @@ -85,11 +91,12 @@ DDS_TopicBase_Connector_T<CCM_TYPE, DDS_TYPE, SEQ_TYPE>::configuration_complete template <typename CCM_TYPE, typename DDS_TYPE, typename SEQ_TYPE> void -DDS_TopicBase_Connector_T<CCM_TYPE, DDS_TYPE, SEQ_TYPE>::ccm_activate (ACE_Reactor* reactor) +DDS_TopicBase_Connector_T<CCM_TYPE, DDS_TYPE, SEQ_TYPE>::ccm_activate (void) { DDS4CCM_TRACE ("DDS_TopicBase_Connector_T<CCM_TYPE, DDS_TYPE, SEQ_TYPE>::ccm_activate"); BaseConnector::ccm_activate (); + ACE_Reactor *reactor = this->reactor (); this->activate_topic (reactor, this->topic_.in (), this->topiclistener_.inout ()); diff --git a/CIAO/connectors/dds4ccm/impl/DDS_TopicBase_Connector_T.h b/CIAO/connectors/dds4ccm/impl/DDS_TopicBase_Connector_T.h index 9290072fc33..4f19fef2734 100644 --- a/CIAO/connectors/dds4ccm/impl/DDS_TopicBase_Connector_T.h +++ b/CIAO/connectors/dds4ccm/impl/DDS_TopicBase_Connector_T.h @@ -29,14 +29,14 @@ public: virtual void key_fields (const ::DDS::StringSeq & key_fields); virtual void configuration_complete (void); - virtual void ccm_activate (ACE_Reactor* reactor); + virtual void ccm_activate (void); virtual void ccm_passivate (void); virtual void ccm_remove (void); virtual void register_type (::DDS::DomainParticipant_ptr participant, - const char * typesupport_name); - virtual - void unregister_type (::DDS::DomainParticipant_ptr participant, const char * typesupport_name); + virtual + void unregister_type (::DDS::DomainParticipant_ptr participant, + const char * typesupport_name); protected: diff --git a/CIAO/connectors/dds4ccm/impl/DDS_Update_T.cpp b/CIAO/connectors/dds4ccm/impl/DDS_Update_T.cpp index ca3931628b5..cafe06a9379 100644 --- a/CIAO/connectors/dds4ccm/impl/DDS_Update_T.cpp +++ b/CIAO/connectors/dds4ccm/impl/DDS_Update_T.cpp @@ -56,7 +56,16 @@ DDS_Update_T<CCM_TYPE, TYPED_WRITER, VALUE_TYPE, SEQ_VALUE_TYPE>::configuration_ DDS4CCM_ERROR (DDS4CCM_LOG_LEVEL_DDS_NIL_RETURN, (LM_ERROR, DDS4CCM_INFO "DDS_Update_T::configuration_complete - " "Error: Proxy returned a nil datawriter.\n")); - throw ::CCM_DDS::InternalError (::DDS::RETCODE_ERROR, 0); + throw ::CORBA::INTERNAL (); + } + ::DDS::ReturnCode_t retcode = dwv_tmp->enable (); + if (retcode != ::DDS::RETCODE_OK) + { + DDS4CCM_ERROR (DDS4CCM_LOG_LEVEL_ERROR, (LM_ERROR, DDS4CCM_INFO + "DDS_Update_T::configuration_complete - " + "Error: Unable to enable the datawriter: <%C>\n", + ::CIAO::DDS4CCM::translate_retcode (retcode))); + throw ::CORBA::INTERNAL (); } this->dds_update_->set_dds_writer (dwv_tmp.in ()); diff --git a/CIAO/connectors/dds4ccm/impl/DDS_Write_T.cpp b/CIAO/connectors/dds4ccm/impl/DDS_Write_T.cpp index 1c2dcf0c777..7ddd7726471 100644 --- a/CIAO/connectors/dds4ccm/impl/DDS_Write_T.cpp +++ b/CIAO/connectors/dds4ccm/impl/DDS_Write_T.cpp @@ -57,8 +57,18 @@ DDS_Write_T<CCM_TYPE, TYPED_WRITER, VALUE_TYPE, SEQ_VALUE_TYPE>::configuration_c DDS4CCM_ERROR (DDS4CCM_LOG_LEVEL_DDS_NIL_RETURN, (LM_ERROR, DDS4CCM_INFO "DDS_Write_T::configuration_complete - " "Error: Proxy returned a nil datawriter.\n")); - throw ::CCM_DDS::InternalError (::DDS::RETCODE_ERROR, 0); + throw ::CORBA::INTERNAL (); } + ::DDS::ReturnCode_t retcode = dwv_tmp->enable (); + if (retcode != ::DDS::RETCODE_OK) + { + DDS4CCM_ERROR (DDS4CCM_LOG_LEVEL_ERROR, (LM_ERROR, DDS4CCM_INFO + "DDS_Write_T::configuration_complete - " + "Error: Unable to enable the datawriter: <%C>\n", + ::CIAO::DDS4CCM::translate_retcode (retcode))); + throw ::CORBA::INTERNAL (); + } + this->dds_write_->set_dds_writer (dwv_tmp.in ()); this->ccm_data_writer_->set_dds_entity (dwv_tmp.in ()); } @@ -98,7 +108,7 @@ DDS_Write_T<CCM_TYPE, TYPED_WRITER, VALUE_TYPE, SEQ_VALUE_TYPE>::remove ( } else { - throw ::CCM_DDS::InternalError (retcode, 0); + throw ::CORBA::INTERNAL (); } } } diff --git a/CIAO/connectors/dds4ccm/impl/PortStatusListener.cpp b/CIAO/connectors/dds4ccm/impl/PortStatusListener.cpp index fed6b7faf70..17506b8c229 100644 --- a/CIAO/connectors/dds4ccm/impl/PortStatusListener.cpp +++ b/CIAO/connectors/dds4ccm/impl/PortStatusListener.cpp @@ -188,7 +188,7 @@ namespace CIAO DDS4CCM_debug_level >= DDS4CCM_LOG_LEVEL_DDS_STATUS) { mask = ::DDS::REQUESTED_DEADLINE_MISSED_STATUS | - ::DDS::SAMPLE_LOST_STATUS; + ::DDS::SAMPLE_LOST_STATUS; } if (DDS4CCM_debug_level >= DDS4CCM_LOG_LEVEL_DDS_STATUS) diff --git a/CIAO/connectors/dds4ccm/impl/PublisherListener.cpp b/CIAO/connectors/dds4ccm/impl/PublisherListener.cpp index d124d32e988..79818d7d721 100644 --- a/CIAO/connectors/dds4ccm/impl/PublisherListener.cpp +++ b/CIAO/connectors/dds4ccm/impl/PublisherListener.cpp @@ -81,7 +81,6 @@ namespace CIAO } } - void PublisherListener::on_offered_deadline_missed ( ::DDS::DataWriter_ptr the_Writer, @@ -142,7 +141,6 @@ namespace CIAO } } - void PublisherListener::on_offered_incompatible_qos ( ::DDS::DataWriter_ptr the_Writer, @@ -209,7 +207,6 @@ namespace CIAO } } - void PublisherListener::on_liveliness_lost ( ::DDS::DataWriter_ptr the_Writer, @@ -225,7 +222,6 @@ namespace CIAO this->on_unexpected_status (the_Writer, ::DDS::LIVELINESS_LOST_STATUS); } - void PublisherListener::on_publication_matched ( ::DDS::DataWriter_ptr the_Writer, @@ -247,7 +243,6 @@ namespace CIAO } #if (CIAO_DDS4CCM_NDDS==1) - void PublisherListener::on_reliable_writer_cache_changed ( ::DDS::DataWriter_ptr the_Writer, @@ -281,7 +276,6 @@ namespace CIAO this->on_unexpected_status (the_Writer, ::DDS::RELIABLE_WRITER_CACHE_CHANGED_STATUS); } - void PublisherListener::on_reliable_reader_activity_changed ( ::DDS::DataWriter_ptr the_Writer, @@ -303,7 +297,6 @@ namespace CIAO } #endif - ::DDS::StatusMask PublisherListener::get_mask ( ::CCM_DDS::ConnectorStatusListener_ptr error_listener) @@ -314,13 +307,13 @@ namespace CIAO DDS4CCM_debug_level >= DDS4CCM_LOG_LEVEL_DDS_STATUS) { mask = ::DDS::OFFERED_DEADLINE_MISSED_STATUS | - ::DDS::OFFERED_INCOMPATIBLE_QOS_STATUS | + ::DDS::OFFERED_INCOMPATIBLE_QOS_STATUS | #if (CIAO_DDS4CCM_NDDS==1) - ::DDS::RELIABLE_WRITER_CACHE_CHANGED_STATUS | - ::DDS::RELIABLE_READER_ACTIVITY_CHANGED_STATUS | + ::DDS::RELIABLE_WRITER_CACHE_CHANGED_STATUS | + ::DDS::RELIABLE_READER_ACTIVITY_CHANGED_STATUS | #endif - ::DDS::LIVELINESS_LOST_STATUS | - ::DDS::PUBLICATION_MATCHED_STATUS; + ::DDS::LIVELINESS_LOST_STATUS | + ::DDS::PUBLICATION_MATCHED_STATUS; } if (DDS4CCM_debug_level >= DDS4CCM_LOG_LEVEL_DDS_STATUS) diff --git a/CIAO/connectors/dds4ccm/impl/SubscriberListener.cpp b/CIAO/connectors/dds4ccm/impl/SubscriberListener.cpp index 45b59674e93..bc273dfe649 100644 --- a/CIAO/connectors/dds4ccm/impl/SubscriberListener.cpp +++ b/CIAO/connectors/dds4ccm/impl/SubscriberListener.cpp @@ -286,9 +286,9 @@ namespace CIAO DDS4CCM_debug_level >= DDS4CCM_LOG_LEVEL_DDS_STATUS) { mask = ::DDS::REQUESTED_INCOMPATIBLE_QOS_STATUS | - ::DDS::SAMPLE_REJECTED_STATUS | - ::DDS::LIVELINESS_CHANGED_STATUS | - ::DDS::SUBSCRIPTION_MATCHED_STATUS; + ::DDS::SAMPLE_REJECTED_STATUS | + ::DDS::LIVELINESS_CHANGED_STATUS | + ::DDS::SUBSCRIPTION_MATCHED_STATUS; } if (DDS4CCM_debug_level >= DDS4CCM_LOG_LEVEL_DDS_STATUS) diff --git a/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipant.cpp b/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipant.cpp index a94a2a6a3c9..b56d64e1c0b 100644 --- a/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipant.cpp +++ b/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipant.cpp @@ -98,7 +98,18 @@ namespace CIAO "Successfully created a DDSPublisher\n", qos_profile)); - ccm_dds_pub->enable (); + DDS_ReturnCode_t retcode = ccm_dds_pub->enable (); + if (retcode != DDS_RETCODE_OK) + { + DDS4CCM_ERROR (DDS4CCM_LOG_LEVEL_ERROR, (LM_ERROR, DDS4CCM_INFO + "DDS_DomainParticipant_i" + "::create_publisher_with_profile <%C> - " + "Error: Unable to create Publisher: <%C>\n", + qos_profile, + ::CIAO::DDS4CCM::translate_retcode (retcode))); + delete ccm_dds_pl; + throw ::CORBA::INTERNAL (); + } return retval._retn (); } @@ -149,7 +160,17 @@ namespace CIAO "DDS_DomainParticipant_i::create_publisher - " "Successfully created a DDSPublisher\n")); - ccm_dds_pub->enable (); + DDS_ReturnCode_t retcode = ccm_dds_pub->enable (); + if (retcode != DDS_RETCODE_OK) + { + DDS4CCM_ERROR (DDS4CCM_LOG_LEVEL_ERROR, (LM_ERROR, DDS4CCM_INFO + "DDS_DomainParticipant_i" + "::create_publisher - " + "Error: Unable to enable the Publisher: <%C>\n", + ::CIAO::DDS4CCM::translate_retcode (retcode))); + delete ccm_dds_pl; + throw ::CORBA::INTERNAL (); + } return retval._retn (); } @@ -252,7 +273,17 @@ namespace CIAO "Successfully created a DDSSubscriber\n", qos_profile)); - ccm_dds_sub->enable (); + DDS_ReturnCode_t retcode = ccm_dds_sub->enable (); + if (retcode != DDS_RETCODE_OK) + { + DDS4CCM_ERROR (DDS4CCM_LOG_LEVEL_ERROR, (LM_ERROR, DDS4CCM_INFO + "DDS_DomainParticipant_i::create_subscriber_with_profile <%C> - " + "Error: Unable to enable the DDSSubscriber: <%C>\n", + qos_profile, + ::CIAO::DDS4CCM::translate_retcode (retcode))); + delete ccm_dds_sl; + throw ::CORBA::INTERNAL (); + } return retval._retn (); } @@ -304,7 +335,16 @@ namespace CIAO "DDS_DomainParticipant_i::create_subscriber - " "Successfully created a DDSSubscriber\n")); - ccm_dds_sub->enable (); + DDS_ReturnCode_t retcode = ccm_dds_sub->enable (); + if (retcode != DDS_RETCODE_OK) + { + DDS4CCM_ERROR (DDS4CCM_LOG_LEVEL_ERROR, (LM_ERROR, DDS4CCM_INFO + "DDS_DomainParticipant_i::create_subscriber - " + "Error: Unable to enable the DDSSubscriber: <%C>\n", + ::CIAO::DDS4CCM::translate_retcode (retcode))); + delete ccm_dds_sl; + throw ::CORBA::INTERNAL (); + } return retval._retn (); } diff --git a/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipantFactory.cpp b/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipantFactory.cpp index be290a1e74b..4363a03b9a1 100644 --- a/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipantFactory.cpp +++ b/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipantFactory.cpp @@ -67,6 +67,7 @@ namespace CIAO "::create_participant - " "Error: Unable to create DomainParticipant for domain <%d>\n", domain_id)); + delete ccm_dds_dpl; return ::DDS::DomainParticipant::_nil (); } @@ -74,7 +75,19 @@ namespace CIAO ACE_NEW_THROW_EX (retval, DDS_DomainParticipant_i (dds_dp), ::CORBA::NO_MEMORY ()); - dds_dp->enable (); + DDS_ReturnCode_t retcode = dds_dp->enable (); + if (retcode != DDS_RETCODE_OK) + { + DDS4CCM_ERROR (DDS4CCM_LOG_LEVEL_ERROR, (LM_ERROR, DDS4CCM_INFO + "DDS_DomainParticipantFactory_i" + "::create_participant - " + "Error: Unable to enable the domainparticipant " + "for domain <%d>: <%C>\n", + domain_id, + ::CIAO::DDS4CCM::translate_retcode (retcode))); + delete ccm_dds_dpl; + throw ::CORBA::INTERNAL (); + } if (ccm_dds_dpl) { @@ -151,16 +164,28 @@ namespace CIAO { DDS4CCM_ERROR (DDS4CCM_LOG_LEVEL_ERROR, (LM_ERROR, DDS4CCM_INFO "DDS_DomainParticipantFactory_i::create_participant_with_profile <%C> - " - "Error: Unable to create DomainParticipant\n", - qos_profile)); + "Error: Unable to create DomainParticipant for domain <%d>\n", + qos_profile, + domain_id)); + delete ccm_dds_dpl; return ::DDS::DomainParticipant::_nil (); } ::DDS::DomainParticipant_var retval; ACE_NEW_THROW_EX (retval, DDS_DomainParticipant_i (dds_dp), ::CORBA::NO_MEMORY ()); - - dds_dp->enable (); + DDS_ReturnCode_t retcode = dds_dp->enable (); + if (retcode != DDS_RETCODE_OK) + { + DDS4CCM_ERROR (DDS4CCM_LOG_LEVEL_ERROR, (LM_ERROR, DDS4CCM_INFO + "DDS_DomainParticipantFactory_i::create_participant_with_profile <%C> - " + "Error: Unable to enable DomainParticipant for domain <%d>: <%C>\n", + qos_profile, + domain_id, + ::CIAO::DDS4CCM::translate_retcode (retcode))); + delete ccm_dds_dpl; + throw ::CORBA::INTERNAL (); + } if (ccm_dds_dpl) { diff --git a/CIAO/connectors/dds4ccm/impl/ndds/Publisher.cpp b/CIAO/connectors/dds4ccm/impl/ndds/Publisher.cpp index f26eea820a5..78e4a2e9c37 100644 --- a/CIAO/connectors/dds4ccm/impl/ndds/Publisher.cpp +++ b/CIAO/connectors/dds4ccm/impl/ndds/Publisher.cpp @@ -55,10 +55,10 @@ namespace CIAO return ::DDS::DataWriter::_nil (); } - DDS_DataWriterListener_i *ccm_dds_drl = 0; + DDS_DataWriterListener_i *ccm_dds_dwl = 0; if (! ::CORBA::is_nil (a_listener)) { - ACE_NEW_THROW_EX (ccm_dds_drl, + ACE_NEW_THROW_EX (ccm_dds_dwl, DDS_DataWriterListener_i (a_listener, 0), ::CORBA::NO_MEMORY ()); } @@ -66,7 +66,7 @@ namespace CIAO DDSDataWriter *ccm_dds_dw = this->rti_entity ()->create_datawriter ( topic->get_rti_entity (), ccm_dds_qos, - ccm_dds_drl, + ccm_dds_dwl, mask); if (!ccm_dds_dw) @@ -74,18 +74,17 @@ namespace CIAO DDS4CCM_ERROR (DDS4CCM_LOG_LEVEL_DDS_NIL_RETURN, (LM_ERROR, DDS4CCM_INFO "DDS_Publisher_i::create_datawriter - " "Error: RTI Topic returned a nil datawriter.\n")); - delete ccm_dds_drl; + delete ccm_dds_dwl; return ::DDS::DataWriter::_nil (); } - ::DDS::DataWriter_var retval = DDS_TypeSupport_i::create_datawriter (ccm_dds_dw, + ::DDS::DataWriter_var retval = DDS_TypeSupport_i::create_datawriter (ccm_dds_dw, this->dp_.in (), this); - if (ccm_dds_drl) - { - ccm_dds_drl->set_dds_entity (retval.in ()); - } - ccm_dds_dw->enable (); + if (ccm_dds_dwl) + { + ccm_dds_dwl->set_dds_entity (retval.in ()); + } return retval._retn (); } @@ -109,10 +108,10 @@ namespace CIAO return ::DDS::DataWriter::_nil (); } - DDS_DataWriterListener_i *ccm_dds_drl = 0; + DDS_DataWriterListener_i *ccm_dds_dwl = 0; if (! ::CORBA::is_nil (a_listener)) { - ACE_NEW_THROW_EX (ccm_dds_drl, + ACE_NEW_THROW_EX (ccm_dds_dwl, DDS_DataWriterListener_i (a_listener, 0), ::CORBA::NO_MEMORY ()); } @@ -124,7 +123,7 @@ namespace CIAO topic->get_rti_entity (), lib_name, prof_name, - ccm_dds_drl, + ccm_dds_dwl, mask); ACE_OS::free (lib_name); ACE_OS::free (prof_name); @@ -135,7 +134,7 @@ namespace CIAO "DDS_Publisher_i::create_datawriter_with_profile <%C> - " "Error: RTI Topic returned a nil datawriter.\n", qos_profile)); - delete ccm_dds_drl; + delete ccm_dds_dwl; return ::DDS::DataWriter::_nil (); } else @@ -150,11 +149,10 @@ namespace CIAO DDS_TypeSupport_i::create_datawriter (ccm_dds_dw, this->dp_.in (), this); - if (ccm_dds_drl) + if (ccm_dds_dwl) { - ccm_dds_drl->set_dds_entity (retval.in ()); + ccm_dds_dwl->set_dds_entity (retval.in ()); } - ccm_dds_dw->enable (); return retval._retn (); } diff --git a/CIAO/connectors/dds4ccm/impl/ndds/Subscriber.cpp b/CIAO/connectors/dds4ccm/impl/ndds/Subscriber.cpp index 4cd72de9ebc..1f623a56194 100644 --- a/CIAO/connectors/dds4ccm/impl/ndds/Subscriber.cpp +++ b/CIAO/connectors/dds4ccm/impl/ndds/Subscriber.cpp @@ -202,7 +202,6 @@ namespace CIAO "Successfully created datareader.\n")); } - ccm_dds_dr->enable (); ::DDS::DataReader_var reader = DDS_TypeSupport_i::create_datareader ( ccm_dds_dr, this->dp_.in (), @@ -288,7 +287,6 @@ namespace CIAO { ccm_dds_drl->set_dds_entity (reader.in ()); } - ccm_dds_dr->enable (); return reader._retn (); } diff --git a/CIAO/connectors/dds4ccm/performance-tests/DDSLatency/DDS_Sender/Latency_Sender.cpp b/CIAO/connectors/dds4ccm/performance-tests/DDSLatency/DDS_Sender/Latency_Sender.cpp index f5e1b98106c..c59cf3ae60f 100644 --- a/CIAO/connectors/dds4ccm/performance-tests/DDSLatency/DDS_Sender/Latency_Sender.cpp +++ b/CIAO/connectors/dds4ccm/performance-tests/DDSLatency/DDS_Sender/Latency_Sender.cpp @@ -38,6 +38,8 @@ ACE_UINT64 * duration_times_ = 0; CORBA::Short * datalen_range_ = 0; ACE_UINT64 clock_overhead_; +ACE_UINT64 unexpected_count_ = 0; + LatencyTest * instance_ = 0; LatencyTestDataWriter * test_data_writer_ = 0; @@ -57,6 +59,76 @@ public: void on_data_available(DDSDataReader *reader); }; +// since this one is also created in the dds4ccm wrapper, we need +// to create one here as well. +class DummyPublisherListener : + public DDSPublisherListener +{ +public: + virtual void on_offered_deadline_missed ( + DDSDataWriter* writer, + const DDS_OfferedDeadlineMissedStatus& status); + virtual void on_liveliness_lost( + DDSDataWriter* writer, + const DDS_LivelinessLostStatus& status); + virtual void on_offered_incompatible_qos( + DDSDataWriter* writer, + const DDS_OfferedIncompatibleQosStatus& status); + virtual void on_publication_matched( + DDSDataWriter* writer, + const DDS_PublicationMatchedStatus& status); + virtual void on_reliable_writer_cache_changed( + DDSDataWriter* writer, + const DDS_ReliableWriterCacheChangedStatus& status); + virtual void on_reliable_reader_activity_changed ( + DDSDataWriter* writer, + const DDS_ReliableReaderActivityChangedStatus& status); +}; + +void DummyPublisherListener::on_offered_deadline_missed ( + DDSDataWriter* /*writer*/, + const DDS_OfferedDeadlineMissedStatus& /*status*/) +{ + ACE_DEBUG ((LM_DEBUG, "on_offered_deadline_missed\n")); + ++unexpected_count_; +} + +void DummyPublisherListener::on_liveliness_lost( + DDSDataWriter* /*writer*/, + const DDS_LivelinessLostStatus& /*status*/) +{ + ++unexpected_count_; +} + +void DummyPublisherListener::on_offered_incompatible_qos( + DDSDataWriter* /*writer*/, + const DDS_OfferedIncompatibleQosStatus& /*status*/) +{ + ++unexpected_count_; +} + +void DummyPublisherListener::on_publication_matched( + DDSDataWriter* /*writer*/, + const DDS_PublicationMatchedStatus& /*status*/) +{ + ++unexpected_count_; +} + +void DummyPublisherListener::on_reliable_writer_cache_changed( + DDSDataWriter* /*writer*/, + const DDS_ReliableWriterCacheChangedStatus& /*status*/) +{ + ++unexpected_count_; +} + +void DummyPublisherListener::on_reliable_reader_activity_changed ( + DDSDataWriter* /*writer*/, + const DDS_ReliableReaderActivityChangedStatus& /*status*/) +{ + ++unexpected_count_; +} + + /* The dummy listener of events and data from the middleware */ class DummyListener: public DDSDataReaderListener { @@ -391,6 +463,8 @@ int ACE_TMAIN(int argc, ACE_TCHAR* argv[]) ::DDS::Topic * send_topic = 0; ::DDS::DataWriter * data_writer = 0; ::DDS::DataWriter * dum_data_writer = 0; + DummyPublisherListener * pub_listener = 0; + ::DDS::Publisher * pub = 0; ACE_Env_Value<int> id (ACE_TEXT("DDS4CCM_DEFAULT_DOMAIN_ID"), domain_id_); domain_id_ = id; @@ -450,17 +524,37 @@ int ACE_TMAIN(int argc, ACE_TCHAR* argv[]) prof_name_, 0, DDS_STATUS_MASK_NONE); - if (!receive_topic) { + if (!receive_topic) + { ACE_ERROR ((LM_ERROR, ACE_TEXT ("Unable to create topic.\n"))); goto clean_exit; + } + + pub_listener = new DummyPublisherListener (); + pub = participant->create_publisher_with_profile ( + lib_name_, + prof_name_, + 0, + DDS_STATUS_MASK_NONE); + + if (!pub) { + ACE_ERROR ((LM_ERROR, ACE_TEXT ("Unable to create publisher.\n"))); + goto clean_exit; } - /* Create the data writer using the default publisher */ - data_writer = participant->create_datawriter_with_profile( - send_topic, - lib_name_, - prof_name_, - 0, - DDS_STATUS_MASK_NONE); + + /* Create the data writer using the publisher */ + data_writer = pub->create_datawriter_with_profile( + send_topic, + lib_name_, + prof_name_, + pub_listener, + DDS_OFFERED_DEADLINE_MISSED_STATUS | + DDS_OFFERED_INCOMPATIBLE_QOS_STATUS | + DDS_RELIABLE_WRITER_CACHE_CHANGED_STATUS | + DDS_RELIABLE_READER_ACTIVITY_CHANGED_STATUS | + DDS_LIVELINESS_LOST_STATUS | + DDS_PUBLICATION_MATCHED_STATUS); + if (!data_writer) { ACE_ERROR ((LM_ERROR, ACE_TEXT ("Unable to create data writer.\n"))); @@ -581,6 +675,8 @@ clean_exit: sec, read_write_str)); } + ACE_DEBUG ((LM_DEBUG, "\tNumber of unexpected events : %u\n", + unexpected_count_)); if (participant) { retcode = participant->delete_contained_entities (); @@ -599,6 +695,7 @@ clean_exit: } delete [] datalen_range_; delete [] duration_times_; + delete pub_listener; return main_result; } diff --git a/CIAO/connectors/dds4ccm/performance-tests/DDSLatency/DDS_Sender/NDDS_Latency_Sender.cpp b/CIAO/connectors/dds4ccm/performance-tests/DDSLatency/DDS_Sender/NDDS_Latency_Sender.cpp index 64a37d7e9b5..c268a516144 100644 --- a/CIAO/connectors/dds4ccm/performance-tests/DDSLatency/DDS_Sender/NDDS_Latency_Sender.cpp +++ b/CIAO/connectors/dds4ccm/performance-tests/DDSLatency/DDS_Sender/NDDS_Latency_Sender.cpp @@ -34,6 +34,8 @@ ACE_UINT64 clock_overhead_; RTIClock *timer = 0; LatencyTest * instance_ = 0; +ACE_UINT64 unexpected_count_ = 0; + LatencyTestDataWriter * test_data_writer_ = 0; const char * lib_name_ = 0; @@ -54,6 +56,75 @@ class DummyListener: public DDSDataReaderListener { }; +// since this one is also created in the dds4ccm wrapper, we need +// to create one here as well. +class DummyPublisherListener : + public DDSPublisherListener +{ +public: + virtual void on_offered_deadline_missed ( + DDSDataWriter* writer, + const DDS_OfferedDeadlineMissedStatus& status); + virtual void on_liveliness_lost( + DDSDataWriter* writer, + const DDS_LivelinessLostStatus& status); + virtual void on_offered_incompatible_qos( + DDSDataWriter* writer, + const DDS_OfferedIncompatibleQosStatus& status); + virtual void on_publication_matched( + DDSDataWriter* writer, + const DDS_PublicationMatchedStatus& status); + virtual void on_reliable_writer_cache_changed( + DDSDataWriter* writer, + const DDS_ReliableWriterCacheChangedStatus& status); + virtual void on_reliable_reader_activity_changed ( + DDSDataWriter* writer, + const DDS_ReliableReaderActivityChangedStatus& status); +}; + +void DummyPublisherListener::on_offered_deadline_missed ( + DDSDataWriter* /*writer*/, + const DDS_OfferedDeadlineMissedStatus& /*status*/) +{ + ACE_DEBUG ((LM_DEBUG, "on_offered_deadline_missed\n")); + ++unexpected_count_; +} + +void DummyPublisherListener::on_liveliness_lost( + DDSDataWriter* /*writer*/, + const DDS_LivelinessLostStatus& /*status*/) +{ + ++unexpected_count_; +} + +void DummyPublisherListener::on_offered_incompatible_qos( + DDSDataWriter* /*writer*/, + const DDS_OfferedIncompatibleQosStatus& /*status*/) +{ + ++unexpected_count_; +} + +void DummyPublisherListener::on_publication_matched( + DDSDataWriter* /*writer*/, + const DDS_PublicationMatchedStatus& /*status*/) +{ + ++unexpected_count_; +} + +void DummyPublisherListener::on_reliable_writer_cache_changed( + DDSDataWriter* /*writer*/, + const DDS_ReliableWriterCacheChangedStatus& /*status*/) +{ + ++unexpected_count_; +} + +void DummyPublisherListener::on_reliable_reader_activity_changed ( + DDSDataWriter* /*writer*/, + const DDS_ReliableReaderActivityChangedStatus& /*status*/) +{ + ++unexpected_count_; +} + void split_qos (const char * qos) { @@ -359,6 +430,8 @@ int ACE_TMAIN(int argc, ACE_TCHAR* argv[]) ::DDS::Topic * send_topic = 0; ::DDS::DataWriter * data_writer = 0; ::DDS::DataWriter * dum_data_writer = 0; + DummyPublisherListener * pub_listener = 0; + ::DDS::Publisher * pub = 0; ACE_Env_Value<int> id (ACE_TEXT("DDS4CCM_DEFAULT_DOMAIN_ID"), domain_id_); domain_id_ = id; @@ -419,13 +492,31 @@ int ACE_TMAIN(int argc, ACE_TCHAR* argv[]) ACE_ERROR ((LM_ERROR, ACE_TEXT ("Unable to create topic.\n"))); goto clean_exit; } - /* Create the data writer using the default publisher */ - data_writer = participant->create_datawriter_with_profile( - send_topic, - lib_name_, - prof_name_, - 0, - DDS_STATUS_MASK_NONE); + + pub_listener = new DummyPublisherListener (); + pub = participant->create_publisher_with_profile ( + lib_name_, + prof_name_, + 0, + DDS_STATUS_MASK_NONE); + + if (!pub) { + ACE_ERROR ((LM_ERROR, ACE_TEXT ("Unable to create publisher.\n"))); + goto clean_exit; + } + + /* Create the data writer using the publisher */ + data_writer = pub->create_datawriter_with_profile( + send_topic, + lib_name_, + prof_name_, + pub_listener, + DDS_OFFERED_DEADLINE_MISSED_STATUS | + DDS_OFFERED_INCOMPATIBLE_QOS_STATUS | + DDS_RELIABLE_WRITER_CACHE_CHANGED_STATUS | + DDS_RELIABLE_READER_ACTIVITY_CHANGED_STATUS | + DDS_LIVELINESS_LOST_STATUS | + DDS_PUBLICATION_MATCHED_STATUS); if (!data_writer) { ACE_ERROR ((LM_ERROR, ACE_TEXT ("Unable to create data writer.\n"))); @@ -542,6 +633,8 @@ clean_exit: number_of_msg_, read_write_str)); } + ACE_DEBUG ((LM_DEBUG, "\tNumber of unexpected events : %u\n", + unexpected_count_)); if (participant) { retcode = participant->delete_contained_entities (); @@ -560,6 +653,7 @@ clean_exit: } delete [] datalen_range_; delete [] duration_times_; + delete pub_listener; return main_result; } diff --git a/CIAO/connectors/dds4ccm/performance-tests/Latency/Sender/LatencyTT_Test_Sender_exec.cpp b/CIAO/connectors/dds4ccm/performance-tests/Latency/Sender/LatencyTT_Test_Sender_exec.cpp index b95359803cc..20e8ff48be9 100644 --- a/CIAO/connectors/dds4ccm/performance-tests/Latency/Sender/LatencyTT_Test_Sender_exec.cpp +++ b/CIAO/connectors/dds4ccm/performance-tests/Latency/Sender/LatencyTT_Test_Sender_exec.cpp @@ -100,12 +100,14 @@ namespace CIAO_LatencyTT_Test_Sender_Impl ::LatencyTT_Test::CCM_Sender_Context_ptr ctx, Sender_exec_i &callback, Atomic_Boolean &matched, - int number_of_subscribers) + int number_of_subscribers, + Atomic_Long &unexpected_count) : ciao_context_ ( ::LatencyTT_Test::CCM_Sender_Context::_duplicate (ctx)) , callback_ (callback) , matched_ (matched) , number_of_subscribers_ (number_of_subscribers) + , unexpected_count_(unexpected_count) { } @@ -154,6 +156,7 @@ namespace CIAO_LatencyTT_Test_Sender_Impl connector_status_exec_i::on_unexpected_status (::DDS::Entity_ptr the_entity, ::DDS::StatusKind status_kind) { + ++this->unexpected_count_; if (! ::CORBA::is_nil (the_entity) && status_kind == DDS::PUBLICATION_MATCHED_STATUS) { @@ -204,6 +207,7 @@ namespace CIAO_LatencyTT_Test_Sender_Impl , duration_times_ (0) , datalen_range_ (0) , _clock_overhead_ (0) + , unexpected_count_ (0) { ACE_NEW_THROW_EX (this->ticker_, WriteTicker (*this), @@ -532,7 +536,8 @@ namespace CIAO_LatencyTT_Test_Sender_Impl this->ciao_context_.in (), *this, this->matched_, - this->number_of_sub_), + this->number_of_sub_, + this->unexpected_count_), ::CCM_DDS::CCM_ConnectorStatusListener::_nil ()); this->ciao_connector_status_ = tmp; @@ -670,6 +675,8 @@ namespace CIAO_LatencyTT_Test_Sender_Impl this->nr_of_runs_, this->number_of_msg_, sec)); } + ACE_DEBUG ((LM_DEBUG, "\tNumber of unexpected events : %u\n", + this->unexpected_count_.value ())); } extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr diff --git a/CIAO/connectors/dds4ccm/performance-tests/Latency/Sender/LatencyTT_Test_Sender_exec.h b/CIAO/connectors/dds4ccm/performance-tests/Latency/Sender/LatencyTT_Test_Sender_exec.h index 4a3da2f9b56..35fe4256927 100644 --- a/CIAO/connectors/dds4ccm/performance-tests/Latency/Sender/LatencyTT_Test_Sender_exec.h +++ b/CIAO/connectors/dds4ccm/performance-tests/Latency/Sender/LatencyTT_Test_Sender_exec.h @@ -103,7 +103,8 @@ namespace CIAO_LatencyTT_Test_Sender_Impl ::LatencyTT_Test::CCM_Sender_Context_ptr ctx, Sender_exec_i &callback, Atomic_Boolean &matched, - int number_of_subscribers); + int number_of_subscribers, + Atomic_Long &unexpected_count); virtual ~connector_status_exec_i (void); //@{ @@ -139,6 +140,7 @@ namespace CIAO_LatencyTT_Test_Sender_Impl Sender_exec_i &callback_; Atomic_Boolean &matched_; int number_of_subscribers_; + Atomic_Long &unexpected_count_; }; /** @@ -241,6 +243,7 @@ namespace CIAO_LatencyTT_Test_Sender_Impl ACE_UINT64* duration_times_; ::CORBA::Short* datalen_range_; ::CORBA::Long _clock_overhead_; + Atomic_Long unexpected_count_; //@} diff --git a/CIAO/docs/static_config_rtexample.html b/CIAO/docs/static_config_rtexample.html index 2e87e5aabe1..d4845ff2f05 100644 --- a/CIAO/docs/static_config_rtexample.html +++ b/CIAO/docs/static_config_rtexample.html @@ -580,7 +580,7 @@ Activate POA manager</span><br style="font-family: monospace;"> PortableServer::POAManager_var poa_manager =</span><br style="font-family: monospace;"> <span style="font-family: monospace;"> -root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);</span><br +root_poa->the_POAManager ();</span><br style="font-family: monospace;"> <span style="font-family: monospace;"> ACE_TRY_CHECK;</span><small><span style="font-weight: bold;">(Highlighted @@ -588,7 +588,7 @@ files are manually added to the generated mpc file)</span></small><br style="font-family: monospace;"> <br style="font-family: monospace;"> <span style="font-family: monospace;"> -poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);</span><br +poa_manager->activate ();</span><br style="font-family: monospace;"> <span style="font-family: monospace;"> ACE_TRY_CHECK;</span><br style="font-family: monospace;"> diff --git a/CIAO/examples/Hello/descriptors/svc_em.conf b/CIAO/examples/Hello/descriptors/svc_em.conf index 2aa568bf9af..eb5b4dd1e30 100644 --- a/CIAO/examples/Hello/descriptors/svc_em.conf +++ b/CIAO/examples/Hello/descriptors/svc_em.conf @@ -4,6 +4,6 @@ # static Advanced_Resource_Factory "-ORBReactorType select_st -ORBInputCDRAllocator null -ORBConnectionCacheLock null -ORBFlushingStrategy blocking" -static Client_Strategy_Factory "-ORBProfileLock null -ORBClientConnectionHandler RW" -static Server_Strategy_Factory "-ORBConcurrency thread-per-connection -ORBPOALock thread -ORBAllowReactivationOfSystemids 0" +static Client_Strategy_Factory "-ORBClientConnectionHandler RW" +static Server_Strategy_Factory "-ORBConcurrency thread-per-connection -ORBAllowReactivationOfSystemids 0" diff --git a/CIAO/performance-tests/Benchmark/RoundTrip/svc.conf b/CIAO/performance-tests/Benchmark/RoundTrip/svc.conf index e1706aae4e5..3041c06f5e3 100644 --- a/CIAO/performance-tests/Benchmark/RoundTrip/svc.conf +++ b/CIAO/performance-tests/Benchmark/RoundTrip/svc.conf @@ -1,6 +1,6 @@ # -# $Id$ +# $Id$ # dynamic Advanced_Resource_Factory Service_Object * TAO_Strategies:_make_TAO_Advanced_Resource_Factory () "-ORBReactorMaskSignals 0 -ORBInputCDRAllocator null -ORBReactorType select_st -ORBConnectionCacheLock null" -static Server_Strategy_Factory "-ORBPOALock null -ORBAllowReactivationOfSystemids 0" -static Client_Strategy_Factory "-ORBTransportMuxStrategy EXCLUSIVE -ORBProfileLock null -ORBClientConnectionHandler RW" +static Server_Strategy_Factory "-ORBAllowReactivationOfSystemids 0" +static Client_Strategy_Factory "-ORBTransportMuxStrategy EXCLUSIVE-ORBClientConnectionHandler RW" diff --git a/CIAO/performance-tests/Benchmark/svc.conf b/CIAO/performance-tests/Benchmark/svc.conf index 7b8129f5667..40babaf2989 100644 --- a/CIAO/performance-tests/Benchmark/svc.conf +++ b/CIAO/performance-tests/Benchmark/svc.conf @@ -1,6 +1,6 @@ # -# $Id$ +# $Id$ # static Advanced_Resource_Factory "-ORBReactorMaskSignals 0 -ORBInputCDRAllocator null -ORBReactorType select_st -ORBConnectionCacheLock null" -static Server_Strategy_Factory "-ORBPOALock null -ORBAllowReactivationOfSystemids 0" -static Client_Strategy_Factory "-ORBTransportMuxStrategy EXCLUSIVE -ORBProfileLock null -ORBClientConnectionHandler RW" +static Server_Strategy_Factory "-ORBAllowReactivationOfSystemids 0" +static Client_Strategy_Factory "-ORBTransportMuxStrategy EXCLUSIVE -ORBClientConnectionHandler RW" diff --git a/CIAO/tests/CIF/Common/CIF_Common.cpp b/CIAO/tests/CIF/Common/CIF_Common.cpp index f257d7f9bc3..8f7c47ffde6 100644 --- a/CIAO/tests/CIF/Common/CIF_Common.cpp +++ b/CIAO/tests/CIF/Common/CIF_Common.cpp @@ -167,7 +167,7 @@ CIF_Common::get_navigation_interface() "Narrow failed from CCMObject to Navigation\n")); return ::Components::Navigation::_nil(); } - return ::Components::Navigation::_duplicate(nav.in()); + return nav._retn (); } //============================================================ @@ -186,7 +186,34 @@ CIF_Common::get_receptacle_interface() "Narrow failed from CCMObject to Receptacles\n")); return ::Components::Receptacles::_nil(); } - return ::Components::Receptacles::_duplicate(rec.in()); + return rec._retn (); +} + +//============================================================ +// get_events_interface +//============================================================ +::Components::Events_ptr +CIF_Common::get_events_interface (bool source) +{ + ::CORBA::Object_var cmp; + if (source) + { + cmp = this->provider_object_->_get_component(); + } + else + { + cmp = this->user_object_->_get_component (); + } + ::Components::Events_var ev = + ::Components::Events::_narrow(cmp.in()); + + if (::CORBA::is_nil(ev.in())) + { + ACE_ERROR((LM_ERROR, + "Narrow failed from CCMObject to Navigation\n")); + return ::Components::Events::_nil(); + } + return ev._retn (); } //============================================================ @@ -248,7 +275,7 @@ CIF_Common::test_provider_component() ::CORBA::Object_var provider_cmp = this->provider_object_->_get_component(); ::CIF::CIF_Provider_var provider_object = ::CIF::CIF_Provider::_narrow(provider_cmp.in ()); - if (::CORBA::is_nil(provider_cmp.in())) + if (::CORBA::is_nil(provider_object.in())) { ACE_ERROR_RETURN((LM_ERROR, "CIF_Common::test_provider_component - " @@ -301,7 +328,7 @@ CIF_Common::test_user_component() int ret = 0; ::CORBA::Object_var user_cmp = this->user_object_->_get_component(); ::CIF::CIF_User_var user_object = ::CIF::CIF_User::_narrow(user_cmp.in ()); - if (::CORBA::is_nil(user_object)) + if (::CORBA::is_nil(user_object.in ())) { ACE_ERROR_RETURN((LM_ERROR, "_get_component returned a nil component for User component\n"), diff --git a/CIAO/tests/CIF/Common/CIF_Common.h b/CIAO/tests/CIF/Common/CIF_Common.h index 2e0c8458db6..c8d3007293c 100644 --- a/CIAO/tests/CIF/Common/CIF_Common.h +++ b/CIAO/tests/CIF/Common/CIF_Common.h @@ -20,6 +20,7 @@ public: ::Components::Navigation_ptr get_navigation_interface (void); ::Components::Receptacles_ptr get_receptacle_interface (void); + ::Components::Events_ptr get_events_interface (bool source); ::CORBA::Object_ptr get_provider_cmp (void); ::CORBA::Object_ptr get_user_cmp (void); diff --git a/CIAO/tests/CIF/Component/CIF_Component.idl b/CIAO/tests/CIF/Component/CIF_Component.idl index be3824dceec..12c240e703d 100644 --- a/CIAO/tests/CIF/Component/CIF_Component.idl +++ b/CIAO/tests/CIF/Component/CIF_Component.idl @@ -30,7 +30,9 @@ module CIF #if !defined (CCM_NOEVENT) publishes DoSomething publish_do_something; publishes DoSomethingElse publish_do_something_else; + emits DoSomething emit_do_something; + emits DoSomethingElse emit_do_something_else; #endif provides foo provide_cif_foo; provides derived_foo provide_cif_derived_foo; @@ -42,6 +44,7 @@ module CIF { #if !defined (CCM_NOEVENT) consumes DoSomething consume_do_something; + consumes DoSomethingElse consume_do_something_else; #endif uses foo use_cif_foo; uses multiple foo use_multiple_foo; diff --git a/CIAO/tests/CIF/Component/CIF_Component_exec.cpp b/CIAO/tests/CIF/Component/CIF_Component_exec.cpp index f6a19a0cc78..59a092078a7 100644 --- a/CIAO/tests/CIF/Component/CIF_Component_exec.cpp +++ b/CIAO/tests/CIF/Component/CIF_Component_exec.cpp @@ -239,6 +239,15 @@ namespace CIAO_CIF_CIF_User_Impl } #endif +#if !defined (CCM_NOEVENT) + void + CIF_User_exec_i::push_consume_do_something_else ( + ::CIF::DoSomethingElse * /* ev */) + { + /* Your code here. */ + } +#endif + ::CORBA::Short CIF_User_exec_i::user_id (void) { diff --git a/CIAO/tests/CIF/Component/CIF_Component_exec.h b/CIAO/tests/CIF/Component/CIF_Component_exec.h index 3a2f241fa7b..e42d45792c2 100644 --- a/CIAO/tests/CIF/Component/CIF_Component_exec.h +++ b/CIAO/tests/CIF/Component/CIF_Component_exec.h @@ -174,6 +174,12 @@ namespace CIAO_CIF_CIF_User_Impl ::CIF::DoSomething * ev); #endif +#if !defined (CCM_NOEVENT) + virtual void + push_consume_do_something_else ( + ::CIF::DoSomethingElse * ev); +#endif + // TAO_IDL - Generated from // be/be_visitor_operation/operation_ch.cpp:36 diff --git a/CIAO/tests/CIF/Events/Events.mpc b/CIAO/tests/CIF/Events/Events.mpc new file mode 100644 index 00000000000..b12b98a3ba3 --- /dev/null +++ b/CIAO/tests/CIF/Events/Events.mpc @@ -0,0 +1,16 @@ +// $Id$ + +project (Events_Test_Client) : ccm_configvalue, naming, ciao_base { + after += CIF_Common CIF_Component_stub + libpaths += ../lib + libs += CIF_Common CIF_Component_stub + exename=Events_Test_Client + includes += .. + + IDL_Files { + } + + Source_Files { + client.cpp + } +} diff --git a/CIAO/tests/CIF/Events/client.cpp b/CIAO/tests/CIF/Events/client.cpp new file mode 100644 index 00000000000..84fe819656e --- /dev/null +++ b/CIAO/tests/CIF/Events/client.cpp @@ -0,0 +1,1785 @@ +// $Id$ + +#include <tests/CIF/Common/CIF_Common.h> +#include <tests/CIF/Component/CIF_ComponentC.h> + +#include <ccm/CCM_EventsC.h> + +#if !defined (CCM_NOEVENT) +//============================================================ +// test_subscribe_unsubscribe +//============================================================ +::Components::EventConsumerBase_ptr +get_consumer (::Components::Events_ptr sink, + const char * name) +{ + ::Components::EventConsumerBase_var consumer; + try + { + consumer = sink->get_consumer (name); + } + catch (const ::Components::InvalidName &) + { + ACE_ERROR ((LM_ERROR, "Events get_consumer - " + "Error: InvalidName exception caught " + "during get_consumer.\n")); + return ::Components::EventConsumerBase::_nil (); + } + catch (...) + { + ACE_ERROR ((LM_ERROR, "Navigation get_consumer - " + "Error: Unknown exception caught " + "during get_consumer.\n")); + return ::Components::EventConsumerBase::_nil (); + } + return consumer._retn (); +} +#endif + +#if !defined (CCM_NOEVENT) +//============================================================ +// test_get_consumer +//============================================================ +int +test_get_consumer (::Components::Events_ptr sink) +{ + try + { + ::Components::EventConsumerBase_var consumer = + sink->get_consumer ("consume_do_something"); + if (::CORBA::is_nil (consumer.in ())) + { + ACE_ERROR ((LM_ERROR, "Events test_get_consumer - " + "Error: returned consumer " + "seems nil.\n")); + return 1; + } + } + catch (const ::Components::InvalidName &) + { + ACE_ERROR ((LM_ERROR, "Events test_get_consumer - " + "Error: InvalidName exception caught " + "during get_consumer.\n")); + return 1; + } + catch (...) + { + ACE_ERROR ((LM_ERROR, "Events test_get_consumer - " + "Error: Unknown exception caught " + "during get_consumer.\n")); + return 1; + } + return 0; +} +#endif + +#if !defined (CCM_NOEVENT) +//============================================================ +// test_get_consumer_invalid_name +//============================================================ +int +test_get_consumer_invalid_name (::Components::Events_ptr sink) +{ + try + { + ::Components::EventConsumerBase_var consumer = + sink->get_consumer ("consume_do_something_invalid_name"); + ACE_ERROR ((LM_ERROR, "Events test_get_consumer_invalid_name - " + "Error: No InvalidName exception raised.\n")); + } + catch (const ::Components::InvalidName &) + { + ACE_DEBUG ((LM_DEBUG, "Events test_get_consumer_invalid_name - " + "Received InvalidName exception " + "during get_consumer.\n")); + ACE_DEBUG ((LM_DEBUG, "Events test_get_consumer_invalid_name - " + "Test passed!\n")); + return 0; + } + catch (...) + { + ACE_ERROR ((LM_ERROR, "Navigation test_get_consumer - " + "Error: Unknown exception caught " + "during get_consumer.\n")); + } + return 1; +} +#endif + +#if !defined (CCM_NOEVENT) +//============================================================ +// test_subscribe_unsubscribe +//============================================================ +int +test_subscribe_unsubscribe (::Components::Events_ptr source, + ::Components::Events_ptr sink) +{ + int ret = 0; + ::Components::Cookie_var ck; + ::Components::EventConsumerBase_var consumer = + get_consumer (sink, "consume_do_something"); + if (::CORBA::is_nil (consumer.in ())) + { + ACE_ERROR ((LM_ERROR, "Events test_subscribe_unsubscribe - " + "Error:Consumer seems nil.\n")); + return 1; + } + + try + { + ck = source->subscribe ("publish_do_something", + consumer.in ()); + } + catch (const ::Components::InvalidName &) + { + ACE_ERROR ((LM_ERROR, "Events test_subscribe_unsubscribe - " + "Error: InvalidName exception caught " + "during subscribe.\n")); + return 1; + } + catch (const ::Components::InvalidConnection &) + { + ACE_ERROR ((LM_ERROR, "Events test_subscribe_unsubscribe - " + "Error: InvalidConnection exception caught " + "during subscribe.\n")); + return 1; + } + catch (const ::Components::ExceededConnectionLimit &) + { + ACE_ERROR ((LM_ERROR, "Events test_subscribe_unsubscribe - " + "Error: ExceededConnectionLimit exception caught " + "during subscribe.\n")); + return 1; + } + catch (...) + { + ACE_ERROR ((LM_ERROR, "Events test_subscribe_unsubscribe - " + "Error: Unknown exception caught " + "during subscribe.\n")); + return 1; + } + + try + { + ::Components::EventConsumerBase_var safe_tmp = + source->unsubscribe ("publish_do_something", + ck.in ()); + if (::CORBA::is_nil (safe_tmp.in ())) + { + ACE_ERROR ((LM_ERROR, "Events test_subscribe_unsubscribe - " + "Error: disconnect: Returned object " + "seems nil.\n")); + return 1; + } + } + catch (const ::Components::InvalidName &) + { + ACE_ERROR ((LM_ERROR, "Events test_subscribe_unsubscribe - " + "Error: InvalidName exception caught " + "during unsubscribe.\n")); + return 1; + } + catch (const ::Components::InvalidConnection &) + { + ACE_ERROR ((LM_ERROR, "Events test_subscribe_unsubscribe - " + "Error: InvalidConnection exception caught " + "during unsubscribe.\n")); + return 1; + } + catch (...) + { + ACE_ERROR ((LM_ERROR, "Events test_subscribe_unsubscribe - " + "Error: Unknown exception caught " + "during unsubscribe.\n")); + return 1; + } + if (ret == 0) + { + ACE_DEBUG ((LM_DEBUG, "Events test_subscribe_unsubscribe - " + "Test passed!\n")); + } + return ret; +} +#endif + +#if !defined (CCM_NOEVENT) +//============================================================ +// test_subscribe_invalid_name +//============================================================ +int +test_subscribe_invalid_name (::Components::Events_ptr source, + ::Components::Events_ptr sink) +{ + ::Components::EventConsumerBase_var consumer = + get_consumer (sink, "consume_do_something"); + if (::CORBA::is_nil (consumer.in ())) + { + ACE_ERROR ((LM_ERROR, "Events test_subscribe_invalid_name - " + "Error:Consumer seems nil.\n")); + return 1; + } + + ::Components::Cookie_var ck; + try + { + ck = source->subscribe ("publish_do_something_invalid_name", + consumer.in ()); + } + catch (const ::Components::InvalidName &) + { + ACE_DEBUG ((LM_DEBUG, "Events test_subscribe_invalid_name - " + "Received expected InvalidName exception " + "during subscribe.\n")); + } + catch (const ::Components::InvalidConnection &) + { + ACE_ERROR ((LM_ERROR, "Events test_subscribe_invalid_name - " + "Error: InvalidConnection exception caught " + "during subscribe.\n")); + return 1; + } + catch (const ::Components::ExceededConnectionLimit &) + { + ACE_ERROR ((LM_ERROR, "Events test_subscribe_invalid_name - " + "Error: ExceededConnectionLimit exception caught " + "during subscribe.\n")); + return 1; + } + catch (...) + { + ACE_ERROR ((LM_ERROR, "Events test_subscribe_invalid_name - " + "Error: Unknown exception caught " + "during subscribe.\n")); + return 1; + } + ACE_DEBUG ((LM_DEBUG, "Events test_subscribe_invalid_name - " + "Test passed!\n")); + return 0; +} +#endif + +#if !defined (CCM_NOEVENT) +//============================================================ +// test_subscribe_invalid_name +//============================================================ +int +test_subscribe_invalid_connection (::Components::Events_ptr source, + ::Components::Events_ptr sink) +{ + ::Components::EventConsumerBase_var consumer = + get_consumer (sink, "consume_do_something"); + if (::CORBA::is_nil (consumer.in ())) + { + ACE_ERROR ((LM_ERROR, "Events test_subscribe_invalid_connection - " + "Error:Consumer seems nil.\n")); + return 1; + } + + ::Components::Cookie_var ck; + try + { + ck = source->subscribe ("publish_do_something_else", + consumer.in ()); + ACE_ERROR ((LM_ERROR, "Events test_subscribe_invalid_connection - " + "Error: No InvalidConnection exception caught.\n")); + return 1; + } + catch (const ::Components::InvalidName &) + { + ACE_ERROR ((LM_ERROR, "Events test_subscribe_invalid_connection - " + "Error: InvalidName exception caught " + "during subscribe.\n")); + } + catch (const ::Components::InvalidConnection &) + { + ACE_DEBUG ((LM_DEBUG, "Events test_subscribe_invalid_connection - " + "Received expected InvalidConnection exception " + "during subscribe.\n")); + ACE_DEBUG ((LM_DEBUG, "Events test_subscribe_invalid_connection - " + "Test passed!\n")); + return 0; + } + catch (const ::Components::ExceededConnectionLimit &) + { + ACE_ERROR ((LM_ERROR, "Events test_subscribe_invalid_connection - " + "Error: ExceededConnectionLimit exception caught " + "during subscribe.\n")); + return 1; + } + catch (const ::CORBA::Exception &e) + { + e._tao_print_exception ("Events test_subscribe_invalid_connection - "); + return 1; + } + catch (...) + { + ACE_ERROR ((LM_ERROR, "Events test_subscribe_invalid_connection - " + "Error: Unknown exception caught " + "during subscribe.\n")); + return 1; + } + ACE_DEBUG ((LM_DEBUG, "Events test_subscribe_invalid_connection - " + "Test passed!\n")); + return 0; +} +#endif + +#if !defined (CCM_NOEVENT) +//============================================================ +// connect_consumer +//============================================================ +int +connect_consumer (::Components::Events_ptr source, + ::Components::Events_ptr sink, + const char * name) +{ + ::Components::EventConsumerBase_var consumer = + get_consumer (sink, "consume_do_something"); + if (::CORBA::is_nil (consumer.in ())) + { + ACE_ERROR ((LM_ERROR, "Events connect_consumer - " + "Error:Consumer seems nil.\n")); + return 1; + } + try + { + source->connect_consumer (name, + consumer.in ()); + } + catch (const ::Components::InvalidName &) + { + ACE_ERROR ((LM_ERROR, "Events connect_consumer - " + "Error: InvalidName exception caught " + "during connect_consumer.\n")); + } + catch (const ::Components::InvalidConnection &) + { + ACE_ERROR ((LM_ERROR, "Events connect_consumer - " + "Error: InvalidConnection exception caught " + "during connect_consumer.\n")); + return 1; + } + catch (const ::Components::AlreadyConnected &) + { + ACE_ERROR ((LM_ERROR, "Events connect_consumer - " + "Error: AlreadyConnected exception caught " + "during connect_consumer.\n")); + return 1; + } + catch (...) + { + ACE_ERROR ((LM_ERROR, "Events connect_consumer - " + "Error: Unknown exception caught " + "during connect_consumer.\n")); + return 1; + } + return 0; +} +#endif + +#if !defined (CCM_NOEVENT) +//============================================================ +// disconnect_consumer +//============================================================ +int +disconnect_consumer (::Components::Events_ptr source, + const char * name) +{ + try + { + ::Components::EventConsumerBase_var obj = + source->disconnect_consumer (name); + if (::CORBA::is_nil (obj.in ())) + { + ACE_ERROR ((LM_ERROR, "Events disconnect_consumer - " + "Error: Returned object from disconnect_consumer " + "seems nil.\n")); + return 1; + } + } + catch (const ::Components::InvalidName &) + { + ACE_ERROR ((LM_ERROR, "Events disconnect_consumer - " + "Error: InvalidName exception caught " + "during disconnect_consumer.\n")); + return 1; + } + catch (const ::Components::NoConnection &) + { + ACE_ERROR ((LM_ERROR, "Events disconnect_consumer - " + "Error: NoConnection exception caught " + "during disconnect_consumer.\n")); + return 1; + } + catch (...) + { + ACE_ERROR ((LM_ERROR, "Events disconnect_consumer - " + "Error: Unknown exception caught " + "during disconnect_consumer.\n")); + return 1; + } + return 0; +} +#endif + +#if !defined (CCM_NOEVENT) +//============================================================ +// test_connect_disconnect_consumer +//============================================================ +int +test_connect_disconnect_consumer (::Components::Events_ptr source, + ::Components::Events_ptr sink) +{ + if (connect_consumer (source, sink, "emit_do_something") == 0) + { + if (disconnect_consumer (source, "emit_do_something") == 0) + { + ACE_DEBUG ((LM_DEBUG, "Events test_connect_disconnect_consumer - " + "Test passed!\n")); + return 0; + } + } + return 1; +} +#endif + +#if !defined (CCM_NOEVENT) +//============================================================ +// test_connect_consumer_invalid_name +//============================================================ +int +test_connect_consumer_invalid_name (::Components::Events_ptr source, + ::Components::Events_ptr sink) +{ + ::Components::EventConsumerBase_var consumer = + get_consumer (sink, "consume_do_something"); + if (::CORBA::is_nil (consumer.in ())) + { + ACE_ERROR ((LM_ERROR, "Events test_connect_consumer_invalid_name - " + "Error:Consumer seems nil.\n")); + return 1; + } + try + { + source->connect_consumer ("emit_do_something_invalid_name", + consumer.in ()); + ACE_ERROR ((LM_ERROR, "Events test_connect_consumer_invalid_name - " + "Error: No InvalidName exception received.\n")); + disconnect_consumer (source, "emit_do_something"); + } + catch (const ::Components::InvalidName &) + { + ACE_DEBUG ((LM_DEBUG, "Events test_connect_consumer_invalid_name - " + "Received InvalidName exception " + "during connect_consumer.\n")); + } + catch (const ::Components::InvalidConnection &) + { + ACE_ERROR ((LM_ERROR, "Events test_connect_consumer_invalid_name - " + "Error: InvalidConnection exception caught " + "during connect_consumer.\n")); + return 1; + } + catch (const ::Components::AlreadyConnected &) + { + ACE_ERROR ((LM_ERROR, "Events test_connect_consumer_invalid_name - " + "Error: AlreadyConnected exception caught " + "during connect_consumer.\n")); + return 1; + } + catch (...) + { + ACE_ERROR ((LM_ERROR, "Events test_connect_consumer_invalid_name - " + "Error: Unknown exception caught " + "during connect_consumer.\n")); + return 1; + } + ACE_DEBUG ((LM_DEBUG, "Events test_connect_consumer_invalid_name - " + "Test passed!\n")); + return 0; +} +#endif + +#if !defined (CCM_NOEVENT) +//============================================================ +// test_connect_consumer_already_connected +//============================================================ +int +test_connect_consumer_already_connected (::Components::Events_ptr source, + ::Components::Events_ptr sink) +{ + ::Components::EventConsumerBase_var consumer = + get_consumer (sink, "consume_do_something"); + if (::CORBA::is_nil (consumer.in ())) + { + ACE_ERROR ((LM_ERROR, "Events test_connect_consumer_already_connected - " + "Error:Consumer seems nil.\n")); + return 1; + } + try + { + source->connect_consumer ("emit_do_something", + consumer.in ()); + source->connect_consumer ("emit_do_something", + consumer.in ()); + ACE_ERROR ((LM_ERROR, "Events test_connect_consumer_already_connected - " + "Error: No AlreadyConnected exception received.\n")); + disconnect_consumer (source, "emit_do_something"); + } + catch (const ::Components::InvalidName &) + { + ACE_ERROR ((LM_ERROR, "Events test_connect_consumer_already_connected - " + "Error: InvalidName exception caught " + "during connect_consumer.\n")); + return 1; + } + catch (const ::Components::InvalidConnection &) + { + ACE_ERROR ((LM_ERROR, "Events test_connect_consumer_already_connected - " + "Error: InvalidConnection exception caught " + "during connect_consumer.\n")); + return 1; + } + catch (const ::Components::AlreadyConnected &) + { + ACE_DEBUG ((LM_DEBUG, "Events test_connect_consumer_already_connected - " + "Received AlreadyConnected exception " + "during connect_consumer.\n")); + disconnect_consumer (source, "emit_do_something"); + } + catch (...) + { + ACE_ERROR ((LM_ERROR, "Events test_connect_consumer_already_connected - " + "Error: Unknown exception caught " + "during connect_consumer.\n")); + return 1; + } + ACE_DEBUG ((LM_DEBUG, "Events test_connect_consumer_already_connected - " + "Test passed!\n")); + return 0; +} +#endif + +#if !defined (CCM_NOEVENT) +//============================================================ +// test_connect_consumer_invalid_connection +//============================================================ +int +test_connect_consumer_invalid_connection (::Components::Events_ptr source, + ::Components::Events_ptr sink) +{ + ::Components::EventConsumerBase_var consumer = + get_consumer (sink, "consume_do_something"); + if (::CORBA::is_nil (consumer.in ())) + { + ACE_ERROR ((LM_ERROR, "Events test_connect_consumer_invalid_connection - " + "Error:Consumer seems nil.\n")); + return 1; + } + try + { + source->connect_consumer ("emit_do_something_else", + consumer.in ()); + ACE_ERROR ((LM_ERROR, "Events test_connect_consumer_invalid_connection - " + "Error: No InvalidConnection exception received.\n")); + disconnect_consumer (source, "emit_do_something_else"); + } + catch (const ::Components::InvalidName &) + { + ACE_ERROR ((LM_ERROR, "Events test_connect_consumer_invalid_connection - " + "Error: InvalidName exception caught " + "during connect_consumer.\n")); + return 1; + } + catch (const ::Components::InvalidConnection &) + { + ACE_DEBUG ((LM_DEBUG, "Events test_connect_consumer_invalid_connection - " + "Received InvalidConnection exception " + "during connect_consumer.\n")); + } + catch (const ::Components::AlreadyConnected &) + { + ACE_ERROR ((LM_ERROR, "Events test_connect_consumer_invalid_connection - " + "Error: AlreadyConnected exception caught" + "during connect_consumer.\n")); + return 1; + } + catch (...) + { + ACE_ERROR ((LM_ERROR, "Events test_connect_consumer_invalid_connection - " + "Error: Unknown exception caught " + "during connect_consumer.\n")); + return 1; + } + ACE_DEBUG ((LM_DEBUG, "Events test_connect_consumer_invalid_connection - " + "Test passed!\n")); + return 0; +} +#endif + +#if !defined (CCM_NOEVENT) +//============================================================ +// test_disconnect_consumer_invalid_name +//============================================================ +int +test_disconnect_consumer_invalid_name (::Components::Events_ptr source, + ::Components::Events_ptr sink) +{ + try + { + if (connect_consumer (source, sink, "emit_do_something") == 0) + { + ::Components::EventConsumerBase_var obj = + source->disconnect_consumer ("emit_do_something_invalid_name"); + ACE_ERROR ((LM_ERROR, "Events test_disconnect_consumer_invalid_name - " + "Error: No InvalidName exception received.\n")); + return 1; + } + else + { + ACE_ERROR ((LM_ERROR, "Events test_disconnect_consumer_invalid_name - " + "Error: Unable to connect to consumer.\n")); + return 1; + } + } + catch (const ::Components::InvalidName &) + { + ACE_DEBUG ((LM_DEBUG, "Events test_disconnect_consumer_invalid_name - " + "Received InvalidName exception " + "during disconnect_consumer.\n")); + disconnect_consumer (source, "emit_do_something"); + } + catch (const ::Components::NoConnection &) + { + ACE_ERROR ((LM_ERROR, "Events test_disconnect_consumer_invalid_name - " + "Error: NoConnection exception caught " + "during disconnect_consumer.\n")); + return 1; + } + catch (...) + { + ACE_ERROR ((LM_ERROR, "Events test_disconnect_consumer_invalid_name - " + "Error: Unknown exception caught " + "during connect_consumer.\n")); + return 1; + } + ACE_DEBUG ((LM_DEBUG, "Events test_disconnect_consumer_invalid_name - " + "Test passed!\n")); + return 0; +} +#endif + +#if !defined (CCM_NOEVENT) +//============================================================ +// test_disconnect_consumer_no_connection +//============================================================ +int +test_disconnect_consumer_no_connection (::Components::Events_ptr source) +{ + try + { + ::Components::EventConsumerBase_var obj = + source->disconnect_consumer ("emit_do_something"); + ACE_ERROR ((LM_ERROR, "Events test_disconnect_consumer_no_connection - " + "Error: No NoConnection exception received.\n")); + return 1; + } + catch (const ::Components::InvalidName &) + { + ACE_ERROR ((LM_ERROR, "Events test_disconnect_consumer_no_connection - " + "Error: InvalidName exception caught " + "during disconnect_consumer.\n")); + return 1; + } + catch (const ::Components::NoConnection &) + { + ACE_DEBUG ((LM_DEBUG, "Events test_disconnect_consumer_no_connection - " + "Received NoConnection exception " + "during disconnect_consumer.\n")); + } + catch (...) + { + ACE_ERROR ((LM_ERROR, "Events test_disconnect_consumer_no_connection - " + "Error: Unknown exception caught " + "during connect_consumer.\n")); + return 1; + } + ACE_DEBUG ((LM_DEBUG, "Events test_disconnect_consumer_no_connection - " + "Test passed!\n")); + return 0; +} +#endif + +#if !defined (CCM_LW) && !defined (CCM_NOEVENT) +//============================================================ +// test_get_all_consumers +//============================================================ +int +test_get_all_consumers (::Components::Events_ptr sink) +{ + int ret = 0; + try + { + ::Components::ConsumerDescriptions_var cds = + sink->get_all_consumers (); + if (cds->length () != 2) + { + ACE_ERROR ((LM_ERROR, "Events test_get_all_consumers - " + "Error: Unexpected number of ConsumerDescriptions: " + "expected <2> - received <%d>.\n", + cds->length ())); + ++ret; + } + for (::CORBA::ULong i = 0UL; i < cds->length (); ++i) + { + if (::ACE_OS::strcmp (cds[i]->name (), "consume_do_something") == 0 || + ::ACE_OS::strcmp (cds[i]->name (), "consume_do_something_else") == 0) + { + ACE_DEBUG ((LM_DEBUG, "Events test_get_all_consumers - " + "Correct consumer description found <%C>\n", + cds[i]->name ())); + } + else + { + ACE_ERROR ((LM_ERROR, "Events test_get_all_consumers - " + "Error Incorrect consumer description found <%C>\n", + cds[i]->name ())); + ++ret; + } + if (::CORBA::is_nil (cds[i]->consumer ())) + { + ACE_ERROR ((LM_ERROR, "Events test_get_all_consumers - " + "Error: Consumer of %C seems nil.\n", + cds[i]->name ())); + ++ret; + } + } + } + catch (const ::CORBA::Exception &ex) + { + ex._tao_print_exception ("test_get_all_consumers. Error: "); + return 1; + } + catch (...) + { + ACE_ERROR ((LM_ERROR, "Events test_get_all_consumers - " + "Error: Unknown exception caught " + "during get_all_consumers.\n")); + return 1; + } + if (ret == 0) + { + ACE_DEBUG ((LM_DEBUG, "Events test_get_all_consumers - " + "Test passed!\n")); + } + return ret; +} +#endif + +#if !defined (CCM_LW) && !defined (CCM_NOEVENT) +//============================================================ +// test_get_named_consumers +//============================================================ +int +test_get_named_consumers (::Components::Events_ptr sink) +{ + int ret = 0; + try + { + ::Components::NameList_var names; + ACE_NEW_THROW_EX (names, + ::Components::NameList, + CORBA::NO_MEMORY ()); + names->length (1); + (*names)[0] = CORBA::string_dup ("consume_do_something_else"); + ::Components::ConsumerDescriptions_var cds = + sink->get_named_consumers (names); + if (cds->length () != 1) + { + ACE_ERROR ((LM_ERROR, "Events test_get_named_consumers <1> - " + "Error: Unexpected number of ConsumerDescriptions: " + "expected <1> - received <%d>.\n", + cds->length ())); + ++ret; + } + for (::CORBA::ULong i = 0UL; i < cds->length (); ++i) + { + if (::ACE_OS::strcmp (cds[i]->name (), "consume_do_something_else") == 0) + { + ACE_DEBUG ((LM_DEBUG, "Events test_get_named_consumers <1> - " + "Correct consumer description found <%C>\n", + cds[i]->name ())); + } + else + { + ACE_ERROR ((LM_ERROR, "Events test_get_named_consumers <1> - " + "Error Incorrect consumer description found <%C>\n", + cds[i]->name ())); + ++ret; + } + if (::CORBA::is_nil (cds[i]->consumer ())) + { + ACE_ERROR ((LM_ERROR, "Events test_get_named_consumers <1> - " + "Error: Consumer of %C seems nil.\n", + cds[i]->name ())); + ++ret; + } + } + + names->length (2); + (*names)[0] = CORBA::string_dup ("consume_do_something"); + (*names)[1] = CORBA::string_dup ("consume_do_something_else"); + cds = sink->get_named_consumers (names); + if (cds->length () != 2) + { + ACE_ERROR ((LM_ERROR, "Events test_get_named_consumers <2> - " + "Error: Unexpected number of ConsumerDescriptions: " + "expected <2> - received <%d>.\n", + cds->length ())); + ++ret; + } + for (::CORBA::ULong i = 0UL; i < cds->length (); ++i) + { + if (::ACE_OS::strcmp (cds[i]->name (), "consume_do_something") == 0 || + ::ACE_OS::strcmp (cds[i]->name (), "consume_do_something_else") == 0) + { + ACE_DEBUG ((LM_DEBUG, "Events test_get_named_consumers <2> - " + "Correct consumer description found <%C>\n", + cds[i]->name ())); + } + else + { + ACE_ERROR ((LM_ERROR, "Events test_get_named_consumers <2> - " + "Error Incorrect consumer description found <%C>\n", + cds[i]->name ())); + ++ret; + } + if (::CORBA::is_nil (cds[i]->consumer ())) + { + ACE_ERROR ((LM_ERROR, "Events test_get_named_consumers <2> - " + "Error: Consumer of %C seems nil.\n", + cds[i]->name ())); + ++ret; + } + } + } + catch (const ::Components::InvalidName &) + { + ACE_ERROR ((LM_ERROR, "Events test_get_named_consumers - " + "Error: InvalidName exception caught " + "during get_named_consumers.\n")); + return 1; + } + catch (const ::CORBA::Exception &ex) + { + ex._tao_print_exception ("test_get_named_consumers. Error: "); + return 1; + } + catch (...) + { + ACE_ERROR ((LM_ERROR, "Events test_get_named_consumers - " + "Error: Unknown exception caught " + "during get_named_consumers.\n")); + return 1; + } + if (ret == 0) + { + ACE_DEBUG ((LM_DEBUG, "Events test_get_named_consumers - " + "Test passed!\n")); + } + return ret; +} +#endif + +#if !defined (CCM_LW) && !defined (CCM_NOEVENT) +//============================================================ +// test_consumer_of_consumer +//============================================================ +int +test_consumer_of_consumer (::Components::Events_ptr source, + ::Components::Events_ptr sink) +{ + int ret = 0; + + try + { + connect_consumer (source, sink, "emit_do_something"); + ::Components::NameList_var names; + ACE_NEW_THROW_EX (names, + ::Components::NameList, + CORBA::NO_MEMORY ()); + names->length (1); + (*names)[0] = CORBA::string_dup ("consume_do_something"); + ::Components::ConsumerDescriptions_var cds = + sink->get_named_consumers (names); + if (cds->length () != 1) + { + ACE_ERROR ((LM_ERROR, "Events test_consumer_of_consumer - " + "Error: Unexpected number of consumer " + "descriptions found. expected <1> - " + "received <%u>\n", + cds->length ())); + return 1; + } + if (::CORBA::is_nil (cds[0UL]->consumer())) + { + ACE_ERROR ((LM_ERROR, "Events test_consumer_of_consumer - " + "Error: Consumer of consumer description " + "seems to be nil.\n")); + return 1; + } + disconnect_consumer (source, "emit_do_something"); + } + catch (const ::Components::InvalidName &) + { + ACE_ERROR ((LM_ERROR, "Events test_consumer_of_consumer - " + "Error: Unexpected InvalidName exception caught" + "during get_named_consumers.\n")); + ++ret; + } + catch (const ::CORBA::Exception &ex) + { + ex._tao_print_exception ("test_consumer_of_consumer . Error: "); + ++ret; + } + catch (...) + { + ACE_ERROR ((LM_ERROR, "Events test_consumer_of_consumer - " + "Error: Unknown exception caught " + "during get_named_consumers.\n")); + ++ret; + } + if (ret == 0) + { + ACE_DEBUG ((LM_DEBUG, "Events test_get_named_consumers - " + "Test passed!\n")); + } + return ret; +} +#endif + +#if !defined (CCM_LW) && !defined (CCM_NOEVENT) +//============================================================ +// test_get_named_consumers_invalid_name +//============================================================ +int +test_get_named_consumers_invalid_name (::Components::Events_ptr sink) +{ + int ret = 0; + + ::Components::NameList_var names; + ACE_NEW_THROW_EX (names, + ::Components::NameList, + CORBA::NO_MEMORY ()); + ::Components::ConsumerDescriptions_var cds; + + try + { + names->length (1); + (*names)[0] = CORBA::string_dup ("consume_do_something_invalid_name"); + cds = sink->get_named_consumers (names); + ACE_ERROR ((LM_ERROR, "Events test_get_named_consumers_invalid_name <1> - " + "Error: No InvalidName exception caught " + "during get_named_consumers\n")); + ++ret; + } + catch (const ::Components::InvalidName &) + { + ACE_DEBUG ((LM_DEBUG, "Events test_get_named_consumers_invalid_name <1> - " + "Received InvalidName exception " + "during get_named_consumers.\n")); + } + catch (const ::CORBA::Exception &ex) + { + ex._tao_print_exception ("test_get_named_consumers_invalid_name <1> . Error: "); + ++ret; + } + catch (...) + { + ACE_ERROR ((LM_ERROR, "Events test_get_named_consumers_invalid_name <1> - " + "Error: Unknown exception caught " + "during get_named_consumers.\n")); + ++ret; + } + + try + { + names->length (2); + (*names)[0] = CORBA::string_dup ("consume_do_something"); + (*names)[1] = CORBA::string_dup ("consume_do_something_else_invalid_name"); + cds = sink->get_named_consumers (names); + ACE_ERROR ((LM_ERROR, "Events test_get_named_consumers_invalid_name <2> - " + "Error: No InvalidName exception caught " + "during get_named_consumers\n")); + ++ret; + } + catch (const ::Components::InvalidName &) + { + ACE_DEBUG ((LM_DEBUG, "Events test_get_named_consumers_invalid_name <2> - " + "Received InvalidName exception " + "during get_named_consumers.\n")); + } + catch (const ::CORBA::Exception &ex) + { + ex._tao_print_exception ("test_get_named_consumers_invalid_name <2>. Error: "); + ++ret; + } + catch (...) + { + ACE_ERROR ((LM_ERROR, "Events test_get_named_consumers_invalid_name <2> - " + "Error: Unknown exception caught " + "during get_named_consumers.\n")); + ++ret; + } + if (ret == 0) + { + ACE_DEBUG ((LM_DEBUG, "Events test_get_named_consumers_invalid_name - " + "Test passed!\n")); + } + return ret; +} +#endif + +#if !defined (CCM_LW) && !defined (CCM_NOEVENT) +//============================================================ +// test_get_all_emitters +//============================================================ +int +test_get_all_emitters (::Components::Events_ptr source) +{ + int ret = 0; + + try + { + ::Components::EmitterDescriptions_var eds = + source->get_all_emitters (); + if (eds->length () != 2) + { + ACE_ERROR ((LM_ERROR, "Events test_get_all_emitters - " + "Error: Unexpected number of Emitter " + "descriptions received. expected - " + "received <%u>\n", + eds->length ())); + ++ret; + } + for (::CORBA::ULong i = 0UL; i < eds->length (); ++i) + { + if (::ACE_OS::strcmp (eds[i]->name (), "emit_do_something") == 0 || + ::ACE_OS::strcmp (eds[i]->name (), "emit_do_something_else") == 0) + { + ACE_DEBUG ((LM_DEBUG, "Events test_get_all_emitters - " + "Correct emitter description found <%C>\n", + eds[i]->name ())); + } + else + { + ACE_ERROR ((LM_ERROR, "Events test_get_all_emitters - " + "Error Incorrect emitter description found <%C>\n", + eds[i]->name ())); + ++ret; + } + } + } + catch (const ::CORBA::Exception &ex) + { + ex._tao_print_exception ("test_get_all_emitters. Error: "); + return 1; + } + catch (...) + { + ACE_ERROR ((LM_ERROR, "Events test_get_all_emitters - " + "Error: Unknown exception caught " + "during get_all_emitters.\n")); + return 1; + } + if (ret == 0) + { + ACE_DEBUG ((LM_DEBUG, "Events test_get_all_emitters - " + "Test passed!\n")); + } + return ret; +} +#endif + +#if !defined (CCM_LW) && !defined (CCM_NOEVENT) +//============================================================ +// test_get_named_emitters +//============================================================ +int +test_get_named_emitters (::Components::Events_ptr source) +{ + int ret = 0; + try + { + ::Components::NameList_var names; + ACE_NEW_THROW_EX (names, + ::Components::NameList, + CORBA::NO_MEMORY ()); + names->length (1); + (*names)[0] = CORBA::string_dup ("emit_do_something_else"); + ::Components::EmitterDescriptions_var eds = + source->get_named_emitters (names); + if (eds->length () != 1) + { + ACE_ERROR ((LM_ERROR, "Events test_get_named_emitters <1> - " + "Error: Unexpected number of ConsumerDescriptions: " + "expected <1> - received <%d>.\n", + eds->length ())); + ++ret; + } + for (::CORBA::ULong i = 0UL; i < eds->length (); ++i) + { + if (::ACE_OS::strcmp (eds[i]->name (), "emit_do_something_else") == 0) + { + ACE_DEBUG ((LM_DEBUG, "Events test_get_named_emitters <1> - " + "Correct emitter description found <%C>\n", + eds[i]->name ())); + } + else + { + ACE_ERROR ((LM_ERROR, "Events test_get_named_emitters <1> - " + "Error Incorrect emitter description found <%C>\n", + eds[i]->name ())); + ++ret; + } + } + + names->length (2); + (*names)[0] = CORBA::string_dup ("emit_do_something"); + (*names)[1] = CORBA::string_dup ("emit_do_something_else"); + eds = source->get_named_emitters (names); + if (eds->length () != 2) + { + ACE_ERROR ((LM_ERROR, "Events test_get_named_emitters <2> - " + "Error: Unexpected number of EmitterDescriptions: " + "expected <2> - received <%d>.\n", + eds->length ())); + ++ret; + } + for (::CORBA::ULong i = 0UL; i < eds->length (); ++i) + { + if (::ACE_OS::strcmp (eds[i]->name (), "emit_do_something") == 0 || + ::ACE_OS::strcmp (eds[i]->name (), "emit_do_something_else") == 0) + { + ACE_DEBUG ((LM_DEBUG, "Events test_get_named_emitters <2> - " + "Correct emitter description found <%C>\n", + eds[i]->name ())); + } + else + { + ACE_ERROR ((LM_ERROR, "Events test_get_named_emitters <2> - " + "Error Incorrect emitter description found <%C>\n", + eds[i]->name ())); + ++ret; + } + } + } + catch (const ::Components::InvalidName &) + { + ACE_ERROR ((LM_ERROR, "Events test_get_named_emitters - " + "Error: InvalidName exception caught " + "during get_named_emitters.\n")); + return 1; + } + catch (const ::CORBA::Exception &ex) + { + ex._tao_print_exception ("test_get_named_emitters. Error: "); + return 1; + } + catch (...) + { + ACE_ERROR ((LM_ERROR, "Events test_get_named_emitters - " + "Error: Unknown exception caught " + "during get_named_emitters.\n")); + return 1; + } + if (ret == 0) + { + ACE_DEBUG ((LM_DEBUG, "Events test_get_named_emitters - " + "Test passed!\n")); + } + return ret; +} +#endif + +#if !defined (CCM_LW) && !defined (CCM_NOEVENT) +//============================================================ +// test_consumer_of_emitter +//============================================================ +int +test_consumer_of_emitter (::Components::Events_ptr source, + ::Components::Events_ptr sink) +{ + int ret = 0; + try + { + connect_consumer (source, sink, "emit_do_something"); + ::Components::NameList_var names; + ACE_NEW_THROW_EX (names, + ::Components::NameList, + CORBA::NO_MEMORY ()); + names->length (1); + (*names)[0] = CORBA::string_dup ("emit_do_something"); + ::Components::EmitterDescriptions_var eds = + source->get_named_emitters (names); + if (eds->length () != 1) + { + ACE_ERROR ((LM_ERROR, "Events test_consumer_of_emitter - " + "Error: Unexpected number of ConsumerDescriptions: " + "expected <1> - received <%d>.\n", + eds->length ())); + return 1; + } + if (::CORBA::is_nil (eds[0UL]->consumer ())) + { + ACE_ERROR ((LM_ERROR, "Events test_consumer_of_emitter - " + "Error: Consumer of Emmitter description " + "seems nil.\n")); + } + disconnect_consumer (source, "emit_do_something"); + } + catch (const ::Components::InvalidName &) + { + ACE_ERROR ((LM_ERROR, "Events test_consumer_of_emitter - " + "Error: InvalidName exception caught " + "during get_named_emitters.\n")); + return 1; + } + catch (const ::CORBA::Exception &ex) + { + ex._tao_print_exception ("test_consumer_of_emitter. Error: "); + return 1; + } + catch (...) + { + ACE_ERROR ((LM_ERROR, "Events test_consumer_of_emitter - " + "Error: Unknown exception caught " + "during get_named_emitters.\n")); + return 1; + } + if (ret == 0) + { + ACE_DEBUG ((LM_DEBUG, "Events test_consumer_of_emitter - " + "Test passed!\n")); + } + return ret; +} +#endif + +#if !defined (CCM_LW) && !defined (CCM_NOEVENT) +//============================================================ +// test_get_named_emitters_invalid_name +//============================================================ +int +test_get_named_emitters_invalid_name (::Components::Events_ptr source) +{ + try + { + ::Components::NameList_var names; + ACE_NEW_THROW_EX (names, + ::Components::NameList, + CORBA::NO_MEMORY ()); + names->length (2); + (*names)[0] = CORBA::string_dup ("emit_do_something"); + (*names)[1] = CORBA::string_dup ("emit_do_something_else_invalid_name"); + ::Components::EmitterDescriptions_var eds = + source->get_named_emitters (names); + ACE_ERROR ((LM_ERROR, "Events test_get_named_emitters_invalid_name - " + "Error: No InvalidName exception caught " + "during get_named_emitters\n")); + return 1; + } + catch (const ::Components::InvalidName &) + { + ACE_DEBUG ((LM_DEBUG, "Events test_get_named_emitters_invalid_name - " + "Received InvalidName exception " + "during get_named_emitters.\n")); + ACE_DEBUG ((LM_DEBUG, "Events test_get_named_emitters_invalid_name - " + "Test passed!\n")); + return 0; + } + catch (const ::CORBA::Exception &ex) + { + ex._tao_print_exception ("test_get_named_emitters_invalid_name. Error: "); + return 1; + } + catch (...) + { + ACE_ERROR ((LM_ERROR, "Events test_get_named_emitters_invalid_name - " + "Error: Unknown exception caught " + "during get_named_emitters.\n")); + return 1; + } + return 1; +} +#endif + +#if !defined (CCM_LW) && !defined (CCM_NOEVENT) +//============================================================ +// test_get_all_publishers +//============================================================ +int +test_get_all_publishers (::Components::Events_ptr source) +{ + int ret = 0; + + try + { + ::Components::PublisherDescriptions_var pds = + source->get_all_publishers (); + if (pds->length () != 2) + { + ACE_ERROR ((LM_ERROR, "Events test_get_all_publishers - " + "Error: Unexpected number of Emitter " + "descriptions received. expected - " + "received <%u>\n", + pds->length ())); + ++ret; + } + for (::CORBA::ULong i = 0UL; i < pds->length (); ++i) + { + if (::ACE_OS::strcmp (pds[i]->name (), "publish_do_something") == 0 || + ::ACE_OS::strcmp (pds[i]->name (), "publish_do_something_else") == 0) + { + ACE_DEBUG ((LM_DEBUG, "Events test_get_all_publishers - " + "Correct publisher description found <%C>\n", + pds[i]->name ())); + } + else + { + ACE_ERROR ((LM_ERROR, "Events test_get_all_publishers - " + "Error Incorrect publisher description found <%C>\n", + pds[i]->name ())); + ++ret; + } + } + } + catch (const ::CORBA::Exception &ex) + { + ex._tao_print_exception ("test_get_all_publishers. Error: "); + return 1; + } + catch (...) + { + ACE_ERROR ((LM_ERROR, "Events test_get_all_publishers - " + "Error: Unknown exception caught " + "during get_all_publishers.\n")); + return 1; + } + if (ret == 0) + { + ACE_DEBUG ((LM_DEBUG, "Events test_get_all_publishers - " + "Test passed!\n")); + } + return ret; +} +#endif + +#if !defined (CCM_LW) && !defined (CCM_NOEVENT) +//============================================================ +// test_get_named_publishers +//============================================================ +int +test_get_named_publishers (::Components::Events_ptr source) +{ + int ret = 0; + try + { + ::Components::NameList_var names; + ACE_NEW_THROW_EX (names, + ::Components::NameList, + CORBA::NO_MEMORY ()); + names->length (1); + (*names)[0] = CORBA::string_dup ("publish_do_something_else"); + ::Components::PublisherDescriptions_var pds = + source->get_named_publishers (names); + if (pds->length () != 1) + { + ACE_ERROR ((LM_ERROR, "Events test_get_named_publishers <1> - " + "Error: Unexpected number of PublisherDescriptions: " + "expected <1> - received <%d>.\n", + pds->length ())); + ++ret; + } + for (::CORBA::ULong i = 0UL; i < pds->length (); ++i) + { + if (::ACE_OS::strcmp (pds[i]->name (), "publish_do_something_else") == 0) + { + ACE_DEBUG ((LM_DEBUG, "Events test_get_named_publishers <1> - " + "Correct publisher description found <%C>\n", + pds[i]->name ())); + } + else + { + ACE_ERROR ((LM_ERROR, "Events test_get_named_publishers <1> - " + "Error Incorrect publisher description found <%C>\n", + pds[i]->name ())); + ++ret; + } + } + + names->length (2); + (*names)[0] = CORBA::string_dup ("publish_do_something"); + (*names)[1] = CORBA::string_dup ("publish_do_something_else"); + pds = source->get_named_publishers (names); + if (pds->length () != 2) + { + ACE_ERROR ((LM_ERROR, "Events test_get_named_publishers <2> - " + "Error: Unexpected number of PublisherDescriptions: " + "expected <2> - received <%d>.\n", + pds->length ())); + ++ret; + } + for (::CORBA::ULong i = 0UL; i < pds->length (); ++i) + { + if (::ACE_OS::strcmp (pds[i]->name (), "publish_do_something") == 0 || + ::ACE_OS::strcmp (pds[i]->name (), "publish_do_something_else") == 0) + { + ACE_DEBUG ((LM_DEBUG, "Events test_get_named_publishers <2> - " + "Correct publisher description found <%C>\n", + pds[i]->name ())); + } + else + { + ACE_ERROR ((LM_ERROR, "Events test_get_named_publishers <2> - " + "Error Incorrect publisher description found <%C>\n", + pds[i]->name ())); + ++ret; + } + } + } + catch (const ::Components::InvalidName &) + { + ACE_ERROR ((LM_ERROR, "Events test_get_named_publishers - " + "Error: InvalidName exception caught " + "during get_named_publishers.\n")); + return 1; + } + catch (const ::CORBA::Exception &ex) + { + ex._tao_print_exception ("test_get_named_publishers. Error: "); + return 1; + } + catch (...) + { + ACE_ERROR ((LM_ERROR, "Events test_get_named_publishers - " + "Error: Unknown exception caught " + "during get_named_publishers.\n")); + return 1; + } + if (ret == 0) + { + ACE_DEBUG ((LM_DEBUG, "Events test_get_named_publishers - " + "Test passed!\n")); + } + return ret; +} +#endif + +#if !defined (CCM_LW) && !defined (CCM_NOEVENT) +//============================================================ +// test_get_named_publishers_invalid_name +//============================================================ +int +test_get_named_publishers_invalid_name (::Components::Events_ptr source) +{ + try + { + ::Components::NameList_var names; + ACE_NEW_THROW_EX (names, + ::Components::NameList, + CORBA::NO_MEMORY ()); + names->length (2); + (*names)[0] = CORBA::string_dup ("publish_do_something"); + (*names)[1] = CORBA::string_dup ("publish_do_something_else_invalid_name"); + ::Components::PublisherDescriptions_var pds = + source->get_named_publishers (names); + ACE_ERROR ((LM_ERROR, "Events test_get_named_publishers_invalid_name - " + "Error: No InvalidName exception caught " + "during get_named_publishers\n")); + return 1; + } + catch (const ::Components::InvalidName &) + { + ACE_DEBUG ((LM_DEBUG, "Events test_get_named_publishers_invalid_name - " + "Received InvalidName exception " + "during get_named_publishers.\n")); + ACE_DEBUG ((LM_DEBUG, "Events test_get_named_publishers_invalid_name - " + "Test passed!\n")); + return 0; + } + catch (const ::CORBA::Exception &ex) + { + ex._tao_print_exception ("test_get_named_publishers_invalid_name. Error: "); + return 1; + } + catch (...) + { + ACE_ERROR ((LM_ERROR, "Events test_get_named_publishers_invalid_name - " + "Error: Unknown exception caught " + "during get_named_publishers.\n")); + return 1; + } + return 1; +} +#endif + +#if !defined (CCM_LW) && !defined (CCM_NOEVENT) +//============================================================ +// test_get_named_publishers_invalid_name +//============================================================ +int +test_consumers_of_publishers (::Components::Events_ptr source, + ::Components::Events_ptr sink) +{ + int ret = 0; + try + { + ::Components::EventConsumerBase_var consumer1 = + get_consumer (sink, "consume_do_something"); + ::Components::EventConsumerBase_var consumer2 = + get_consumer (sink, "consume_do_something"); + if (::CORBA::is_nil (consumer1.in ()) || + ::CORBA::is_nil (consumer1.in ())) + { + ACE_ERROR ((LM_ERROR, "Events test_consumers_of_publishers - " + "Error: One of the consumers seems nil.\n")); + return 1; + } + ::Components::Cookie_var ck1 = source->subscribe ("publish_do_something", + consumer1.in ()); + ::Components::Cookie_var ck2 = source->subscribe ("publish_do_something", + consumer2.in ()); + ::Components::NameList_var names; + ACE_NEW_THROW_EX (names, + ::Components::NameList, + CORBA::NO_MEMORY ()); + names->length (1); + (*names)[0] = CORBA::string_dup ("publish_do_something"); + ::Components::PublisherDescriptions_var pds = + source->get_named_publishers (names); + + if (pds->length () != 1) + { + ACE_ERROR ((LM_ERROR, "Events test_consumers_of_publishers - " + "Error: Unexpected number of PublisherDescriptions: " + "expected <1> - received <%d>.\n", + pds->length ())); + return 1; + } + ::CORBA::ULong consumers = pds[0UL]->consumers ().length (); + if (consumers != 2) + { + ACE_ERROR ((LM_ERROR, "Events test_consumers_of_publishers - " + "Error: Unexpected number of PublisherDescriptions: " + "expected <2> - received <%d>.\n", + pds[0UL]->consumers().length ())); + ++ret; + } + for (::CORBA::ULong consumer = 0; consumer < consumers; ++consumer) + { + ::Components::EventConsumerBase_var unsub = + source->unsubscribe ("publish_do_something", + pds[0UL]->consumers ()[consumer]->ck ()); + } + } + catch (const ::Components::InvalidName &) + { + ACE_ERROR ((LM_ERROR, "Events test_consumers_of_publishers - " + "Error: InvalidName exception caught\n")); + return 1; + } + catch (const ::Components::InvalidConnection &) + { + ACE_ERROR ((LM_ERROR, "Events test_consumers_of_publishers - " + "Error: InvalidConnection exception caught\n")); + return 1; + } + catch (const ::Components::ExceededConnectionLimit &) + { + ACE_ERROR ((LM_ERROR, "Events test_consumers_of_publishers - " + "Error: ExceededConnectionLimit exception caught\n")); + return 1; + } + catch (const ::CORBA::Exception &ex) + { + ex._tao_print_exception ("test_consumers_of_publishers. Error: "); + return 1; + } + catch (...) + { + ACE_ERROR ((LM_ERROR, "Events test_consumers_of_publishers - " + "Error: Unknown exception caught " + "during get_named_publishers.\n")); + return 1; + } + if (ret == 0) + { + ACE_DEBUG ((LM_DEBUG, "Events test_consumers_of_publishers - " + "Test passed!\n")); + } + return ret; +} +#endif + +int +run_test (::Components::Events_ptr source, + ::Components::Events_ptr sink) +{ + int ret = 0; + try + { + +#if !defined (CCM_NOEVENT) + ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); + ret += test_get_consumer (sink); + + ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); + ret += test_get_consumer_invalid_name (sink); + + ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); + ret += test_subscribe_unsubscribe (source, sink); + + ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); + ret += test_subscribe_invalid_name (source, sink); + + ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); + ret += test_subscribe_invalid_connection (source, sink); + + ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); + ret += test_connect_disconnect_consumer (source, sink); + + ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); + ret += test_connect_consumer_invalid_name (source, sink); + + ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); + ret += test_connect_consumer_already_connected (source, sink); + + ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); + ret += test_connect_consumer_invalid_connection (source, sink); + + ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); + ret += test_disconnect_consumer_invalid_name (source, sink); + + ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); + ret += test_disconnect_consumer_no_connection (source); + +#endif + +#if !defined (CCM_LW) && !defined (CCM_NOEVENT) + ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); + ret += test_get_all_consumers (sink); + + ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); + ret += test_get_named_consumers (sink); + + ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); + ret += test_consumer_of_consumer (source, sink); + + ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); + ret += test_get_named_consumers_invalid_name (sink); + + ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); + ret += test_get_all_emitters (source); + + ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); + ret += test_get_named_emitters (source); + + ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); + ret += test_consumer_of_emitter (source, sink); + + ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); + ret += test_get_named_emitters_invalid_name (source); + + ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); + ret += test_get_all_publishers (source); + + ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); + ret += test_get_named_publishers (source); + + ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); + ret += test_get_named_publishers_invalid_name (source); + + ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); + ret += test_consumers_of_publishers (source, sink); +#endif + + } + catch (...) + { + ACE_ERROR ((LM_ERROR, "Events run_test - " + "Error: Unknown " + "exception during run_test\n")); + ++ret; + } + return ret; + + return ret; +} + +int +ACE_TMAIN (int argc, ACE_TCHAR **argv) +{ + CIF_Common cmd; + int ret = 0; + try + { + if (cmd.init (argc, argv) != 0) + { + ACE_ERROR_RETURN ((LM_ERROR, + "Error: Unable to initalize\n"), + 1); + + } + ::CORBA::Object_var prov = cmd.get_provider_cmp (); + if (::CORBA::is_nil (prov.in ())) + { + ACE_ERROR_RETURN ((LM_ERROR, + "Unable to get provider component\n"), + 1); + } + ::Components::Events_var source = cmd.get_events_interface (true); + if (::CORBA::is_nil (source.in ())) + { + ACE_ERROR_RETURN ((LM_ERROR, + "Unable to get source event interface\n"), + 1); + } + ::Components::Events_var sink = cmd.get_events_interface (false); + if (::CORBA::is_nil (sink.in ())) + { + ACE_ERROR_RETURN ((LM_ERROR, + "Unable to get sink event interface\n"), + 1); + } + ret = run_test (source.in (), sink.in ()); + + cmd.shutdown (); + } + catch (const ::CORBA::Exception &ex) + { + ex._tao_print_exception ("Events main"); + return 1; + } + catch (...) + { + ACE_ERROR_RETURN ((LM_ERROR, + "Error: Caught unknown exception\n"), + 1); + } + + ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); + ACE_DEBUG ((LM_DEBUG, "SUMMARY : ")); + if (ret != 0) + { + ACE_ERROR ((LM_ERROR, "Events main - " + " %d error(s) found during tests.\n\n", + ret)); + } + else + { + ACE_ERROR ((LM_ERROR, "Events main - " + " No problems found during tests.\n\n")); + } + return ret; +} diff --git a/CIAO/tests/CIF/Navigation/client.cpp b/CIAO/tests/CIF/Navigation/client.cpp index fa652b42f18..3f54cd1045d 100644 --- a/CIAO/tests/CIF/Navigation/client.cpp +++ b/CIAO/tests/CIF/Navigation/client.cpp @@ -276,13 +276,13 @@ test_get_all_ports (::Components::CCMObject_ptr cmp) if (::ACE_OS::strcmp (fds[i]->name (), "provide_cif_foo") == 0 || ::ACE_OS::strcmp (fds[i]->name (), "provide_cif_derived_foo") == 0) { - ACE_DEBUG ((LM_DEBUG, "Navigation get_all_ports - " + ACE_DEBUG ((LM_DEBUG, "Navigation test_get_all_ports - " "Correct facetdescription found <%C>\n", fds[i]->name ())); } else { - ACE_ERROR ((LM_ERROR, "Navigation get_all_ports - " + ACE_ERROR ((LM_ERROR, "Navigation test_get_all_ports - " "Error Incorrect facetdescription found <%C>\n", fds[i]->name ())); } @@ -292,14 +292,14 @@ test_get_all_ports (::Components::CCMObject_ptr cmp) rds = cpd->receptacles (); if (rds.length () != 0) { - ACE_ERROR ((LM_ERROR, "Navigation get_all_ports - " + ACE_ERROR ((LM_ERROR, "Navigation test_get_all_ports - " "Error: Found receptacles an a Navigation " "Component\n")); ++ret; } else { - ACE_DEBUG ((LM_DEBUG, "Navigation get_all_ports - " + ACE_DEBUG ((LM_DEBUG, "Navigation test_get_all_ports - " "Expected number of Receptacles found\n")); } #if !defined (CCM_NOEVENT) @@ -307,30 +307,30 @@ test_get_all_ports (::Components::CCMObject_ptr cmp) cds = cpd->consumers (); if (cds.length () != 0) { - ACE_ERROR ((LM_ERROR, "Navigation get_all_ports - " + ACE_ERROR ((LM_ERROR, "Navigation test_get_all_ports - " "Error: Found Consumers while not " "configured\n")); ++ret; } else { - ACE_DEBUG ((LM_DEBUG, "Navigation get_all_ports - " + ACE_DEBUG ((LM_DEBUG, "Navigation test_get_all_ports - " "Expected number of Consumers found\n")); } ::Components::EmitterDescriptions eds; eds = cpd->emitters (); - if (eds.length () != 1) + if (eds.length () != 2) { - ACE_ERROR ((LM_ERROR, "Navigation get_all_ports - " + ACE_ERROR ((LM_ERROR, "Navigation test_get_all_ports - " "Error: Unexpected number of emitters found: " - "expected <1> - received <%d>\n", + "expected <2> - received <%d>\n", eds.length ())); ++ret; } else { - ACE_DEBUG ((LM_DEBUG, "Navigation get_all_ports - " + ACE_DEBUG ((LM_DEBUG, "Navigation test_get_all_ports - " "Expected number of Emitters found\n")); } @@ -338,7 +338,7 @@ test_get_all_ports (::Components::CCMObject_ptr cmp) pds = cpd->publishers (); if (pds.length () != 2) { - ACE_ERROR ((LM_ERROR, "Navigation get_all_ports - " + ACE_ERROR ((LM_ERROR, "Navigation test_get_all_ports - " "Error: Unexpected number publishers found: " "expected <2> - received <%d>\n", pds.length ())); @@ -346,19 +346,19 @@ test_get_all_ports (::Components::CCMObject_ptr cmp) } else { - ACE_DEBUG ((LM_DEBUG, "Navigation get_all_ports - " + ACE_DEBUG ((LM_DEBUG, "Navigation test_get_all_ports - " "Expected number of Publishers found\n")); } #endif } catch (const ::CORBA::Exception& ex) { - ex._tao_print_exception ("Navigation get_all_ports"); + ex._tao_print_exception ("Navigation test_get_all_ports"); return 1; } catch (...) { - ACE_ERROR ((LM_ERROR, "Navigation get_all_ports - " + ACE_ERROR ((LM_ERROR, "Navigation test_get_all_ports - " "Error: Unexpected exception caught.\n")); return 1; } @@ -479,7 +479,7 @@ test_get_named_publishers (::Components::CCMObject_ptr cmp) { ACE_DEBUG ((LM_DEBUG, "Navigation test_get_named_publishers - " "Received expected InvalidName " - "exception during connect\n")); + "exception.\n")); } catch (const ::CORBA::Exception& ex) { @@ -511,13 +511,13 @@ test_get_all_emitters (::Components::CCMObject_ptr cmp) { ::Components::EmitterDescriptions_var eds; eds = cmp->get_all_emitters (); - if (eds->length () != 1) + if (eds->length () != 2) { ACE_ERROR_RETURN ((LM_ERROR, "Navigation test_get_all_emitters - " "Error: get_all_emitters returned an " "unexpected number of emitters: " - "expected <1> - received <%d>\n", + "expected <2> - received <%d>\n", eds->length ()), 1); } @@ -605,7 +605,7 @@ test_get_named_emitters (::Components::CCMObject_ptr cmp) { ACE_DEBUG ((LM_DEBUG, "Navigation test_get_named_emitters - " "Received expected InvalidName " - "exception during connect\n")); + "exception.\n")); } catch (const ::CORBA::Exception& ex) { @@ -641,10 +641,10 @@ run_test (::Components::Navigation_ptr nav, ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); ret += test_same_component (nav); - ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); ret += test_get_all_ports (cmp); -#if !defined (CCM_NOEVENT) + +# if !defined (CCM_NOEVENT) ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); ret += test_get_all_publishers (cmp); @@ -656,10 +656,11 @@ run_test (::Components::Navigation_ptr nav, ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); ret += test_get_named_emitters (cmp); -#endif +# endif #else ACE_UNUSED_ARG (cmp); #endif + return ret; } @@ -712,17 +713,17 @@ ACE_TMAIN (int argc, ACE_TCHAR **argv) } ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); - ACE_DEBUG ((LM_DEBUG, "SUMMARY : \n")); + ACE_DEBUG ((LM_DEBUG, "SUMMARY : ")); if (ret != 0) { - ACE_ERROR ((LM_ERROR, "\tNavigation main - " - " %d error(s) found during tests.\n", + ACE_ERROR ((LM_ERROR, "Navigation main - " + " %d error(s) found during tests.\n\n", ret)); } else { - ACE_ERROR ((LM_ERROR, "\tNavigation main - " - " No problems found during tests.\n")); + ACE_ERROR ((LM_ERROR, "Navigation main - " + " No problems found during tests.\n\n")); } return ret; } diff --git a/CIAO/tests/CIF/Receptacle/client.cpp b/CIAO/tests/CIF/Receptacle/client.cpp index 0dd3678f487..9c76595590f 100644 --- a/CIAO/tests/CIF/Receptacle/client.cpp +++ b/CIAO/tests/CIF/Receptacle/client.cpp @@ -2,17 +2,27 @@ #include "Common/CIF_Common.h" +#include <vector> + //============================================================ // connect //============================================================ ::Components::Cookie * connect (::Components::Receptacles_ptr rec, - ::CORBA::Object_ptr facet) + ::CORBA::Object_ptr facet, + bool multiple = false) { ::Components::Cookie_var ck; try { - ck = rec->connect ("use_cif_foo", facet); + if (multiple) + { + ck = rec->connect ("use_multiple_foo", facet); + } + else + { + ck = rec->connect ("use_cif_foo", facet); + } } catch (const ::Components::InvalidName &) { @@ -46,12 +56,20 @@ connect (::Components::Receptacles_ptr rec, //============================================================ ::CORBA::Object_ptr disconnect (::Components::Receptacles_ptr rec, - ::Components::Cookie * ck) + ::Components::Cookie * ck, + bool multiple = false) { ::CORBA::Object_var obj; try { - obj = rec->disconnect ("use_cif_foo", ck); + if (multiple) + { + obj = rec->disconnect ("use_multiple_foo", ck); + } + else + { + obj = rec->disconnect ("use_cif_foo", ck); + } } catch (const ::Components::InvalidName &) { @@ -98,8 +116,62 @@ test_connect_disconnect (::Components::Receptacles_ptr rec, "disconnect test passed !\n")); return 0; } - else - return 1; + return 1; +} + +//============================================================ +// test_connect_disconnect +//============================================================ +int +test_cookie_required_exception (::Components::Receptacles_ptr rec, + ::CORBA::Object_ptr facet) +{ + ACE_DEBUG ((LM_DEBUG, "Receptacle test_cookie_required_exception - " + "Start test\n")); + int ret = 0; + ::Components::Cookie_var ck1 = connect (rec, facet, true); + ::Components::Cookie_var ck2 = connect (rec, facet, true); + + ::CORBA::Object_var obj; + + try + { + obj = rec->disconnect ("use_multiple_foo", 0); + ACE_ERROR ((LM_ERROR, "Receptacle test_cookie_required_exception - " + "Error: No exception during disconnect\n")); + ++ret; + } + catch (const ::Components::InvalidName &) + { + ACE_ERROR ((LM_ERROR, "Receptacle test_cookie_required_exception - " + "Error: InvalidName " + "exception during disconnect\n")); + ++ret; + } + catch (const ::Components::InvalidConnection &) + { + ACE_ERROR ((LM_ERROR, "Receptacle test_cookie_required_exception - " + "Error: InvalidConnection " + "exception during disconnect\n")); + ++ret; + } + catch (const ::Components::CookieRequired &) + { + ACE_DEBUG ((LM_DEBUG, "Receptacle test_cookie_required_exception - " + "Received expected CookieRequired " + "exception during disconnect\n")); + } + catch (const ::Components::NoConnection &) + { + ACE_ERROR ((LM_ERROR, "Receptacle test_cookie_required_exception - " + "Error: NoConnection " + "exception during disconnect\n")); + ++ret; + } + //need to disconnect properly + obj = disconnect (rec, ck1.in (), true); + obj = disconnect (rec, ck2.in (), true); + return ret; } //============================================================ @@ -339,7 +411,7 @@ test_get_named_receptacles (::Components::Receptacles_ptr rec) ::Components::NameList, ::CORBA::NO_MEMORY ()); one_name->length (1); - (*one_name)[0] = ::CORBA::string_dup ("use_cif_foo"); + (*one_name)[0] = ::CORBA::string_dup ("use_cif_derived_foo"); try { @@ -459,47 +531,57 @@ test_get_named_receptacles (::Components::Receptacles_ptr rec) #endif -#if !defined (CCM_LW) int -test_exceeded_limit_exception (::Components::Receptacles_ptr rec, +test_multiple_facets (::Components::Receptacles_ptr rec, ::CORBA::Object_ptr facet) { + std::vector < ::Components::Cookie_var > cookies; try { for (CORBA::ULong i = 0UL; - i < 100; + i < 5; ++i) { - rec->connect ("use_multiple_foo", facet); + ::Components::Cookie_var tmp = + rec->connect ("use_multiple_foo", facet); + cookies.push_back (tmp._retn ()); + ACE_DEBUG ((LM_DEBUG, "Receptacle test_multiple_facets - " + "%d receptacle(s) connected\n", + i + 1)); + } + for (CORBA::ULong i = 0UL; + i < 5; + ++i) + { + CORBA::Object_var objref = disconnect (rec, cookies[i].in (), true); + ACE_DEBUG ((LM_DEBUG, "Receptacle test_multiple_facets - " + "Disconnected receptacle %d\n", + i + 1)); } } catch (const ::Components::ExceededConnectionLimit &) { - ACE_ERROR ((LM_ERROR, "Receptacle test_exceeded_limit_exception - " - "Expected ExceededConnectionLimit " - "exception received\n")); - ACE_DEBUG ((LM_DEBUG, "Receptacle test_exceeded_limit_exception - " - "Test passed!\n")); - return 0; + ACE_ERROR ((LM_ERROR, "Receptacle test_multiple_facets - " + "Error: ExceededConnectionLimit " + "exception caught\n")); + return 1; } catch (const ::CORBA::Exception &ex) { - ex._tao_print_exception ("test_exceeded_limit_exception"); + ex._tao_print_exception ("test_multiple_facets"); return 1; } catch (...) { - ACE_ERROR ((LM_ERROR, "Receptacle test_exceeded_limit_exception - " + ACE_ERROR ((LM_ERROR, "Receptacle test_multiple_facets - " "Error: exception during invocation of " - "test_exceeded_limit_exception.\n")); + "test_multiple_facets.\n")); return 1; } - ACE_ERROR ((LM_ERROR, "Receptacle test_exceeded_limit_exception - " - "Error: Did not received the expected " - "ExceededConnectionLimit exception!\n")); - return 1; + ACE_DEBUG ((LM_DEBUG, "Receptacle test_multiple_facets - " + "Test passed!\n")); + return 0; } -#endif #if !defined (CCM_LW) int @@ -527,7 +609,7 @@ test_get_all_ports (::Components::CCMObject_ptr cmp) } else { - ACE_DEBUG ((LM_DEBUG, "Receptacle get_all_ports - " + ACE_DEBUG ((LM_DEBUG, "Receptacle test_get_all_ports - " "Expected number of Facets found\n")); } #if !defined (CCM_NOEVENT) @@ -548,13 +630,13 @@ test_get_all_ports (::Components::CCMObject_ptr cmp) ::ACE_OS::strcmp (rds[i]->name (), "use_multiple_foo") == 0 || ::ACE_OS::strcmp (rds[i]->name (), "use_cif_derived_foo") == 0) { - ACE_DEBUG ((LM_DEBUG, "Receptacle get_all_ports - " + ACE_DEBUG ((LM_DEBUG, "Receptacle test_get_all_ports - " "Correct receptacledescription found <%C>\n", rds[i]->name ())); } else { - ACE_ERROR ((LM_ERROR, "Receptacle get_all_ports - " + ACE_ERROR ((LM_ERROR, "Receptacle test_get_all_ports - " "Error Incorrect receptacledescription found <%C>\n", rds[i]->name ())); ++ret; @@ -563,17 +645,17 @@ test_get_all_ports (::Components::CCMObject_ptr cmp) ::Components::ConsumerDescriptions cds; cds = cpd->consumers (); - if (cds.length () != 1) + if (cds.length () != 2) { - ACE_ERROR ((LM_ERROR, "Receptacle get_all_ports - " + ACE_ERROR ((LM_ERROR, "Receptacle test_get_all_ports - " "Error: Unexpected number of consumers found: " - "expected <1> - received <%d>\n", + "expected <2> - received <%d>\n", cds.length ())); ++ret; } else { - ACE_DEBUG ((LM_DEBUG, "Receptacle get_all_ports - " + ACE_DEBUG ((LM_DEBUG, "Receptacle test_get_all_ports - " "Expected number of Consumers found\n")); } @@ -581,14 +663,14 @@ test_get_all_ports (::Components::CCMObject_ptr cmp) eds = cpd->emitters (); if (eds.length () != 0) { - ACE_ERROR ((LM_ERROR, "Receptacle get_all_ports - " + ACE_ERROR ((LM_ERROR, "Receptacle test_get_all_ports - " "Error: Found Emitters while not " "configured\n")); ++ret; } else { - ACE_DEBUG ((LM_DEBUG, "Receptacle get_all_ports - " + ACE_DEBUG ((LM_DEBUG, "Receptacle test_get_all_ports - " "Expected number of Emitters found\n")); } @@ -596,26 +678,26 @@ test_get_all_ports (::Components::CCMObject_ptr cmp) pds = cpd->publishers (); if (pds.length () != 0) { - ACE_ERROR ((LM_ERROR, "Receptacle get_all_ports - " + ACE_ERROR ((LM_ERROR, "Receptacle test_get_all_ports - " "Error: Found Publishers while not " "configured\n")); ++ret; } else { - ACE_DEBUG ((LM_DEBUG, "Receptacle get_all_ports - " + ACE_DEBUG ((LM_DEBUG, "Receptacle test_get_all_ports - " "Expected number of Publishers found\n")); } #endif } catch (const ::CORBA::Exception& ex) { - ex._tao_print_exception ("Receptacle get_all_ports"); + ex._tao_print_exception ("Receptacle test_get_all_ports"); return 1; } catch (...) { - ACE_ERROR ((LM_ERROR, "Receptacle get_all_ports - " + ACE_ERROR ((LM_ERROR, "Receptacle test_get_all_ports - " "Error: Unexpected exception caught.\n")); return 1; } @@ -673,13 +755,13 @@ test_get_all_consumers (::Components::CCMObject_ptr cmp) { ::Components::ConsumerDescriptions_var cds; cds = cmp->get_all_consumers (); - if (cds->length () != 1) + if (cds->length () != 2) { ACE_ERROR_RETURN ((LM_ERROR, "Receptacle test_get_all_consumers - " "Error: get_all_consumers returned an " "unexpected number of consumers: " - "expected <1> - received <%d>\n", + "expected <2> - received <%d>\n", cds->length ()), 1); } @@ -716,7 +798,7 @@ test_get_named_consumers (::Components::CCMObject_ptr cmp) ::Components::NameList, ::CORBA::NO_MEMORY ()); one_name->length (1); - (*one_name)[0] = ::CORBA::string_dup ("consume_do_something"); + (*one_name)[0] = ::CORBA::string_dup ("consume_do_something_else"); cds = cmp->get_named_consumers (one_name); if (cds->length () != 1) { @@ -800,6 +882,9 @@ run_test (::Components::Receptacles_ptr rec, ret += test_connect_disconnect (rec, facet); ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); + ret += test_cookie_required_exception (rec, facet); + + ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); ret += test_invalid_name_exception (rec, facet); ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); @@ -808,8 +893,8 @@ run_test (::Components::Receptacles_ptr rec, ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); ret += test_invalid_connection_exception (rec); - //ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); - //ret += test_exceeded_limit_exception (rec, facet); + ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); + ret += test_multiple_facets (rec, facet); #if !defined (CCM_LW) ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); @@ -917,17 +1002,17 @@ ACE_TMAIN (int argc, ACE_TCHAR **argv) } ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); - ACE_DEBUG ((LM_DEBUG, "SUMMARY : \n")); + ACE_DEBUG ((LM_DEBUG, "SUMMARY : ")); if (ret != 0) { - ACE_ERROR ((LM_ERROR, "\tReceptacle main - " - " %d error(s) found during tests.\n", + ACE_ERROR ((LM_ERROR, "Receptacle main - " + " %d error(s) found during tests.\n\n", ret)); } else { - ACE_ERROR ((LM_ERROR, "\tReceptacle main - " - " No problems found during tests.\n")); + ACE_ERROR ((LM_ERROR, "Receptacle main - " + " No problems found during tests.\n\n")); } return ret; } diff --git a/CIAO/tests/CIF/descriptors/run_test.pl b/CIAO/tests/CIF/descriptors/run_test.pl index d19c0565ee6..f277cc7dfc1 100755 --- a/CIAO/tests/CIF/descriptors/run_test.pl +++ b/CIAO/tests/CIF/descriptors/run_test.pl @@ -29,10 +29,10 @@ $ior_nsfile = 0; $ior_embase = "EM.ior"; $ior_emfile = 0; -$nr_clients = 2; - +$nr_clients = 3; @clients = ("../Navigation/Navigation_Test_Client", - "../Receptacle/Receptacle_Test_Client" ); + "../Receptacle/Receptacle_Test_Client", + "../Events/Events_Test_Client"); # Processes $E = 0; @@ -240,7 +240,7 @@ for ($client_nr = 0; $client_nr < $nr_clients; ++$client_nr) { if ($client_status != 0) { print STDERR "ERROR: client $clients[$client_nr] returned $client_status\n"; } - print "Sleeping 2 seconds to allow task $clients[$i] to complete\n"; + print "Sleeping 2 seconds to allow task $clients[$client_nr] to complete\n"; sleep (2); # Invoke executor - stop the application -. diff --git a/CIAO/tests/DAnCE/Components/SimpleConsumer.idl b/CIAO/tests/DAnCE/Components/SimpleConsumer.idl index 5972f550d07..9218a20ee13 100644 --- a/CIAO/tests/DAnCE/Components/SimpleConsumer.idl +++ b/CIAO/tests/DAnCE/Components/SimpleConsumer.idl @@ -11,7 +11,7 @@ module Simple component SimpleConsumer { #if !defined (CCM_NOEVENT) - consumes Hello hello_; + consumes Hello hello_consumes; #endif }; diff --git a/CIAO/tests/DAnCE/Components/SimpleConsumer_exec.cpp b/CIAO/tests/DAnCE/Components/SimpleConsumer_exec.cpp index 464b93b32c5..c5b0c19d1e9 100644 --- a/CIAO/tests/DAnCE/Components/SimpleConsumer_exec.cpp +++ b/CIAO/tests/DAnCE/Components/SimpleConsumer_exec.cpp @@ -27,7 +27,7 @@ namespace CIAO_Simple_SimpleConsumer_Impl // Port operations. #if !defined (CCM_NOEVENT) void - SimpleConsumer_exec_i::push_hello_ ( + SimpleConsumer_exec_i::push_hello_consumes ( ::Simple::Hello * ev ) { ACE_TRACE ("SimpleConsumer_exec_i::push_hello_ ()"); diff --git a/CIAO/tests/DAnCE/Components/SimpleConsumer_exec.h b/CIAO/tests/DAnCE/Components/SimpleConsumer_exec.h index 72fb134e566..1b84393094e 100644 --- a/CIAO/tests/DAnCE/Components/SimpleConsumer_exec.h +++ b/CIAO/tests/DAnCE/Components/SimpleConsumer_exec.h @@ -31,7 +31,7 @@ namespace CIAO_Simple_SimpleConsumer_Impl // Port operations. #if !defined (CCM_NOEVENT) virtual void - push_hello_ ( + push_hello_consumes ( ::Simple::Hello *ev); #endif // Operations from Components::SessionComponent diff --git a/CIAO/tests/DAnCE/Components/SimpleEmitter.idl b/CIAO/tests/DAnCE/Components/SimpleEmitter.idl index 5b43b305000..b3675470bd0 100644 --- a/CIAO/tests/DAnCE/Components/SimpleEmitter.idl +++ b/CIAO/tests/DAnCE/Components/SimpleEmitter.idl @@ -11,7 +11,7 @@ module Simple component SimpleEmitter { #if !defined (CCM_NOEVENT) - emits Hello hello_; + emits Hello hello_emits; #endif }; diff --git a/CIAO/tests/DAnCE/Components/SimpleEmitter_exec.cpp b/CIAO/tests/DAnCE/Components/SimpleEmitter_exec.cpp index 031e19a26d9..17e46be0731 100644 --- a/CIAO/tests/DAnCE/Components/SimpleEmitter_exec.cpp +++ b/CIAO/tests/DAnCE/Components/SimpleEmitter_exec.cpp @@ -56,7 +56,7 @@ namespace CIAO_Simple_SimpleEmitter_Impl #if !defined (CCM_NOEVENT) ::Simple::Hello_var hello = new OBV_Simple::Hello ("Test successful, hello from SimpleEmitter_exec_i"); - this->context_->push_hello_ (hello._retn ()); + this->context_->push_hello_emits (hello.in ()); #endif } diff --git a/CIAO/tests/DAnCE/Components/SimpleLocalProvider.idl b/CIAO/tests/DAnCE/Components/SimpleLocalProvider.idl index c43c7360056..0b87e3a282e 100644 --- a/CIAO/tests/DAnCE/Components/SimpleLocalProvider.idl +++ b/CIAO/tests/DAnCE/Components/SimpleLocalProvider.idl @@ -10,7 +10,7 @@ module Simple { component SimpleLocalProvider { - provides LocalTrigger trig; + provides LocalTrigger trig_provides; }; home SimpleLocalProviderHome manages SimpleLocalProvider diff --git a/CIAO/tests/DAnCE/Components/SimpleLocalProvider_exec.cpp b/CIAO/tests/DAnCE/Components/SimpleLocalProvider_exec.cpp index 973267fc448..9983d25b593 100644 --- a/CIAO/tests/DAnCE/Components/SimpleLocalProvider_exec.cpp +++ b/CIAO/tests/DAnCE/Components/SimpleLocalProvider_exec.cpp @@ -56,7 +56,7 @@ namespace CIAO_Simple_SimpleLocalProvider_Impl // Port operations. ::Simple::CCM_LocalTrigger_ptr - SimpleLocalProvider_exec_i::get_trig () + SimpleLocalProvider_exec_i::get_trig_provides () { ACE_TRACE ("SimpleLocalProvider_exec_i::get_trig ()"); return new Trigger_exec_i (this->triggered_); diff --git a/CIAO/tests/DAnCE/Components/SimpleLocalProvider_exec.h b/CIAO/tests/DAnCE/Components/SimpleLocalProvider_exec.h index cc9c8cf5159..1fb3a05f095 100644 --- a/CIAO/tests/DAnCE/Components/SimpleLocalProvider_exec.h +++ b/CIAO/tests/DAnCE/Components/SimpleLocalProvider_exec.h @@ -49,7 +49,7 @@ namespace CIAO_Simple_SimpleLocalProvider_Impl // Port operations. virtual ::Simple::CCM_LocalTrigger_ptr - get_trig (); + get_trig_provides (); // Operations from Components::SessionComponent diff --git a/CIAO/tests/DAnCE/Components/SimpleLocalUser.idl b/CIAO/tests/DAnCE/Components/SimpleLocalUser.idl index d0dcdccf4f8..88e58be4d0d 100644 --- a/CIAO/tests/DAnCE/Components/SimpleLocalUser.idl +++ b/CIAO/tests/DAnCE/Components/SimpleLocalUser.idl @@ -10,7 +10,7 @@ module Simple { component SimpleLocalUser { - uses LocalTrigger trig; + uses LocalTrigger trig_uses; }; home SimpleLocalUserHome manages SimpleLocalUser diff --git a/CIAO/tests/DAnCE/Components/SimpleLocalUser_exec.cpp b/CIAO/tests/DAnCE/Components/SimpleLocalUser_exec.cpp index 1bb6d6eb292..9276385caec 100644 --- a/CIAO/tests/DAnCE/Components/SimpleLocalUser_exec.cpp +++ b/CIAO/tests/DAnCE/Components/SimpleLocalUser_exec.cpp @@ -53,7 +53,7 @@ namespace CIAO_Simple_SimpleLocalUser_Impl { ACE_TRACE ("SimpleLocalUser_exec_i::ccm_activate ()"); - ::Simple::LocalTrigger_var trig (this->context_->get_connection_trig ()); + ::Simple::LocalTrigger_var trig (this->context_->get_connection_trig_uses ()); if (CORBA::is_nil (trig.in ())) { diff --git a/CIAO/tests/DAnCE/Components/SimpleMultipleUser.idl b/CIAO/tests/DAnCE/Components/SimpleMultipleUser.idl index 586041187ff..4d2c2292f42 100644 --- a/CIAO/tests/DAnCE/Components/SimpleMultipleUser.idl +++ b/CIAO/tests/DAnCE/Components/SimpleMultipleUser.idl @@ -10,7 +10,7 @@ module Simple { component SimpleMultipleUser { - uses multiple Trigger trig; + uses multiple Trigger trig_uses_m; }; home SimpleMultipleUserHome manages SimpleMultipleUser diff --git a/CIAO/tests/DAnCE/Components/SimpleMultipleUser_exec.cpp b/CIAO/tests/DAnCE/Components/SimpleMultipleUser_exec.cpp index 743d2d308c6..ca344c6ab33 100644 --- a/CIAO/tests/DAnCE/Components/SimpleMultipleUser_exec.cpp +++ b/CIAO/tests/DAnCE/Components/SimpleMultipleUser_exec.cpp @@ -53,8 +53,8 @@ namespace CIAO_Simple_SimpleMultipleUser_Impl { ACE_TRACE ("SimpleMultipleUser_exec_i::ccm_activate ()"); - ::Simple::SimpleMultipleUser::trigConnections_var conns = - this->context_->get_connections_trig (); + ::Simple::SimpleMultipleUser::trig_uses_mConnections_var conns = + this->context_->get_connections_trig_uses_m (); ACE_DEBUG ((LM_NOTICE, "SimpleMultipleUser_exec_i::ccm_activate - " "Got %u connections to my receptacle\n", diff --git a/CIAO/tests/DAnCE/Components/SimpleNilFacetProvider.idl b/CIAO/tests/DAnCE/Components/SimpleNilFacetProvider.idl index 7e9b11fe8eb..11f93f62568 100644 --- a/CIAO/tests/DAnCE/Components/SimpleNilFacetProvider.idl +++ b/CIAO/tests/DAnCE/Components/SimpleNilFacetProvider.idl @@ -12,7 +12,7 @@ module Simple { component SimpleNilFacetProvider { - provides Trigger trig; + provides Trigger trig_provides; }; home SimpleNilFacetProviderHome manages SimpleNilFacetProvider diff --git a/CIAO/tests/DAnCE/Components/SimpleNilFacetProvider_exec.cpp b/CIAO/tests/DAnCE/Components/SimpleNilFacetProvider_exec.cpp index c595862b30b..ac381fb2904 100644 --- a/CIAO/tests/DAnCE/Components/SimpleNilFacetProvider_exec.cpp +++ b/CIAO/tests/DAnCE/Components/SimpleNilFacetProvider_exec.cpp @@ -53,7 +53,7 @@ namespace CIAO_Simple_SimpleNilFacetProvider_Impl // Port operations. ::Simple::CCM_Trigger_ptr - SimpleNilFacetProvider_exec_i::get_trig () + SimpleNilFacetProvider_exec_i::get_trig_provides () { ACE_TRACE ("SimpleNilFacetProvider_exec_i::get_trig ()"); return ::Simple::CCM_Trigger::_nil (); diff --git a/CIAO/tests/DAnCE/Components/SimpleNilFacetProvider_exec.h b/CIAO/tests/DAnCE/Components/SimpleNilFacetProvider_exec.h index 8e2525029d2..3050f07f278 100644 --- a/CIAO/tests/DAnCE/Components/SimpleNilFacetProvider_exec.h +++ b/CIAO/tests/DAnCE/Components/SimpleNilFacetProvider_exec.h @@ -46,7 +46,7 @@ namespace CIAO_Simple_SimpleNilFacetProvider_Impl // Port operations. virtual ::Simple::CCM_Trigger_ptr - get_trig (); + get_trig_provides (); // Operations from Components::SessionComponent diff --git a/CIAO/tests/DAnCE/Components/SimpleNilFacetUser.idl b/CIAO/tests/DAnCE/Components/SimpleNilFacetUser.idl index dde46667e8c..b686aab5d25 100644 --- a/CIAO/tests/DAnCE/Components/SimpleNilFacetUser.idl +++ b/CIAO/tests/DAnCE/Components/SimpleNilFacetUser.idl @@ -10,7 +10,7 @@ module Simple { component SimpleNilFacetUser { - uses Trigger trig; + uses Trigger trig_uses; }; home SimpleNilFacetUserHome manages SimpleNilFacetUser diff --git a/CIAO/tests/DAnCE/Components/SimpleNilFacetUser_exec.cpp b/CIAO/tests/DAnCE/Components/SimpleNilFacetUser_exec.cpp index 15787d0c9b4..819f77a8166 100644 --- a/CIAO/tests/DAnCE/Components/SimpleNilFacetUser_exec.cpp +++ b/CIAO/tests/DAnCE/Components/SimpleNilFacetUser_exec.cpp @@ -53,7 +53,7 @@ namespace CIAO_Simple_SimpleNilFacetUser_Impl { ACE_TRACE ("SimpleNilFacetUser_exec_i::ccm_activate ()"); bool caught_exception = false; - ::Simple::Trigger_var trig (this->context_->get_connection_trig ()); + ::Simple::Trigger_var trig (this->context_->get_connection_trig_uses ()); if (CORBA::is_nil (trig.in ())) { diff --git a/CIAO/tests/DAnCE/Components/SimpleProvider.idl b/CIAO/tests/DAnCE/Components/SimpleProvider.idl index ec9859d0130..01a8f783a30 100644 --- a/CIAO/tests/DAnCE/Components/SimpleProvider.idl +++ b/CIAO/tests/DAnCE/Components/SimpleProvider.idl @@ -10,7 +10,7 @@ module Simple { component SimpleProvider { - provides Trigger trig; + provides Trigger trig_provides; }; home SimpleProviderHome manages SimpleProvider diff --git a/CIAO/tests/DAnCE/Components/SimpleProvider_exec.cpp b/CIAO/tests/DAnCE/Components/SimpleProvider_exec.cpp index 6d123c2238e..3be2d15c266 100644 --- a/CIAO/tests/DAnCE/Components/SimpleProvider_exec.cpp +++ b/CIAO/tests/DAnCE/Components/SimpleProvider_exec.cpp @@ -56,7 +56,7 @@ namespace CIAO_Simple_SimpleProvider_Impl // Port operations. ::Simple::CCM_Trigger_ptr - SimpleProvider_exec_i::get_trig () + SimpleProvider_exec_i::get_trig_provides () { ACE_TRACE ("SimpleProvider_exec_i::get_trig ()"); return new Trigger_exec_i (this->triggered_); diff --git a/CIAO/tests/DAnCE/Components/SimpleProvider_exec.h b/CIAO/tests/DAnCE/Components/SimpleProvider_exec.h index 41d8d531bfb..61290752ebd 100644 --- a/CIAO/tests/DAnCE/Components/SimpleProvider_exec.h +++ b/CIAO/tests/DAnCE/Components/SimpleProvider_exec.h @@ -49,7 +49,7 @@ namespace CIAO_Simple_SimpleProvider_Impl // Port operations. virtual ::Simple::CCM_Trigger_ptr - get_trig (); + get_trig_provides (); // Operations from Components::SessionComponent diff --git a/CIAO/tests/DAnCE/Components/SimplePublisher.idl b/CIAO/tests/DAnCE/Components/SimplePublisher.idl index 770bc8b1e43..27afdd0fc70 100644 --- a/CIAO/tests/DAnCE/Components/SimplePublisher.idl +++ b/CIAO/tests/DAnCE/Components/SimplePublisher.idl @@ -11,7 +11,7 @@ module Simple component SimplePublisher { #if !defined (CCM_NOEVENT) - publishes Hello hello_; + publishes Hello hello_publishes; #endif }; diff --git a/CIAO/tests/DAnCE/Components/SimplePublisher_exec.cpp b/CIAO/tests/DAnCE/Components/SimplePublisher_exec.cpp index e322bb7862c..3876af8956d 100644 --- a/CIAO/tests/DAnCE/Components/SimplePublisher_exec.cpp +++ b/CIAO/tests/DAnCE/Components/SimplePublisher_exec.cpp @@ -54,7 +54,7 @@ namespace CIAO_Simple_SimplePublisher_Impl ACE_TRACE ("SimplePublisher_exec_i::ccm_activate ()"); #if !defined (CCM_NOEVENT) ::Simple::Hello_var hello = new OBV_Simple::Hello ("Test successful, hello from SimplePublisher_exec_i"); - this->context_->push_hello_ (hello._retn ()); + this->context_->push_hello_publishes (hello.in ()); #endif // Your code here. } diff --git a/CIAO/tests/DAnCE/Components/SimpleUser.idl b/CIAO/tests/DAnCE/Components/SimpleUser.idl index 3bb1137dd8a..cb158408608 100644 --- a/CIAO/tests/DAnCE/Components/SimpleUser.idl +++ b/CIAO/tests/DAnCE/Components/SimpleUser.idl @@ -10,7 +10,7 @@ module Simple { component SimpleUser { - uses Trigger trig; + uses Trigger trig_uses; }; home SimpleUserHome manages SimpleUser diff --git a/CIAO/tests/DAnCE/Components/SimpleUser_exec.cpp b/CIAO/tests/DAnCE/Components/SimpleUser_exec.cpp index 756061d92c5..d42779fa523 100644 --- a/CIAO/tests/DAnCE/Components/SimpleUser_exec.cpp +++ b/CIAO/tests/DAnCE/Components/SimpleUser_exec.cpp @@ -53,7 +53,7 @@ namespace CIAO_Simple_SimpleUser_Impl { ACE_TRACE ("SimpleUser_exec_i::ccm_activate ()"); - ::Simple::Trigger_var trig (this->context_->get_connection_trig ()); + ::Simple::Trigger_var trig (this->context_->get_connection_trig_uses ()); if (CORBA::is_nil (trig.in ())) { diff --git a/CIAO/tests/DAnCE/EM-Redeployment/run_test.pl b/CIAO/tests/DAnCE/EM-Redeployment/run_test.pl index a327f560f79..2db8f416225 100755 --- a/CIAO/tests/DAnCE/EM-Redeployment/run_test.pl +++ b/CIAO/tests/DAnCE/EM-Redeployment/run_test.pl @@ -12,6 +12,8 @@ $CIAO_ROOT = "$ENV{'CIAO_ROOT'}"; $TAO_ROOT = "$ENV{'TAO_ROOT'}"; $DANCE_ROOT = "$ENV{'DANCE_ROOT'}"; +$ENV{'CIAO_LOG_LEVEL'}=1; + $daemons_running = 0; $em_running = 0; $ns_running = 0; diff --git a/CIAO/tests/DAnCE/ExecutionManager-Deployments/EmitsConnectionExplicitHome.cdp b/CIAO/tests/DAnCE/ExecutionManager-Deployments/EmitsConnectionExplicitHome.cdp index 4f2ef3b3395..66b84533cb1 100644 --- a/CIAO/tests/DAnCE/ExecutionManager-Deployments/EmitsConnectionExplicitHome.cdp +++ b/CIAO/tests/DAnCE/ExecutionManager-Deployments/EmitsConnectionExplicitHome.cdp @@ -207,13 +207,13 @@ <connection> <name>TestConnection</name> <internalEndpoint> - <portName>hello_</portName> + <portName>hello_emits</portName> <provider>false</provider> <kind>EventEmitter</kind> <instance xmi:idref="SimpleEmitterComponentInstance" /> </internalEndpoint> <internalEndpoint> - <portName>hello_</portName> + <portName>hello_consumes</portName> <provider>true</provider> <kind>EventConsumer</kind> <instance xmi:idref="SimpleConsumerComponentInstance" /> diff --git a/CIAO/tests/DAnCE/ExecutionManager-Deployments/EmitsConnectionExplicitHome_NS.cdp b/CIAO/tests/DAnCE/ExecutionManager-Deployments/EmitsConnectionExplicitHome_NS.cdp new file mode 100644 index 00000000000..fa462d3c8b7 --- /dev/null +++ b/CIAO/tests/DAnCE/ExecutionManager-Deployments/EmitsConnectionExplicitHome_NS.cdp @@ -0,0 +1,261 @@ +<!-- $Id$ --> +<Deployment:DeploymentPlan + xmlns:Deployment="http://www.omg.org/Deployment" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd"> + <label>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" /> + <execParameter> + <name>edu.vanderbilt.dre.DAnCE.ImplementationType</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>edu.vanderbilt.dre.CCM.HomedComponent</string> + </value> + </value> + </execParameter> + </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" /> + <execParameter> + <name>edu.vanderbilt.dre.DAnCE.ImplementationType</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>edu.vanderbilt.dre.CCM.HomedComponent</string> + </value> + </value> + </execParameter> + </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.CIAO.ComponentHomeId</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.CIAO.ComponentHomeId</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleConsumerHome</string> + </value> + </value> + </configProperty> + </instance> + + <connection> + <name>TestConnection</name> + <internalEndpoint> + <portName>hello_consumes</portName> + <provider>true</provider> + <kind>EventConsumer</kind> + <instance xmi:idref="SimpleConsumerComponentInstance" /> + </internalEndpoint> + <externalReference> + <location>corbaname:rir:/NameService#SimpleEmitterComponent</location> + <provider>false</provider> + <portName>hello_emits</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/tests/DAnCE/ExecutionManager-Deployments/MultiplexConnectionExplicitHome.cdp b/CIAO/tests/DAnCE/ExecutionManager-Deployments/MultiplexConnectionExplicitHome.cdp index 35b9916d38e..f56dc419b0c 100644 --- a/CIAO/tests/DAnCE/ExecutionManager-Deployments/MultiplexConnectionExplicitHome.cdp +++ b/CIAO/tests/DAnCE/ExecutionManager-Deployments/MultiplexConnectionExplicitHome.cdp @@ -226,13 +226,13 @@ <connection> <name>TestConnection</name> <internalEndpoint> - <portName>trig</portName> + <portName>trig_provides</portName> <provider>true</provider> <kind>Facet</kind> <instance xmi:idref="SimpleProviderComponentInstance" /> </internalEndpoint> <internalEndpoint> - <portName>trig</portName> + <portName>trig_uses_m</portName> <provider>false</provider> <kind>MultiplexReceptacle</kind> <instance xmi:idref="SimpleMultipleUserComponentInstance" /> @@ -242,13 +242,13 @@ <connection> <name>TestConnectionReverse</name> <internalEndpoint> - <portName>trig</portName> + <portName>trig_uses_m</portName> <provider>false</provider> <kind>MultiplexReceptacle</kind> <instance xmi:idref="SimpleMultipleUserComponentInstanceReverse" /> </internalEndpoint> <internalEndpoint> - <portName>trig</portName> + <portName>trig_provides</portName> <provider>true</provider> <kind>Facet</kind> <instance xmi:idref="SimpleProviderComponentInstance" /> diff --git a/CIAO/tests/DAnCE/ExecutionManager-Deployments/MultiplexConnectionExplicitHome_NS.cdp b/CIAO/tests/DAnCE/ExecutionManager-Deployments/MultiplexConnectionExplicitHome_NS.cdp index 3b839da2323..32039e10b0f 100644 --- a/CIAO/tests/DAnCE/ExecutionManager-Deployments/MultiplexConnectionExplicitHome_NS.cdp +++ b/CIAO/tests/DAnCE/ExecutionManager-Deployments/MultiplexConnectionExplicitHome_NS.cdp @@ -258,14 +258,8 @@ <connection> <name>TestConnection</name> -<!-- <internalEndpoint> - <portName>trig</portName> - <provider>true</provider> - <kind>Facet</kind> - <instance xmi:idref="SimpleProviderComponentInstance" /> - </internalEndpoint> --> <internalEndpoint> - <portName>trig</portName> + <portName>trig_uses_m</portName> <provider>false</provider> <kind>MultiplexReceptacle</kind> <instance xmi:idref="SimpleMultipleUserComponentInstance" /> @@ -273,21 +267,15 @@ <externalReference> <location>corbaname:rir:/NameService#SimpleProviderComponent</location> <provider>true</provider> - <portName>trig</portName> + <portName>trig_provides</portName> <supportedType>Meaningless</supportedType> </externalReference> </connection> <connection> <name>TestConnection_2</name> -<!-- <internalEndpoint> - <portName>trig</portName> - <provider>true</provider> - <kind>Facet</kind> - <instance xmi:idref="SimpleProviderComponentInstance" /> - </internalEndpoint> --> <internalEndpoint> - <portName>trig</portName> + <portName>trig_uses_m</portName> <provider>false</provider> <kind>MultiplexReceptacle</kind> <instance xmi:idref="SimpleMultipleUserComponentInstance" /> @@ -295,7 +283,7 @@ <externalReference> <location>corbaname:rir:/NameService#SimpleProviderComponent</location> <provider>true</provider> - <portName>trig</portName> + <portName>trig_provides</portName> <supportedType>Meaningless</supportedType> </externalReference> </connection> @@ -303,7 +291,7 @@ <connection> <name>TestConnectionReverse</name> <internalEndpoint> - <portName>trig</portName> + <portName>trig_provides</portName> <provider>true</provider> <kind>Facet</kind> <instance xmi:idref="SimpleProviderComponentInstance" /> @@ -311,7 +299,7 @@ <externalReference> <location>corbaname:rir:/NameService#SimpleMultipleUserComponentReverse</location> <provider>false</provider> - <portName>trig</portName> + <portName>trig_uses_m</portName> <supportedType>Meaningless</supportedType> </externalReference> </connection> @@ -319,7 +307,7 @@ <connection> <name>TestConnectionReverse_2</name> <internalEndpoint> - <portName>trig</portName> + <portName>trig_provides</portName> <provider>true</provider> <kind>Facet</kind> <instance xmi:idref="SimpleProviderComponentInstance" /> @@ -327,7 +315,7 @@ <externalReference> <location>corbaname:rir:/NameService#SimpleMultipleUserComponentReverse</location> <provider>false</provider> - <portName>trig</portName> + <portName>trig_uses_m</portName> <supportedType>Meaningless</supportedType> </externalReference> </connection> diff --git a/CIAO/tests/DAnCE/ExecutionManager-Deployments/MultiplexConnectionExplicitHome_NS_PL_DP.cdp b/CIAO/tests/DAnCE/ExecutionManager-Deployments/MultiplexConnectionExplicitHome_NS_PL_DP.cdp index f145805483e..86f4820f61d 100644 --- a/CIAO/tests/DAnCE/ExecutionManager-Deployments/MultiplexConnectionExplicitHome_NS_PL_DP.cdp +++ b/CIAO/tests/DAnCE/ExecutionManager-Deployments/MultiplexConnectionExplicitHome_NS_PL_DP.cdp @@ -258,14 +258,8 @@ <connection> <name>TestConnection</name> -<!-- <internalEndpoint> - <portName>trig</portName> - <provider>true</provider> - <kind>Facet</kind> - <instance xmi:idref="SimpleProviderComponentInstance" /> - </internalEndpoint> --> <internalEndpoint> - <portName>trig</portName> + <portName>trig_uses_m</portName> <provider>false</provider> <kind>MultiplexReceptacle</kind> <instance xmi:idref="SimpleMultipleUserComponentInstance" /> @@ -273,21 +267,15 @@ <externalReference> <location>corbaname:rir:/NameService#SimpleProviderComponent</location> <provider>true</provider> - <portName>trig</portName> + <portName>trig_provides</portName> <supportedType>Meaningless</supportedType> </externalReference> </connection> <connection> <name>TestConnection_2</name> -<!-- <internalEndpoint> - <portName>trig</portName> - <provider>true</provider> - <kind>Facet</kind> - <instance xmi:idref="SimpleProviderComponentInstance" /> - </internalEndpoint> --> <internalEndpoint> - <portName>trig</portName> + <portName>trig_uses_m</portName> <provider>false</provider> <kind>MultiplexReceptacle</kind> <instance xmi:idref="SimpleMultipleUserComponentInstance" /> @@ -295,7 +283,7 @@ <externalReference> <location>corbaname:rir:/NameService#SimpleProviderComponent</location> <provider>true</provider> - <portName>trig</portName> + <portName>trig_provides</portName> <supportedType>Meaningless</supportedType> </externalReference> </connection> @@ -303,7 +291,7 @@ <connection> <name>TestConnectionReverse</name> <internalEndpoint> - <portName>trig</portName> + <portName>trig_provides</portName> <provider>true</provider> <kind>Facet</kind> <instance xmi:idref="SimpleProviderComponentInstance" /> @@ -311,7 +299,7 @@ <externalReference> <location>corbaname:rir:/NameService#SimpleMultipleUserComponentReverse</location> <provider>false</provider> - <portName>trig</portName> + <portName>trig_uses_m</portName> <supportedType>Meaningless</supportedType> </externalReference> </connection> @@ -319,7 +307,7 @@ <connection> <name>TestConnectionReverse_2</name> <internalEndpoint> - <portName>trig</portName> + <portName>trig_provides</portName> <provider>true</provider> <kind>Facet</kind> <instance xmi:idref="SimpleProviderComponentInstance" /> @@ -327,7 +315,7 @@ <externalReference> <location>corbaname:rir:/NameService#SimpleMultipleUserComponentReverse</location> <provider>false</provider> - <portName>trig</portName> + <portName>trig_uses_m</portName> <supportedType>Meaningless</supportedType> </externalReference> </connection> diff --git a/CIAO/tests/DAnCE/ExecutionManager-Deployments/MultiplexConnectionExplicitHome_NS_PL_SP.cdp b/CIAO/tests/DAnCE/ExecutionManager-Deployments/MultiplexConnectionExplicitHome_NS_PL_SP.cdp index 5d500d5d76f..303af027f56 100644 --- a/CIAO/tests/DAnCE/ExecutionManager-Deployments/MultiplexConnectionExplicitHome_NS_PL_SP.cdp +++ b/CIAO/tests/DAnCE/ExecutionManager-Deployments/MultiplexConnectionExplicitHome_NS_PL_SP.cdp @@ -258,14 +258,8 @@ <connection> <name>TestConnection</name> -<!-- <internalEndpoint> - <portName>trig</portName> - <provider>true</provider> - <kind>Facet</kind> - <instance xmi:idref="SimpleProviderComponentInstance" /> - </internalEndpoint> --> <internalEndpoint> - <portName>trig</portName> + <portName>trig_uses_m</portName> <provider>false</provider> <kind>MultiplexReceptacle</kind> <instance xmi:idref="SimpleMultipleUserComponentInstance" /> @@ -273,21 +267,15 @@ <externalReference> <location>corbaname:rir:/NameService#SimpleProviderComponent</location> <provider>true</provider> - <portName>trig</portName> + <portName>trig_provides</portName> <supportedType>Meaningless</supportedType> </externalReference> </connection> <connection> <name>TestConnection_2</name> -<!-- <internalEndpoint> - <portName>trig</portName> - <provider>true</provider> - <kind>Facet</kind> - <instance xmi:idref="SimpleProviderComponentInstance" /> - </internalEndpoint> --> <internalEndpoint> - <portName>trig</portName> + <portName>trig_uses_m</portName> <provider>false</provider> <kind>MultiplexReceptacle</kind> <instance xmi:idref="SimpleMultipleUserComponentInstance" /> @@ -295,7 +283,7 @@ <externalReference> <location>corbaname:rir:/NameService#SimpleProviderComponent</location> <provider>true</provider> - <portName>trig</portName> + <portName>trig_provides</portName> <supportedType>Meaningless</supportedType> </externalReference> </connection> @@ -303,7 +291,7 @@ <connection> <name>TestConnectionReverse</name> <internalEndpoint> - <portName>trig</portName> + <portName>trig_provides</portName> <provider>true</provider> <kind>Facet</kind> <instance xmi:idref="SimpleProviderComponentInstance" /> @@ -311,7 +299,7 @@ <externalReference> <location>corbaname:rir:/NameService#SimpleMultipleUserComponentReverse</location> <provider>false</provider> - <portName>trig</portName> + <portName>trig_uses_m</portName> <supportedType>Meaningless</supportedType> </externalReference> </connection> @@ -319,7 +307,7 @@ <connection> <name>TestConnectionReverse_2</name> <internalEndpoint> - <portName>trig</portName> + <portName>trig_provides</portName> <provider>true</provider> <kind>Facet</kind> <instance xmi:idref="SimpleProviderComponentInstance" /> @@ -327,7 +315,7 @@ <externalReference> <location>corbaname:rir:/NameService#SimpleMultipleUserComponentReverse</location> <provider>false</provider> - <portName>trig</portName> + <portName>trig_uses_m</portName> <supportedType>Meaningless</supportedType> </externalReference> </connection> diff --git a/CIAO/tests/DAnCE/ExecutionManager-Deployments/PublishConnectionExplicitHome.cdp b/CIAO/tests/DAnCE/ExecutionManager-Deployments/PublishConnectionExplicitHome.cdp index 4fa193e0196..b207fc0ee8c 100644 --- a/CIAO/tests/DAnCE/ExecutionManager-Deployments/PublishConnectionExplicitHome.cdp +++ b/CIAO/tests/DAnCE/ExecutionManager-Deployments/PublishConnectionExplicitHome.cdp @@ -207,13 +207,13 @@ <connection> <name>TestConnection</name> <internalEndpoint> - <portName>hello_</portName> + <portName>hello_publishes</portName> <provider>false</provider> <kind>EventPublisher</kind> <instance xmi:idref="SimplePublisherComponentInstance" /> </internalEndpoint> <internalEndpoint> - <portName>hello_</portName> + <portName>hello_consumes</portName> <provider>true</provider> <kind>EventConsumer</kind> <instance xmi:idref="SimpleConsumerComponentInstance" /> diff --git a/CIAO/tests/DAnCE/ExecutionManager-Deployments/PublishConnectionExplicitHome_NS.cdp b/CIAO/tests/DAnCE/ExecutionManager-Deployments/PublishConnectionExplicitHome_NS.cdp new file mode 100644 index 00000000000..6ac893350ca --- /dev/null +++ b/CIAO/tests/DAnCE/ExecutionManager-Deployments/PublishConnectionExplicitHome_NS.cdp @@ -0,0 +1,277 @@ +<!-- $Id$ --> +<Deployment:DeploymentPlan + xmlns:Deployment="http://www.omg.org/Deployment" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd"> + <label>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" /> + <execParameter> + <name>edu.vanderbilt.dre.DAnCE.ImplementationType</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>edu.vanderbilt.dre.CCM.HomedComponent</string> + </value> + </value> + </execParameter> + </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" /> + <execParameter> + <name>edu.vanderbilt.dre.DAnCE.ImplementationType</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>edu.vanderbilt.dre.CCM.HomedComponent</string> + </value> + </value> + </execParameter> + </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.CIAO.ComponentHomeId</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.CIAO.ComponentHomeId</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleConsumerHome</string> + </value> + </value> + </configProperty> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.RegisterNaming</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleConsumerComponent</string> + </value> + </value> + </configProperty> + </instance> + + <!--connection> + <name>TestConnection</name> + <internalEndpoint> + <portName>hello_publishes</portName> + <provider>false</provider> + <kind>EventPublisher</kind> + <instance xmi:idref="SimplePublisherComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>hello_consumes</portName> + <provider>true</provider> + <kind>EventConsumer</kind> + <instance xmi:idref="SimpleConsumerComponentInstance" /> + </internalEndpoint> + </connection--> + + <connection> + <name>TestConnection</name> + <internalEndpoint> + <portName>hello_publishes</portName> + <provider>false</provider> + <kind>EventPublisher</kind> + <instance xmi:idref="SimplePublisherComponentInstance" /> + </internalEndpoint> + <externalReference> + <location>corbaname:rir:/NameService#SimpleConsumerComponent</location> + <provider>true</provider> + <portName>hello_consumes</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/tests/DAnCE/ExecutionManager-Deployments/PublishConnectionExplicitHome_NS_PL_DP.cdp b/CIAO/tests/DAnCE/ExecutionManager-Deployments/PublishConnectionExplicitHome_NS_PL_DP.cdp new file mode 100644 index 00000000000..b7c18385afb --- /dev/null +++ b/CIAO/tests/DAnCE/ExecutionManager-Deployments/PublishConnectionExplicitHome_NS_PL_DP.cdp @@ -0,0 +1,353 @@ +<!-- $Id$ --> +<Deployment:DeploymentPlan + xmlns:Deployment="http://www.omg.org/Deployment" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd"> + <label>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" /> + <execParameter> + <name>edu.vanderbilt.dre.DAnCE.ImplementationType</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>edu.vanderbilt.dre.CCM.HomedComponent</string> + </value> + </value> + </execParameter> + </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" /> + <execParameter> + <name>edu.vanderbilt.dre.DAnCE.ImplementationType</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>edu.vanderbilt.dre.CCM.HomedComponent</string> + </value> + </value> + </execParameter> + </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.CIAO.ComponentHomeId</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.CIAO.ComponentHomeId</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleConsumerHome</string> + </value> + </value> + </configProperty> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.RegisterNaming</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleConsumerComponent</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="SimplePublisherComponentInstanceReverse"> + <name>SimplePublisherComponentReverse</name> + <node>NodeOne</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimplePublisherComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.CIAO.ComponentHomeId</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>SimplePublisherComponentReverse</string> + </value> + </value> + </configProperty> + </instance> + + <connection> + <name>TestConnection</name> + <internalEndpoint> + <portName>hello_publishes</portName> + <provider>false</provider> + <kind>EventPublisher</kind> + <instance xmi:idref="SimplePublisherComponentInstance" /> + </internalEndpoint> + <externalReference> + <location>corbaname:rir:/NameService#SimpleConsumerComponent</location> + <provider>true</provider> + <portName>hello_consumes</portName> + <supportedType>Meaningless</supportedType> + </externalReference> + </connection> + + <connection> + <name>TestConnection_2</name> + <internalEndpoint> + <portName>hello_publishes</portName> + <provider>false</provider> + <kind>EventPublisher</kind> + <instance xmi:idref="SimplePublisherComponentInstance" /> + </internalEndpoint> + <externalReference> + <location>corbaname:rir:/NameService#SimpleConsumerComponent</location> + <provider>true</provider> + <portName>hello_consumes</portName> + <supportedType>Meaningless</supportedType> + </externalReference> + </connection> + + <connection> + <name>TestConnectionReverse</name> + <internalEndpoint> + <portName>hello_consumes</portName> + <provider>true</provider> + <kind>EventConsumer</kind> + <instance xmi:idref="SimpleConsumerComponentInstance" /> + </internalEndpoint> + <externalReference> + <location>corbaname:rir:/NameService#SimplePublisherComponentReverse</location> + <provider>false</provider> + <portName>hello_publishes</portName> + <supportedType>Meaningless</supportedType> + </externalReference> + </connection> + + <connection> + <name>TestConnectionReverse_2</name> + <internalEndpoint> + <portName>hello_consumes</portName> + <provider>true</provider> + <kind>EventConsumer</kind> + <instance xmi:idref="SimpleConsumerComponentInstance" /> + </internalEndpoint> + <externalReference> + <location>corbaname:rir:/NameService#SimplePublisherComponentReverse</location> + <provider>false</provider> + <portName>hello_publishes</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> + + <localityConstraint> + <constraint>SameProcess</constraint> + <constrainedInstance xmi:idref="SimplePublisherHomeInstance" /> + <constrainedInstance xmi:idref="SimplePublisherComponentInstance" /> + <constrainedInstance xmi:idref="SimplePublisherComponentInstanceReverse" /> + </localityConstraint> + + <localityConstraint> + <constraint>SameProcess</constraint> + <constrainedInstance xmi:idref="SimpleConsumerHomeInstance" /> + <constrainedInstance xmi:idref="SimpleConsumerComponentInstance" /> + </localityConstraint> + + </Deployment:DeploymentPlan> diff --git a/CIAO/tests/DAnCE/ExecutionManager-Deployments/PublishConnectionExplicitHome_NS_PL_SP.cdp b/CIAO/tests/DAnCE/ExecutionManager-Deployments/PublishConnectionExplicitHome_NS_PL_SP.cdp new file mode 100644 index 00000000000..a93ad5a583a --- /dev/null +++ b/CIAO/tests/DAnCE/ExecutionManager-Deployments/PublishConnectionExplicitHome_NS_PL_SP.cdp @@ -0,0 +1,349 @@ +<!-- $Id$ --> +<Deployment:DeploymentPlan + xmlns:Deployment="http://www.omg.org/Deployment" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd"> + <label>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" /> + <execParameter> + <name>edu.vanderbilt.dre.DAnCE.ImplementationType</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>edu.vanderbilt.dre.CCM.HomedComponent</string> + </value> + </value> + </execParameter> + </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" /> + <execParameter> + <name>edu.vanderbilt.dre.DAnCE.ImplementationType</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>edu.vanderbilt.dre.CCM.HomedComponent</string> + </value> + </value> + </execParameter> + </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.CIAO.ComponentHomeId</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.CIAO.ComponentHomeId</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleConsumerHome</string> + </value> + </value> + </configProperty> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.RegisterNaming</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleConsumerComponent</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="SimplePublisherComponentInstanceReverse"> + <name>SimplePublisherComponentReverse</name> + <node>NodeOne</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimplePublisherComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.CIAO.ComponentHomeId</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>SimplePublisherComponentReverse</string> + </value> + </value> + </configProperty> + </instance> + + <connection> + <name>TestConnection</name> + <internalEndpoint> + <portName>hello_publishes</portName> + <provider>false</provider> + <kind>EventPublisher</kind> + <instance xmi:idref="SimplePublisherComponentInstance" /> + </internalEndpoint> + <externalReference> + <location>corbaname:rir:/NameService#SimpleConsumerComponent</location> + <provider>true</provider> + <portName>hello_consumes</portName> + <supportedType>Meaningless</supportedType> + </externalReference> + </connection> + + <connection> + <name>TestConnection_2</name> + <internalEndpoint> + <portName>hello_publishes</portName> + <provider>false</provider> + <kind>EventPublisher</kind> + <instance xmi:idref="SimplePublisherComponentInstance" /> + </internalEndpoint> + <externalReference> + <location>corbaname:rir:/NameService#SimpleConsumerComponent</location> + <provider>true</provider> + <portName>hello_consumes</portName> + <supportedType>Meaningless</supportedType> + </externalReference> + </connection> + + <connection> + <name>TestConnectionReverse</name> + <internalEndpoint> + <portName>hello_consumes</portName> + <provider>true</provider> + <kind>EventConsumer</kind> + <instance xmi:idref="SimpleConsumerComponentInstance" /> + </internalEndpoint> + <externalReference> + <location>corbaname:rir:/NameService#SimplePublisherComponentReverse</location> + <provider>false</provider> + <portName>hello_publishes</portName> + <supportedType>Meaningless</supportedType> + </externalReference> + </connection> + + <connection> + <name>TestConnectionReverse_2</name> + <internalEndpoint> + <portName>hello_consumes</portName> + <provider>true</provider> + <kind>EventConsumer</kind> + <instance xmi:idref="SimpleConsumerComponentInstance" /> + </internalEndpoint> + <externalReference> + <location>corbaname:rir:/NameService#SimplePublisherComponentReverse</location> + <provider>false</provider> + <portName>hello_publishes</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> + + <localityConstraint> + <constraint>SameProcess</constraint> + <constrainedInstance xmi:idref="SimplePublisherHomeInstance" /> + <constrainedInstance xmi:idref="SimplePublisherComponentInstance" /> + <constrainedInstance xmi:idref="SimplePublisherComponentInstanceReverse" /> + <constrainedInstance xmi:idref="SimpleConsumerHomeInstance" /> + <constrainedInstance xmi:idref="SimpleConsumerComponentInstance" /> + </localityConstraint> + + </Deployment:DeploymentPlan> diff --git a/CIAO/tests/DAnCE/ExecutionManager-Deployments/SimplexConnectionExplicitHome.cdp b/CIAO/tests/DAnCE/ExecutionManager-Deployments/SimplexConnectionExplicitHome.cdp index cc9adc76a2c..838047f3daa 100644 --- a/CIAO/tests/DAnCE/ExecutionManager-Deployments/SimplexConnectionExplicitHome.cdp +++ b/CIAO/tests/DAnCE/ExecutionManager-Deployments/SimplexConnectionExplicitHome.cdp @@ -226,13 +226,13 @@ <connection> <name>TestConnection</name> <internalEndpoint> - <portName>trig</portName> + <portName>trig_provides</portName> <provider>true</provider> <kind>Facet</kind> <instance xmi:idref="SimpleProviderComponentInstance" /> </internalEndpoint> <internalEndpoint> - <portName>trig</portName> + <portName>trig_uses</portName> <provider>false</provider> <kind>SimplexReceptacle</kind> <instance xmi:idref="SimpleUserComponentInstance" /> @@ -242,13 +242,13 @@ <connection> <name>TestConnectionReverse</name> <internalEndpoint> - <portName>trig</portName> + <portName>trig_uses</portName> <provider>false</provider> <kind>SimplexReceptacle</kind> <instance xmi:idref="SimpleUserComponentInstanceReverse" /> </internalEndpoint> <internalEndpoint> - <portName>trig</portName> + <portName>trig_provides</portName> <provider>true</provider> <kind>Facet</kind> <instance xmi:idref="SimpleProviderComponentInstance" /> diff --git a/CIAO/tests/DAnCE/ExecutionManager-Deployments/SimplexConnectionExplicitHome_NS.cdp b/CIAO/tests/DAnCE/ExecutionManager-Deployments/SimplexConnectionExplicitHome_NS.cdp index 47d78248fe8..327d4ed21c4 100644 --- a/CIAO/tests/DAnCE/ExecutionManager-Deployments/SimplexConnectionExplicitHome_NS.cdp +++ b/CIAO/tests/DAnCE/ExecutionManager-Deployments/SimplexConnectionExplicitHome_NS.cdp @@ -248,7 +248,7 @@ <connection> <name>TestConnection</name> <internalEndpoint> - <portName>trig</portName> + <portName>trig_provides</portName> <provider>true</provider> <kind>Facet</kind> <instance xmi:idref="SimpleProviderComponentInstance" /> @@ -256,7 +256,7 @@ <externalReference> <location>corbaname:rir:/NameService#SimpleUserComponent</location> <provider>false</provider> - <portName>trig</portName> + <portName>trig_uses</portName> <supportedType>Meaningless</supportedType> </externalReference> </connection> @@ -264,7 +264,7 @@ <connection> <name>TestConnectionReverse</name> <internalEndpoint> - <portName>trig</portName> + <portName>trig_uses</portName> <provider>false</provider> <kind>SimplexReceptacle</kind> <instance xmi:idref="SimpleUserComponentInstanceReverse" /> @@ -272,7 +272,7 @@ <externalReference> <location>corbaname:rir:/NameService#SimpleProviderComponent</location> <provider>true</provider> - <portName>trig</portName> + <portName>trig_provides</portName> <supportedType>Meaningless</supportedType> </externalReference> </connection> diff --git a/CIAO/tests/DAnCE/ExecutionManager-Deployments/SimplexConnectionExplicitHome_NS_PL_DP.cdp b/CIAO/tests/DAnCE/ExecutionManager-Deployments/SimplexConnectionExplicitHome_NS_PL_DP.cdp index e1debbaf8a7..cf31086434d 100644 --- a/CIAO/tests/DAnCE/ExecutionManager-Deployments/SimplexConnectionExplicitHome_NS_PL_DP.cdp +++ b/CIAO/tests/DAnCE/ExecutionManager-Deployments/SimplexConnectionExplicitHome_NS_PL_DP.cdp @@ -248,7 +248,7 @@ <connection> <name>TestConnection</name> <internalEndpoint> - <portName>trig</portName> + <portName>trig_provides</portName> <provider>true</provider> <kind>Facet</kind> <instance xmi:idref="SimpleProviderComponentInstance" /> @@ -256,7 +256,7 @@ <externalReference> <location>corbaname:rir:/NameService#SimpleUserComponent</location> <provider>false</provider> - <portName>trig</portName> + <portName>trig_uses</portName> <supportedType>Meaningless</supportedType> </externalReference> </connection> @@ -264,7 +264,7 @@ <connection> <name>TestConnectionReverse</name> <internalEndpoint> - <portName>trig</portName> + <portName>trig_uses</portName> <provider>false</provider> <kind>SimplexReceptacle</kind> <instance xmi:idref="SimpleUserComponentInstanceReverse" /> @@ -272,7 +272,7 @@ <externalReference> <location>corbaname:rir:/NameService#SimpleProviderComponent</location> <provider>true</provider> - <portName>trig</portName> + <portName>trig_provides</portName> <supportedType>Meaningless</supportedType> </externalReference> </connection> diff --git a/CIAO/tests/DAnCE/ExecutionManager-Deployments/SimplexConnectionExplicitHome_NS_PL_SP.cdp b/CIAO/tests/DAnCE/ExecutionManager-Deployments/SimplexConnectionExplicitHome_NS_PL_SP.cdp index 89d99f7f087..54eb24301ce 100644 --- a/CIAO/tests/DAnCE/ExecutionManager-Deployments/SimplexConnectionExplicitHome_NS_PL_SP.cdp +++ b/CIAO/tests/DAnCE/ExecutionManager-Deployments/SimplexConnectionExplicitHome_NS_PL_SP.cdp @@ -248,7 +248,7 @@ <connection> <name>TestConnection</name> <internalEndpoint> - <portName>trig</portName> + <portName>trig_provides</portName> <provider>true</provider> <kind>Facet</kind> <instance xmi:idref="SimpleProviderComponentInstance" /> @@ -256,7 +256,7 @@ <externalReference> <location>corbaname:rir:/NameService#SimpleUserComponent</location> <provider>false</provider> - <portName>trig</portName> + <portName>trig_uses</portName> <supportedType>Meaningless</supportedType> </externalReference> </connection> @@ -264,7 +264,7 @@ <connection> <name>TestConnectionReverse</name> <internalEndpoint> - <portName>trig</portName> + <portName>trig_uses</portName> <provider>false</provider> <kind>SimplexReceptacle</kind> <instance xmi:idref="SimpleUserComponentInstanceReverse" /> @@ -272,7 +272,7 @@ <externalReference> <location>corbaname:rir:/NameService#SimpleProviderComponent</location> <provider>true</provider> - <portName>trig</portName> + <portName>trig_provides</portName> <supportedType>Meaningless</supportedType> </externalReference> </connection> diff --git a/CIAO/tests/DAnCE/ExecutionManager-Deployments/SimplexConnectionExplicitHome_NilFacet.cdp b/CIAO/tests/DAnCE/ExecutionManager-Deployments/SimplexConnectionExplicitHome_NilFacet.cdp index 302ea09d258..1040b880d3a 100644 --- a/CIAO/tests/DAnCE/ExecutionManager-Deployments/SimplexConnectionExplicitHome_NilFacet.cdp +++ b/CIAO/tests/DAnCE/ExecutionManager-Deployments/SimplexConnectionExplicitHome_NilFacet.cdp @@ -226,13 +226,13 @@ <connection> <name>TestConnection</name> <internalEndpoint> - <portName>trig</portName> + <portName>trig_provides</portName> <provider>true</provider> <kind>Facet</kind> <instance xmi:idref="SimpleNilFacetProviderComponentInstance" /> </internalEndpoint> <internalEndpoint> - <portName>trig</portName> + <portName>trig_uses</portName> <provider>false</provider> <kind>SimplexReceptacle</kind> <instance xmi:idref="SimpleNilFacetUserComponentInstance" /> @@ -242,13 +242,13 @@ <connection> <name>TestConnectionReverse</name> <internalEndpoint> - <portName>trig</portName> + <portName>trig_uses</portName> <provider>false</provider> <kind>SimplexReceptacle</kind> <instance xmi:idref="SimpleNilFacetUserComponentInstanceReverse" /> </internalEndpoint> <internalEndpoint> - <portName>trig</portName> + <portName>trig_provides</portName> <provider>true</provider> <kind>Facet</kind> <instance xmi:idref="SimpleNilFacetProviderComponentInstance" /> diff --git a/CIAO/tests/DAnCE/ExecutionManager-Deployments/run_test.pl b/CIAO/tests/DAnCE/ExecutionManager-Deployments/run_test.pl index a85382f4f53..5f996ff9791 100755 --- a/CIAO/tests/DAnCE/ExecutionManager-Deployments/run_test.pl +++ b/CIAO/tests/DAnCE/ExecutionManager-Deployments/run_test.pl @@ -12,6 +12,8 @@ $CIAO_ROOT = "$ENV{'CIAO_ROOT'}"; $TAO_ROOT = "$ENV{'TAO_ROOT'}"; $DANCE_ROOT = "$ENV{'DANCE_ROOT'}"; +$ENV{'CIAO_LOG_LEVEL'}=1; + $daemons_running = 0; $em_running = 0; $ns_running = 0; diff --git a/CIAO/tests/DAnCE/ExecutionManager-Deployments/run_test_cdr.pl b/CIAO/tests/DAnCE/ExecutionManager-Deployments/run_test_cdr.pl index f0a5594eba1..702e38b10c1 100755 --- a/CIAO/tests/DAnCE/ExecutionManager-Deployments/run_test_cdr.pl +++ b/CIAO/tests/DAnCE/ExecutionManager-Deployments/run_test_cdr.pl @@ -12,6 +12,8 @@ $CIAO_ROOT = "$ENV{'CIAO_ROOT'}"; $TAO_ROOT = "$ENV{'TAO_ROOT'}"; $DANCE_ROOT = "$ENV{'DANCE_ROOT'}"; +$ENV{'CIAO_LOG_LEVEL'}=1; + $daemons_running = 0; $em_running = 0; $ns_running = 0; diff --git a/CIAO/tests/DAnCE/Executor-Destructor/run_test.pl b/CIAO/tests/DAnCE/Executor-Destructor/run_test.pl index c6981554f50..441b1b4693a 100755 --- a/CIAO/tests/DAnCE/Executor-Destructor/run_test.pl +++ b/CIAO/tests/DAnCE/Executor-Destructor/run_test.pl @@ -12,6 +12,8 @@ $CIAO_ROOT = "$ENV{'CIAO_ROOT'}"; $TAO_ROOT = "$ENV{'TAO_ROOT'}"; $DANCE_ROOT = "$ENV{'DANCE_ROOT'}"; +$ENV{'CIAO_LOG_LEVEL'}=1; + $daemons_running = 0; $em_running = 0; $ns_running = 0; diff --git a/CIAO/tests/DAnCE/NodeManager-Deployments/EmitsConnectionExplicitHome.cdp b/CIAO/tests/DAnCE/NodeManager-Deployments/EmitsConnectionExplicitHome.cdp index 823e86a9993..080c59b79e8 100644 --- a/CIAO/tests/DAnCE/NodeManager-Deployments/EmitsConnectionExplicitHome.cdp +++ b/CIAO/tests/DAnCE/NodeManager-Deployments/EmitsConnectionExplicitHome.cdp @@ -207,13 +207,13 @@ <connection> <name>TestConnection</name> <internalEndpoint> - <portName>hello_</portName> + <portName>hello_emits</portName> <provider>false</provider> <kind>EventEmitter</kind> <instance xmi:idref="SimpleEmitterComponentInstance" /> </internalEndpoint> <internalEndpoint> - <portName>hello_</portName> + <portName>hello_consumes</portName> <provider>true</provider> <kind>EventConsumer</kind> <instance xmi:idref="SimpleConsumerComponentInstance" /> diff --git a/CIAO/tests/DAnCE/NodeManager-Deployments/LocalSimplexConnectionExplicitHome.cdp b/CIAO/tests/DAnCE/NodeManager-Deployments/LocalSimplexConnectionExplicitHome.cdp index 90bb678edd6..2f377360b78 100644 --- a/CIAO/tests/DAnCE/NodeManager-Deployments/LocalSimplexConnectionExplicitHome.cdp +++ b/CIAO/tests/DAnCE/NodeManager-Deployments/LocalSimplexConnectionExplicitHome.cdp @@ -230,13 +230,13 @@ <resourceType>Local_Interface</resourceType> </deployRequirement> <internalEndpoint> - <portName>trig</portName> + <portName>trig_provides</portName> <provider>true</provider> <kind>Facet</kind> <instance xmi:idref="SimpleLocalProviderComponentInstance" /> </internalEndpoint> <internalEndpoint> - <portName>trig</portName> + <portName>trig_uses</portName> <provider>false</provider> <kind>SimplexReceptacle</kind> <instance xmi:idref="SimpleLocalUserComponentInstance" /> @@ -250,13 +250,13 @@ <resourceType>Local_Interface</resourceType> </deployRequirement> <internalEndpoint> - <portName>trig</portName> + <portName>trig_uses</portName> <provider>false</provider> <kind>SimplexReceptacle</kind> <instance xmi:idref="SimpleLocalUserComponentInstanceReverse" /> </internalEndpoint> <internalEndpoint> - <portName>trig</portName> + <portName>trig_provides</portName> <provider>true</provider> <kind>Facet</kind> <instance xmi:idref="SimpleLocalProviderComponentInstance" /> diff --git a/CIAO/tests/DAnCE/NodeManager-Deployments/MultiplexConnectionExplicitHome.cdp b/CIAO/tests/DAnCE/NodeManager-Deployments/MultiplexConnectionExplicitHome.cdp index ac82795eb37..3ee9846da76 100644 --- a/CIAO/tests/DAnCE/NodeManager-Deployments/MultiplexConnectionExplicitHome.cdp +++ b/CIAO/tests/DAnCE/NodeManager-Deployments/MultiplexConnectionExplicitHome.cdp @@ -226,13 +226,13 @@ <connection> <name>TestConnection</name> <internalEndpoint> - <portName>trig</portName> + <portName>trig_provides</portName> <provider>true</provider> <kind>Facet</kind> <instance xmi:idref="SimpleProviderComponentInstance" /> </internalEndpoint> <internalEndpoint> - <portName>trig</portName> + <portName>trig_uses_m</portName> <provider>false</provider> <kind>MultiplexReceptacle</kind> <instance xmi:idref="SimpleMultipleUserComponentInstance" /> @@ -242,13 +242,13 @@ <connection> <name>TestConnectionReverse</name> <internalEndpoint> - <portName>trig</portName> + <portName>trig_uses_m</portName> <provider>false</provider> <kind>MultiplexReceptacle</kind> <instance xmi:idref="SimpleMultipleUserComponentInstanceReverse" /> </internalEndpoint> <internalEndpoint> - <portName>trig</portName> + <portName>trig_provides</portName> <provider>true</provider> <kind>Facet</kind> <instance xmi:idref="SimpleProviderComponentInstance" /> diff --git a/CIAO/tests/DAnCE/NodeManager-Deployments/PublishConnectionExplicitHome.cdp b/CIAO/tests/DAnCE/NodeManager-Deployments/PublishConnectionExplicitHome.cdp index b0313928731..cd773177e35 100644 --- a/CIAO/tests/DAnCE/NodeManager-Deployments/PublishConnectionExplicitHome.cdp +++ b/CIAO/tests/DAnCE/NodeManager-Deployments/PublishConnectionExplicitHome.cdp @@ -234,13 +234,13 @@ <connection> <name>TestConnection</name> <internalEndpoint> - <portName>hello_</portName> + <portName>hello_publishes</portName> <provider>false</provider> <kind>EventPublisher</kind> <instance xmi:idref="SimplePublisherComponentInstance" /> </internalEndpoint> <internalEndpoint> - <portName>hello_</portName> + <portName>hello_consumes</portName> <provider>true</provider> <kind>EventConsumer</kind> <instance xmi:idref="SimpleConsumerComponentInstance" /> @@ -249,13 +249,13 @@ <connection> <name>TestConnection2</name> <internalEndpoint> - <portName>hello_</portName> + <portName>hello_publishes</portName> <provider>false</provider> <kind>EventPublisher</kind> <instance xmi:idref="SimplePublisherComponentInstance" /> </internalEndpoint> <internalEndpoint> - <portName>hello_</portName> + <portName>hello_consumes</portName> <provider>true</provider> <kind>EventConsumer</kind> <instance xmi:idref="SimpleConsumerComponentInstance2" /> diff --git a/CIAO/tests/DAnCE/NodeManager-Deployments/SimplexConnectionExplicitHome.cdp b/CIAO/tests/DAnCE/NodeManager-Deployments/SimplexConnectionExplicitHome.cdp index 09258e030cb..b179d822dcd 100644 --- a/CIAO/tests/DAnCE/NodeManager-Deployments/SimplexConnectionExplicitHome.cdp +++ b/CIAO/tests/DAnCE/NodeManager-Deployments/SimplexConnectionExplicitHome.cdp @@ -226,13 +226,13 @@ <connection> <name>TestConnection</name> <internalEndpoint> - <portName>trig</portName> + <portName>trig_provides</portName> <provider>true</provider> <kind>Facet</kind> <instance xmi:idref="SimpleProviderComponentInstance" /> </internalEndpoint> <internalEndpoint> - <portName>trig</portName> + <portName>trig_uses</portName> <provider>false</provider> <kind>SimplexReceptacle</kind> <instance xmi:idref="SimpleUserComponentInstance" /> @@ -242,13 +242,13 @@ <connection> <name>TestConnectionReverse</name> <internalEndpoint> - <portName>trig</portName> + <portName>trig_uses</portName> <provider>false</provider> <kind>SimplexReceptacle</kind> <instance xmi:idref="SimpleUserComponentInstanceReverse" /> </internalEndpoint> <internalEndpoint> - <portName>trig</portName> + <portName>trig_provides</portName> <provider>true</provider> <kind>Facet</kind> <instance xmi:idref="SimpleProviderComponentInstance" /> diff --git a/CIAO/tests/DAnCE/NodeManager-Deployments/TwoComponentsOneHome.cdp b/CIAO/tests/DAnCE/NodeManager-Deployments/TwoComponentsOneHome.cdp index 0d118133609..97062ecd436 100644 --- a/CIAO/tests/DAnCE/NodeManager-Deployments/TwoComponentsOneHome.cdp +++ b/CIAO/tests/DAnCE/NodeManager-Deployments/TwoComponentsOneHome.cdp @@ -245,13 +245,13 @@ <connection> <name>TestConnection</name> <internalEndpoint> - <portName>trig</portName> + <portName>trig_provides</portName> <provider>true</provider> <kind>Facet</kind> <instance xmi:idref="SimpleProviderComponentInstance" /> </internalEndpoint> <internalEndpoint> - <portName>trig</portName> + <portName>trig_uses</portName> <provider>false</provider> <kind>SimplexReceptacle</kind> <instance xmi:idref="SimpleUserComponentInstance" /> @@ -261,13 +261,13 @@ <connection> <name>TestConnectionReverse</name> <internalEndpoint> - <portName>trig</portName> + <portName>trig_uses</portName> <provider>false</provider> <kind>SimplexReceptacle</kind> <instance xmi:idref="SimpleUserComponentInstanceReverse" /> </internalEndpoint> <internalEndpoint> - <portName>trig</portName> + <portName>trig_provides</portName> <provider>true</provider> <kind>Facet</kind> <instance xmi:idref="SimpleProviderComponentInstanceOne" /> diff --git a/CIAO/tests/DAnCE/NodeManager-Deployments/run_test.pl b/CIAO/tests/DAnCE/NodeManager-Deployments/run_test.pl index 7fcdaea1159..21589022640 100755 --- a/CIAO/tests/DAnCE/NodeManager-Deployments/run_test.pl +++ b/CIAO/tests/DAnCE/NodeManager-Deployments/run_test.pl @@ -12,6 +12,8 @@ $CIAO_ROOT = "$ENV{'CIAO_ROOT'}"; $TAO_ROOT = "$ENV{'TAO_ROOT'}"; $DANCE_ROOT = "$ENV{'DANCE_ROOT'}"; +$ENV{'CIAO_LOG_LEVEL'}=1; + $daemons_running = 0; $em_running = 0; $ns_running = 0; diff --git a/CIAO/tests/DAnCE/NodeManager-Deployments/run_test_cdr.pl b/CIAO/tests/DAnCE/NodeManager-Deployments/run_test_cdr.pl index 1ee7f237114..383f31437e9 100755 --- a/CIAO/tests/DAnCE/NodeManager-Deployments/run_test_cdr.pl +++ b/CIAO/tests/DAnCE/NodeManager-Deployments/run_test_cdr.pl @@ -12,6 +12,8 @@ $CIAO_ROOT = "$ENV{'CIAO_ROOT'}"; $TAO_ROOT = "$ENV{'TAO_ROOT'}"; $DANCE_ROOT = "$ENV{'DANCE_ROOT'}"; +$ENV{'CIAO_LOG_LEVEL'}=1; + $daemons_running = 0; $em_running = 0; $ns_running = 0; diff --git a/CIAO/tests/DAnCE/Progressive_Deployments/Plan_C.cdp b/CIAO/tests/DAnCE/Progressive_Deployments/Plan_C.cdp index 471985cadeb..be2ab7f2cc8 100644 --- a/CIAO/tests/DAnCE/Progressive_Deployments/Plan_C.cdp +++ b/CIAO/tests/DAnCE/Progressive_Deployments/Plan_C.cdp @@ -229,7 +229,7 @@ <connection> <name>TestConnection</name> <internalEndpoint> - <portName>trig</portName> + <portName>trig_provides</portName> <provider>true</provider> <kind>Facet</kind> <instance xmi:idref="SimpleProviderComponentInstance" /> @@ -245,7 +245,7 @@ <connection> <name>TestConnectionReverse</name> <internalEndpoint> - <portName>trig</portName> + <portName>trig_uses</portName> <provider>false</provider> <kind>SimplexReceptacle</kind> <instance xmi:idref="SimpleUserComponentInstance" /> diff --git a/CIAO/tests/DAnCE/Progressive_Deployments/run_test.pl b/CIAO/tests/DAnCE/Progressive_Deployments/run_test.pl index 4a61bf89089..90418d4f183 100755 --- a/CIAO/tests/DAnCE/Progressive_Deployments/run_test.pl +++ b/CIAO/tests/DAnCE/Progressive_Deployments/run_test.pl @@ -12,6 +12,8 @@ $CIAO_ROOT = "$ENV{'CIAO_ROOT'}"; $TAO_ROOT = "$ENV{'TAO_ROOT'}"; $DANCE_ROOT = "$ENV{'DANCE_ROOT'}"; +$ENV{'CIAO_LOG_LEVEL'}=1; + $daemons_running = 0; $em_running = 0; $ns_running = 0; diff --git a/CIAO/tutorials/Quoter/Simple/01.html b/CIAO/tutorials/Quoter/Simple/01.html index 2e168f6556d..f7be88a3e0b 100644 --- a/CIAO/tutorials/Quoter/Simple/01.html +++ b/CIAO/tutorials/Quoter/Simple/01.html @@ -182,6 +182,27 @@ "c5"> </span></span> <span class= 'c4'>$ACE_ROOT/MPC/<a href="../../../../../../MPC/docs/README">README</a></span></h3> + <h3 class="Section1 c11"><span class='c10'>·<span class= + "c5"> </span></span> + <span class='c4'>In the beginning of this tutorial, we're using a + perl scripts which creates the MPC files for you. This script is + called <span class="c42">generate_component_mpc.pl</span> + and is located in $CIAO_ROOT/bin.</span></h3> + + <h3 class="Section1 c11"><span class='c10'>·<span class= + "c5"> </span></span> + <span class='c4'>When running this script, please use the full + path to the CIAO bin directory instead of $CIAO_ROOT/bin on Linux or + %CIAO_ROOT%\bin on Windows.</span></h3> + + <h3 class="Section1 c11"><span class='c10'>·<span class= + "c5"> </span></span> + <span class='c4'>To understand the meaning of different parameters + passed to <span class="c42">generate_component_mpc.pl</span> + <span class='c4'>type the following command:<br/> + <span class="c42">generate_component_mpc.pl -h</span><br /> + <br /></span></span></h3> + <p class='c14'><span class='c1'>Interface Design:</span></p> <p class='c17'><span class='c15'>·<span class= @@ -204,17 +225,20 @@ command:</span></p> <p class='c19'><span class="c18">generate_component_mpc.pl - –n Stock_Base</span></p> + –n –e –l ../lib –o ../lib Stock_Base</span></p> <p class='c21'><span class='c20'>The command above will generate a <i>Stock_Base.mpc</i> file that contains two projects <i>Stock_Base_stub</i> and <i>Stock_Base_skel</i> for the Stub - and Servant code respectively. The MPC file should look like - <a href="Stock_Base/Stock_Base.mpc">this</a>.<br/> - Mind that "libout" and "libpaths" are added. This is done to make - the compilation of this example easier and at runtime, all deliveralbes - are in one directory. Beware that you need to add this - directory to your system path when running the executables (see page 4). + and Servant code respectively. Since we're using events in this + tutorial, we need to add –e to the command line. + The MPC file should look like <a href="Stock_Base/Stock_Base.mpc"> + this</a>.<br/> + Mind that "-o" (library output) and "-l" (path to libraries) are added. + This is done to make the compilation of this example easier and at + runtime, all deliveralbes are in one directory. Beware that you need to + add this directory to your system path when running the executables + (see page 4). </span></p> <p class='c14'><span class='c1'>Component Design:</span></p> @@ -241,8 +265,9 @@ <i>Quoter/Distributor</i> <span> </span>sub-directory, type the following command</span></p> - <p class="c28"><span class="c27">generate_component_mpc.pl -p - Stock_Base -c StockDistributorDriver StockDistributor</span></p> + <p class="c28"><span class="c27">generate_component_mpc.pl + –e –p Stock_Base –c StockDistributorDriver + –o ../lib –l ../lib StockDistributor</span></p> <p class='c31'><span class='c20'>The command above takes a few optional parameters. The -p option indicates that the <span class= @@ -273,8 +298,7 @@ "c5"> </span></span> <span class='c20'>The generated</span> <span class='c20'>MPC file should look like <a href= - "Distributor/StockDistributor.mpc">this</a>. Both "libout" and "libpaths" - are added again. + "Distributor/StockDistributor.mpc">this</a>. </span></p> <p class='c40'><span class='c1'>Broker:</span></p> @@ -297,9 +321,10 @@ <i>Quoter/Broker</i> sub-directory, type the following command:</span></p> - <p class='c43'><span class="c42"><span class= - "c27">generate_component_mpc.pl -p Stock_Base -c - StockBrokerDriver StockBroker</span></span></p> + <p class='c43'><span class="c42"><span class="c27"> + generate_component_mpc.pl –e –p Stock_Base + –c StockBrokerDriver –o ../lib –l ../lib + StockBroker</span></span></p> <p class='c31'><span class='c20'><span class="c32">The command above takes a few optional parameter. The -p option states that @@ -330,21 +355,7 @@ "c5"> </span></span> <span class='c20'><span class="c32">The generated</span> <span class="c32">MPC file should look like</span> <a href= - "Broker/StockBroker.mpc">this</a>. Both "libout" and "libpaths" - are added again.</span></p> - - <p class='c45'><span class='c1'><br /> - <b>Note:</b></span></p> - - <p class='c45'><span class='c1'>To understand the meaning of - different parameters passed to</span> <span class= - "c42">generate_component_mpc.pl</span><span class='c20'>click - <a href="../../../generate_component_mpc.html">here</a> or type - the</span> <span class='c1'>following command:</span></p> - - <p class='c45'><span class="c42">generate_component_mpc.pl - -h</span><span class='c1'><br /> - <br /></span></p> + "Broker/StockBroker.mpc">this</a>.</span></p> <p class='c46'><span class='c1'><a href= "index.html">Previous</a> diff --git a/CIAO/tutorials/Quoter/Simple/Broker/StockBroker.mpc b/CIAO/tutorials/Quoter/Simple/Broker/StockBroker.mpc index 0d0891b6759..1fa92c57c16 100644 --- a/CIAO/tutorials/Quoter/Simple/Broker/StockBroker.mpc +++ b/CIAO/tutorials/Quoter/Simple/Broker/StockBroker.mpc @@ -1,14 +1,16 @@ // $Id$ -// This file is generated with "generate_component_mpc.pl -p Stock_Base -c StockBrokerDriver StockBroker -l ../lib -o ../lib" +// This file is generated with "generate_component_mpc.pl -e -p Stock_Base -l ../lib -o ../lib -c StockBrokerDriver StockBroker" project(Stock_Base_StockBroker_idl_gen) : componentidldefaults, avoids_ccm_noevent { custom_only = 1 + idlflags += -Wb,stub_export_macro=STOCKBROKER_STUB_Export \ -Wb,stub_export_include=StockBroker_stub_export.h \ -Wb,skel_export_macro=STOCKBROKER_SVNT_Export \ -Wb,skel_export_include=StockBroker_svnt_export.h \ -Wb,exec_export_macro=STOCKBROKER_EXEC_Export \ - -Wb,exec_export_include=StockBroker_exec_export.h + -Wb,exec_export_include=StockBroker_exec_export.h \ + -Gxhex -Gxhsk -Gxhst IDL_Files { StockBroker.idl @@ -28,8 +30,8 @@ project(Stock_Base_StockBroker_lem_gen) : ciaoidldefaults, avoids_ccm_noevent { } project(Stock_Base_StockBroker_lem_stub) : ccm_svnt, avoids_ccm_noevent { - after += Stock_Base_StockBroker_lem_gen Stock_Base_StockBroker_stub Stock_Base_stub - libs += Stock_Base_stub StockBroker_stub + after += Stock_Base_StockBroker_lem_gen Stock_Base_StockBroker_stub Stock_Base_stub Stock_Base_lem_stub + libs += Stock_Base_stub Stock_Base_lem_stub StockBroker_stub libpaths += ../lib libout = ../lib sharedname = StockBroker_lem_stub @@ -52,9 +54,9 @@ project(Stock_Base_StockBroker_lem_stub) : ccm_svnt, avoids_ccm_noevent { } } -project(Stock_Base_StockBroker_stub) : ccm_stub, avoids_ccm_noevent { - after += Stock_Base_StockBroker_idl_gen Stock_Base_stub - libs += Stock_Base_stub +project(Stock_Base_StockBroker_stub) : ccm_stub, avoids_ccm_noevent { + after += Stock_Base_StockBroker_idl_gen Stock_Base_stub Stock_Base_lem_stub + libs += Stock_Base_stub Stock_Base_lem_stub libpaths += ../lib libout = ../lib sharedname = StockBroker_stub @@ -77,10 +79,10 @@ project(Stock_Base_StockBroker_stub) : ccm_stub, avoids_ccm_noevent { } } -project(Stock_Base_StockBroker_exec) : ciao_executor, avoids_ccm_noevent { - after += Stock_Base_StockBroker_lem_stub Stock_Base_StockBroker_stub +project(Stock_Base_StockBroker_exec) : ciao_executor, avoids_ccm_noevent { + after += Stock_Base_lem_stub Stock_Base_StockBroker_lem_stub Stock_Base_StockBroker_stub sharedname = StockBroker_exec - libs += StockBroker_stub StockBroker_lem_stub Stock_Base_stub + libs += Stock_Base_lem_stub StockBroker_stub StockBroker_lem_stub Stock_Base_stub Stock_Base_lem_stub libpaths += ../lib libout = ../lib dynamicflags += STOCKBROKER_EXEC_BUILD_DLL @@ -102,16 +104,17 @@ project(Stock_Base_StockBroker_exec) : ciao_executor, avoids_ccm_noevent { } -project(Stock_Base_StockBroker_svnt) : ciao_servant, avoids_ccm_noevent { - after += Stock_Base_skel Stock_Base_StockBroker_lem_stub +project(Stock_Base_StockBroker_svnt) : ciao_servant, avoids_ccm_noevent { + after += Stock_Base_skel Stock_Base_lem_stub Stock_Base_StockBroker_lem_stub sharedname = StockBroker_svnt libs += StockBroker_stub StockBroker_lem_stub \ Stock_Base_skel \ - Stock_Base_stub + Stock_Base_stub \ + Stock_Base_lem_stub libpaths += ../lib libout = ../lib dynamicflags += STOCKBROKER_SVNT_BUILD_DLL - + IDL_Files { } @@ -131,10 +134,10 @@ project(Stock_Base_StockBroker_svnt) : ciao_servant, avoids_ccm_noevent { } } -project (Stock_Base_StockBrokerDriver) : ccm_stub, valuetype , avoids_ccm_noevent { +project (Stock_Base_StockBrokerDriver) : ccm_stub, valuetype, avoids_ccm_noevent { exename = StockBrokerDriver after += Stock_Base_StockBroker_stub - libs += StockBroker_stub Stock_Base_stub + libs += StockBroker_stub Stock_Base_stub Stock_Base_lem_stub libpaths += ../lib exeout = ../lib IDL_Files { diff --git a/CIAO/tutorials/Quoter/Simple/Distributor/StockDistributor.mpc b/CIAO/tutorials/Quoter/Simple/Distributor/StockDistributor.mpc index 8412025e9a6..4690c2030dc 100644 --- a/CIAO/tutorials/Quoter/Simple/Distributor/StockDistributor.mpc +++ b/CIAO/tutorials/Quoter/Simple/Distributor/StockDistributor.mpc @@ -1,16 +1,16 @@ // $Id$ -// This file is generated with "generate_component_mpc.pl -p Stock_Base -c StockDistributorDriver StockDistributor -l ../lib -o ../lib" +// This file is generated with "generate_component_mpc.pl -e -p Stock_Base -l ../lib -o ../lib -c StockDistributorDriver StockDistributor" project(Stock_Base_StockDistributor_idl_gen) : componentidldefaults, avoids_ccm_noevent { - after += Stock_Base_idl_gen custom_only = 1 - idlflags += \ - -Wb,stub_export_macro=STOCKDISTRIBUTOR_STUB_Export \ + + idlflags += -Wb,stub_export_macro=STOCKDISTRIBUTOR_STUB_Export \ -Wb,stub_export_include=StockDistributor_stub_export.h \ -Wb,skel_export_macro=STOCKDISTRIBUTOR_SVNT_Export \ -Wb,skel_export_include=StockDistributor_svnt_export.h \ -Wb,exec_export_macro=STOCKDISTRIBUTOR_EXEC_Export \ - -Wb,exec_export_include=StockDistributor_exec_export.h + -Wb,exec_export_include=StockDistributor_exec_export.h \ + -Gxhex -Gxhsk -Gxhst IDL_Files { StockDistributor.idl @@ -29,9 +29,9 @@ project(Stock_Base_StockDistributor_lem_gen) : ciaoidldefaults, avoids_ccm_noeve } } -project(Stock_Base_StockDistributor_lem_stub) : ccm_svnt, avoids_ccm_noevent { - after += Stock_Base_StockDistributor_lem_gen Stock_Base_StockDistributor_stub Stock_Base_stub - libs += Stock_Base_stub StockDistributor_stub +project(Stock_Base_StockDistributor_lem_stub) : ccm_svnt, avoids_ccm_noevent { + after += Stock_Base_StockDistributor_lem_gen Stock_Base_StockDistributor_stub Stock_Base_stub Stock_Base_lem_stub + libs += Stock_Base_stub Stock_Base_lem_stub StockDistributor_stub libpaths += ../lib libout = ../lib sharedname = StockDistributor_lem_stub @@ -54,9 +54,9 @@ project(Stock_Base_StockDistributor_lem_stub) : ccm_svnt, avoids_ccm_noevent { } } -project(Stock_Base_StockDistributor_stub) : ccm_stub, avoids_ccm_noevent { - after += Stock_Base_StockDistributor_idl_gen Stock_Base_stub - libs += Stock_Base_stub +project(Stock_Base_StockDistributor_stub) : ccm_stub, avoids_ccm_noevent { + after += Stock_Base_StockDistributor_idl_gen Stock_Base_stub Stock_Base_lem_stub + libs += Stock_Base_stub Stock_Base_lem_stub libpaths += ../lib libout = ../lib sharedname = StockDistributor_stub @@ -79,10 +79,10 @@ project(Stock_Base_StockDistributor_stub) : ccm_stub, avoids_ccm_noevent { } } -project(Stock_Base_StockDistributor_exec) : ciao_executor, avoids_ccm_noevent { - after += Stock_Base_StockDistributor_lem_stub Stock_Base_StockDistributor_stub +project(Stock_Base_StockDistributor_exec) : ciao_executor, avoids_ccm_noevent { + after += Stock_Base_lem_stub Stock_Base_StockDistributor_lem_stub Stock_Base_StockDistributor_stub sharedname = StockDistributor_exec - libs += StockDistributor_stub StockDistributor_lem_stub Stock_Base_stub + libs += Stock_Base_lem_stub StockDistributor_stub StockDistributor_lem_stub Stock_Base_stub Stock_Base_lem_stub libpaths += ../lib libout = ../lib dynamicflags += STOCKDISTRIBUTOR_EXEC_BUILD_DLL @@ -104,16 +104,17 @@ project(Stock_Base_StockDistributor_exec) : ciao_executor, avoids_ccm_noevent } -project(Stock_Base_StockDistributor_svnt) : ciao_servant, avoids_ccm_noevent { - after += Stock_Base_skel Stock_Base_StockDistributor_lem_stub +project(Stock_Base_StockDistributor_svnt) : ciao_servant, avoids_ccm_noevent { + after += Stock_Base_skel Stock_Base_lem_stub Stock_Base_StockDistributor_lem_stub sharedname = StockDistributor_svnt libs += StockDistributor_stub StockDistributor_lem_stub \ Stock_Base_skel \ - Stock_Base_stub + Stock_Base_stub \ + Stock_Base_lem_stub libpaths += ../lib libout = ../lib dynamicflags += STOCKDISTRIBUTOR_SVNT_BUILD_DLL - + IDL_Files { } @@ -133,10 +134,10 @@ project(Stock_Base_StockDistributor_svnt) : ciao_servant, avoids_ccm_noevent { } } -project (Stock_Base_StockDistributorDriver) : ccm_stub, valuetype , avoids_ccm_noevent { +project (Stock_Base_StockDistributorDriver) : ccm_stub, valuetype, avoids_ccm_noevent { exename = StockDistributorDriver after += Stock_Base_StockDistributor_stub - libs += StockDistributor_stub Stock_Base_stub + libs += StockDistributor_stub Stock_Base_stub Stock_Base_lem_stub libpaths += ../lib exeout = ../lib IDL_Files { diff --git a/CIAO/tutorials/Quoter/Simple/Stock_Base/Stock_Base.mpc b/CIAO/tutorials/Quoter/Simple/Stock_Base/Stock_Base.mpc index 930c152bf19..0e78e03ed11 100644 --- a/CIAO/tutorials/Quoter/Simple/Stock_Base/Stock_Base.mpc +++ b/CIAO/tutorials/Quoter/Simple/Stock_Base/Stock_Base.mpc @@ -1,14 +1,14 @@ // $Id$ -// This file is generated with "generate_component_mpc.pl -n Stock_Base -l ../lib -o ../lib" +// This file is generated with "generate_component_mpc.pl -ne -l ../lib -o ../lib Stock_Base" project(Stock_Base_idl_gen) : componentidldefaults, avoids_ccm_noevent { custom_only = 1 + idlflags += -Wb,stub_export_macro=STOCK_BASE_STUB_Export \ -Wb,stub_export_include=Stock_Base_stub_export.h \ -Wb,skel_export_macro=STOCK_BASE_SKEL_Export \ -Wb,skel_export_include=Stock_Base_skel_export.h \ - -Wb,exec_export_macro=STOCK_BASE_EXEC_Export \ - -Wb,exec_export_include=Stock_Base_exec_export.h + -Gxhex -Gxhsk -Gxhst IDL_Files { Stock_Base.idl @@ -16,31 +16,55 @@ project(Stock_Base_idl_gen) : componentidldefaults, avoids_ccm_noevent { } project(Stock_Base_lem_gen) : ciaoidldefaults, avoids_ccm_noevent { - custom_only = 1 after += Stock_Base_idl_gen - idlflags += \ - -Wb,export_macro=STOCK_BASE_EXEC_Export \ - -Wb,export_include=Stock_Base_exec_export.h + custom_only = 1 + idlflags += -Wb,stub_export_macro=STOCK_BASE_LEM_STUB_Export \ + -Wb,stub_export_include=Stock_Base_lem_stub_export.h \ + -SS -Gxhst IDL_Files { Stock_BaseE.idl } } -project(Stock_Base_stub) : ccm_stub, avoids_ccm_noevent { - after += Stock_Base_lem_gen - libs += +project(Stock_Base_lem_stub) : ccm_svnt, avoids_ccm_noevent { + after += Stock_Base_lem_gen Stock_Base_stub + libs += Stock_Base_stub + libpaths += ../lib + libout = ../lib + sharedname = Stock_Base_lem_stub + dynamicflags += STOCK_BASE_LEM_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Stock_BaseEC.cpp + } + + Header_Files { + Stock_BaseEC.h + Stock_Base_lem_stub_export.h + } + + Inline_Files { + Stock_BaseEC.inl + } +} + +project(Stock_Base_stub) : ccm_stub, avoids_ccm_noevent { + after += Stock_Base_idl_gen + libs += libpaths += ../lib libout = ../lib sharedname = Stock_Base_stub - dynamicflags += STOCK_BASE_STUB_BUILD_DLL STOCK_BASE_EXEC_BUILD_DLL + dynamicflags += STOCK_BASE_STUB_BUILD_DLL IDL_Files { } Source_Files { Stock_BaseC.cpp - Stock_BaseEC.cpp } Header_Files { @@ -54,15 +78,15 @@ project(Stock_Base_stub) : ccm_stub, avoids_ccm_noevent { } -project(Stock_Base_skel) : ciao_executor, avoids_ccm_noevent { +project(Stock_Base_skel) : ciao_executor, avoids_ccm_noevent { after += Stock_Base_stub Stock_Base_lem_stub sharedname = Stock_Base_skel libs += Stock_Base_stub - + libpaths += ../lib libout = ../lib dynamicflags += STOCK_BASE_SKEL_BUILD_DLL - + IDL_Files { } diff --git a/CIAO/tutorials/Quoter/Simple/descriptors/run_test.pl b/CIAO/tutorials/Quoter/Simple/descriptors/run_test.pl index 71cdf474fa0..a01c3fc6edf 100755 --- a/CIAO/tutorials/Quoter/Simple/descriptors/run_test.pl +++ b/CIAO/tutorials/Quoter/Simple/descriptors/run_test.pl @@ -264,10 +264,10 @@ if ($status == 0) { sleep (2); } else { - print "Error starting Stock Distributor"; + print "Error starting Stock Distributor\n"; } -print "We're done. Stop the application now by invoking the plan_launcher again"; +print "We're done. Stop the application now by invoking the plan_launcher again\n"; sleep (5); # Invoke executor - stop the application -. diff --git a/DAnCE/ChangeLog b/DAnCE/ChangeLog index 63ae36cddbb..cc74084baa9 100644 --- a/DAnCE/ChangeLog +++ b/DAnCE/ChangeLog @@ -1,3 +1,33 @@ +Fri Feb 11 11:16:00 UTC 2011 Martin Corino <mcorino@remedy.nl> + + Merged changes from Remedy work branch. + + === start changelog === + + Sun Jan 23 19:27:25 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * tools/Config_Handlers/DynAny_Handler/DataType_Handler.h: + * tools/Config_Handlers/DynAny_Handler/DataType_Handler.cpp: + * tools/Config_Handlers/DynAny_Handler/DynAlias_Handler.cpp: + * tools/Config_Handlers/DynAny_Handler/DynAny_Handler.h: + * tools/Config_Handlers/DynAny_Handler/DynAny_Handler.cpp: + * tools/Config_Handlers/DynAny_Handler/DynEnum_Handler.h: + * tools/Config_Handlers/DynAny_Handler/DynEnum_Handler.cpp: + * tools/Config_Handlers/DynAny_Handler/DynSequence_Handler.cpp: + * tools/Config_Handlers/DynAny_Handler/DynStruct_Handler.h: + * tools/Config_Handlers/DynAny_Handler/DynStruct_Handler.cpp: + Fixed valgrind leaks, layout changes, use DANCE_ERROR + + Fri Jan 21 15:43:55 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * tools/Config_Handlers/DynAny_Handler/DynSequence_Handler.cpp: + Fixed typo in comment + + * tools/Config_Handlers/DynAny_Handler/DynStruct_Handler.cpp: + Postfix increment + + === end changelog === + Fri Jan 28 11:21:05 CET 2011 Johnny Willemsen <jwillemsen@remedy.nl> * DAnCE version 1.0.1 released. diff --git a/DAnCE/bin/PythonDAnCE/__init__.py b/DAnCE/bin/PythonDAnCE/__init__.py index 0ebbdbeba93..48a8970aaee 100755 --- a/DAnCE/bin/PythonDAnCE/__init__.py +++ b/DAnCE/bin/PythonDAnCE/__init__.py @@ -1 +1,2 @@ +# $Id$ import generator diff --git a/DAnCE/bin/PythonDAnCE/generator/__init__.py b/DAnCE/bin/PythonDAnCE/generator/__init__.py index 6942635ce28..050a49b0a63 100755 --- a/DAnCE/bin/PythonDAnCE/generator/__init__.py +++ b/DAnCE/bin/PythonDAnCE/generator/__init__.py @@ -1,3 +1,4 @@ +# $Id$ temp_path = "" diff --git a/DAnCE/bin/PythonDAnCE/generator/_path.py b/DAnCE/bin/PythonDAnCE/generator/_path.py index e69de29bb2d..fbbab2d1199 100755 --- a/DAnCE/bin/PythonDAnCE/generator/_path.py +++ b/DAnCE/bin/PythonDAnCE/generator/_path.py @@ -0,0 +1 @@ +# $Id$ diff --git a/DAnCE/bin/PythonDAnCE/generator/artifact.py b/DAnCE/bin/PythonDAnCE/generator/artifact.py index dbebad5291d..488953d6b8b 100755 --- a/DAnCE/bin/PythonDAnCE/generator/artifact.py +++ b/DAnCE/bin/PythonDAnCE/generator/artifact.py @@ -1,3 +1,5 @@ +# $Id$ + from templet import stringfunction @stringfunction diff --git a/DAnCE/bin/PythonDAnCE/generator/comp_impl.py b/DAnCE/bin/PythonDAnCE/generator/comp_impl.py index b7dcfbf4a50..cca8a6a3ca5 100755 --- a/DAnCE/bin/PythonDAnCE/generator/comp_impl.py +++ b/DAnCE/bin/PythonDAnCE/generator/comp_impl.py @@ -1,3 +1,5 @@ +# $Id$ + from templet import stringfunction @stringfunction diff --git a/DAnCE/bin/PythonDAnCE/generator/comp_inst.py b/DAnCE/bin/PythonDAnCE/generator/comp_inst.py index a235501d12e..922cd819602 100755 --- a/DAnCE/bin/PythonDAnCE/generator/comp_inst.py +++ b/DAnCE/bin/PythonDAnCE/generator/comp_inst.py @@ -1,3 +1,4 @@ +# $Id$ from templet import stringfunction @stringfunction diff --git a/DAnCE/bin/PythonDAnCE/generator/config_prop.py b/DAnCE/bin/PythonDAnCE/generator/config_prop.py index 79c5b1199ee..b531a670660 100644 --- a/DAnCE/bin/PythonDAnCE/generator/config_prop.py +++ b/DAnCE/bin/PythonDAnCE/generator/config_prop.py @@ -1,3 +1,4 @@ +# $Id$ from templet import stringfunction @stringfunction diff --git a/DAnCE/bin/PythonDAnCE/generator/connection.py b/DAnCE/bin/PythonDAnCE/generator/connection.py index b1691f2cd27..ed6421556bb 100644 --- a/DAnCE/bin/PythonDAnCE/generator/connection.py +++ b/DAnCE/bin/PythonDAnCE/generator/connection.py @@ -1,3 +1,4 @@ +# $Id$ from templet import stringfunction @stringfunction diff --git a/DAnCE/bin/PythonDAnCE/generator/deploy_requirement.py b/DAnCE/bin/PythonDAnCE/generator/deploy_requirement.py index 700b02958c2..e7afc8187a4 100644 --- a/DAnCE/bin/PythonDAnCE/generator/deploy_requirement.py +++ b/DAnCE/bin/PythonDAnCE/generator/deploy_requirement.py @@ -1,3 +1,5 @@ +# $Id$ + from templet import stringfunction @stringfunction diff --git a/DAnCE/bin/PythonDAnCE/generator/external_reference.py b/DAnCE/bin/PythonDAnCE/generator/external_reference.py index 3bb68174044..1529a5d1c0f 100644 --- a/DAnCE/bin/PythonDAnCE/generator/external_reference.py +++ b/DAnCE/bin/PythonDAnCE/generator/external_reference.py @@ -1,3 +1,5 @@ +# $Id$ + from templet import stringfunction @stringfunction diff --git a/DAnCE/bin/PythonDAnCE/generator/footer.py b/DAnCE/bin/PythonDAnCE/generator/footer.py index 687cfb78a02..701e6aceeec 100755 --- a/DAnCE/bin/PythonDAnCE/generator/footer.py +++ b/DAnCE/bin/PythonDAnCE/generator/footer.py @@ -1,3 +1,5 @@ +# $Id$ + from templet import stringfunction @stringfunction diff --git a/DAnCE/bin/PythonDAnCE/generator/header.py b/DAnCE/bin/PythonDAnCE/generator/header.py index c16146ae028..1e3e1ae9081 100755 --- a/DAnCE/bin/PythonDAnCE/generator/header.py +++ b/DAnCE/bin/PythonDAnCE/generator/header.py @@ -1,3 +1,5 @@ +# $Id$ + from templet import stringfunction @stringfunction diff --git a/DAnCE/bin/PythonDAnCE/generator/home_impl.py b/DAnCE/bin/PythonDAnCE/generator/home_impl.py index 87c14a68070..316650325fa 100755 --- a/DAnCE/bin/PythonDAnCE/generator/home_impl.py +++ b/DAnCE/bin/PythonDAnCE/generator/home_impl.py @@ -1,3 +1,5 @@ +# $Id$ + from templet import stringfunction @stringfunction diff --git a/DAnCE/bin/PythonDAnCE/generator/home_inst.py b/DAnCE/bin/PythonDAnCE/generator/home_inst.py index 6d24a5c5986..5546a2e33b1 100755 --- a/DAnCE/bin/PythonDAnCE/generator/home_inst.py +++ b/DAnCE/bin/PythonDAnCE/generator/home_inst.py @@ -1,3 +1,4 @@ +# $Id$ from templet import stringfunction @stringfunction diff --git a/DAnCE/bin/PythonDAnCE/generator/homed_comp_impl.py b/DAnCE/bin/PythonDAnCE/generator/homed_comp_impl.py index ab8a7ee9517..858c0dbea3b 100755 --- a/DAnCE/bin/PythonDAnCE/generator/homed_comp_impl.py +++ b/DAnCE/bin/PythonDAnCE/generator/homed_comp_impl.py @@ -1,3 +1,4 @@ +# $Id$ from templet import stringfunction @stringfunction diff --git a/DAnCE/bin/PythonDAnCE/generator/homed_comp_inst.py b/DAnCE/bin/PythonDAnCE/generator/homed_comp_inst.py index ee1218d4539..2bcba979762 100755 --- a/DAnCE/bin/PythonDAnCE/generator/homed_comp_inst.py +++ b/DAnCE/bin/PythonDAnCE/generator/homed_comp_inst.py @@ -1,3 +1,4 @@ +# $Id$ from templet import stringfunction @stringfunction diff --git a/DAnCE/bin/PythonDAnCE/generator/internal_endpoint.py b/DAnCE/bin/PythonDAnCE/generator/internal_endpoint.py index 594118c29fc..3081ea4337e 100644 --- a/DAnCE/bin/PythonDAnCE/generator/internal_endpoint.py +++ b/DAnCE/bin/PythonDAnCE/generator/internal_endpoint.py @@ -1,3 +1,5 @@ +# $Id$ + from templet import stringfunction @stringfunction diff --git a/DAnCE/bin/PythonDAnCE/generator/templet.py b/DAnCE/bin/PythonDAnCE/generator/templet.py index 85cfb9f0389..744896e12b2 100755 --- a/DAnCE/bin/PythonDAnCE/generator/templet.py +++ b/DAnCE/bin/PythonDAnCE/generator/templet.py @@ -1,3 +1,5 @@ +# $Id$ + """A lightweight python templating engine. Templet version 2 beta. Supports two templating idioms: diff --git a/DAnCE/bin/generate_plan.py b/DAnCE/bin/generate_plan.py index cdbc3bb3df1..b04bb4408f8 100755 --- a/DAnCE/bin/generate_plan.py +++ b/DAnCE/bin/generate_plan.py @@ -1,4 +1,5 @@ #!/usr/bin/python +# $Id$ import sys, os sys.path.append (os.getenv ("DANCE_ROOT")) diff --git a/DAnCE/tools/Config_Handlers/DynAny_Handler/DataType_Handler.cpp b/DAnCE/tools/Config_Handlers/DynAny_Handler/DataType_Handler.cpp index 451de620036..11781486674 100644 --- a/DAnCE/tools/Config_Handlers/DynAny_Handler/DataType_Handler.cpp +++ b/DAnCE/tools/Config_Handlers/DynAny_Handler/DataType_Handler.cpp @@ -14,7 +14,7 @@ namespace DAnCE{ { } - ///This method takes a <CIAO::Config_Handlers::DataType> + ///This method takes a CIAO::Config_Handlers::DataType ///and returns the corresponding CORBA::TypeCode. CORBA::TypeCode_ptr DataType_Handler::data_type (const DataType& desc) diff --git a/DAnCE/tools/Config_Handlers/DynAny_Handler/DataType_Handler.h b/DAnCE/tools/Config_Handlers/DynAny_Handler/DataType_Handler.h index dd2d2375bf5..9d0b822fd5d 100644 --- a/DAnCE/tools/Config_Handlers/DynAny_Handler/DataType_Handler.h +++ b/DAnCE/tools/Config_Handlers/DynAny_Handler/DataType_Handler.h @@ -22,19 +22,19 @@ #endif /* ACE_LACKS_PRAGMA_ONCE */ -namespace DAnCE{ +namespace DAnCE +{ + namespace Config_Handlers + { - namespace Config_Handlers{ - - /* + /** * @class DataType_Handler * - * @brief Handler class for <ComponentPortDescription> types. + * @brief Handler class for ComponentPortDescription types. * * This class defines handler methods to map values from * XSC objects, parsed from the descriptor files, to the * corresponding CORBA IDL type for the schema element. - * */ class DataType_Handler{ @@ -44,15 +44,14 @@ namespace DAnCE{ DataType_Handler (void); virtual ~DataType_Handler (void); - ////This method takes a <CIAO::Config_Handlers::DataType> - ///and returns the corresponding CORBA::TypeCode. + /// This method takes a CIAO::Config_Handlers::DataType + /// and returns the corresponding CORBA::TypeCode. static void data_type (CORBA::TypeCode_ptr& type, - const DataType& desc); + const DataType& desc); static DataType data_type (const CORBA::TypeCode_ptr& type); }; - } } diff --git a/DAnCE/tools/Config_Handlers/DynAny_Handler/DynAlias_Handler.cpp b/DAnCE/tools/Config_Handlers/DynAny_Handler/DynAlias_Handler.cpp index 48f6880b35d..de228ee51d7 100644 --- a/DAnCE/tools/Config_Handlers/DynAny_Handler/DynAlias_Handler.cpp +++ b/DAnCE/tools/Config_Handlers/DynAny_Handler/DynAlias_Handler.cpp @@ -23,7 +23,7 @@ namespace DAnCE { try { - CORBA::TypeCode_ptr tc; + CORBA::TypeCode_var tc; if (req_tc) tc = req_tc; @@ -135,7 +135,7 @@ namespace DAnCE // return retval._retn (); } - catch (DynamicAny::DynAny::InvalidValue) + catch (const DynamicAny::DynAny::InvalidValue&) { DANCE_DEBUG (1, (LM_ERROR, ACE_TEXT ("Invalid value provided in XML when trying to ") ACE_TEXT ("initialize an instance of enumerated type %s\n"), @@ -160,9 +160,8 @@ namespace DAnCE } void - DynAlias_Handler::extract_out_of_dynany (const DynamicAny::DynAny_ptr dyn) + DynAlias_Handler::extract_out_of_dynany (const DynamicAny::DynAny_ptr) { - ACE_UNUSED_ARG (dyn); DANCE_DEBUG (1, (LM_ERROR, ACE_TEXT ("Extracting Enums not yet supported\n"))); } @@ -175,18 +174,16 @@ namespace DAnCE throw Config_Error (ACE_TEXT (""), ACE_TEXT ("Did not find expected alias type description, tk_kind may be wrong.")); } - - // @@ Leak this guy onto the heap to avoid a compile problem. - CORBA::TypeCode_ptr tc = + CORBA::TypeCode_var tc = DYNANY_HANDLER->orb ()->create_alias_tc (ACE_TEXT_ALWAYS_CHAR (type.alias ().typeId ().c_str ()), ACE_TEXT_ALWAYS_CHAR (type.alias ().name ().c_str ()), DYNANY_HANDLER->create_typecode (type.alias ().elementType ())); DYNANY_HANDLER->register_typecode (type.alias ().typeId (), - tc); + tc.in ()); - return tc; + return tc._retn (); } } diff --git a/DAnCE/tools/Config_Handlers/DynAny_Handler/DynAny_Handler.cpp b/DAnCE/tools/Config_Handlers/DynAny_Handler/DynAny_Handler.cpp index 5c075336de0..f70d6a59a61 100644 --- a/DAnCE/tools/Config_Handlers/DynAny_Handler/DynAny_Handler.cpp +++ b/DAnCE/tools/Config_Handlers/DynAny_Handler/DynAny_Handler.cpp @@ -29,7 +29,7 @@ namespace DAnCE if (CORBA::is_nil (daf_.in ())) { - DANCE_DEBUG (1, (LM_ERROR, ACE_TEXT ("Unable to narrow Dynamic Any factory\n"))); + DANCE_ERROR (1, (LM_ERROR, ACE_TEXT ("Unable to narrow Dynamic Any factory\n"))); throw Config_Error (ACE_TEXT (""), ACE_TEXT ("Unable to narrow DynAny factory")); } } @@ -177,7 +177,7 @@ namespace DAnCE case TCKind::tk_component_l: case TCKind::tk_home_l: case TCKind::tk_event_l: - DANCE_DEBUG (1, (LM_ERROR, ACE_TEXT ("Type not supported\n"))); + DANCE_ERROR (1, (LM_ERROR, ACE_TEXT ("Type not supported\n"))); throw Config_Error (ACE_TEXT (""), ACE_TEXT ("Type not supported")); } @@ -256,7 +256,7 @@ namespace DAnCE case CORBA::tk_TypeCode: case ::CORBA::tk_null: default: - DANCE_DEBUG (1, (LM_ERROR, ACE_TEXT ("DynAny_Handler: I have no idea how to perform a referse mapping.\n"))); + DANCE_DEBUG (1, (LM_ERROR, ACE_TEXT ("DynAny_Handler: I have no idea how to perform a reverse mapping.\n"))); throw Config_Error (ACE_TEXT (""), ACE_TEXT ("reverse mapping for this type not supported")); } #endif diff --git a/DAnCE/tools/Config_Handlers/DynAny_Handler/DynAny_Handler.h b/DAnCE/tools/Config_Handlers/DynAny_Handler/DynAny_Handler.h index 0c6ae41eaeb..8f9e1384ee2 100644 --- a/DAnCE/tools/Config_Handlers/DynAny_Handler/DynAny_Handler.h +++ b/DAnCE/tools/Config_Handlers/DynAny_Handler/DynAny_Handler.h @@ -36,7 +36,7 @@ namespace DAnCE /** * @class Any_Handler * - * @brief Handler class for <ComponentInterfaceDescription> types. + * @brief Handler class for ComponentInterfaceDescription types. * * This class defines handler methods to map values from * XSC Any objects, parsed from the descriptor files, to the @@ -52,7 +52,7 @@ namespace DAnCE DynamicAny::DynAny_ptr extract_into_dynany (const DataType &type, const DataValue &value, - CORBA::TypeCode_ptr = 0); + CORBA::TypeCode_ptr = CORBA::TypeCode::_nil ()); Any extract_from_dynany (const CORBA::Any &any); diff --git a/DAnCE/tools/Config_Handlers/DynAny_Handler/DynEnum_Handler.cpp b/DAnCE/tools/Config_Handlers/DynAny_Handler/DynEnum_Handler.cpp index fef1bfed9fb..f90234b8e98 100644 --- a/DAnCE/tools/Config_Handlers/DynAny_Handler/DynEnum_Handler.cpp +++ b/DAnCE/tools/Config_Handlers/DynAny_Handler/DynEnum_Handler.cpp @@ -23,7 +23,7 @@ namespace DAnCE { try { - CORBA::TypeCode_ptr tc; + CORBA::TypeCode_var tc; if (req_tc) tc = req_tc; @@ -75,7 +75,7 @@ namespace DAnCE { if (!type.enum_p ()) { - DANCE_DEBUG (1, (LM_ERROR, ACE_TEXT ("ERROR: Enum type descriptioin required"))); + DANCE_DEBUG (1, (LM_ERROR, ACE_TEXT ("ERROR: Enum type description required"))); throw Config_Error (ACE_TEXT (""), ACE_TEXT ("Did not find expected enum type description, tk_kind may be wrong.")); } @@ -91,16 +91,15 @@ namespace DAnCE members[index++] = CORBA::string_dup (ACE_TEXT_ALWAYS_CHAR ((*i)->c_str ())); } - // @@ Leak this guy onto the heap to avoid a compile problem. - CORBA::TypeCode_ptr tc = + CORBA::TypeCode_var tc = DYNANY_HANDLER->orb ()->create_enum_tc (ACE_TEXT_ALWAYS_CHAR (type.enum_ ().typeId ().c_str ()), ACE_TEXT_ALWAYS_CHAR (type.enum_ ().name ().c_str ()), members); DYNANY_HANDLER->register_typecode ((type.enum_ ().typeId ()), - tc); + tc.in ()); - return tc; + return tc._retn (); } } diff --git a/DAnCE/tools/Config_Handlers/DynAny_Handler/DynEnum_Handler.h b/DAnCE/tools/Config_Handlers/DynAny_Handler/DynEnum_Handler.h index bf26eabd4f7..aea0361ec85 100644 --- a/DAnCE/tools/Config_Handlers/DynAny_Handler/DynEnum_Handler.h +++ b/DAnCE/tools/Config_Handlers/DynAny_Handler/DynEnum_Handler.h @@ -29,14 +29,13 @@ namespace DAnCE /** * @class DynEnum_Handler * @brief Translates enums specified in deployment plans into Dynamic Anys - * */ class DynEnum_Handler { public: static DynamicAny::DynAny_ptr extract_into_dynany (const DataType &type, const DataValue &value, - CORBA::TypeCode_ptr = 0); + CORBA::TypeCode_ptr = CORBA::TypeCode::_nil ()); static void extract_out_of_dynany (const DynamicAny::DynAny_ptr dyn); diff --git a/DAnCE/tools/Config_Handlers/DynAny_Handler/DynSequence_Handler.cpp b/DAnCE/tools/Config_Handlers/DynAny_Handler/DynSequence_Handler.cpp index 8f5066a0df4..9b1a77c60b5 100644 --- a/DAnCE/tools/Config_Handlers/DynAny_Handler/DynSequence_Handler.cpp +++ b/DAnCE/tools/Config_Handlers/DynAny_Handler/DynSequence_Handler.cpp @@ -23,7 +23,7 @@ namespace DAnCE const DataValue &value, CORBA::TypeCode_ptr req_tc) { - CORBA::TypeCode_ptr tc; + CORBA::TypeCode_var tc; if (req_tc) tc = req_tc; else @@ -93,7 +93,7 @@ namespace DAnCE case TCKind::tk_char_l: case TCKind::tk_wchar_l: - // special case where value iterataor multiplicity should be one, and should + // special case where value iterator multiplicity should be one, and should // represent a string, each character of which becomes a element of the sequence. case TCKind::tk_sequence_l: @@ -122,9 +122,8 @@ namespace DAnCE } void - DynSequence_Handler::extract_out_of_dynany (const DynamicAny::DynAny_ptr dyn) + DynSequence_Handler::extract_out_of_dynany (const DynamicAny::DynAny_ptr) { - ACE_UNUSED_ARG (dyn); DANCE_DEBUG (1, (LM_ERROR, ACE_TEXT ("Extracting Sequences not yet supported\n"))); } @@ -133,29 +132,22 @@ namespace DAnCE { if (!type.sequence_p ()) { - DANCE_DEBUG (1, (LM_ERROR, ACE_TEXT ("ERROR: Sequence type descriptioin required"))); + DANCE_DEBUG (1, (LM_ERROR, ACE_TEXT ("ERROR: Sequence type description required"))); throw Config_Error (ACE_TEXT (""), ACE_TEXT ("Expected <sequence> element, incorrect tc_kind.")); } - CORBA::TypeCode_ptr etc = + CORBA::TypeCode_var etc = DYNANY_HANDLER->create_typecode (type.sequence ().elementType ()); CORBA::ULong bound (0); if (type.sequence ().bound_p ()) bound = type.sequence ().bound (); - // @@ Leak this guy onto the heap to avoid a compile problem. - CORBA::TypeCode_ptr tc = - DYNANY_HANDLER->orb ()->create_sequence_tc (bound, - etc); + CORBA::TypeCode_var tc = + DYNANY_HANDLER->orb ()->create_sequence_tc (bound, etc); - // Sequences don't have names. - // DYNANY_HANDLER->register_typecode (type.sequence_ ().typeId (), - // tc); - - return tc; + return tc._retn (); } - } } diff --git a/DAnCE/tools/Config_Handlers/DynAny_Handler/DynStruct_Handler.cpp b/DAnCE/tools/Config_Handlers/DynAny_Handler/DynStruct_Handler.cpp index 85a2c65ba68..52f15013690 100644 --- a/DAnCE/tools/Config_Handlers/DynAny_Handler/DynStruct_Handler.cpp +++ b/DAnCE/tools/Config_Handlers/DynAny_Handler/DynStruct_Handler.cpp @@ -7,11 +7,7 @@ #include "Common.h" #include "ace/Null_Mutex.h" - -//#include "tao/ORB.h" #include "tao/IFR_Client/IFR_BasicC.h" -//#include "tao/TypeCodeFactory/TypeCodeFactory_Adapter_Impl.h" - #include "tao/AnyTypeCode/Struct_TypeCode.h" namespace DAnCE @@ -35,7 +31,7 @@ namespace DAnCE { try { - CORBA::TypeCode_ptr tc; + CORBA::TypeCode_var tc; if (req_tc) tc = req_tc; @@ -60,7 +56,7 @@ namespace DAnCE values[pos].id = ACE_TEXT_ALWAYS_CHAR ((*i)->name ().c_str ()); values[pos].value = DYNANY_HANDLER->extract_into_dynany (*dt_map[(*i)->name ()], (*i)->value ()); - pos++; + ++pos; } retval->set_members_as_dyn_any (values); @@ -82,9 +78,8 @@ namespace DAnCE void - DynStruct_Handler::extract_out_of_dynany (const DynamicAny::DynAny_ptr dyn) + DynStruct_Handler::extract_out_of_dynany (const DynamicAny::DynAny_ptr) { - ACE_UNUSED_ARG (dyn); DANCE_DEBUG (1, (LM_ERROR, ACE_TEXT ("Extracting Structs not yet supported\n"))); } @@ -112,16 +107,14 @@ namespace DAnCE ++pos; } - // @@ Leak this guy onto the heap to avoid a compile problem. - CORBA::TypeCode_ptr tc = + CORBA::TypeCode_var tc = DYNANY_HANDLER->orb ()->create_struct_tc (ACE_TEXT_ALWAYS_CHAR (rid.c_str ()), ACE_TEXT_ALWAYS_CHAR (name.c_str ()), members); - DYNANY_HANDLER->register_typecode (type.struct_ ().typeId (), - tc); + DYNANY_HANDLER->register_typecode (type.struct_ ().typeId (), tc.in ()); - return tc; + return tc._retn (); } } } diff --git a/DAnCE/tools/Config_Handlers/DynAny_Handler/DynStruct_Handler.h b/DAnCE/tools/Config_Handlers/DynAny_Handler/DynStruct_Handler.h index 4c478e094b0..1db59b9aacf 100644 --- a/DAnCE/tools/Config_Handlers/DynAny_Handler/DynStruct_Handler.h +++ b/DAnCE/tools/Config_Handlers/DynAny_Handler/DynStruct_Handler.h @@ -29,7 +29,6 @@ namespace DAnCE /** * @class DynStruct_Handler * @brief Translates structs specified in deployment plans into Dynamic Anys - * */ class DynStruct_Handler { @@ -42,7 +41,6 @@ namespace DAnCE static CORBA::TypeCode_ptr create_typecode (const DataType &type); }; - } } diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 32af566d14d..fa3856a32e0 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,353 @@ +Fri Feb 11 11:16:00 UTC 2011 Martin Corino <mcorino@remedy.nl> + + Merged changes from Remedy work branch. + + === start changelog === + + Wed Feb 9 15:12:59 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * etc/tao_pi.doxygen: + * etc/tao_pi_server.doxygen: + * etc/tao_rtcorba.doxygen: + * etc/tao_rtportableserver.doxygen: + * etc/tao_transportcurrent.doxygen: + * etc/tao_ziop.doxygen: + Set some defines to get more documentation + + Wed Feb 9 13:31:39 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * etc/tao_strategies.doxygen: + Improved doxygen generation + + * examples/Load_Balancing/Load_Balancer_i.cpp: + * orbsvcs/orbsvcs/HTIOP/HTIOP_Endpoint.h: + * orbsvcs/orbsvcs/PortableGroup/UIPMC_Acceptor.h: + * orbsvcs/orbsvcs/PortableGroup/UIPMC_Endpoint.h: + * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Endpoint.h: + * orbsvcs/tests/Bug_2615_Regression/Test.idl: + * tao/MProfile.cpp: + * tao/PortableServer/Object_Adapter.cpp: + * tao/Strategies/COIOP_Acceptor.h: + * tao/Strategies/COIOP_Endpoint.h: + * tao/Strategies/DIOP_Acceptor.h: + * tao/Strategies/DIOP_Endpoint.h: + * tao/Strategies/SCIOP_Acceptor.h: + * tao/Strategies/SCIOP_Endpoint.h: + * tao/Strategies/SHMIOP_Endpoint.h: + * tao/Strategies/UIOP_Endpoint.h: + Fixed typos and doxygen warnings + + Tue Feb 8 19:04:20 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * examples/RTCORBA/Activity/README: + * orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullConsumer.cpp: + * orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullSupplier.cpp: + * orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushConsumer.cpp: + * orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushSupplier.cpp: + * orbsvcs/orbsvcs/CosEvent/CEC_TypedProxyPushConsumer.cpp: + * orbsvcs/orbsvcs/ESF/ESF_Proxy_RefCount_Guard.h: + * orbsvcs/orbsvcs/ESF/ESF_RefCount_Guard.h: + * orbsvcs/orbsvcs/Event/EC_ProxyConsumer.cpp: + * orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp: + * orbsvcs/orbsvcs/Naming/Naming_Context_Interface.cpp: + * orbsvcs/orbsvcs/Naming/Persistent_Context_Index.cpp: + * performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.h: + * performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.cpp: + * performance-tests/Cubit/TAO/MT_Cubit/Globals.h: + * performance-tests/Cubit/TAO/MT_Cubit/Task_Client.h: + * performance-tests/Cubit/TAO/MT_Cubit/Timer.h: + * performance-tests/Cubit/TAO/MT_Cubit/Timer.cpp: + * performance-tests/Cubit/TAO/MT_Cubit/client.h: + * performance-tests/Cubit/TAO/MT_Cubit/client.cpp: + * tao/Environment.cpp: + Fixed typos and removed old Chorus support + + Thu Feb 3 09:23:31 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * TAO_IDL/be/be_visitor_interface/interface_cs.cpp: + Added workaround for broken HP C++ V7.4-004 on OpenVMS IA64 V8.3 + + Wed Feb 2 14:28:02 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * tao/CSD_Framework/CSD_Default_Servant_Dispatcher.cpp: + * tao/CSD_Framework/CSD_POA.h: + * tao/ORB_Core.h: + * tao/Object.h: + * tao/PortableServer/Regular_POA.h: + * tao/PortableServer/Servant_Dispatcher.h: + * tao/Transport_Mux_Strategy.h: + Layout/doxygen changes + + Wed Feb 2 12:31:51 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * tao/orbconf.h: + Removed deprecated macros + + Wed Feb 2 11:44:53 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * tao/default_resource.cpp: + Removed support for deprecated -ORBConnectionCachingStrategy + + Tue Feb 1 12:52:12 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * TAO_IDL/be/be_visitor_component/servant_svh.cpp: + * TAO_IDL/be/be_visitor_component/servant_svs.cpp: + Don't generate empty methods + + Tue Feb 1 12:30:57 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * TAO_IDL/be/be_visitor_component/context_svs.cpp: + Fixed race condition in generated code + + Mon Jan 31 18:58:53 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * TAO_IDL/be/be_visitor_component/context_svs.cpp: + Throw correct exception + + Mon Jan 31 18:19:54 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * TAO_IDL/be/be_visitor_component/context_svs.cpp: + Fixed several race conditions, possible memory leaks and incorrect + logic + + Mon Jan 31 15:12:37 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * TAO_IDL/be/be_visitor_component/context_svs.cpp: + Layout changes + + * TAO_IDL/be/be_visitor_component/servant_svs.cpp: + Throw an exception when we can't allocate any memory anymore + + Mon Jan 31 14:45:24 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * TAO_IDL/be/be_visitor_component/servant_svh.cpp: + * TAO_IDL/be/be_visitor_component/servant_svs.cpp: + Reduced amount of methods in the servant with LwCCM, this should + reduce the footprint heavily with LwCCM again + + Mon Jan 31 13:45:43 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * TAO_IDL/be/be_visitor_component/context_svs.cpp: + Layout change in generated code + + Mon Jan 31 11:38:58 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * TAO_IDL/be/be_visitor_component/context_svs.cpp: + Fixed race condition in generated code + + Mon Jan 31 11:23:52 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * TAO_IDL/be/be_visitor_component/servant_svs.cpp: + Fixed race condition in generated code + + Mon Jan 31 10:29:08 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * TAO_IDL/be/be_visitor_home/home_svs.cpp: + Fixed race condition in generated code + + Mon Jan 31 09:55:00 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * TAO_IDL/be/be_visitor_component/context_svh.cpp: + * TAO_IDL/be/be_visitor_component/servant_svs.cpp: + * TAO_IDL/be_include/be_visitor_component/servant_svs.h: + Fixed race condition in generated code + + Mon Jan 31 08:47:49 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * orbsvcs/orbsvcs/FaultTolerance/FT_ServerORBInitializer.h: + * orbsvcs/orbsvcs/FaultTolerance/FT_ServerPolicy_i.h: + * orbsvcs/orbsvcs/FaultTolerance/FT_Service_Callbacks.h: + * orbsvcs/orbsvcs/FaultTolerance/FT_Service_Callbacks.cpp: + Cleanup of not used stuff + + * tao/Stub.h: + * tao/Stub.inl: + Readded profile_lock(), used by FT + + Fri Jan 28 14:26:35 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * TAO_IDL/be/be_visitor_component/context_svh.cpp: + * TAO_IDL/be/be_visitor_component/servant_svs.cpp: + First step in not letting the generate servant use context members + directly, this causes all kind race conditions in a MT situation. + More changes need to be made between the servant and the context. + + * TAO_IDL/be/be_visitor_interface/interface_sh.cpp: + + * tao/ObjectKey_Table.h: + Added export macro again, needed for strategies + + * tao/operation_details.h: + * tao/Objref_VarOut_T.h: + Doxygen changes + + * tao/On_Demand_Fragmentation_Strategy.h: + Doxygen change, use ACE_Copy_Disabled + + Thu Jan 27 11:29:03 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * docs/Options.html: + * tao/ORB_Core.cpp: + * tao/ObjectKey_Table.h: + * tao/ObjectKey_Table.inl: + * tao/ObjectKey_Table.cpp: + * tao/Resource_Factory.h: + * tao/Resource_Factory.cpp: + * tao/default_resource.h: + * tao/default_resource.cpp: + Removed -ORBObjectKeyTableLock, tricky option and this removed a few + virtual method calls. Also use inlining as much as possible + + Thu Jan 27 10:46:12 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * tao/DLL_Parser.cpp: + * tao/IORTable/Table_Adapter.h: + * tao/IORTable/Table_Adapter.cpp: + * tao/Object.h: + * tao/ObjectKey_Table.h: + * tao/PortableServer/Non_Servant_Upcall.cpp: + * tao/PortableServer/Object_Adapter.h: + * tao/PortableServer/Object_Adapter.inl: + * tao/PortableServer/Object_Adapter.cpp: + * tao/PortableServer/Root_POA.cpp: + * tao/PortableServer/ServantRetentionStrategyRetain.cpp: + * tao/PortableServer/Servant_Upcall.cpp: + * tao/Server_Strategy_Factory.h: + * tao/Server_Strategy_Factory.cpp: + * tao/default_resource.h: + * tao/default_server.h: + * tao/default_server.cpp: + Removed -ORBPOALock support, disabling the lock in a MT situation is + very risky and causes race conditions. By removing this support + we remove several virtual calls from the critical path which + gives a better performance in the regular callpath. + + * DevGuideExamples/Multithreading/Reactive/svc.conf: + * docs/Options.html: + * docs/configurations.html: + * examples/AMH/Sink_Server/st_server.conf: + * examples/AMH/Sink_Server/st_server.conf.xml: + * orbsvcs/performance-tests/LoadBalancing/LBPerf/CPU/svc.conf.xml: + * orbsvcs/performance-tests/LoadBalancing/LBPerf/RPS/svc.conf: + * orbsvcs/performance-tests/LoadBalancing/LBPerf/RPS/svc.conf.xml: + * orbsvcs/tests/AVStreams/Latency/svc.conf: + * orbsvcs/tests/AVStreams/Latency/svc.conf.xml: + * orbsvcs/tests/AVStreams/Multicast/components_svc.conf: + * orbsvcs/tests/AVStreams/Multicast/components_svc.conf.xml: + * orbsvcs/tests/Bug_2377_Regression/svc.conf: + * orbsvcs/tests/Bug_2925_Regression/svc.conf: + * orbsvcs/tests/EC_MT_Mcast/svc.conf: + * performance-tests/Cubit/TAO/IDL_Cubit/collocation/svc.conf: + * performance-tests/Cubit/TAO/IDL_Cubit/collocation/svc.conf.xml: + * performance-tests/Cubit/TAO/IDL_Cubit/svc.conf: + * performance-tests/Cubit/TAO/IDL_Cubit/svc.conf.xml: + * performance-tests/Cubit/TAO/IDL_Cubit/svc.st_server.conf: + * performance-tests/Cubit/TAO/IDL_Cubit/svc.st_server.conf.xml: + * performance-tests/Cubit/TAO/IDL_Cubit/svc.zero_lock.conf: + * performance-tests/Cubit/TAO/IDL_Cubit/svc.zero_lock.conf.xml: + * performance-tests/Cubit/TAO/MT_Cubit/svc.conf: + * performance-tests/Cubit/TAO/MT_Cubit/svc.conf.xml: + * performance-tests/Latency/Collocation/svc.conf: + * performance-tests/Latency/DII/svc.conf: + * performance-tests/Latency/DII/svc.conf.xml: + * performance-tests/Latency/DSI/svc.conf: + * performance-tests/Latency/DSI/svc.conf.xml: + * performance-tests/Latency/Deferred/svc.conf: + * performance-tests/Latency/Deferred/svc.conf.xml: + * performance-tests/Latency/Single_Threaded/svc.conf: + * performance-tests/Latency/Single_Threaded/svc.conf.xml: + * performance-tests/RTCorba/Multiple_Endpoints/Orb_Per_Priority/server.conf: + * performance-tests/RTCorba/Multiple_Endpoints/Orb_Per_Priority/server.conf.xml: + * performance-tests/Sequence_Latency/DII/svc.conf: + * performance-tests/Sequence_Latency/DII/svc.conf.xml: + * performance-tests/Sequence_Latency/DSI/svc.conf: + * performance-tests/Sequence_Latency/DSI/svc.conf.xml: + * performance-tests/Sequence_Latency/Deferred/svc.conf: + * performance-tests/Sequence_Latency/Deferred/svc.conf.xml: + * performance-tests/Sequence_Latency/Single_Threaded/svc.conf: + * performance-tests/Sequence_Latency/Single_Threaded/svc.conf.xml: + * performance-tests/Throughput/svc.conf: + * performance-tests/Throughput/svc.conf.xml: + * tests/Bug_3163_Regression/server.conf: + * tests/Bug_3647_Regression/svc.conf: + * tests/CSD_Collocation/svc.conf: + * tests/CSD_Collocation/svc.conf.xml: + * tests/Collocation/svc.conf: + * tests/Collocation/svc.conf.xml: + * tests/Smart_Proxies/Collocation/svc.conf: + * tests/Smart_Proxies/Collocation/svc.conf.xml: + Removed -ORBPOALock, got removed + + Wed Jan 26 15:20:42 UTC 2011 Martin Corino <corino_m@remedy.nl> + + * TAO_IDL/be/be_visitor_connector/facet_ami_exs.cpp: + Added exception in case AMI facet not connected. + + Wed Jan 26 13:51:51 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * tao/Client_Strategy_Factory.h: + * tao/Messaging/AMH_Response_Handler.cpp: + * tao/Object.h: + * tao/Object.cpp: + * tao/Profile.h: + * tao/Profile.inl: + * tao/Resource_Factory.h: + * tao/Stub.inl: + * tao/Stub.cpp: + * tao/Valuetype/AbstractBase.h: + * tao/Valuetype/AbstractBase.cpp: + Simplified refcounting and use more inlining + + * tao/tao.mpc: + Updated + + * tao/Configurable_Refcount.h: + * tao/Configurable_Refcount.inl: + * tao/Configurable_Refcount.cpp: + Removed these files, not used anymore + + Wed Jan 26 13:39:14 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * tao/Client_Strategy_Factory.h: + * tao/Client_Strategy_Factory.cpp: + * tao/Configurable_Refcount.h: + * tao/Configurable_Refcount.inl: + * tao/Object.inl: + * tao/Object.cpp: + * tao/Profile.cpp: + * tao/Resource_Factory.h: + * tao/Resource_Factory.cpp: + * tao/Valuetype/AbstractBase.cpp: + * tao/default_client.h: + * tao/default_client.cpp: + * tao/default_resource.h: + * tao/default_resource.cpp: + Simplified refcounts, this improves the runtime performance of TAO + + Wed Jan 26 10:44:30 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * TAO_IDL/be/be_visitor_component/context_svs.cpp: + Fixed race condition in the disconnect + + * tao/SystemException.cpp: + Layout change + + Tue Jan 25 14:01:47 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * TAO_IDL/be/be_visitor_component/servant_svh.cpp: + Layout change + + * TAO_IDL/be/be_visitor_operation/operation_svs.cpp: + Fixed race condition in generated code + + Tue Jan 25 13:04:28 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * TAO_IDL/be/be_visitor_component/servant_svs.cpp: + Throw an InvalidConnection exception when an EventConsumerBase can't + be narrowed to a type specific Event. + + === end changelog === + Wed Feb 9 13:45:47 UTC 2011 Vladimir Zykov <vladimir.zykov@prismtech.com> * tao/Acceptor_Impl.cpp: diff --git a/TAO/DevGuideExamples/Multithreading/Reactive/svc.conf b/TAO/DevGuideExamples/Multithreading/Reactive/svc.conf index 3cd02504e29..0dc37559239 100644 --- a/TAO/DevGuideExamples/Multithreading/Reactive/svc.conf +++ b/TAO/DevGuideExamples/Multithreading/Reactive/svc.conf @@ -1,4 +1,4 @@ # svc.conf file for single-threaded reactive server. -static Server_Strategy_Factory "-ORBConcurrency reactive -ORBPOALock null" +static Server_Strategy_Factory "-ORBConcurrency reactive" dynamic Advanced_Resource_Factory Service_Object * TAO_Strategies:_make_TAO_Advanced_Resource_Factory () "-ORBReactorType select_st -ORBInputCDRAllocator null" -static Client_Strategy_Factory "-ORBProfileLock null -ORBClientConnectionHandler st" +static Client_Strategy_Factory "-ORBClientConnectionHandler st" @@ -1,6 +1,11 @@ USER VISIBLE CHANGES BETWEEN TAO-2.0.1 and TAO-2.0.2 ==================================================== +. Remove support for already deprecated -ORBConnectionCachingStrategy + +. Removed -ORBObjectKeyTableLock and -ORBPOALock, very risk options and this + way the regular invocation path can be optimized much more + USER VISIBLE CHANGES BETWEEN TAO-2.0.0 and TAO-2.0.1 ==================================================== diff --git a/TAO/TAO_IDL/be/be_visitor_component/context_svh.cpp b/TAO/TAO_IDL/be/be_visitor_component/context_svh.cpp index 4a4e636cab9..f3615ad1be2 100644 --- a/TAO/TAO_IDL/be/be_visitor_component/context_svh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_component/context_svh.cpp @@ -28,7 +28,6 @@ be_visitor_context_svh::visit_component (be_component *node) // This visitor is spawned by be_visitor_component_svh, // which already does a check for imported node, so none // is needed here. - node_ = node; AST_Decl *scope = ScopeAsDecl (node->defined_in ()); @@ -56,11 +55,11 @@ be_visitor_context_svh::visit_component (be_component *node) << "{" << be_nl << "public:" << be_idt_nl; - os_ << "// Allow the servant to access our state." << be_nl + os_ << "/// Allow the servant to access our state." << be_nl << "friend class " << lname << "_Servant;" << be_nl_2; - os_ << "// Some useful typedefs." << be_nl + os_ << "/// Some useful typedefs." << be_nl << "typedef" << be_nl << "::CIAO::" << be_global->ciao_container_type () << "_Context_Impl<" << be_idt << be_idt_nl @@ -101,11 +100,13 @@ be_visitor_context_svh::visit_component (be_component *node) os_ << "virtual ~" << lname << "_Context (void);"; os_ << be_nl_2 - << "// Operations for " << lname + << "/** @name Operations and members for " << lname << " receptacles and event sources," << be_nl - << "// defined in " << global << sname - << "::CCM_" << lname << "_Context."; + << " * defined in " << global << sname + << "::CCM_" << lname << "_Context." << be_nl << " */" + << be_nl + << "//@{"; if (this->visit_component_scope (node) == -1) { @@ -117,7 +118,9 @@ be_visitor_context_svh::visit_component (be_component *node) -1); } - os_ << be_uidt_nl + os_ << be_nl + << "//@}" + << be_uidt_nl << "};"; return 0; @@ -177,11 +180,11 @@ be_visitor_context_svh::visit_uses (be_uses *node) } os_ << be_uidt_nl << be_nl - << "protected:" << be_idt_nl; + << "private:" << be_idt_nl; if (is_multiple) { - os_ << "// Multiplex " << port_name << " connection." << be_nl + os_ << "/// Multiplex " << port_name << " connection." << be_nl << "typedef std::map<ptrdiff_t," << be_nl << " ::" << obj_name << "_var>" << be_idt_nl @@ -193,7 +196,7 @@ be_visitor_context_svh::visit_uses (be_uses *node) } else { - os_ << "// Simplex " << port_name << " connection." << be_nl + os_ << "/// Simplex " << port_name << " connection." << be_nl << "::" << obj_name << "_var" << be_nl << "ciao_uses_" << port_name << "_;"; } @@ -226,7 +229,7 @@ be_visitor_context_svh::visit_publishes (be_publishes *node) << "::Components::Cookie * ck);" << be_uidt; os_ << be_uidt_nl << be_nl - << "protected:" << be_idt_nl; + << "private:" << be_idt_nl; os_ << "typedef std::map<ptrdiff_t," << be_nl << " ::" << obj_name diff --git a/TAO/TAO_IDL/be/be_visitor_component/context_svs.cpp b/TAO/TAO_IDL/be/be_visitor_component/context_svs.cpp index 0540e050b9f..f5f2749fe00 100644 --- a/TAO/TAO_IDL/be/be_visitor_component/context_svs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_component/context_svs.cpp @@ -149,7 +149,7 @@ be_visitor_context_svs::visit_publishes (be_publishes *node) << "{" << be_idt_nl << "if ( ::CORBA::is_nil (c))" << be_idt_nl << "{" << be_idt_nl - << "throw ::CORBA::BAD_PARAM ();" << be_uidt_nl + << "throw ::Components::InvalidConnection ();" << be_uidt_nl << "}" << be_uidt_nl << be_nl; os_ << "ptrdiff_t const ptr = reinterpret_cast<ptrdiff_t> (c);" @@ -163,11 +163,18 @@ be_visitor_context_svs::visit_publishes (be_publishes *node) << " 0);"; os_ << be_nl_2 + << "::" << fname << "Consumer_var ciao_var = " << be_idt_nl + << "::" << fname << "Consumer::_duplicate (c);" << be_uidt << be_nl_2 + << "std::pair<" << tao_cg->upcase (port_name) <<"_TABLE::iterator, bool> ret =" << be_idt_nl << "this->ciao_publishes_" << port_name - << "_[ptr] =" << be_nl - << " ::" << fname << "Consumer::_duplicate (c);"; - - os_ << be_uidt_nl + << "_.insert (" << be_idt_nl << tao_cg->upcase (port_name) + << "_TABLE::value_type (ptr, ciao_var.in ()));" + << be_uidt << be_uidt_nl + << "if (!ret.second)" << be_idt_nl + << "{" << be_idt_nl + << "throw ::Components::AlreadyConnected ();" << be_uidt_nl + << "}" << be_uidt_nl + << "ciao_var._retn ();" << be_uidt_nl << "}"; os_ << be_nl @@ -263,7 +270,7 @@ be_visitor_context_svs::visit_emits (be_emits *node) << "{" << be_idt_nl << "if ( ::CORBA::is_nil (c))" << be_idt_nl << "{" << be_idt_nl - << "throw ::CORBA::BAD_PARAM ();" << be_uidt_nl + << "throw ::Components::InvalidConnection ();" << be_uidt_nl << "}" << be_uidt_nl << be_nl << "if (! ::CORBA::is_nil (this->ciao_emits_" << port_name << "_consumer_.in ()))" << be_idt_nl @@ -281,13 +288,15 @@ be_visitor_context_svs::visit_emits (be_emits *node) << node_->local_name () << "_Context::disconnect_" << port_name << " (void)" << be_nl << "{" << be_idt_nl - << "if ( ::CORBA::is_nil (this->ciao_emits_" - << port_name << "_consumer_.in ()))" << be_idt_nl + << "::" << fname << "Consumer_var ciao_emits_" << port_name << " =" << be_idt_nl + << "this->ciao_emits_" << port_name << "_consumer_._retn ();" << be_uidt_nl << be_nl + << "if ( ::CORBA::is_nil (ciao_emits_" + << port_name << ".in ()))" << be_idt_nl << "{" << be_idt_nl << "throw ::Components::NoConnection ();" << be_uidt_nl << "}" << be_uidt_nl << be_nl - << "return this->ciao_emits_" << port_name - << "_consumer_._retn ();" << be_uidt_nl + << "return ciao_emits_" << port_name + << "._retn ();" << be_uidt_nl << "}"; return 0; @@ -304,10 +313,9 @@ be_visitor_context_svs::gen_uses_simplex (AST_Type *obj, << node_->local_name () << "_Context::get_connection_" << port_name << " (void)" << be_nl << "{" << be_idt_nl - << "return" << be_idt_nl - << "::" << fname << "::_duplicate (" << be_idt_nl + << "return ::" << fname << "::_duplicate (" << be_idt_nl << "this->ciao_uses_" << port_name << "_.in ());" - << be_uidt << be_uidt << be_uidt_nl + << be_uidt << be_uidt_nl << "}"; os_ << be_nl_2 @@ -316,15 +324,15 @@ be_visitor_context_svs::gen_uses_simplex (AST_Type *obj, << port_name << " (" << be_idt_nl << "::" << fname << "_ptr c)" << be_uidt_nl << "{" << be_idt_nl + << "if ( ::CORBA::is_nil (c))" << be_idt_nl + << "{" << be_idt_nl + << "throw ::Components::InvalidConnection ();" << be_uidt_nl + << "}" << be_uidt_nl << be_nl << "if (! ::CORBA::is_nil (this->ciao_uses_" << port_name << "_.in ()))" << be_idt_nl << "{" << be_idt_nl << "throw ::Components::AlreadyConnected ();" << be_uidt_nl << "}" << be_uidt_nl << be_nl - << "if ( ::CORBA::is_nil (c))" << be_idt_nl - << "{" << be_idt_nl - << "throw ::Components::InvalidConnection ();" << be_uidt_nl - << "}" << be_uidt_nl << be_nl << "this->ciao_uses_" << port_name << "_ =" << be_idt_nl << "::" << fname << "::_duplicate (c);" << be_uidt << be_uidt_nl @@ -335,13 +343,15 @@ be_visitor_context_svs::gen_uses_simplex (AST_Type *obj, << node_->local_name () << "_Context::disconnect_" << port_name << " (void)" << be_nl << "{" << be_idt_nl - << "if ( ::CORBA::is_nil (this->ciao_uses_" - << port_name << "_.in ()))" << be_idt_nl + << "::" << fname << "_var ciao_uses_" << port_name << " =" << be_idt_nl + << "this->ciao_uses_" << port_name << "_._retn ();" << be_uidt_nl << be_nl + << "if ( ::CORBA::is_nil (ciao_uses_" + << port_name << ".in ()))" << be_idt_nl << "{" << be_idt_nl << "throw ::Components::NoConnection ();" << be_uidt_nl << "}" << be_uidt_nl << be_nl - << "return this->ciao_uses_" << port_name - << "_._retn ();" << be_uidt_nl + << "return ciao_uses_" << port_name + << "._retn ();" << be_uidt_nl << "}"; } @@ -418,11 +428,18 @@ be_visitor_context_svs::gen_uses_multiplex ( << " 0);"; os_ << be_nl_2 + << "::" << fname << "_var ciao_var = " << be_idt_nl + << "::" << fname << "::_duplicate (c);" << be_uidt << be_nl_2 + << "std::pair<" << tao_cg->upcase (port_name) <<"_TABLE::iterator, bool> ret =" << be_idt_nl << "this->ciao_uses_" << port_name - << "_[ptr] =" << be_nl - << " ::" << fname << "::_duplicate (c);"; - - os_ << be_uidt_nl + << "_.insert (" << be_idt_nl << tao_cg->upcase (port_name) + << "_TABLE::value_type (ptr, ciao_var.in ()));" + << be_uidt << be_uidt_nl + << "if (!ret.second)" << be_idt_nl + << "{" << be_idt_nl + << "throw ::Components::AlreadyConnected ();" << be_uidt_nl + << "}" << be_uidt_nl + << "ciao_var._retn ();" << be_uidt_nl << "}"; os_ << be_nl_2 @@ -465,17 +482,14 @@ be_visitor_context_svs::gen_uses_multiplex ( << "_TABLE::iterator iter =" << be_idt_nl << "this->ciao_uses_" << port_name << "_.find (key);" << be_uidt_nl << be_nl - << "if (iter == this->ciao_uses_" << port_name + << "if (iter != this->ciao_uses_" << port_name << "_.end ())" << be_idt_nl << "{" << be_idt_nl - << "throw ::Components::InvalidConnection ();" << be_uidt_nl - << "}" << be_uidt_nl << be_nl << "retv = iter->second;" << be_nl << "n = this->ciao_uses_" << port_name - << "_.erase (key);"; - - os_ << be_uidt_nl - << "}"; + << "_.erase (key);" << be_uidt_nl + << "}" << be_uidt_nl + << "}" << be_uidt; os_ << be_nl_2 << "if (n != 1UL)" << be_idt_nl diff --git a/TAO/TAO_IDL/be/be_visitor_component/servant_svh.cpp b/TAO/TAO_IDL/be/be_visitor_component/servant_svh.cpp index a52bf15b18c..24115152589 100644 --- a/TAO/TAO_IDL/be/be_visitor_component/servant_svh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_component/servant_svh.cpp @@ -28,7 +28,6 @@ be_visitor_servant_svh::visit_component (be_component *node) // This visitor is spawned by be_visitor_component_svh, // which already does a check for imported node, so none // is needed here. - node_ = node; AST_Decl *scope = ScopeAsDecl (node_->defined_in ()); @@ -181,7 +180,7 @@ be_visitor_servant_svh::visit_provides (be_provides *node) int be_visitor_servant_svh::visit_uses (be_uses *node) { - if (node->uses_type ()->is_local ()) + if (node->uses_type ()->is_local () || be_global->gen_lwccm ()) { return 0; } @@ -234,7 +233,7 @@ be_visitor_servant_svh::visit_uses (be_uses *node) int be_visitor_servant_svh::visit_publishes (be_publishes *node) { - if(!be_global->gen_noeventccm ()) + if(!be_global->gen_noeventccm () && !be_global->gen_lwccm ()) { const char *obj_name = node->publishes_type ()->full_name (); const char *port_name = node->local_name ()->get_string (); @@ -257,7 +256,7 @@ be_visitor_servant_svh::visit_publishes (be_publishes *node) int be_visitor_servant_svh::visit_emits (be_emits *node) { - if(!be_global->gen_noeventccm ()) + if(!be_global->gen_noeventccm () && !be_global->gen_lwccm ()) { const char *obj_name = node->emits_type ()->full_name (); const char *port_name = node->local_name ()->get_string (); @@ -353,9 +352,12 @@ be_visitor_servant_svh::visit_consumes (be_consumes *node) os_ << be_uidt_nl << "};"; - os_ << be_nl_2 - << "virtual ::" << obj_name << "Consumer_ptr" << be_nl - << "get_consumer_" << port_name << " (void);"; + if (!be_global->gen_lwccm ()) + { + os_ << be_nl_2 + << "virtual ::" << obj_name << "Consumer_ptr" << be_nl + << "get_consumer_" << port_name << " (void);"; + } os_ << be_uidt_nl << be_nl << "private:" << be_idt_nl; @@ -391,7 +393,7 @@ be_visitor_servant_svh::gen_non_type_specific (void) << "disconnect (const char * name, ::Components::Cookie * ck);"; } - if (!be_global->gen_lwccm ()) + if (!be_global->gen_lwccm () && this->node_->n_uses () != 0) { os_ << be_nl_2 << "virtual ::Components::ReceptacleDescriptions *" @@ -405,15 +407,21 @@ be_visitor_servant_svh::gen_non_type_specific (void) if (!be_global->gen_lwccm () && !is_connector && !be_global->gen_noeventccm ()) { - os_ << be_nl_2 - << "virtual ::Components::PublisherDescriptions *" - << be_nl - << "get_all_publishers (void);"; + if (this->node_->n_publishes () != 0UL) + { + os_ << be_nl_2 + << "virtual ::Components::PublisherDescriptions *" + << be_nl + << "get_all_publishers (void);"; + } - os_ << be_nl_2 - << "virtual ::Components::EmitterDescriptions *" - << be_nl - << "get_all_emitters (void);"; + if (this->node_->n_emits () != 0UL) + { + os_ << be_nl_2 + << "virtual ::Components::EmitterDescriptions *" + << be_nl + << "get_all_emitters (void);"; + } } /// If the node is a connector or the events must be disabled, event sources diff --git a/TAO/TAO_IDL/be/be_visitor_component/servant_svs.cpp b/TAO/TAO_IDL/be/be_visitor_component/servant_svs.cpp index 946a17db361..cd9943a1671 100644 --- a/TAO/TAO_IDL/be/be_visitor_component/servant_svs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_component/servant_svs.cpp @@ -29,7 +29,6 @@ be_visitor_servant_svs::visit_component (be_component *node) // This visitor is spawned by be_visitor_component_svh, // which already does a check for imported node, so none // is needed here. - node_ = node; AST_Decl *scope = ScopeAsDecl (node_->defined_in ()); @@ -344,7 +343,7 @@ be_visitor_servant_svs::visit_provides (be_provides *node) int be_visitor_servant_svs::visit_uses (be_uses *node) { - if (node->uses_type ()->is_local ()) + if (node->uses_type ()->is_local () || be_global->gen_lwccm ()) { return 0; } @@ -424,6 +423,11 @@ be_visitor_servant_svs::visit_uses (be_uses *node) int be_visitor_servant_svs::visit_publishes (be_publishes *node) { + if (be_global->gen_lwccm ()) + { + return 0; + } + const char *obj_name = node->publishes_type ()->full_name (); const char *port_name = node->local_name ()->get_string (); @@ -455,6 +459,11 @@ be_visitor_servant_svs::visit_publishes (be_publishes *node) int be_visitor_servant_svs::visit_emits (be_emits *node) { + if (be_global->gen_lwccm ()) + { + return 0; + } + const char *obj_name = node->emits_type ()->full_name (); const char *port_name = node->local_name ()->get_string (); @@ -565,16 +574,19 @@ be_visitor_servant_svs::visit_consumes (be_consumes *node) << "throw ::Components::BadEventType ();" << be_uidt_nl << "}"; - os_ << be_nl_2 - << "::" << fname << "Consumer_ptr" << be_nl - << node_->local_name () << "_Servant::get_consumer_" - << port_name << " (void)" << be_nl - << "{" << be_idt_nl - << "return" << be_idt_nl - << "::" << fname << "Consumer::_duplicate (" << be_idt_nl - << "this->consumes_" << port_name << "_.in ());" - << be_uidt << be_uidt << be_uidt_nl - << "}"; + if (!be_global->gen_lwccm ()) + { + os_ << be_nl_2 + << "::" << fname << "Consumer_ptr" << be_nl + << node_->local_name () << "_Servant::get_consumer_" + << port_name << " (void)" << be_nl + << "{" << be_idt_nl + << "return" << be_idt_nl + << "::" << fname << "Consumer::_duplicate (" << be_idt_nl + << "this->consumes_" << port_name << "_.in ());" + << be_uidt << be_uidt << be_uidt_nl + << "}"; + } os_ << be_nl_2 << "void" << be_nl @@ -644,6 +656,11 @@ be_visitor_servant_svs::gen_provides_top (void) return; } + ACE_CString comp_sname_str ( + ScopeAsDecl (node_->defined_in ())->full_name ()); + const char *global = (comp_sname_str == "" ? "" : "::"); + ACE_CString sname_str (ScopeAsDecl (node_->defined_in ())->full_name ()); + os_ << be_nl_2 << "/// CIAO-specific." << be_nl << "::CORBA::Object_ptr" << be_nl @@ -655,6 +672,17 @@ be_visitor_servant_svs::gen_provides_top (void) os_ << "if (name == 0)" << be_idt_nl << "{" << be_idt_nl << "throw ::CORBA::BAD_PARAM ();" << be_uidt_nl + << "}" << be_uidt << be_nl_2; + + os_ << "::" << sname_str << global << "CCM_" << node_->original_local_name () + << "_var executor = " << be_idt_nl + << "::" << sname_str << global << "CCM_" << node_->original_local_name () + << "::_duplicate (this->executor_.in ());" << be_uidt << be_nl_2; + + os_ << "if ( ::CORBA::is_nil (executor.in ()))" + << be_idt_nl + << "{"<< be_idt_nl + << "throw ::CORBA::INV_OBJREF ();" << be_uidt_nl << "}" << be_uidt; be_visitor_facet_executor_block feb_visitor (this->ctx_); @@ -741,7 +769,7 @@ be_visitor_servant_svs::gen_publishes_top (void) << "}"; } - if (!be_global->gen_lwccm () && !be_global->gen_noeventccm ()) + if (!be_global->gen_lwccm () && !be_global->gen_noeventccm () && this->node_->n_publishes () != 0) { os_ << be_nl_2 << "::Components::PublisherDescriptions *" << be_nl @@ -750,10 +778,10 @@ be_visitor_servant_svs::gen_publishes_top (void) << "{" << be_idt_nl << "::Components::PublisherDescriptions *retval = 0;" << be_nl - << "ACE_NEW_RETURN (retval," << be_nl - << " ::Components::PublisherDescriptions," + << "ACE_NEW_THROW_EX (retval," << be_nl + << " ::Components::PublisherDescriptions," << be_nl - << " 0);" << be_nl_2 + << " ::CORBA::NO_MEMORY ());" << be_nl_2 << "::Components::PublisherDescriptions_var " << "safe_retval = retval;" << be_nl << "safe_retval->length (" << this->node_->n_publishes () @@ -848,7 +876,7 @@ be_visitor_servant_svs::gen_uses_top (void) << "}"; } // nuses > 0UL - if (!be_global->gen_lwccm ()) + if (!be_global->gen_lwccm () && nuses > 0) { os_ << be_nl_2 << "::Components::ReceptacleDescriptions *" << be_nl @@ -857,10 +885,10 @@ be_visitor_servant_svs::gen_uses_top (void) << "{" << be_idt_nl << "::Components::ReceptacleDescriptions * retval = 0;" << be_nl - << "ACE_NEW_RETURN (retval," << be_nl - << " ::Components::ReceptacleDescriptions," + << "ACE_NEW_THROW_EX (retval," << be_nl + << " ::Components::ReceptacleDescriptions," << be_nl - << " 0);" << be_nl + << " ::CORBA::NO_MEMORY ());" << be_nl_2 << "::Components::ReceptacleDescriptions_var " << "safe_retval = retval;" << be_nl << "safe_retval->length (" << nuses @@ -868,7 +896,7 @@ be_visitor_servant_svs::gen_uses_top (void) if (nuses > 0UL) { - be_visitor_receptacle_desc rd_visitor (this->ctx_); + be_visitor_receptacle_desc rd_visitor (this->ctx_, this->node_); if (rd_visitor.visit_component_scope (node_) == -1) { @@ -966,7 +994,7 @@ be_visitor_servant_svs::gen_emits_top (void) void be_visitor_servant_svs::gen_get_all_emitters (void) { - if (be_global->gen_lwccm () || be_global->gen_noeventccm () ) + if (be_global->gen_lwccm () || be_global->gen_noeventccm () || this->node_->n_emits () == 0UL) { return; } @@ -978,10 +1006,10 @@ be_visitor_servant_svs::gen_get_all_emitters (void) << "{" << be_idt_nl << "::Components::EmitterDescriptions *retval = 0;" << be_nl - << "ACE_NEW_RETURN (retval," << be_nl - << " ::Components::EmitterDescriptions," + << "ACE_NEW_THROW_EX (retval," << be_nl + << " ::Components::EmitterDescriptions," << be_nl - << " 0);" << be_nl_2 + << " ::CORBA::NO_MEMORY ());" << be_nl_2 << "::Components::EmitterDescriptions_var " << "safe_retval = retval;" << be_nl << "safe_retval->length (" << this->node_->n_emits () @@ -1107,7 +1135,7 @@ be_visitor_facet_executor_block::visit_provides ( << "if (ACE_OS::strcmp (name, \"" << port_name << "\") == 0)" << be_idt_nl << "{" << be_idt_nl - << "return this->executor_->get_" << port_name + << "return executor->get_" << port_name << " ();" << be_uidt_nl << "}" << be_uidt; @@ -1144,25 +1172,10 @@ be_visitor_connect_block::visit_uses (be_uses *node) << "::" << obj_name << "::_narrow (connection);" << be_uidt_nl << be_nl; - if (node->uses_type ()->is_local ()) - { - // @@todo: placeholder for connection logic - os_ << "/// " << (is_multiple ? "Multiplex" : "Simplex") - << " connect." << be_nl - << (is_multiple ? "return " : "") << "this->context_->connect_" - << port_name << " (_ciao_conn.in ());"; - } - else - { - os_ << "if ( ::CORBA::is_nil (_ciao_conn.in ()))" << be_idt_nl - << "{" << be_idt_nl - << "throw ::Components::InvalidConnection ();" << be_uidt_nl - << "}" << be_uidt_nl << be_nl; - os_ << "/// " << (is_multiple ? "Multiplex" : "Simplex") - << " connect." << be_nl - << (is_multiple ? "return " : "") << "this->connect_" - << port_name << " (_ciao_conn.in ());"; - } + os_ << "/// " << (is_multiple ? "Multiplex" : "Simplex") + << " connect." << be_nl + << (is_multiple ? "return " : "") << "this->context_->connect_" + << port_name << " (_ciao_conn.in ());"; if (! is_multiple) { @@ -1213,14 +1226,7 @@ be_visitor_disconnect_block::visit_uses (be_uses *node) << "}" << be_uidt_nl << be_nl; } - os_ << "return this->"; - - if (node->uses_type ()->is_local ()) - { - os_ << "context_->"; - } - - os_ << "disconnect_" << port_name + os_ << "return this->context_->disconnect_" << port_name << " (" << (is_multiple ? "ck" : "") << ");" << be_uidt_nl << "}" << be_uidt; @@ -1230,10 +1236,13 @@ be_visitor_disconnect_block::visit_uses (be_uses *node) // ====================================================== be_visitor_receptacle_desc::be_visitor_receptacle_desc ( - be_visitor_context *ctx) + be_visitor_context *ctx, + be_component *node) : be_visitor_component_scope (ctx), - slot_ (0UL) + slot_ (0UL), + comp_ (node) { + node_ = node; } be_visitor_receptacle_desc::~be_visitor_receptacle_desc ( @@ -1253,35 +1262,47 @@ be_visitor_receptacle_desc::visit_uses (be_uses *node) os_ << be_nl_2; - bool gen_guard = is_multiple; + ACE_CString sname_str (comp_->full_name ()); + const char *sname = sname_str.c_str (); + + const char *global = (sname_str == "" ? "" : "::"); - if (gen_guard) + if (!is_multiple) + { + os_ << obj->full_name () << "_var ciao_" + << port_name << " = " << be_idt_nl + << "this->context_->get_connection_" + << port_name << " ();" << be_uidt_nl; + } + else { - os_ << "{" << be_idt_nl - << "ACE_GUARD_RETURN (TAO_SYNCH_MUTEX," << be_nl - << " mon," << be_nl - << " this->context_->" - << port_name << "_lock_," << be_nl - << " 0);" << be_nl_2; + os_ << "::" << sname << global << port_name << "Connections_var ciao_" + << port_name << " = " << be_idt_nl + << "this->context_->get_connections_" + << port_name << " ();" << be_uidt_nl; } os_ << "::CIAO::Servant::describe_" << (is_multiple ? "multiplex" : "simplex") - << "_receptacle<" << be_idt_nl - << "::" << obj->full_name () << "_var> (" << be_idt_nl - << "\"" << port_name << "\"," << be_nl - << "\"" << obj->repoID () << "\"," << be_nl - << "this->context_->ciao_uses_" - << port_name << "_," << be_nl - << "safe_retval," << be_nl - << slot_++ << "UL);" << be_uidt << be_uidt; + << "_receptacle<" << be_idt_nl; - if (gen_guard) + if (!is_multiple) { - os_ << be_uidt_nl - << "}"; + os_ << "::" << obj->full_name () << "> (" << be_idt_nl; + } + else + { + os_ << "::" << sname << global << port_name << "Connections> (" << be_idt_nl; } + os_ << "\"" << port_name << "\"," << be_nl + << "\"" << obj->repoID () << "\"," << be_nl; + + os_ << "ciao_" << port_name << ".in (), " << be_nl; + + os_ << "safe_retval," << be_nl + << slot_++ << "UL);" << be_uidt << be_uidt; + return 0; } @@ -1314,7 +1335,7 @@ be_visitor_subscribe_block::visit_publishes ( << "::" << obj_name << "Consumer_var sub =" << be_idt_nl << "::" << obj_name << "Consumer::_narrow (subscribe);" << be_uidt_nl << be_nl - << "return this->subscribe_" << port_name + << "return this->context_->subscribe_" << port_name << " (sub.in ());" << be_uidt_nl << "}" << be_uidt; @@ -1345,7 +1366,7 @@ be_visitor_unsubscribe_block::visit_publishes ( << "if (ACE_OS::strcmp (publisher_name, \"" << port_name << "\") == 0)" << be_idt_nl << "{" << be_idt_nl - << "return this->unsubscribe_" << port_name + << "return this->context_->unsubscribe_" << port_name << " (ck);" << be_uidt_nl << "}" << be_uidt; @@ -1429,12 +1450,7 @@ be_visitor_connect_consumer_block::visit_emits ( << "Consumer_var _ciao_consumer =" << be_idt_nl << "::" << obj_name << "Consumer::_narrow (consumer);" << be_uidt_nl << be_nl - << "if ( ::CORBA::is_nil (_ciao_consumer.in ()))" - << be_idt_nl - << "{" << be_idt_nl - << "throw ::Components::InvalidConnection ();" << be_uidt_nl - << "}" << be_uidt_nl << be_nl - << "this->connect_" << port_name + << "this->context_->connect_" << port_name << " (_ciao_consumer.in ());" << be_nl_2 << "return;" << be_uidt_nl << "}" << be_uidt; @@ -1466,7 +1482,7 @@ be_visitor_disconnect_consumer_block::visit_emits ( << "if (ACE_OS::strcmp (source_name, \"" << port_name << "\") == 0)" << be_idt_nl << "{" << be_idt_nl - << "return this->disconnect_" << port_name + << "return this->context_->disconnect_" << port_name << " ();" << be_uidt_nl << "}" << be_uidt; diff --git a/TAO/TAO_IDL/be/be_visitor_connector/facet_ami_exs.cpp b/TAO/TAO_IDL/be/be_visitor_connector/facet_ami_exs.cpp index 2693e14f0fe..5cf4cf3bbb3 100644 --- a/TAO/TAO_IDL/be/be_visitor_connector/facet_ami_exs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_connector/facet_ami_exs.cpp @@ -472,8 +472,17 @@ be_visitor_facet_ami_exs::gen_facet_executor_op (be_operation *node) } os_ << ");" << be_uidt << be_uidt_nl - << "}" << be_uidt << be_uidt_nl - << "}"; + << "}" << be_uidt << be_nl; + + /// Throw an INV_OBJREF exception because there is no connection + /// see AMI4CCM mars/11-xx-yy , 2011 + + os_ << "else" << be_idt_nl + << "{" << be_idt_nl + << "throw ::CORBA::INV_OBJREF ();" << be_uidt_nl + << "}" << be_uidt << be_uidt_nl; + + os_ << "}"; return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_home/home_svs.cpp b/TAO/TAO_IDL/be/be_visitor_home/home_svs.cpp index d3d8623aef9..14c37a30f6b 100644 --- a/TAO/TAO_IDL/be/be_visitor_home/home_svs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_home/home_svs.cpp @@ -145,9 +145,23 @@ be_visitor_home_svs::visit_factory (be_factory *node) const char *comp_lname = comp_->local_name ()->get_string (); const char *global = (comp_sname_str == "" ? "" : "::"); + ACE_CString sname_str (ScopeAsDecl (node_->defined_in ())->full_name ()); + + os_ << "::" << sname_str << global << "CCM_" << node_->original_local_name () + << "_var executor = " << be_idt_nl + << "::" << sname_str << global << "CCM_" << node_->original_local_name () + << "::_duplicate (this->executor_.in ());" << be_uidt + << be_nl_2; + + os_ << "if ( ::CORBA::is_nil (executor.in ()))" + << be_idt_nl + << "{"<< be_idt_nl + << "throw ::CORBA::INV_OBJREF ();" << be_uidt_nl + << "}" << be_uidt_nl << be_nl; + os_ << "::Components::EnterpriseComponent_var _ciao_ec =" << be_idt_nl - << "this->executor_->" << node->local_name () << " ("; + << "executor->" << node->local_name () << " ("; if (node->argument_count () > 0) { diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp index 55aa6c78553..3210c8aa7d6 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp @@ -69,9 +69,20 @@ be_visitor_interface_cs::visit_interface (be_interface *node) << "TAO::Objref_Traits<" << node->name () << ">::release (" << be_idt << be_idt_nl << node->name () << "_ptr p)" << be_uidt << be_uidt_nl - << "{" << be_idt_nl - << "::CORBA::release (p);" << be_uidt_nl - << "}"; + << "{" << be_idt_nl; + + // Workaround for broken HP V7.4-004 on OpenVMS IA83 + if (node->has_mixed_parentage ()) + { + *os << "::CORBA::AbstractBase_ptr abs = p;" << be_nl + << "::CORBA::release (abs);" << be_uidt_nl; + } + else + { + *os << "::CORBA::release (p);" << be_uidt_nl; + } + + *os << "}"; *os << be_nl_2 << node->name () << "_ptr" << be_nl @@ -90,14 +101,14 @@ be_visitor_interface_cs::visit_interface (be_interface *node) << "{" << be_idt_nl << "return "; - if (node->is_abstract () || c != 0) - { - *os << "cdr << p;"; - } - else - { - *os << "::CORBA::Object::marshal (p, cdr);"; - } + if (node->is_abstract () || c != 0) + { + *os << "cdr << p;"; + } + else + { + *os << "::CORBA::Object::marshal (p, cdr);"; + } *os << be_uidt_nl << "}"; diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp index 1ab468ac493..ab11005da9b 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp @@ -113,7 +113,7 @@ be_visitor_interface_sh::visit_interface (be_interface *node) << "public:" << be_idt_nl; // Some useful typedefs. - *os << "// Useful for template programming." << be_nl + *os << "/// Useful for template programming." << be_nl << "typedef ::" << node->name () << " _stub_type;" << be_nl << "typedef ::" << node->name () << "_ptr _stub_ptr_type;" diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation_svs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation_svs.cpp index 2e3113bba5d..68084dc7420 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation_svs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_svs.cpp @@ -85,7 +85,16 @@ be_visitor_operation_svs::gen_op_body (be_operation *node) os_ << be_nl << "{" << be_idt_nl; - os_ << "if ( ::CORBA::is_nil (this->executor_.in ()))" + ACE_CString sname_str (ScopeAsDecl (scope_->defined_in ())->full_name ()); + const char *global = (sname_str == "" ? "" : "::"); + + os_ << "::" << sname_str << global << "CCM_" << scope_->original_local_name () + << "_var executor = " << be_idt_nl + << "::" << sname_str << global << "CCM_" << scope_->original_local_name () + << "::_duplicate (this->executor_.in ());" << be_uidt + << be_nl_2; + + os_ << "if ( ::CORBA::is_nil (executor.in ()))" << be_idt_nl << "{"<< be_idt_nl << "throw ::CORBA::INV_OBJREF ();" << be_uidt_nl @@ -98,7 +107,7 @@ be_visitor_operation_svs::gen_op_body (be_operation *node) os_ << "return "; } - os_ << "this->executor_->" << node->local_name () << " ("; + os_ << "executor->" << node->local_name () << " ("; if (node->argument_count () == 0) { diff --git a/TAO/TAO_IDL/be_include/be_visitor_component/servant_svs.h b/TAO/TAO_IDL/be_include/be_visitor_component/servant_svs.h index 5007b4edbd6..db4867c6adb 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_component/servant_svs.h +++ b/TAO/TAO_IDL/be_include/be_visitor_component/servant_svs.h @@ -134,7 +134,8 @@ class be_visitor_receptacle_desc : public be_visitor_component_scope { public: - be_visitor_receptacle_desc (be_visitor_context *ctx); + be_visitor_receptacle_desc (be_visitor_context *ctx, + be_component *node); ~be_visitor_receptacle_desc (void); @@ -142,6 +143,7 @@ public: private: ACE_CDR::ULong slot_; + be_component *comp_; }; // ====================================================== diff --git a/TAO/docs/Options.html b/TAO/docs/Options.html index 25aaa913c81..fd8b5147c48 100644 --- a/TAO/docs/Options.html +++ b/TAO/docs/Options.html @@ -702,8 +702,8 @@ is <code>0</code>. This option is disabled (<code>0</code>) by default.</td> specifies the third lane of that thread pool. Note that <code>0</code> should be used for the lane when specifying endpoints for thread pools without lanes. <code>*:*</code> - can be used to specify all pools and lanes, <code>1:*</code> means - all lanes from pool <code>1</code>, and <code>*:1</code> + can be used to specify all pools and lanes, <code>1:*</code> means + all lanes from pool <code>1</code>, and <code>*:1</code> means lane <code>1</code> from all pools. <p>Sets of endpoints may be specified using multiple @@ -890,54 +890,54 @@ Repository</a>. </td> <tr> <td><code>-ORBDaemon</code></td> <td>Specifies that the ORB should <em>daemonize</em> itself, <em>i.e.</em>, -run as a background process. Note, that this changes the working directory to +run as a background process. Note, that this changes the working directory to be the root directory "/". This especially affects relative paths specified at the command line. This option is only meaningful on OS platforms that support daemonization.</td> </tr> <tr> <td><code>-ORBForwardInvocationOnObjectNotExist</code> <em>boolean (0|1)</em></td> - <td>If this option is 1, the ORB forwards the request to next available profile when - receiving OBJECT_NOT_EXIST exception reply. The default value is <CODE>0</CODE> - which means the request is not forwarded upon OBJECT_NOT_EXIST exception. + <td>If this option is 1, the ORB forwards the request to next available profile when + receiving OBJECT_NOT_EXIST exception reply. The default value is <CODE>0</CODE> + which means the request is not forwarded upon OBJECT_NOT_EXIST exception. </td> </tr> <tr> <td><code>-ORBForwardOnceOnObjectNotExist</code> <em>boolean (0|1)</em></td> - <td>If this option is 1, the ORB forwards the request if it + <td>If this option is 1, the ORB forwards the request if it receives OBJECT_NOT_EXIST exception reply. If it receives one of the exceptions (OBJECT_NOT_EXIST, COMM_FAILURE, TRANSIENT, INV_OBJREF) during forwarding, - the request is not forwarded again and exception is propagated to the client - code. The default value is <CODE>0</CODE> which means the request - is not forwarded upon OBJECT_NOT_EXIST exception. + the request is not forwarded again and exception is propagated to the client + code. The default value is <CODE>0</CODE> which means the request + is not forwarded upon OBJECT_NOT_EXIST exception. </td> </tr> <tr> <td><code>-ORBForwardOnceOnCommFailure</code> <em>boolean (0|1)</em></td> - <td>If this option is 1, the ORB forwards the request if it + <td>If this option is 1, the ORB forwards the request if it receives COMM_FAILURE exception reply. If it receives one of the exceptions (OBJECT_NOT_EXIST, COMM_FAILURE, TRANSIENT, INV_OBJREF) during forwarding, the request is not forwarded again and exception is propagated to the client - code. The default value is <CODE>0</CODE> which means the request is not forwarded upon + code. The default value is <CODE>0</CODE> which means the request is not forwarded upon COMM_FAILURE exception. </td> </tr> <tr> <td><code>-ORBForwardOnceOnTransient</code> <em>boolean (0|1)</em></td> - <td>If this option is 1, the ORB forwards the request if it + <td>If this option is 1, the ORB forwards the request if it receives TRANSIENT exception reply. If it receives one of the exceptions (OBJECT_NOT_EXIST, COMM_FAILURE, TRANSIENT, INV_OBJREF) during forwarding, - the request is not forwarded again and exception is propagated to the client - code. The default value is <CODE>0</CODE> which means the request + the request is not forwarded again and exception is propagated to the client + code. The default value is <CODE>0</CODE> which means the request is not forwarded upon TRANSIENT exception. </td> </tr> <tr> <td><code>-ORBForwardOnceOnInvObjref</code> <em>boolean (0|1)</em></td> - <td>If this option is 1, the ORB forwards the request if it + <td>If this option is 1, the ORB forwards the request if it receives INV_OBJREF exception reply. If it receives one of the exceptions (OBJECT_NOT_EXIST, COMM_FAILURE, TRANSIENT, INV_OBJREF) during forwarding, - the request is not forwarded again and exception is propagated to the client - code. The default value is <CODE>0</CODE> which means the request + the request is not forwarded again and exception is propagated to the client + code. The default value is <CODE>0</CODE> which means the request is not forwarded upon INV_OBJREF exception. </td> </tr> @@ -1161,32 +1161,6 @@ used to guarantee exclusive access, and <code>null</code>, which specifies that no locking be performed. The default is thread. </td> </tr> <tr> - <td><code>-ORBCorbaObjectLock</code> <em>locktype</em></td> - <td><a name="-ORBCorbaObjectLock"></a> Specify the type of lock -to be used by CORBA::Object. The lock is needed within the CORBA object -to synchronize the state when the same object is shared by multiple -threads. Possible values for lock type are <code>thread</code>, which -specifies that an inter-thread mutex is used to guarantee exclusive -access, and <code>null</code>, which specifies that no locking be -performed. The default is thread. The <code>null</code> lock option is -useful when there is only one thread in the system. This option can be -used to minimize the amount of memory consumed by the locks in -applications where locks are not needed. The memory growth problem gets -particularly exacerbated for applications dealing with hundreds and -thousands of objects. </td> - </tr> - <tr> - <td><code>-ORBObjectKeyTableLock</code> <em>locktype</em></td> - <td><a name="-ORBObjectKeyTableLock"></a> Specify the type of -lock to be used by the ObjectKey table. ObjectKey table keeps track of -the ObjectKeys that are generated and made available through IORs. The -table manages the life time of the object keys within the ORB through a -reference counting mechanism. Possible values for lock type are <code>thread</code>, -which specifies that an inter-thread mutex is used to guarantee -exclusive access, and <code>null</code>, which specifies that no -locking be performed. The default is thread. </td> - </tr> - <tr> <td><code>-ORBFlushingStrategy</code> <em>type</em></td> <td><a name="-ORBFlushingStrategy"></a>By default TAO provides three strategies to flush queued messages. The <code>leader_follower</code> @@ -1520,14 +1494,6 @@ any logical-OR combination of <code>THR_DETACHED</code>, <code>THR_BOUND</code>, <code>THR_NEW_LWP</code>, <code>THE_SUSPENDED</code>. The default is <code>THR_BOUND | THR_DETACHED</code> . </td> </tr> - <tr> - <td><code>-ORBPOALock</code> <em>lock type</em></td> - <td><a name="-ORBPOALock"></a>Specify the type of lock to be -used for POA accesses. Possible values for <em>lock type</em> are <code>thread</code>, -which specifies that an inter-thread mutex is used to guarantee -exclusive access, and <code>null</code>, which specifies that no -locking be performed. The default is <code>thread</code>.</td> - </tr> </tbody> </table> </p> @@ -1562,15 +1528,6 @@ file.</p> <th>Description</th> </tr> <tr> - <td><code><a name="#-ORBProfileLock">-ORBProfileLock</a></code> - <em>which</em></td> - <td>Specify the kind of synchronization primitive for the -Profiles. Default is <em>thread</em>, which means that a regular -thread mutex is used. The second option is <em>null</em>, which means -a null lock is used. This makes sense in case of optimizations and is -allowed when no forwarding is used or only a single threaded client. </td> - </tr> - <tr> <td><code>-ORBClientConnectionHandler</code> <em>MT | ST | RW / MT_NOUPCALL</em><br> <code>-ORBWaitStrategy</code> <em>MT / ST / RW / MT_NOUPCALL diff --git a/TAO/docs/configurations.html b/TAO/docs/configurations.html index c5d2dc5fa1c..3afdb17ad9b 100644 --- a/TAO/docs/configurations.html +++ b/TAO/docs/configurations.html @@ -141,7 +141,7 @@ Roadmap</h3> <ul> <li><a name="orb"><b>Number of ORBs</b> -- </a></li> - TAO can assign multiple endpoints to an ORB. + TAO can assign multiple endpoints to an ORB. It is therefore not necessary to create multiple ORBs to accept requests from multiple endpoints. However, multiple ORBs can be used to support different policies within the same process, @@ -182,7 +182,7 @@ Roadmap</h3> <li><tt>reactive</tt>: In this approach, each thread in the thread pool has an ORB that accepts and processes requests reactively. This is also called as the - "ORB-per-thread" model <P> + "ORB-per-thread" model <P> <li><P><tt>leader/followers</tt>: In this model, the user must create several threads, all of which invoke @@ -193,7 +193,7 @@ Roadmap</h3> doing so the ORB will selects another thread in the pool to become the leader. In other words the threads in the pool take turns to - process the events. + process the events. </p> </li> @@ -226,23 +226,7 @@ Roadmap</h3> -ORBCollocation </a></code> flag as an argument of <code> ORB_init </code> (most often thru the command line flags.) <p> - <li> <a NAME="profile"></a><b>Forwarding Profile</b> -- - When multiple threads using the same - <tt>CORBA::Object</tt> and using forwarding, it is necessary to - protect the forwarding <tt>Profile</tt>, which is part of the - CORBA::Object, against multiple access. Therefore a mutex lock - is used by default to ensure proper access. <P> - - Using the switch <tt><a href="Options.html#-ORBProfileLock"> - -ORBProfileLock </a></tt> this policy can be deactivated - specifying <tt>-ORBProfileLock null</tt>. - The primary reason for doing this is to improve performance - when no forwarding is used or no multithreading with access to - shared <tt>CORBA::Object</tt>'s. Using a null mutex reduces - the overhead compared with using a regular mutex - lock.</li><P> - - <li> <a NAME="orbsvcs"></a><b>orbsvcs Library</b> -- + <li> <a NAME="orbsvcs"></a><b>orbsvcs Library</b> -- By default, TAO's Makefiles build all the services that TAO supports. @@ -329,7 +313,6 @@ The following are common ORB configurations used by TAO applications.<P> select_st</tt>, <tt>-ORBInputCDRAllocator null</tt> <br><tt>TAO_Server_Strategy_Factory</tt>: <tt>-ORBconcurrency reactive</tt> (default), - <tt>-ORBPOALock null</tt> <br><tt>TAO_Client_Strategy_Factory</tt>: <tt>-ORBConnectorLock null</tt></td> </td> @@ -337,10 +320,10 @@ The following are common ORB configurations used by TAO applications.<P> </table> <P>Check out the <tt><a href="../examples/Simple/grid/">Grid</a></tt> - for an example of a default configuration and - <tt><a href="../performance-tests/Latency/Single_Threaded/">this</a></tt> + for an example of a default configuration and + <tt><a href="../performance-tests/Latency/Single_Threaded/">this</a></tt> for an example of settings that would provide better performance. - + <P> <li> <a NAME="tpc"></a><B>Multiple threads, single ORB, thread-per-connection @@ -468,7 +451,7 @@ The following are common ORB configurations used by TAO applications.<P> <td>This model implements a highly optimized <A HREF="rtcorba/">Real-time CORBA</A> thread pool that minimizes context switching, and thread creation costs. In this - model, the application is responsible for starting up the ORB and then + model, the application is responsible for starting up the ORB and then calling the Real-time CORBA thread pool factory methods that internally spawn a pool of threads. When a request comes in, one of these waiting threads in the pool will handle the diff --git a/TAO/docs/performance.html b/TAO/docs/performance.html index 687b9ae0ce1..133649ad5dd 100644 --- a/TAO/docs/performance.html +++ b/TAO/docs/performance.html @@ -254,25 +254,6 @@ <ul> <li> <p> - A single-threaded client application may not require - the internal thread synchronization performed by TAO. - It may therefore be useful to add the following line to your - <code>svc.conf</code> file: - </p> - - <blockquote> - <code>static <a href = "Options.html#DefaultClient">Client_Strategy_Factory</a> "<a href="Options.html#-ORBProfileLock">-ORBProfileLock</a> null"</code> - </blockquote> - - <p> - If such an entry already exists in your - <code>svc.conf</code> file, then just add - <code>-ORBProfileLock null</code> to the list options - between the quotes found after - <code>Client_Strategy_Factory</code>. - </p> - - <p> Other options include disabling synchronization in the components of TAO responsible for constructing and sending requests to the target and for receiving replies. These @@ -608,7 +589,7 @@ CC 5.x compiler gives a big footprint reduction of the order of 40%.</P> <P>Also footprint can be saved by specifying the following in your platform_macros.GNU file: </P> <P> -<code> +<code> <pre> optimize=1 debug=0 @@ -618,8 +599,8 @@ CPPFLAGS += -DACE_USE_RCSID=0 -DACE_NLOGGING=1 <P> If portable interceptors aren't needed, code around line 729 in -<code>$TAO_ROOT/tao/orbconf.h</code> can be modified to hard-code -<code>TAO_HAS_INTERCEPTORS</code> as <code>0</code>, and all interceptor +<code>$TAO_ROOT/tao/orbconf.h</code> can be modified to hard-code +<code>TAO_HAS_INTERCEPTORS</code> as <code>0</code>, and all interceptor code will be skipped by the preprocessor. <P> @@ -630,7 +611,7 @@ code will be skipped by the preprocessor. <TR> <TD><code>-Sc</code> <TD>Suppresses generation of the TIE classes (template classes used - to delegate request dispatching when IDL interface inheritance + to delegate request dispatching when IDL interface inheritance would cause a 'ladder' of inheritance if the servant classe had corresponding inheritance). This option can be used almost all the time. diff --git a/TAO/docs/releasenotes/orbcore.html b/TAO/docs/releasenotes/orbcore.html index 78ee249f584..8a4ed62cc67 100644 --- a/TAO/docs/releasenotes/orbcore.html +++ b/TAO/docs/releasenotes/orbcore.html @@ -68,7 +68,7 @@ Point of contact: <a href="mailto: bala@cs.wustl.edu">Balchandran Natarajan</a> leads to crash failures. <p> </li> - + </ul> <!-- --------------------- --> <a href="#toc">Back to TOC</a> @@ -84,7 +84,7 @@ Point of contact: <a href="mailto: bala@cs.wustl.edu">Balchandran Natarajan</a> <li><p>Improvement to connection cache on the acceptor side so that it will purge old connections when there are no more slots or sockets are available. The connection cache does good job of - purging things on the connector side</p> + purging things on the connector side</p> </li> <li><p> Prevent unbounded stack growth that leads to a failure in @@ -106,14 +106,14 @@ Point of contact: <a href="mailto: bala@cs.wustl.edu">Balchandran Natarajan</a> TAO has slowed down a bit over the past two betas. Need to identify the bottlenecks before improving the performance.</p> </li> - + <li><p> Its a known fact that thread-per-connection is faster than the reactive model, even for single threaded cases. Need to identify portions of the reactor that slows down things and fix them or create a fast path in the ORB just using plain vanilla select for the server.</p> </li> - + <li><p> In the output data path, the CDR creates the message block and all other associted things on TSS. If we could change the CDR to first create them on the stack and then move @@ -125,7 +125,7 @@ Point of contact: <a href="mailto: bala@cs.wustl.edu">Balchandran Natarajan</a> <li>Features:</li> <ol> <li><p>Implement DP-CORBA specification</p></li> - + <li><p>Implement TII specification.</p></li> </ol> @@ -150,7 +150,7 @@ Point of contact: <a href="mailto: bala@cs.wustl.edu">Balchandran Natarajan</a> <code>$TAO_ROOT/tests/Connection_Timeout</code> for an example of how to use this feature.<p> </li> - + <li><p> Implemented non-blocking connects with three different strategies for connection establishment. The details of the strategies and the related documentation can be found <A @@ -161,11 +161,11 @@ Point of contact: <a href="mailto: bala@cs.wustl.edu">Balchandran Natarajan</a> option -ORBConnectionPurgingStrategy fills in the role of the deprecated strategy.</p> </li> - + <li><p> Deprecated the option -ORBResources.</p></li> <li><p> The connectors have been moved to the lanes.</p> </li> - + <li><p> Fixed stack recursion problems that occurs, when a thread flushing a reply by entering the reactor starts processing incoming requests.</p> @@ -188,7 +188,7 @@ Point of contact: <a href="mailto: bala@cs.wustl.edu">Balchandran Natarajan</a> optimization. This is useful for RTCORBA server threads to avoid priority inversions. Buffering messages and sending notifications to the reactor, that does not know or honour - priority could lead to priority inversions. + priority could lead to priority inversions. </p> </li> @@ -210,7 +210,7 @@ Point of contact: <a href="mailto: bala@cs.wustl.edu">Balchandran Natarajan</a> All of the following protocols were updated: DIOP, IIOP, SCIOP, SHMIOP, SSLIOP, UIOP, UIPMC. </p> </li> - + <li><p> Support for the ORB methods create_value_tc, create_component_tc, create_event_tc, create_home_tc and create_recursive_tc added. </p> </li> diff --git a/TAO/etc/tao_pi.doxygen b/TAO/etc/tao_pi.doxygen index 1a6ca66d3b0..4574c930d52 100644 --- a/TAO/etc/tao_pi.doxygen +++ b/TAO/etc/tao_pi.doxygen @@ -125,7 +125,8 @@ PREDEFINED = __ACE_INLINE__ \ ACE_END_VERSIONED_NAMESPACE_DECL \ TAO_BEGIN_VERSIONED_NAMESPACE_DECL \ TAO_END_VERSIONED_NAMESPACE_DECL \ - ACE_INLINE + ACE_INLINE=inline \ + TAO_HAS_INTERCEPTORS=1 EXPAND_AS_DEFINED = ACE_UNIMPLEMENTED_FUNC \ ACE_CACHE_MAP_MANAGER diff --git a/TAO/etc/tao_pi_server.doxygen b/TAO/etc/tao_pi_server.doxygen index df393973b5b..7e423a29c28 100644 --- a/TAO/etc/tao_pi_server.doxygen +++ b/TAO/etc/tao_pi_server.doxygen @@ -125,7 +125,8 @@ PREDEFINED = __ACE_INLINE__ \ ACE_END_VERSIONED_NAMESPACE_DECL \ TAO_BEGIN_VERSIONED_NAMESPACE_DECL \ TAO_END_VERSIONED_NAMESPACE_DECL \ - ACE_INLINE + ACE_INLINE=inline \ + TAO_HAS_INTERCEPTORS=1 EXPAND_AS_DEFINED = ACE_UNIMPLEMENTED_FUNC \ ACE_CACHE_MAP_MANAGER diff --git a/TAO/etc/tao_rtcorba.doxygen b/TAO/etc/tao_rtcorba.doxygen index f327d455f4d..4bd083c73b7 100644 --- a/TAO/etc/tao_rtcorba.doxygen +++ b/TAO/etc/tao_rtcorba.doxygen @@ -125,7 +125,8 @@ PREDEFINED = __ACE_INLINE__ \ ACE_END_VERSIONED_NAMESPACE_DECL \ TAO_BEGIN_VERSIONED_NAMESPACE_DECL \ TAO_END_VERSIONED_NAMESPACE_DECL \ - ACE_INLINE + ACE_INLINE=inline \ + TAO_HAS_CORBA_MESSAGING=1 EXPAND_AS_DEFINED = ACE_UNIMPLEMENTED_FUNC \ ACE_CACHE_MAP_MANAGER diff --git a/TAO/etc/tao_rtportableserver.doxygen b/TAO/etc/tao_rtportableserver.doxygen index 1db620e26fb..b740a3bed35 100644 --- a/TAO/etc/tao_rtportableserver.doxygen +++ b/TAO/etc/tao_rtportableserver.doxygen @@ -125,7 +125,8 @@ PREDEFINED = __ACE_INLINE__ \ ACE_END_VERSIONED_NAMESPACE_DECL \ TAO_BEGIN_VERSIONED_NAMESPACE_DECL \ TAO_END_VERSIONED_NAMESPACE_DECL \ - ACE_INLINE + ACE_INLINE=inline \ + TAO_HAS_CORBA_MESSAGING=1 EXPAND_AS_DEFINED = ACE_UNIMPLEMENTED_FUNC \ ACE_CACHE_MAP_MANAGER diff --git a/TAO/etc/tao_strategies.doxygen b/TAO/etc/tao_strategies.doxygen index c020f47b344..2ac0de9e15f 100644 --- a/TAO/etc/tao_strategies.doxygen +++ b/TAO/etc/tao_strategies.doxygen @@ -125,7 +125,12 @@ PREDEFINED = __ACE_INLINE__ \ ACE_END_VERSIONED_NAMESPACE_DECL \ TAO_BEGIN_VERSIONED_NAMESPACE_DECL \ TAO_END_VERSIONED_NAMESPACE_DECL \ - ACE_INLINE + ACE_INLINE=inline \ + TAO_HAS_COIOP=1 \ + TAO_HAS_DIOP=1 \ + TAO_HAS_SCIOP=1 \ + TAO_HAS_SHMIOP=1 \ + TAO_HAS_UIOP=1 EXPAND_AS_DEFINED = ACE_UNIMPLEMENTED_FUNC \ ACE_CACHE_MAP_MANAGER diff --git a/TAO/etc/tao_transportcurrent.doxygen b/TAO/etc/tao_transportcurrent.doxygen index 5c09e787a0b..470407c0d70 100644 --- a/TAO/etc/tao_transportcurrent.doxygen +++ b/TAO/etc/tao_transportcurrent.doxygen @@ -125,7 +125,8 @@ PREDEFINED = __ACE_INLINE__ \ ACE_END_VERSIONED_NAMESPACE_DECL \ TAO_BEGIN_VERSIONED_NAMESPACE_DECL \ TAO_END_VERSIONED_NAMESPACE_DECL \ - ACE_INLINE + ACE_INLINE=inline \ + TAO_HAS_TRANSPORT_CURRENT=1 EXPAND_AS_DEFINED = ACE_UNIMPLEMENTED_FUNC \ ACE_CACHE_MAP_MANAGER diff --git a/TAO/etc/tao_ziop.doxygen b/TAO/etc/tao_ziop.doxygen index 1c29834d3f6..f4c5dcbe874 100644 --- a/TAO/etc/tao_ziop.doxygen +++ b/TAO/etc/tao_ziop.doxygen @@ -125,7 +125,8 @@ PREDEFINED = __ACE_INLINE__ \ ACE_END_VERSIONED_NAMESPACE_DECL \ TAO_BEGIN_VERSIONED_NAMESPACE_DECL \ TAO_END_VERSIONED_NAMESPACE_DECL \ - ACE_INLINE + ACE_INLINE=inline \ + TAO_HAS_CORBA_MESSAGING=1 EXPAND_AS_DEFINED = ACE_UNIMPLEMENTED_FUNC \ ACE_CACHE_MAP_MANAGER diff --git a/TAO/examples/AMH/Sink_Server/st_server.conf b/TAO/examples/AMH/Sink_Server/st_server.conf index c09dab002f1..75f547672a1 100644 --- a/TAO/examples/AMH/Sink_Server/st_server.conf +++ b/TAO/examples/AMH/Sink_Server/st_server.conf @@ -8,4 +8,4 @@ # http://www.cs.wustl.edu/~schmidt/ACE_wrappers/TAO/docs/configurations.html#concurrency # static Advanced_Resource_Factory "-ORBReactorType select_st -ORBInputCDRAllocator null" -static Server_Strategy_Factory "-ORBconcurrency reactive -ORBPOALock null" +static Server_Strategy_Factory "-ORBconcurrency reactive" diff --git a/TAO/examples/AMH/Sink_Server/st_server.conf.xml b/TAO/examples/AMH/Sink_Server/st_server.conf.xml index 561e3220175..981d619d165 100644 --- a/TAO/examples/AMH/Sink_Server/st_server.conf.xml +++ b/TAO/examples/AMH/Sink_Server/st_server.conf.xml @@ -10,5 +10,5 @@ <!-- http://www.cs.wustl.edu/~schmidt/ACE_wrappers/TAO/docs/configurations.html#concurrency --> <!-- --> <static id="Advanced_Resource_Factory" params="-ORBReactorType select_st -ORBInputCDRAllocator null"/> - <static id="Server_Strategy_Factory" params="-ORBconcurrency reactive -ORBPOALock null"/> + <static id="Server_Strategy_Factory" params="-ORBconcurrency reactive"/> </ACE_Svc_Conf> diff --git a/TAO/examples/Load_Balancing/Load_Balancer_i.cpp b/TAO/examples/Load_Balancing/Load_Balancer_i.cpp index efeac91cfa2..27e2648e5fc 100644 --- a/TAO/examples/Load_Balancing/Load_Balancer_i.cpp +++ b/TAO/examples/Load_Balancing/Load_Balancer_i.cpp @@ -231,7 +231,7 @@ Object_Group_i::unbind (const char * id) { ACE_CString member_id (id); - // Code below works iff list and hash map states are consistent, + // Code below works if list and hash map states are consistent, // which is the case unless the system experienced major problems, // e.g., ran out of memory ... diff --git a/TAO/examples/RTCORBA/Activity/README b/TAO/examples/RTCORBA/Activity/README index 32264d094e1..4b43ffb98f3 100644 --- a/TAO/examples/RTCORBA/Activity/README +++ b/TAO/examples/RTCORBA/Activity/README @@ -1,5 +1,5 @@ //$Id$ -=================== RT CORBA capabilities demo =================== +=================== RT CORBA capabilities demo =================== Table of contents ----------------- @@ -20,7 +20,7 @@ In this experiment we show the effect of maintaining end to end priorities. The experiment consists of the following participants: -Job: A CORBA servant object that performs CPU intensive work. The ammount +Job: A CORBA servant object that performs CPU intensive work. The amount of work depends on a load factor that is conveyed to the object per invocation as an argument. @@ -41,18 +41,18 @@ To specify POA options the format is: -POA <name> -PriorityModel <CLIENT|SERVER> <priority> -Lanes <count> (-Lane <priority> ,<static_threads> <dynamic_threads>)* -Bands <count> (-Band <low> <high>)* e.g. --POA poa1 -PriorityModel CLIENT 10 -Bands 2 -Band 1 20 -Band 30 85 -Lanes 2 -Lane 10 1 0 -Lane 80 1 0 +-POA poa1 -PriorityModel CLIENT 10 -Bands 2 -Band 1 20 -Band 30 85 -Lanes 2 -Lane 10 1 0 -Lane 80 1 0 -specifes a POA with: +specifes a POA with: Name - poa1 Priority model - client propogated, def. priority = 10 Bands - 2 Bands with Band values as follows - - Band 1 : low priority = 1, high priority = 20 + Band 1 : low priority = 1, high priority = 20 Band 2 : low priority = 30, high priority = 85 - + Lanes - 2 Lanes with Lane values as follows - Lane 1 : priority = 10, 1 static thread, 0 dynamic threads Lane 2 : priority = 80, 1 static thread, 0 dynamic threads @@ -72,7 +72,7 @@ The format for specify a Job is: where, poa_name is the POA that this object is activated in. -e.g. +e.g. -Job job_10 poa1 specifies a Job with, @@ -85,12 +85,12 @@ Task Options The format for specify a Task is: --ThreadTask -JobName <name> -Priority <priority> -Period <period> -ExecTime <exec_time> -Phase <phase> -Iter <iterations> -Load <load_weight> +-ThreadTask -JobName <name> -Priority <priority> -Period <period> -ExecTime <exec_time> -Phase <phase> -Iter <iterations> -Load <load_weight> where, -ThreadTask = Specifies a Thread based timer. -JobName <name> = Name of the Job object that this task will exec. once every period. --Priority <priority> = The OS thread priority at which to run this task. +-Priority <priority> = The OS thread priority at which to run this task. -Period <period> = The period of execution. (in uS) -ExecTime <exec_time> = The offline estimate of the worst case execution time for the Job. (uS) -Phase <phase> = The phase to start at (uS) @@ -98,16 +98,16 @@ where, -Load <load_weight> = a load factor passed to the job that varies its processing. e.g. --ThreadTask -JobName job_10 -Priority 10 -Period 1 -ExecTime 10000 -Phase 0 -Iter 20 -Load 1000 +-ThreadTask -JobName job_10 -Priority 10 -Period 1 -ExecTime 10000 -Phase 0 -Iter 20 -Load 1000 specifes a Thread Task in which, JobName = job_10 -Priority = 10 --Period = 1uS --ExecTime = 10000uS +-Period = 1uS +-ExecTime = 10000uS -Phase = 0uS -Iter = 20 iterations --Load = 1000 +-Load = 1000 4. Command-Line Options ---------------------- @@ -121,12 +121,12 @@ other instances of activity can be started. a). The activated Jobs are registered with a Naming service, so we need an NS running e.g. ./Naming_Service -o naming_ior - + b). Start one or more instances of ./activity depending on the test configuration that you have designed. e.g. ./activity -ORBInitRef NameService=file://naming_ior -ORBSvcConf svc.conf.whatever -ORBDebugLevel 1 -c) once all the instances exit, the test will generate data files: <job_name>.dat +c) once all the instances exit, the test will generate data files: <job_name>.dat use gen_graph to generate a .png file to view the results in a graphical viewer. diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullConsumer.cpp b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullConsumer.cpp index 68565691851..3c26d56fa2e 100644 --- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullConsumer.cpp +++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullConsumer.cpp @@ -68,7 +68,7 @@ TAO_CEC_ProxyPullConsumer::deactivate (void) catch (const CORBA::Exception&) { // Exceptions here should not be propagated. They usually - // indicate that an object is beign disconnected twice, or some + // indicate that an object is being disconnected twice, or some // race condition, but not a fault that the user needs to know // about. } diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullSupplier.cpp b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullSupplier.cpp index 9ded55dc62e..fadaf6c2bea 100644 --- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullSupplier.cpp +++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullSupplier.cpp @@ -67,7 +67,7 @@ TAO_CEC_ProxyPullSupplier::deactivate (void) catch (const CORBA::Exception&) { // Exceptions here should not be propagated. They usually - // indicate that an object is beign disconnected twice, or some + // indicate that an object is being disconnected twice, or some // race condition, but not a fault that the user needs to know // about. } diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushConsumer.cpp b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushConsumer.cpp index cb8caddc6ad..c1342545f4c 100644 --- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushConsumer.cpp +++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushConsumer.cpp @@ -68,7 +68,7 @@ TAO_CEC_ProxyPushConsumer::deactivate (void) catch (const CORBA::Exception&) { // Exceptions here should not be propagated. They usually - // indicate that an object is beign disconnected twice, or some + // indicate that an object is being disconnected twice, or some // race condition, but not a fault that the user needs to know // about. } diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushSupplier.cpp b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushSupplier.cpp index 99a601ceddf..d73a8acf0f1 100644 --- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushSupplier.cpp +++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushSupplier.cpp @@ -121,7 +121,7 @@ TAO_CEC_ProxyPushSupplier::deactivate (void) catch (const CORBA::Exception&) { // Exceptions here should not be propagated. They usually - // indicate that an object is beign disconnected twice, or some + // indicate that an object is being disconnected twice, or some // race condition, but not a fault that the user needs to know // about. } diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_TypedProxyPushConsumer.cpp b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_TypedProxyPushConsumer.cpp index 5aeeb41fdd1..95841b71732 100644 --- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_TypedProxyPushConsumer.cpp +++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_TypedProxyPushConsumer.cpp @@ -101,7 +101,7 @@ TAO_CEC_TypedProxyPushConsumer::deactivate (void) catch (const CORBA::Exception&) { // Exceptions here should not be propagated. They usually - // indicate that an object is beign disconnected twice, or some + // indicate that an object is being disconnected twice, or some // race condition, but not a fault that the user needs to know // about. } diff --git a/TAO/orbsvcs/orbsvcs/ESF/ESF_Proxy_RefCount_Guard.h b/TAO/orbsvcs/orbsvcs/ESF/ESF_Proxy_RefCount_Guard.h index 6fbb9c609e1..3a0585e8f31 100644 --- a/TAO/orbsvcs/orbsvcs/ESF/ESF_Proxy_RefCount_Guard.h +++ b/TAO/orbsvcs/orbsvcs/ESF/ESF_Proxy_RefCount_Guard.h @@ -31,7 +31,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL * The system can then execute the operation without any risk of * having the underlying object destroyed. The advantage of using * a reference count is that no mutex or lock needs to be held - * while the operation is beign executed. + * while the operation is being executed. * This class implements that common idiom, but it also adds hooks * to handle scenarios where more than one operation is performed * while holding the reference count. diff --git a/TAO/orbsvcs/orbsvcs/ESF/ESF_RefCount_Guard.h b/TAO/orbsvcs/orbsvcs/ESF/ESF_RefCount_Guard.h index 2bf75f0b5f6..b5c73f89987 100644 --- a/TAO/orbsvcs/orbsvcs/ESF/ESF_RefCount_Guard.h +++ b/TAO/orbsvcs/orbsvcs/ESF/ESF_RefCount_Guard.h @@ -33,7 +33,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL * The system can then execute the operation without any risk of * having the underlying object destroyed. The advantage of using * a reference count is that no mutex or lock needs to be held - * while the operation is beign executed. + * while the operation is being executed. */ template<class T> class TAO_ESF_RefCount_Guard diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.cpp index 4c7d333e330..4512722d588 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.cpp @@ -193,7 +193,7 @@ TAO_EC_ProxyPushConsumer::deactivate (void) catch (const CORBA::Exception&) { // Exceptions here should not be propagated. They usually - // indicate that an object is beign disconnected twice, or some + // indicate that an object is being disconnected twice, or some // race condition, but not a fault that the user needs to know // about. } diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp index feaa1099b1b..c2c252d2545 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp @@ -140,7 +140,7 @@ TAO_EC_ProxyPushSupplier::deactivate (void) throw () catch (const CORBA::Exception&) { // Exceptions here should not be propagated. They usually - // indicate that an object is beign disconnected twice, or some + // indicate that an object is being disconnected twice, or some // race condition, but not a fault that the user needs to know // about. } diff --git a/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_ServerORBInitializer.h b/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_ServerORBInitializer.h index 681b774a3db..dba4f8ae445 100644 --- a/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_ServerORBInitializer.h +++ b/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_ServerORBInitializer.h @@ -23,13 +23,6 @@ #include "tao/LocalObject.h" #include "orbsvcs/FaultTolerance/FT_ServerORB_export.h" -// This is to remove "inherits via dominance" warnings from MSVC. -// MSVC is being a little too paranoid. -#if defined(_MSC_VER) -#pragma warning(push) -#pragma warning(disable:4250) -#endif /* _MSC_VER */ - TAO_BEGIN_VERSIONED_NAMESPACE_DECL /// RTCORBA ORB initializer. @@ -55,10 +48,6 @@ private: TAO_END_VERSIONED_NAMESPACE_DECL -#if defined(_MSC_VER) -#pragma warning(pop) -#endif /* _MSC_VER */ - #include /**/ "ace/post.h" #endif /* TAO_FT_SERVERORB_INITIALIZER_H */ diff --git a/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_ServerPolicy_i.h b/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_ServerPolicy_i.h index 34ac0eabd2a..106af4e2fbb 100644 --- a/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_ServerPolicy_i.h +++ b/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_ServerPolicy_i.h @@ -16,12 +16,6 @@ #include /**/ "ace/pre.h" #include "orbsvcs/FT_CORBA_ORBC.h" - -#if defined(_MSC_VER) -#pragma warning(push) -#pragma warning(disable:4250) -#endif /* _MSC_VER */ - #include "orbsvcs/FaultTolerance/FT_ServerORB_export.h" #include "tao/LocalObject.h" @@ -74,10 +68,6 @@ private: TAO_END_VERSIONED_NAMESPACE_DECL -#if defined(_MSC_VER) -#pragma warning(pop) -#endif /* _MSC_VER */ - #if defined (__ACE_INLINE__) #include "orbsvcs/FaultTolerance/FT_ServerPolicy_i.inl" #endif /* __ACE_INLINE__ */ diff --git a/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_Service_Callbacks.cpp b/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_Service_Callbacks.cpp index 02dec8e7aaa..16ada0ae26e 100644 --- a/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_Service_Callbacks.cpp +++ b/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_Service_Callbacks.cpp @@ -19,17 +19,12 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_FT_Service_Callbacks::TAO_FT_Service_Callbacks (TAO_ORB_Core *orb_core) - : orb_core_ (orb_core), - profile_lock_ (0) + : orb_core_ (orb_core) { - this->profile_lock_ = - this->orb_core_->client_factory ()->create_profile_lock (); } TAO_FT_Service_Callbacks::~TAO_FT_Service_Callbacks (void) { - // Delete the memeory for the lock - delete this->profile_lock_; } CORBA::Boolean @@ -203,7 +198,7 @@ TAO_FT_Service_Callbacks::is_permanent_forward_condition (const CORBA::Object_pt sc.context_id = IOP::FT_GROUP_VERSION; if (service_context.get_context (sc) == 0) - return false; /* false */ + return false; IOP::TaggedComponent tc; tc.tag = IOP::TAG_FT_GROUP; @@ -213,9 +208,9 @@ TAO_FT_Service_Callbacks::is_permanent_forward_condition (const CORBA::Object_pt if (stub->forward_profiles ()) { // set lock, as forward_profiles might be deleted concurrently - ACE_MT (ACE_GUARD_RETURN (ACE_Lock, + ACE_MT (ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, guard, - *stub->profile_lock (), + stub->profile_lock (), 0)); // even now, the forward profiles might have been deleted in the meanwhile @@ -234,9 +229,9 @@ TAO_FT_Service_Callbacks::is_permanent_forward_condition (const CORBA::Object_pt if (tagged_components.get_component (tc) == 0) // releasing lock - return false; /* false */ + return false; - return true; /* true */ + return true; // releasing lock } diff --git a/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_Service_Callbacks.h b/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_Service_Callbacks.h index de694bb723c..d2685042f83 100644 --- a/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_Service_Callbacks.h +++ b/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_Service_Callbacks.h @@ -50,7 +50,7 @@ public: virtual ~TAO_FT_Service_Callbacks (void); /// Select the profile from MProfile as the needs of the services - /// may be. Return the profile in <pfile> + /// may be. Return the profile in @a pfile virtual CORBA::Boolean select_profile (const TAO_MProfile &mprofile, TAO_Profile *&pfile); @@ -97,10 +97,6 @@ private: private: /// The ORB core in which we have been activated TAO_ORB_Core *orb_core_; - - /// Mutex to protect access to the profile that gets passed along - /// @@ Lock needs to be removed... - ACE_Lock* profile_lock_; }; TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Endpoint.h b/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Endpoint.h index 210d705eb9c..af1ca4bdf61 100644 --- a/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Endpoint.h +++ b/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Endpoint.h @@ -85,8 +85,8 @@ namespace TAO /// Makes a copy of <this> virtual TAO_Endpoint *duplicate (void); - /// Return true if this endpoint is equivalent to <other_endpoint>. Two - /// endpoints are equivalent iff their port and host are the same. + /// Return true if this endpoint is equivalent to @a other_endpoint. Two + /// endpoints are equivalent if their port and host are the same. CORBA::Boolean is_equivalent (const TAO_Endpoint *other_endpoint); /// Return a hash value for this object. @@ -103,7 +103,7 @@ namespace TAO /// ownership of this string. const char *host (void) const; - /// Copy the string <h> into <host_> and return the resulting pointer. + /// Copy the string @a h into <host_> and return the resulting pointer. /// This object maintains ownership of this string. const char *host (const char *h); @@ -117,7 +117,7 @@ namespace TAO /// ownership of this string. const char *htid (void) const; - /// Copy the string <h> into <host_> and return the resulting pointer. + /// Copy the string @a h into <host_> and return the resulting pointer. /// This object maintains ownership of this string. const char *htid (const char *h); diff --git a/TAO/orbsvcs/orbsvcs/Naming/Naming_Context_Interface.cpp b/TAO/orbsvcs/orbsvcs/Naming/Naming_Context_Interface.cpp index d01a51f75f4..df5cb7b77e7 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/Naming_Context_Interface.cpp +++ b/TAO/orbsvcs/orbsvcs/Naming/Naming_Context_Interface.cpp @@ -332,7 +332,7 @@ TAO_Naming_Context::to_url_is_alnum_or_punctuation (char c) if (ACE_OS::ace_isalnum (c)) return 1; - // NON US-ASCII charcters excluding those in this array are the + // NON US-ASCII characters excluding those in this array are the // characters that need to be escaped static char non_escaped_punctuation[] = { ';', '/', ':', '?', '@', '=', '+', '$', ',', '-', diff --git a/TAO/orbsvcs/orbsvcs/Naming/Persistent_Context_Index.cpp b/TAO/orbsvcs/orbsvcs/Naming/Persistent_Context_Index.cpp index 70f6caf7b04..34b74c6b5de 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/Persistent_Context_Index.cpp +++ b/TAO/orbsvcs/orbsvcs/Naming/Persistent_Context_Index.cpp @@ -238,15 +238,7 @@ TAO_Persistent_Context_Index::create_index (void) return -1; } -#if !defined (CHORUS) ACE_MMAP_Memory_Pool::OPTIONS options (base_address_); -#else - // Use base address == 0, don't use a fixed address. - ACE_MMAP_Memory_Pool::OPTIONS options (0, - 0, - 0, - ACE_CHORUS_LOCAL_NAME_SPACE_T_SIZE); -#endif /* CHORUS */ // Create the allocator with the appropriate options. The name used // for the lock is the same as one used for the file. diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Acceptor.h b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Acceptor.h index 59c1270b87b..e66f18ff5a7 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Acceptor.h +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Acceptor.h @@ -34,7 +34,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -// TAO UIPMC_Acceptor concrete call defination +// TAO UIPMC_Acceptor concrete call definition /** * @class TAO_UIPMC_Acceptor diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Endpoint.h b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Endpoint.h index 5402b4dad28..e4c0b82097e 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Endpoint.h +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Endpoint.h @@ -64,8 +64,8 @@ public: /// Makes a copy of <this> virtual TAO_Endpoint *duplicate (void); - /// Return true if this endpoint is equivalent to <other_endpoint>. Two - /// endpoints are equivalent iff their port and host are the same. + /// Return true if this endpoint is equivalent to @a other_endpoint. Two + /// endpoints are equivalent if their port and host are the same. CORBA::Boolean is_equivalent (const TAO_Endpoint *other_endpoint); /// Return a hash value for this object. diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Endpoint.h b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Endpoint.h index aa860e89bca..694f530f58b 100644 --- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Endpoint.h +++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Endpoint.h @@ -234,7 +234,7 @@ namespace TAO /** * Return true if this endpoint is equivalent to @param * other_endpoint. - * Two synthetic endpoints are equivalent iff their iiop counterparts are + * Two synthetic endpoints are equivalent if their iiop counterparts are * equivalent, and, if both have non-zero ssl ports, their ssl * ports are the same. */ diff --git a/TAO/orbsvcs/performance-tests/LoadBalancing/LBPerf/CPU/svc.conf.xml b/TAO/orbsvcs/performance-tests/LoadBalancing/LBPerf/CPU/svc.conf.xml index 5b2a58bb6f0..51612b28d17 100644 --- a/TAO/orbsvcs/performance-tests/LoadBalancing/LBPerf/CPU/svc.conf.xml +++ b/TAO/orbsvcs/performance-tests/LoadBalancing/LBPerf/CPU/svc.conf.xml @@ -5,6 +5,6 @@ <!-- $Id$ --> <!-- --> <static id="Advanced_Resource_Factory" params="-ORBReactorMaskSignals 0 -ORBInputCDRAllocator null -ORBReactorType select_st -ORBConnectionCacheLock null"/> - <static id="Server_Strategy_Factory" params="-ORBPOALock null -ORBAllowReactivationOfSystemids 0"/> - <static id="Client_Strategy_Factory" params="-ORBTransportMuxStrategy EXCLUSIVE -ORBProfileLock null -ORBClientConnectionHandler RW"/> + <static id="Server_Strategy_Factory" params="-ORBAllowReactivationOfSystemids 0"/> + <static id="Client_Strategy_Factory" params="-ORBTransportMuxStrategy EXCLUSIVE -ORBClientConnectionHandler RW"/> </ACE_Svc_Conf> diff --git a/TAO/orbsvcs/performance-tests/LoadBalancing/LBPerf/RPS/svc.conf b/TAO/orbsvcs/performance-tests/LoadBalancing/LBPerf/RPS/svc.conf index 9e0c5ed01ed..40babaf2989 100644 --- a/TAO/orbsvcs/performance-tests/LoadBalancing/LBPerf/RPS/svc.conf +++ b/TAO/orbsvcs/performance-tests/LoadBalancing/LBPerf/RPS/svc.conf @@ -2,5 +2,5 @@ # $Id$ # static Advanced_Resource_Factory "-ORBReactorMaskSignals 0 -ORBInputCDRAllocator null -ORBReactorType select_st -ORBConnectionCacheLock null" -static Server_Strategy_Factory "-ORBPOALock null -ORBAllowReactivationOfSystemids 0" -static Client_Strategy_Factory "-ORBTransportMuxStrategy EXCLUSIVE -ORBProfileLock null -ORBClientConnectionHandler RW" +static Server_Strategy_Factory "-ORBAllowReactivationOfSystemids 0" +static Client_Strategy_Factory "-ORBTransportMuxStrategy EXCLUSIVE -ORBClientConnectionHandler RW" diff --git a/TAO/orbsvcs/performance-tests/LoadBalancing/LBPerf/RPS/svc.conf.xml b/TAO/orbsvcs/performance-tests/LoadBalancing/LBPerf/RPS/svc.conf.xml index 5b2a58bb6f0..51612b28d17 100644 --- a/TAO/orbsvcs/performance-tests/LoadBalancing/LBPerf/RPS/svc.conf.xml +++ b/TAO/orbsvcs/performance-tests/LoadBalancing/LBPerf/RPS/svc.conf.xml @@ -5,6 +5,6 @@ <!-- $Id$ --> <!-- --> <static id="Advanced_Resource_Factory" params="-ORBReactorMaskSignals 0 -ORBInputCDRAllocator null -ORBReactorType select_st -ORBConnectionCacheLock null"/> - <static id="Server_Strategy_Factory" params="-ORBPOALock null -ORBAllowReactivationOfSystemids 0"/> - <static id="Client_Strategy_Factory" params="-ORBTransportMuxStrategy EXCLUSIVE -ORBProfileLock null -ORBClientConnectionHandler RW"/> + <static id="Server_Strategy_Factory" params="-ORBAllowReactivationOfSystemids 0"/> + <static id="Client_Strategy_Factory" params="-ORBTransportMuxStrategy EXCLUSIVE -ORBClientConnectionHandler RW"/> </ACE_Svc_Conf> diff --git a/TAO/orbsvcs/tests/AVStreams/Latency/svc.conf b/TAO/orbsvcs/tests/AVStreams/Latency/svc.conf index 55dab11ac36..580f3233481 100644 --- a/TAO/orbsvcs/tests/AVStreams/Latency/svc.conf +++ b/TAO/orbsvcs/tests/AVStreams/Latency/svc.conf @@ -1,5 +1,5 @@ # $Id$ # static Advanced_Resource_Factory "-ORBReactorType select_st -ORBInputCDRAllocator null -ORBConnectionCacheLock null" -static Server_Strategy_Factory "-ORBPOALock null -ORBAllowReactivationOfSystemids 0" -static Client_Strategy_Factory "-ORBProfileLock null -ORBClientConnectionHandler ST" +static Server_Strategy_Factory "-ORBAllowReactivationOfSystemids 0" +static Client_Strategy_Factory "-ORBClientConnectionHandler ST" diff --git a/TAO/orbsvcs/tests/AVStreams/Latency/svc.conf.xml b/TAO/orbsvcs/tests/AVStreams/Latency/svc.conf.xml index 5f7c667443f..0f0e38f5e02 100644 --- a/TAO/orbsvcs/tests/AVStreams/Latency/svc.conf.xml +++ b/TAO/orbsvcs/tests/AVStreams/Latency/svc.conf.xml @@ -4,6 +4,6 @@ <!-- $Id$ --> <!-- --> <static id="Advanced_Resource_Factory" params="-ORBReactorType select_st -ORBInputCDRAllocator null -ORBConnectionCacheLock null"/> - <static id="Server_Strategy_Factory" params="-ORBPOALock null -ORBAllowReactivationOfSystemids 0"/> - <static id="Client_Strategy_Factory" params="-ORBProfileLock null -ORBClientConnectionHandler ST"/> + <static id="Server_Strategy_Factory" params="-ORBAllowReactivationOfSystemids 0"/> + <static id="Client_Strategy_Factory" params="-ORBClientConnectionHandler ST"/> </ACE_Svc_Conf> diff --git a/TAO/orbsvcs/tests/AVStreams/Multicast/components_svc.conf b/TAO/orbsvcs/tests/AVStreams/Multicast/components_svc.conf index 4c6d9054999..fd70a6b6c7b 100644 --- a/TAO/orbsvcs/tests/AVStreams/Multicast/components_svc.conf +++ b/TAO/orbsvcs/tests/AVStreams/Multicast/components_svc.conf @@ -1,8 +1,8 @@ # $Id$ # #static Advanced_Resource_Factory "-ORBresources global -ORBReactorType select_st -ORBInputCDRAllocator null -ORBConnectionCacheLock null" -#static Server_Strategy_Factory "-ORBPOALock null -ORBAllowReactivationOfSystemids 0" -#static Client_Strategy_Factory "-ORBProfileLock null -ORBClientConnectionHandler ST" +#static Server_Strategy_Factory "-ORBAllowReactivationOfSystemids 0" +#static Client_Strategy_Factory "-ORBClientConnectionHandler ST" static Advanced_Resource_Factory "-ORBReactorType select_mt" diff --git a/TAO/orbsvcs/tests/AVStreams/Multicast/components_svc.conf.xml b/TAO/orbsvcs/tests/AVStreams/Multicast/components_svc.conf.xml index 4ddaaf0c147..705c51a7f77 100644 --- a/TAO/orbsvcs/tests/AVStreams/Multicast/components_svc.conf.xml +++ b/TAO/orbsvcs/tests/AVStreams/Multicast/components_svc.conf.xml @@ -4,7 +4,7 @@ <!-- $Id$ --> <!-- --> <!-- static Advanced_Resource_Factory "-ORBReactorType select_st -ORBInputCDRAllocator null -ORBConnectionCacheLock null" --> - <!-- static Server_Strategy_Factory "-ORBPOALock null -ORBAllowReactivationOfSystemids 0" --> - <!-- static Client_Strategy_Factory "-ORBProfileLock null -ORBClientConnectionHandler ST" --> + <!-- static Server_Strategy_Factory "-ORBAllowReactivationOfSystemids 0" --> + <!-- static Client_Strategy_Factory "-ORBClientConnectionHandler ST" --> <static id="Advanced_Resource_Factory" params="-ORBReactorType select_mt"/> </ACE_Svc_Conf> diff --git a/TAO/orbsvcs/tests/Bug_2377_Regression/svc.conf b/TAO/orbsvcs/tests/Bug_2377_Regression/svc.conf index 1510ade0e8f..3e410f289cd 100644 --- a/TAO/orbsvcs/tests/Bug_2377_Regression/svc.conf +++ b/TAO/orbsvcs/tests/Bug_2377_Regression/svc.conf @@ -1,5 +1,5 @@ dynamic UIPMC_Factory Service_Object * TAO_PortableGroup:_make_TAO_UIPMC_Protocol_Factory() "" static Resource_Factory "-ORBProtocolFactory IIOP_Factory -ORBProtocolFactory UIPMC_Factory" dynamic PortableGroup_Loader Service_Object * TAO_PortableGroup:_make_TAO_PortableGroup_Loader() "" -static Server_Strategy_Factory "-ORBConcurrency reactive -ORBPOALock thread -ORBAllowReactivationOfSystemids 1" -static Client_Strategy_Factory "-ORBProfileLock thread -ORBClientConnectionHandler MT" +static Server_Strategy_Factory "-ORBConcurrency reactive -ORBAllowReactivationOfSystemids 1" +static Client_Strategy_Factory "-ORBClientConnectionHandler MT" diff --git a/TAO/orbsvcs/tests/Bug_2615_Regression/Test.idl b/TAO/orbsvcs/tests/Bug_2615_Regression/Test.idl index 13acc187276..dc6d9c82e4e 100644 --- a/TAO/orbsvcs/tests/Bug_2615_Regression/Test.idl +++ b/TAO/orbsvcs/tests/Bug_2615_Regression/Test.idl @@ -13,11 +13,11 @@ module Test */ oneway void shutdown (); - // Lets make sure things are working + /// Lets make sure things are working void ping (); - // Calling this method returns true iff a FT request - // service context was received in the server + /// Calling this method returns true if a FT request + /// service context was received in the server boolean has_ft_request_service_context (); }; }; diff --git a/TAO/orbsvcs/tests/Bug_2925_Regression/svc.conf b/TAO/orbsvcs/tests/Bug_2925_Regression/svc.conf index 1510ade0e8f..3e410f289cd 100644 --- a/TAO/orbsvcs/tests/Bug_2925_Regression/svc.conf +++ b/TAO/orbsvcs/tests/Bug_2925_Regression/svc.conf @@ -1,5 +1,5 @@ dynamic UIPMC_Factory Service_Object * TAO_PortableGroup:_make_TAO_UIPMC_Protocol_Factory() "" static Resource_Factory "-ORBProtocolFactory IIOP_Factory -ORBProtocolFactory UIPMC_Factory" dynamic PortableGroup_Loader Service_Object * TAO_PortableGroup:_make_TAO_PortableGroup_Loader() "" -static Server_Strategy_Factory "-ORBConcurrency reactive -ORBPOALock thread -ORBAllowReactivationOfSystemids 1" -static Client_Strategy_Factory "-ORBProfileLock thread -ORBClientConnectionHandler MT" +static Server_Strategy_Factory "-ORBConcurrency reactive -ORBAllowReactivationOfSystemids 1" +static Client_Strategy_Factory "-ORBClientConnectionHandler MT" diff --git a/TAO/orbsvcs/tests/EC_MT_Mcast/svc.conf b/TAO/orbsvcs/tests/EC_MT_Mcast/svc.conf index c6fce32e1bc..4a5690653a3 100644 --- a/TAO/orbsvcs/tests/EC_MT_Mcast/svc.conf +++ b/TAO/orbsvcs/tests/EC_MT_Mcast/svc.conf @@ -1,5 +1,5 @@ # $Id$ static EC_Factory "-ECObserver basic -ECProxyPushConsumerCollection mt:copy_on_write:list -ECProxyPushSupplierCollection mt:copy_on_write:list -ECDispatching reactive -ECScheduling null -ECFiltering prefix -ECSupplierFiltering per-supplier" -static Client_Strategy_Factory "-ORBProfileLock thread -ORBClientConnectionHandler MT" -static Server_Strategy_Factory "-ORBConcurrency reactive -ORBPOALock thread" +static Client_Strategy_Factory "-ORBClientConnectionHandler MT" +static Server_Strategy_Factory "-ORBConcurrency reactive" static Advanced_Resource_Factory "-ORBReactorType tp -ORBInputCDRAllocator thread -ORBConnectionCacheLock thread" diff --git a/TAO/orbsvcs/tests/HTIOP/AMI/exclusive.conf b/TAO/orbsvcs/tests/HTIOP/AMI/exclusive.conf index 37d1ecd17d9..7df4f045924 100644 --- a/TAO/orbsvcs/tests/HTIOP/AMI/exclusive.conf +++ b/TAO/orbsvcs/tests/HTIOP/AMI/exclusive.conf @@ -4,6 +4,6 @@ dynamic HTIOP_Factory Service_Object * "-inside 1" static Client_Strategy_Factory - "-ORBTransportMuxStrategy EXCLUSIVE -ORBProfileLock null -ORBclientconnectionhandler ST" + "-ORBTransportMuxStrategy EXCLUSIVE -ORBclientconnectionhandler ST" static Resource_Factory "-ORBProtocolFactory HTIOP_Factory" diff --git a/TAO/orbsvcs/tests/HTIOP/AMI/muxed.conf b/TAO/orbsvcs/tests/HTIOP/AMI/muxed.conf index 99322cdc625..8d89b69d043 100644 --- a/TAO/orbsvcs/tests/HTIOP/AMI/muxed.conf +++ b/TAO/orbsvcs/tests/HTIOP/AMI/muxed.conf @@ -4,6 +4,6 @@ dynamic HTIOP_Factory Service_Object * "-inside 1" static Client_Strategy_Factory - "-ORBTransportMuxStrategy MUXED -ORBProfileLock null -ORBClientConnectionHandler ST" + "-ORBTransportMuxStrategy MUXED -ORBClientConnectionHandler ST" static Resource_Factory "-ORBProtocolFactory HTIOP_Factory" diff --git a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.cpp b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.cpp index 58a2da23934..b71c28d89de 100644 --- a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.cpp +++ b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.cpp @@ -164,7 +164,7 @@ Cubit_Client::Cubit_Client (int shutdown) { } -// Simple function that returns the substraction of 117 from the +// Simple function that returns the subtraction of 117 from the // parameter. int diff --git a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.h b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.h index 0c969d01ac9..39696deb2a4 100644 --- a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.h +++ b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.h @@ -57,7 +57,7 @@ public: private: int func (u_int i); - // Simple function that returns the substraction of 117 from the + // Simple function that returns the subtraction of 117 from the // parameter. int read_ior (const ACE_TCHAR *filename); diff --git a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/collocation/svc.conf b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/collocation/svc.conf index 6e5455e2499..ec5eb31b91b 100644 --- a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/collocation/svc.conf +++ b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/collocation/svc.conf @@ -3,5 +3,5 @@ # Please see $TAO_ROOT/docs/Options.html for details on these options. # static Advanced_Resource_Factory "-ORBReactorType select_st -ORBConnectionCacheLock null" -static Client_Strategy_Factory "-ORBProfileLock null -ORBClientConnectionHandler ST" -static Server_Strategy_Factory "-ORBConcurrency reactive -ORBPOALock null" +static Client_Strategy_Factory "-ORBClientConnectionHandler ST" +static Server_Strategy_Factory "-ORBConcurrency reactive" diff --git a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/collocation/svc.conf.xml b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/collocation/svc.conf.xml index 728b156ecc0..163ec651984 100644 --- a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/collocation/svc.conf.xml +++ b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/collocation/svc.conf.xml @@ -6,6 +6,6 @@ <!-- Please see $TAO_ROOT/docs/Options.html for details on these options. --> <!-- --> <static id="Advanced_Resource_Factory" params="-ORBReactorType select_st -ORBConnectionCacheLock null"/> - <static id="Client_Strategy_Factory" params="-ORBProfileLock null -ORBClientConnectionHandler ST"/> - <static id="Server_Strategy_Factory" params="-ORBConcurrency reactive -ORBPOALock null"/> + <static id="Client_Strategy_Factory" params="-ORBClientConnectionHandler ST"/> + <static id="Server_Strategy_Factory" params="-ORBConcurrency reactive"/> </ACE_Svc_Conf> diff --git a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.conf b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.conf index 2aa568bf9af..eb5b4dd1e30 100644 --- a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.conf +++ b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.conf @@ -4,6 +4,6 @@ # static Advanced_Resource_Factory "-ORBReactorType select_st -ORBInputCDRAllocator null -ORBConnectionCacheLock null -ORBFlushingStrategy blocking" -static Client_Strategy_Factory "-ORBProfileLock null -ORBClientConnectionHandler RW" -static Server_Strategy_Factory "-ORBConcurrency thread-per-connection -ORBPOALock thread -ORBAllowReactivationOfSystemids 0" +static Client_Strategy_Factory "-ORBClientConnectionHandler RW" +static Server_Strategy_Factory "-ORBConcurrency thread-per-connection -ORBAllowReactivationOfSystemids 0" diff --git a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.conf.xml b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.conf.xml index 239410f8b86..60269f5dee6 100644 --- a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.conf.xml +++ b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.conf.xml @@ -6,6 +6,6 @@ <!-- Please see $TAO_ROOT/docs/Options.html for details on these options. --> <!-- --> <static id="Advanced_Resource_Factory" params="-ORBReactorType select_st -ORBInputCDRAllocator null -ORBConnectionCacheLock null -ORBFlushingStrategy blocking"/> - <static id="Client_Strategy_Factory" params="-ORBProfileLock null -ORBClientConnectionHandler RW"/> - <static id="Server_Strategy_Factory" params="-ORBConcurrency thread-per-connection -ORBPOALock thread -ORBAllowReactivationOfSystemids 0"/> + <static id="Client_Strategy_Factory" params="-ORBClientConnectionHandler RW"/> + <static id="Server_Strategy_Factory" params="-ORBConcurrency thread-per-connection -ORBAllowReactivationOfSystemids 0"/> </ACE_Svc_Conf> diff --git a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.st_client.conf b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.st_client.conf index 56478215e3d..f96d9a39f74 100644 --- a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.st_client.conf +++ b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.st_client.conf @@ -4,4 +4,4 @@ # static Advanced_Resource_Factory "-ORBReactorType select_st -ORBInputCDRAllocator null -ORBConnectionCacheLock null" -static Client_Strategy_Factory "-ORBProfileLock null -ORBClientConnectionHandler RW" +static Client_Strategy_Factory "-ORBClientConnectionHandler RW" diff --git a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.st_client.conf.xml b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.st_client.conf.xml index cfde325a4c0..e26cbd04d3d 100644 --- a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.st_client.conf.xml +++ b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.st_client.conf.xml @@ -6,5 +6,5 @@ <!-- Please see $TAO_ROOT/docs/Options.html for details on these options. --> <!-- --> <static id="Advanced_Resource_Factory" params="-ORBReactorType select_st -ORBInputCDRAllocator null -ORBConnectionCacheLock null"/> - <static id="Client_Strategy_Factory" params="-ORBProfileLock null -ORBClientConnectionHandler RW"/> + <static id="Client_Strategy_Factory" params="-ORBClientConnectionHandler RW"/> </ACE_Svc_Conf> diff --git a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.st_server.conf b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.st_server.conf index 7482152738d..e406f816f5d 100644 --- a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.st_server.conf +++ b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.st_server.conf @@ -4,4 +4,4 @@ # static Advanced_Resource_Factory "-ORBReactorType select_st -ORBInputCDRAllocator null" -static Server_Strategy_Factory "-ORBPOALock null -ORBAllowReactivationOfSystemids 0" +static Server_Strategy_Factory "-ORBAllowReactivationOfSystemids 0" diff --git a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.st_server.conf.xml b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.st_server.conf.xml index c76b951b729..32ae378187c 100644 --- a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.st_server.conf.xml +++ b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.st_server.conf.xml @@ -6,5 +6,5 @@ <!-- Please see $TAO_ROOT/docs/Options.html for details on these options. --> <!-- --> <static id="Advanced_Resource_Factory" params="-ORBReactorType select_st -ORBInputCDRAllocator null"/> - <static id="Server_Strategy_Factory" params="-ORBPOALock null -ORBAllowReactivationOfSystemids 0"/> + <static id="Server_Strategy_Factory" params="-ORBAllowReactivationOfSystemids 0"/> </ACE_Svc_Conf> diff --git a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.zero_lock.conf b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.zero_lock.conf index d3d195dabce..2de29f90f01 100644 --- a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.zero_lock.conf +++ b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.zero_lock.conf @@ -8,5 +8,5 @@ # static Advanced_Resource_Factory "-ORBReactorType select_st -ORBInputCDRAllocator null -ORBConnectionCacheLock null" -static Client_Strategy_Factory "-ORBProfileLock null -ORBClientConnectionHandler RW" -static Server_Strategy_Factory "-ORBConcurrency thread-per-connection -ORBPOALock null -ORBAllowReactivationOfSystemids 0" +static Client_Strategy_Factory "-ORBClientConnectionHandler RW" +static Server_Strategy_Factory "-ORBConcurrency thread-per-connection -ORBAllowReactivationOfSystemids 0" diff --git a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.zero_lock.conf.xml b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.zero_lock.conf.xml index b876d3df416..20e85bd18d2 100644 --- a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.zero_lock.conf.xml +++ b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.zero_lock.conf.xml @@ -10,6 +10,6 @@ <!-- the only problems are on shutdown. --> <!-- --> <static id="Advanced_Resource_Factory" params="-ORBReactorType select_st -ORBInputCDRAllocator null -ORBConnectionCacheLock null"/> - <static id="Client_Strategy_Factory" params="-ORBProfileLock null -ORBClientConnectionHandler RW"/> - <static id="Server_Strategy_Factory" params="-ORBConcurrency thread-per-connection -ORBPOALock null -ORBAllowReactivationOfSystemids 0"/> + <static id="Client_Strategy_Factory" params="-ORBClientConnectionHandler RW"/> + <static id="Server_Strategy_Factory" params="-ORBConcurrency thread-per-connection -ORBAllowReactivationOfSystemids 0"/> </ACE_Svc_Conf> diff --git a/TAO/performance-tests/Cubit/TAO/MT_Cubit/Globals.h b/TAO/performance-tests/Cubit/TAO/MT_Cubit/Globals.h index 63b5a7940ad..fd18a5d03d7 100644 --- a/TAO/performance-tests/Cubit/TAO/MT_Cubit/Globals.h +++ b/TAO/performance-tests/Cubit/TAO/MT_Cubit/Globals.h @@ -62,15 +62,6 @@ ACE_Sched_Params::priority_max(ACE_SCHED_FIFO,ACE_SCOPE_THREAD) ACE_THR_PRI_FIFO_DEF + 25 #endif /* ! __Lynx__ */ -#if defined (CHORUS_MVME) -#define PCCTIMER_INIT {int pTime;/*Initialize the PCC timer chip */pccTimerInit ();\ -if (pccTimer (PCC2_TIMER1_START, &pTime) != K_OK)\ -ACE_DEBUG ((LM_DEBUG,"pccTimer has a pending benchmark\n"));\ -} -#else /* !CHORUS_MVME */ -#define PCCTIMER_INIT -#endif /* !CHORUS_MVME */ - #if defined (VXWORKS) && defined (FORCE_ARGS) static char *force_argv[]= { diff --git a/TAO/performance-tests/Cubit/TAO/MT_Cubit/Task_Client.h b/TAO/performance-tests/Cubit/TAO/MT_Cubit/Task_Client.h index f7c6a762c03..9d9e10b1f9c 100644 --- a/TAO/performance-tests/Cubit/TAO/MT_Cubit/Task_Client.h +++ b/TAO/performance-tests/Cubit/TAO/MT_Cubit/Task_Client.h @@ -38,12 +38,8 @@ #include "Globals.h" #include "Timer.h" -#if defined (CHORUS_MVME) -# include "pccTimer.h" -#endif /* CHORUS_MVME */ - // FUZZ: disable check_for_math_include -#if !defined (__KCC) && !defined (__xlC__) +#if !defined (__xlC__) // Some plaforms define an exception structure in math.h... # if defined (__GNUG__) // And some compilers have this workaround. Disable it with this diff --git a/TAO/performance-tests/Cubit/TAO/MT_Cubit/Timer.cpp b/TAO/performance-tests/Cubit/TAO/MT_Cubit/Timer.cpp index 80be1bd682c..33fd84ef56d 100644 --- a/TAO/performance-tests/Cubit/TAO/MT_Cubit/Timer.cpp +++ b/TAO/performance-tests/Cubit/TAO/MT_Cubit/Timer.cpp @@ -5,33 +5,20 @@ MT_Cubit_Timer::MT_Cubit_Timer (u_int granularity) :granularity_ (granularity) -#if defined (CHORUS_MVME) - , pstartTime_ (0) - , pstopTime_ (0) -#endif /* CHORUS_MVME */ { } void MT_Cubit_Timer::start (void) { -#if defined (CHORUS_MVME) - this->pstartTime_ = pccTime1Get(); -#else /* CHORUS_MVME */ this->timer_.start (); -#endif /* !CHORUS_MVME */ } void MT_Cubit_Timer::stop (void) { -#if defined (CHORUS_MVME) - this->pstopTime_ = pccTime1Get (); -#else /* CHORUS_MVME */ - // If CHORUS_MVME is not defined just use plain timer_.stop (). this->timer_.stop (); this->timer_.elapsed_time (this->delta_); -#endif /* !CHORUS_MVME */ } ACE_timer_t diff --git a/TAO/performance-tests/Cubit/TAO/MT_Cubit/Timer.h b/TAO/performance-tests/Cubit/TAO/MT_Cubit/Timer.h index 45c22dbb567..eb6931459a3 100644 --- a/TAO/performance-tests/Cubit/TAO/MT_Cubit/Timer.h +++ b/TAO/performance-tests/Cubit/TAO/MT_Cubit/Timer.h @@ -50,12 +50,6 @@ private: // This is the granularity of the timing of the CORBA requests. A // value of 5 represents that we will take time every 5 requests, // instead of the default of every request (1). - -#if defined (CHORUS_MVME) - // Variables for the pccTimer. - int pstartTime_; - int pstopTime_; -#endif /* CHORUS_MVME */ }; #endif /* _MT_CUBIT_TIMER_H */ diff --git a/TAO/performance-tests/Cubit/TAO/MT_Cubit/client.cpp b/TAO/performance-tests/Cubit/TAO/MT_Cubit/client.cpp index b1536bd8bbb..822032d3714 100644 --- a/TAO/performance-tests/Cubit/TAO/MT_Cubit/client.cpp +++ b/TAO/performance-tests/Cubit/TAO/MT_Cubit/client.cpp @@ -128,7 +128,6 @@ Client_i::init (int argc, ACE_TCHAR *argv[]) this->ts_->thread_count_ = ACE_OS::atoi (this->argv_[i+1]); } - PCCTIMER_INIT; return 0; } @@ -248,11 +247,7 @@ Client_i::output_latency (void) i++,iterator.advance ()) { ACE_OS::sprintf (buffer + ACE_OS::strlen (buffer), -#if defined (CHORUS_MVME) - "\t%u\n", -#else "\t%f\n", -#endif /* !CHORUS_MVME */ *latency); ACE_OS::fputs (buffer, latency_file_handle); @@ -295,11 +290,6 @@ Client_i::calc_util_time (void) // Execute one computation. timer.start (); -#if defined (CHORUS_MVME) - this->util_thread_->computation (); - timer.stop (); - this->util_task_duration_ = timer.get_elapsed (); -#else for (u_int i = 0; i < NUM_UTIL_COMPUTATIONS; ++i) @@ -307,7 +297,6 @@ Client_i::calc_util_time (void) timer.stop (); this->util_task_duration_ = timer.get_elapsed () / NUM_UTIL_COMPUTATIONS; -#endif /* !CHORUS_MVME */ } int @@ -534,18 +523,7 @@ Client_i::print_latency_stats (void) // it to Excel to calculate jitter, in the mean time we come up // with the sqrt() function. output_latency (); -#elif defined (CHORUS_MVME) - ACE_DEBUG ((LM_DEBUG, - "Test done.\n" - "High priority client latency : %u usec\n" - "Low priority client latency : %u usec\n", - this->high_priority_client_->get_high_priority_latency (), - this->low_priority_client_[0]->get_low_priority_latency () )); - // Output the latency values to a file, tab separated, to import - // it to Excel to calculate jitter, in the mean time we come up - // with the sqrt() function. - output_latency (); -#else /* !CHORUS_MVME */ +#else ACE_DEBUG ((LM_DEBUG, "Test done.\n" "High priority client latency : %f usec, jitter: %f usec\n" "Low priority client latency : %f usec, jitter: %f usec\n", @@ -554,8 +532,8 @@ Client_i::print_latency_stats (void) this->low_priority_client_[0]->get_low_priority_latency (), this->low_priority_client_[0]->get_low_priority_jitter ())); // output_latency (); -#endif /* !ACE_VXWORKS && !CHORUS_MVME */ } +#endif } void @@ -857,12 +835,5 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) // Run the tests. client.run (); -#if defined (CHORUS_MVME) - int pTime; - if (pccTimer (PCC2_TIMER1_STOP, - &pTime) != K_OK) - ACE_DEBUG ((LM_DEBUG, - "pccTimer has a pending bench mark\n")); -#endif /* CHORUS_MVME */ return 0; } diff --git a/TAO/performance-tests/Cubit/TAO/MT_Cubit/client.h b/TAO/performance-tests/Cubit/TAO/MT_Cubit/client.h index 0a6b5894a19..3cccca50c16 100644 --- a/TAO/performance-tests/Cubit/TAO/MT_Cubit/client.h +++ b/TAO/performance-tests/Cubit/TAO/MT_Cubit/client.h @@ -30,10 +30,6 @@ #include "Util_Thread.h" #include "Timer.h" -#if defined (CHORUS_MVME) -#include "pccTimer.h" -#endif /* CHORUS_MVME */ - #if defined (VME_DRIVER) #include <hostLib.h> extern "C" STATUS vmeDrv (void); diff --git a/TAO/performance-tests/Cubit/TAO/MT_Cubit/svc.conf b/TAO/performance-tests/Cubit/TAO/MT_Cubit/svc.conf index bb4034051b9..2bdce0c3f02 100644 --- a/TAO/performance-tests/Cubit/TAO/MT_Cubit/svc.conf +++ b/TAO/performance-tests/Cubit/TAO/MT_Cubit/svc.conf @@ -4,5 +4,5 @@ # static Advanced_Resource_Factory "-ORBInputCDRAllocator null -ORBConnectionCacheLock null" -static Client_Strategy_Factory "-ORBProfileLock null -ORBClientConnectionHandler RW" -static Server_Strategy_Factory "-ORBConcurrency thread-per-connection -ORBPOALock null -ORBAllowReactivationOfSystemids 0" +static Client_Strategy_Factory "-ORBClientConnectionHandler RW" +static Server_Strategy_Factory "-ORBConcurrency thread-per-connection -ORBAllowReactivationOfSystemids 0" diff --git a/TAO/performance-tests/Cubit/TAO/MT_Cubit/svc.conf.xml b/TAO/performance-tests/Cubit/TAO/MT_Cubit/svc.conf.xml index 3d76eda6597..73ad6ac6461 100644 --- a/TAO/performance-tests/Cubit/TAO/MT_Cubit/svc.conf.xml +++ b/TAO/performance-tests/Cubit/TAO/MT_Cubit/svc.conf.xml @@ -6,6 +6,6 @@ <!-- Please see $TAO_ROOT/docs/Options.html for details on these options. --> <!-- --> <static id="Advanced_Resource_Factory" params="-ORBInputCDRAllocator null -ORBConnectionCacheLock null"/> - <static id="Client_Strategy_Factory" params="-ORBProfileLock null -ORBClientConnectionHandler RW"/> - <static id="Server_Strategy_Factory" params="-ORBConcurrency thread-per-connection -ORBPOALock null -ORBAllowReactivationOfSystemids 0"/> + <static id="Client_Strategy_Factory" params="-ORBClientConnectionHandler RW"/> + <static id="Server_Strategy_Factory" params="-ORBConcurrency thread-per-connection -ORBAllowReactivationOfSystemids 0"/> </ACE_Svc_Conf> diff --git a/TAO/performance-tests/Latency/Collocation/svc.conf b/TAO/performance-tests/Latency/Collocation/svc.conf index 9e0c5ed01ed..40babaf2989 100644 --- a/TAO/performance-tests/Latency/Collocation/svc.conf +++ b/TAO/performance-tests/Latency/Collocation/svc.conf @@ -2,5 +2,5 @@ # $Id$ # static Advanced_Resource_Factory "-ORBReactorMaskSignals 0 -ORBInputCDRAllocator null -ORBReactorType select_st -ORBConnectionCacheLock null" -static Server_Strategy_Factory "-ORBPOALock null -ORBAllowReactivationOfSystemids 0" -static Client_Strategy_Factory "-ORBTransportMuxStrategy EXCLUSIVE -ORBProfileLock null -ORBClientConnectionHandler RW" +static Server_Strategy_Factory "-ORBAllowReactivationOfSystemids 0" +static Client_Strategy_Factory "-ORBTransportMuxStrategy EXCLUSIVE -ORBClientConnectionHandler RW" diff --git a/TAO/performance-tests/Latency/DII/svc.conf b/TAO/performance-tests/Latency/DII/svc.conf index 557c16b5caf..1b3ec40e989 100644 --- a/TAO/performance-tests/Latency/DII/svc.conf +++ b/TAO/performance-tests/Latency/DII/svc.conf @@ -2,5 +2,5 @@ # $Id$ # static Advanced_Resource_Factory "-ORBReactorMaskSignals 0 -ORBInputCDRAllocator null -ORBReactorType select_st -ORBConnectionCacheLock null" -static Server_Strategy_Factory "-ORBPOALock null -ORBAllowReactivationOfSystemids 0" -static Client_Strategy_Factory "-ORBProfileLock null -ORBClientConnectionHandler RW" +static Server_Strategy_Factory "-ORBAllowReactivationOfSystemids 0" +static Client_Strategy_Factory "-ORBClientConnectionHandler RW" diff --git a/TAO/performance-tests/Latency/DII/svc.conf.xml b/TAO/performance-tests/Latency/DII/svc.conf.xml index 7188391fbb8..c10d08fced6 100644 --- a/TAO/performance-tests/Latency/DII/svc.conf.xml +++ b/TAO/performance-tests/Latency/DII/svc.conf.xml @@ -5,6 +5,6 @@ <!-- $Id$ --> <!-- --> <static id="Advanced_Resource_Factory" params="-ORBReactorMaskSignals 0 -ORBInputCDRAllocator null -ORBReactorType select_st -ORBConnectionCacheLock null"/> - <static id="Server_Strategy_Factory" params="-ORBPOALock null -ORBAllowReactivationOfSystemids 0"/> - <static id="Client_Strategy_Factory" params="-ORBProfileLock null -ORBClientConnectionHandler RW"/> + <static id="Server_Strategy_Factory" params="-ORBAllowReactivationOfSystemids 0"/> + <static id="Client_Strategy_Factory" params="-ORBClientConnectionHandler RW"/> </ACE_Svc_Conf> diff --git a/TAO/performance-tests/Latency/DSI/svc.conf b/TAO/performance-tests/Latency/DSI/svc.conf index 557c16b5caf..1b3ec40e989 100644 --- a/TAO/performance-tests/Latency/DSI/svc.conf +++ b/TAO/performance-tests/Latency/DSI/svc.conf @@ -2,5 +2,5 @@ # $Id$ # static Advanced_Resource_Factory "-ORBReactorMaskSignals 0 -ORBInputCDRAllocator null -ORBReactorType select_st -ORBConnectionCacheLock null" -static Server_Strategy_Factory "-ORBPOALock null -ORBAllowReactivationOfSystemids 0" -static Client_Strategy_Factory "-ORBProfileLock null -ORBClientConnectionHandler RW" +static Server_Strategy_Factory "-ORBAllowReactivationOfSystemids 0" +static Client_Strategy_Factory "-ORBClientConnectionHandler RW" diff --git a/TAO/performance-tests/Latency/DSI/svc.conf.xml b/TAO/performance-tests/Latency/DSI/svc.conf.xml index d35a5ac7473..24c49a25937 100644 --- a/TAO/performance-tests/Latency/DSI/svc.conf.xml +++ b/TAO/performance-tests/Latency/DSI/svc.conf.xml @@ -5,6 +5,6 @@ <!-- $Id$ --> <!-- --> <static id="Advanced_Resource_Factory" params="-ORBReactorMaskSignals 0 -ORBInputCDRAllocator null -ORBReactorType select_st -ORBConnectionCacheLock null"/> - <static id="Server_Strategy_Factory" params="-ORBPOALock null -ORBAllowReactivationOfSystemids 0"/> - <static id="Client_Strategy_Factory" params="-ORBProfileLock null -ORBClientConnectionHandler RW"/> + <static id="Server_Strategy_Factory" params="-ORBAllowReactivationOfSystemids 0"/> + <static id="Client_Strategy_Factory" params="-ORBClientConnectionHandler RW"/> </ACE_Svc_Conf> diff --git a/TAO/performance-tests/Latency/Deferred/svc.conf b/TAO/performance-tests/Latency/Deferred/svc.conf index c15a02cf58f..ee3d894e6d1 100644 --- a/TAO/performance-tests/Latency/Deferred/svc.conf +++ b/TAO/performance-tests/Latency/Deferred/svc.conf @@ -2,5 +2,4 @@ # $Id$ # static Advanced_Resource_Factory "-ORBReactorMaskSignals 0 -ORBInputCDRAllocator null -ORBReactorType select_st -ORBConnectionCacheLock null" -static Server_Strategy_Factory "-ORBPOALock null -ORBAllowReactivationOfSystemids 0" -static Client_Strategy_Factory "-ORBProfileLock null" +static Server_Strategy_Factory "-ORBAllowReactivationOfSystemids 0" diff --git a/TAO/performance-tests/Latency/Deferred/svc.conf.xml b/TAO/performance-tests/Latency/Deferred/svc.conf.xml index a9d9071cbd8..441a106aacf 100644 --- a/TAO/performance-tests/Latency/Deferred/svc.conf.xml +++ b/TAO/performance-tests/Latency/Deferred/svc.conf.xml @@ -5,6 +5,5 @@ <!-- $Id$ --> <!-- --> <static id="Advanced_Resource_Factory" params="-ORBReactorMaskSignals 0 -ORBInputCDRAllocator null -ORBReactorType select_st -ORBConnectionCacheLock null"/> - <static id="Server_Strategy_Factory" params="-ORBPOALock null -ORBAllowReactivationOfSystemids 0"/> - <static id="Client_Strategy_Factory" params="-ORBProfileLock null"/> + <static id="Server_Strategy_Factory" params="-ORBAllowReactivationOfSystemids 0"/> </ACE_Svc_Conf> diff --git a/TAO/performance-tests/Latency/Single_Threaded/svc.conf b/TAO/performance-tests/Latency/Single_Threaded/svc.conf index 9e0c5ed01ed..40babaf2989 100644 --- a/TAO/performance-tests/Latency/Single_Threaded/svc.conf +++ b/TAO/performance-tests/Latency/Single_Threaded/svc.conf @@ -2,5 +2,5 @@ # $Id$ # static Advanced_Resource_Factory "-ORBReactorMaskSignals 0 -ORBInputCDRAllocator null -ORBReactorType select_st -ORBConnectionCacheLock null" -static Server_Strategy_Factory "-ORBPOALock null -ORBAllowReactivationOfSystemids 0" -static Client_Strategy_Factory "-ORBTransportMuxStrategy EXCLUSIVE -ORBProfileLock null -ORBClientConnectionHandler RW" +static Server_Strategy_Factory "-ORBAllowReactivationOfSystemids 0" +static Client_Strategy_Factory "-ORBTransportMuxStrategy EXCLUSIVE -ORBClientConnectionHandler RW" diff --git a/TAO/performance-tests/Latency/Single_Threaded/svc.conf.xml b/TAO/performance-tests/Latency/Single_Threaded/svc.conf.xml index 5b2a58bb6f0..51612b28d17 100644 --- a/TAO/performance-tests/Latency/Single_Threaded/svc.conf.xml +++ b/TAO/performance-tests/Latency/Single_Threaded/svc.conf.xml @@ -5,6 +5,6 @@ <!-- $Id$ --> <!-- --> <static id="Advanced_Resource_Factory" params="-ORBReactorMaskSignals 0 -ORBInputCDRAllocator null -ORBReactorType select_st -ORBConnectionCacheLock null"/> - <static id="Server_Strategy_Factory" params="-ORBPOALock null -ORBAllowReactivationOfSystemids 0"/> - <static id="Client_Strategy_Factory" params="-ORBTransportMuxStrategy EXCLUSIVE -ORBProfileLock null -ORBClientConnectionHandler RW"/> + <static id="Server_Strategy_Factory" params="-ORBAllowReactivationOfSystemids 0"/> + <static id="Client_Strategy_Factory" params="-ORBTransportMuxStrategy EXCLUSIVE -ORBClientConnectionHandler RW"/> </ACE_Svc_Conf> diff --git a/TAO/performance-tests/RTCorba/Multiple_Endpoints/Orb_Per_Priority/server.conf b/TAO/performance-tests/RTCorba/Multiple_Endpoints/Orb_Per_Priority/server.conf index e51746649af..7d577fed52b 100644 --- a/TAO/performance-tests/RTCorba/Multiple_Endpoints/Orb_Per_Priority/server.conf +++ b/TAO/performance-tests/RTCorba/Multiple_Endpoints/Orb_Per_Priority/server.conf @@ -2,6 +2,6 @@ # static Advanced_Resource_Factory "-ORBReactorType select_st -ORBInputCDRAllocator null" -static Server_Strategy_Factory "-ORBPOALock null -ORBAllowReactivationOfSystemids 0" +static Server_Strategy_Factory "-ORBAllowReactivationOfSystemids 0" static RT_ORB_Loader "-ORBSchedPolicy SCHED_FIFO -ORBPriorityMapping direct" diff --git a/TAO/performance-tests/RTCorba/Multiple_Endpoints/Orb_Per_Priority/server.conf.xml b/TAO/performance-tests/RTCorba/Multiple_Endpoints/Orb_Per_Priority/server.conf.xml index 751f637a827..7fa80454210 100644 --- a/TAO/performance-tests/RTCorba/Multiple_Endpoints/Orb_Per_Priority/server.conf.xml +++ b/TAO/performance-tests/RTCorba/Multiple_Endpoints/Orb_Per_Priority/server.conf.xml @@ -4,6 +4,6 @@ <!-- $Id$ --> <!-- --> <static id="Advanced_Resource_Factory" params="-ORBReactorType select_st -ORBInputCDRAllocator null"/> - <static id="Server_Strategy_Factory" params="-ORBPOALock null -ORBAllowReactivationOfSystemids 0"/> + <static id="Server_Strategy_Factory" params="-ORBAllowReactivationOfSystemids 0"/> <static id="RT_ORB_Loader" params="-ORBSchedPolicy SCHED_FIFO -ORBPriorityMapping direct"/> </ACE_Svc_Conf> diff --git a/TAO/performance-tests/Sequence_Latency/DII/svc.conf b/TAO/performance-tests/Sequence_Latency/DII/svc.conf index 557c16b5caf..1b3ec40e989 100644 --- a/TAO/performance-tests/Sequence_Latency/DII/svc.conf +++ b/TAO/performance-tests/Sequence_Latency/DII/svc.conf @@ -2,5 +2,5 @@ # $Id$ # static Advanced_Resource_Factory "-ORBReactorMaskSignals 0 -ORBInputCDRAllocator null -ORBReactorType select_st -ORBConnectionCacheLock null" -static Server_Strategy_Factory "-ORBPOALock null -ORBAllowReactivationOfSystemids 0" -static Client_Strategy_Factory "-ORBProfileLock null -ORBClientConnectionHandler RW" +static Server_Strategy_Factory "-ORBAllowReactivationOfSystemids 0" +static Client_Strategy_Factory "-ORBClientConnectionHandler RW" diff --git a/TAO/performance-tests/Sequence_Latency/DII/svc.conf.xml b/TAO/performance-tests/Sequence_Latency/DII/svc.conf.xml index 7188391fbb8..c10d08fced6 100644 --- a/TAO/performance-tests/Sequence_Latency/DII/svc.conf.xml +++ b/TAO/performance-tests/Sequence_Latency/DII/svc.conf.xml @@ -5,6 +5,6 @@ <!-- $Id$ --> <!-- --> <static id="Advanced_Resource_Factory" params="-ORBReactorMaskSignals 0 -ORBInputCDRAllocator null -ORBReactorType select_st -ORBConnectionCacheLock null"/> - <static id="Server_Strategy_Factory" params="-ORBPOALock null -ORBAllowReactivationOfSystemids 0"/> - <static id="Client_Strategy_Factory" params="-ORBProfileLock null -ORBClientConnectionHandler RW"/> + <static id="Server_Strategy_Factory" params="-ORBAllowReactivationOfSystemids 0"/> + <static id="Client_Strategy_Factory" params="-ORBClientConnectionHandler RW"/> </ACE_Svc_Conf> diff --git a/TAO/performance-tests/Sequence_Latency/DSI/svc.conf b/TAO/performance-tests/Sequence_Latency/DSI/svc.conf index 557c16b5caf..1b3ec40e989 100644 --- a/TAO/performance-tests/Sequence_Latency/DSI/svc.conf +++ b/TAO/performance-tests/Sequence_Latency/DSI/svc.conf @@ -2,5 +2,5 @@ # $Id$ # static Advanced_Resource_Factory "-ORBReactorMaskSignals 0 -ORBInputCDRAllocator null -ORBReactorType select_st -ORBConnectionCacheLock null" -static Server_Strategy_Factory "-ORBPOALock null -ORBAllowReactivationOfSystemids 0" -static Client_Strategy_Factory "-ORBProfileLock null -ORBClientConnectionHandler RW" +static Server_Strategy_Factory "-ORBAllowReactivationOfSystemids 0" +static Client_Strategy_Factory "-ORBClientConnectionHandler RW" diff --git a/TAO/performance-tests/Sequence_Latency/DSI/svc.conf.xml b/TAO/performance-tests/Sequence_Latency/DSI/svc.conf.xml index d35a5ac7473..24c49a25937 100644 --- a/TAO/performance-tests/Sequence_Latency/DSI/svc.conf.xml +++ b/TAO/performance-tests/Sequence_Latency/DSI/svc.conf.xml @@ -5,6 +5,6 @@ <!-- $Id$ --> <!-- --> <static id="Advanced_Resource_Factory" params="-ORBReactorMaskSignals 0 -ORBInputCDRAllocator null -ORBReactorType select_st -ORBConnectionCacheLock null"/> - <static id="Server_Strategy_Factory" params="-ORBPOALock null -ORBAllowReactivationOfSystemids 0"/> - <static id="Client_Strategy_Factory" params="-ORBProfileLock null -ORBClientConnectionHandler RW"/> + <static id="Server_Strategy_Factory" params="-ORBAllowReactivationOfSystemids 0"/> + <static id="Client_Strategy_Factory" params="-ORBClientConnectionHandler RW"/> </ACE_Svc_Conf> diff --git a/TAO/performance-tests/Sequence_Latency/Deferred/svc.conf b/TAO/performance-tests/Sequence_Latency/Deferred/svc.conf index c15a02cf58f..ee3d894e6d1 100644 --- a/TAO/performance-tests/Sequence_Latency/Deferred/svc.conf +++ b/TAO/performance-tests/Sequence_Latency/Deferred/svc.conf @@ -2,5 +2,4 @@ # $Id$ # static Advanced_Resource_Factory "-ORBReactorMaskSignals 0 -ORBInputCDRAllocator null -ORBReactorType select_st -ORBConnectionCacheLock null" -static Server_Strategy_Factory "-ORBPOALock null -ORBAllowReactivationOfSystemids 0" -static Client_Strategy_Factory "-ORBProfileLock null" +static Server_Strategy_Factory "-ORBAllowReactivationOfSystemids 0" diff --git a/TAO/performance-tests/Sequence_Latency/Deferred/svc.conf.xml b/TAO/performance-tests/Sequence_Latency/Deferred/svc.conf.xml index a9d9071cbd8..441a106aacf 100644 --- a/TAO/performance-tests/Sequence_Latency/Deferred/svc.conf.xml +++ b/TAO/performance-tests/Sequence_Latency/Deferred/svc.conf.xml @@ -5,6 +5,5 @@ <!-- $Id$ --> <!-- --> <static id="Advanced_Resource_Factory" params="-ORBReactorMaskSignals 0 -ORBInputCDRAllocator null -ORBReactorType select_st -ORBConnectionCacheLock null"/> - <static id="Server_Strategy_Factory" params="-ORBPOALock null -ORBAllowReactivationOfSystemids 0"/> - <static id="Client_Strategy_Factory" params="-ORBProfileLock null"/> + <static id="Server_Strategy_Factory" params="-ORBAllowReactivationOfSystemids 0"/> </ACE_Svc_Conf> diff --git a/TAO/performance-tests/Sequence_Latency/Single_Threaded/svc.conf b/TAO/performance-tests/Sequence_Latency/Single_Threaded/svc.conf index 9e0c5ed01ed..40babaf2989 100644 --- a/TAO/performance-tests/Sequence_Latency/Single_Threaded/svc.conf +++ b/TAO/performance-tests/Sequence_Latency/Single_Threaded/svc.conf @@ -2,5 +2,5 @@ # $Id$ # static Advanced_Resource_Factory "-ORBReactorMaskSignals 0 -ORBInputCDRAllocator null -ORBReactorType select_st -ORBConnectionCacheLock null" -static Server_Strategy_Factory "-ORBPOALock null -ORBAllowReactivationOfSystemids 0" -static Client_Strategy_Factory "-ORBTransportMuxStrategy EXCLUSIVE -ORBProfileLock null -ORBClientConnectionHandler RW" +static Server_Strategy_Factory "-ORBAllowReactivationOfSystemids 0" +static Client_Strategy_Factory "-ORBTransportMuxStrategy EXCLUSIVE -ORBClientConnectionHandler RW" diff --git a/TAO/performance-tests/Sequence_Latency/Single_Threaded/svc.conf.xml b/TAO/performance-tests/Sequence_Latency/Single_Threaded/svc.conf.xml index 5b2a58bb6f0..51612b28d17 100644 --- a/TAO/performance-tests/Sequence_Latency/Single_Threaded/svc.conf.xml +++ b/TAO/performance-tests/Sequence_Latency/Single_Threaded/svc.conf.xml @@ -5,6 +5,6 @@ <!-- $Id$ --> <!-- --> <static id="Advanced_Resource_Factory" params="-ORBReactorMaskSignals 0 -ORBInputCDRAllocator null -ORBReactorType select_st -ORBConnectionCacheLock null"/> - <static id="Server_Strategy_Factory" params="-ORBPOALock null -ORBAllowReactivationOfSystemids 0"/> - <static id="Client_Strategy_Factory" params="-ORBTransportMuxStrategy EXCLUSIVE -ORBProfileLock null -ORBClientConnectionHandler RW"/> + <static id="Server_Strategy_Factory" params="-ORBAllowReactivationOfSystemids 0"/> + <static id="Client_Strategy_Factory" params="-ORBTransportMuxStrategy EXCLUSIVE -ORBClientConnectionHandler RW"/> </ACE_Svc_Conf> diff --git a/TAO/performance-tests/Throughput/svc.conf b/TAO/performance-tests/Throughput/svc.conf index 0804ab1486e..d389aa68c95 100644 --- a/TAO/performance-tests/Throughput/svc.conf +++ b/TAO/performance-tests/Throughput/svc.conf @@ -4,5 +4,5 @@ # static Advanced_Resource_Factory "-ORBInputCDRAllocator null -ORBReactorType select_st -ORBReactorMaskSignals 0 -ORBConnectionCacheLock null -ORBFlushingStrategy blocking" -static Client_Strategy_Factory "-ORBProfileLock null -ORBClientConnectionHandler RW" -static Server_Strategy_Factory "-ORBPOALock null -ORBAllowReactivationOfSystemids 0" +static Client_Strategy_Factory "-ORBClientConnectionHandler RW" +static Server_Strategy_Factory "-ORBAllowReactivationOfSystemids 0" diff --git a/TAO/performance-tests/Throughput/svc.conf.xml b/TAO/performance-tests/Throughput/svc.conf.xml index 32eb197be90..e3cd786d2cc 100644 --- a/TAO/performance-tests/Throughput/svc.conf.xml +++ b/TAO/performance-tests/Throughput/svc.conf.xml @@ -6,6 +6,6 @@ <!-- Please see $TAO_ROOT/docs/Options.html for details on these options. --> <!-- --> <static id="Advanced_Resource_Factory" params="-ORBInputCDRAllocator null -ORBReactorType select_st -ORBReactorMaskSignals 0 -ORBConnectionCacheLock null -ORBFlushingStrategy blocking"/> - <static id="Client_Strategy_Factory" params="-ORBProfileLock null -ORBClientConnectionHandler RW"/> - <static id="Server_Strategy_Factory" params="-ORBPOALock null -ORBAllowReactivationOfSystemids 0"/> + <static id="Client_Strategy_Factory" params="-ORBClientConnectionHandler RW"/> + <static id="Server_Strategy_Factory" params="-ORBAllowReactivationOfSystemids 0"/> </ACE_Svc_Conf> diff --git a/TAO/tao/CSD_Framework/CSD_Default_Servant_Dispatcher.cpp b/TAO/tao/CSD_Framework/CSD_Default_Servant_Dispatcher.cpp index 828be978ab1..557709055d0 100644 --- a/TAO/tao/CSD_Framework/CSD_Default_Servant_Dispatcher.cpp +++ b/TAO/tao/CSD_Framework/CSD_Default_Servant_Dispatcher.cpp @@ -20,8 +20,7 @@ TAO_CSD_Default_Servant_Dispatcher::create_Root_POA (const ACE_CString &name, ACE_Lock &lock, TAO_SYNCH_MUTEX &thread_lock, TAO_ORB_Core &orb_core, - TAO_Object_Adapter *object_adapter - ) + TAO_Object_Adapter *object_adapter) { TAO_CSD_POA *poa = 0; diff --git a/TAO/tao/CSD_Framework/CSD_POA.h b/TAO/tao/CSD_Framework/CSD_POA.h index e6ddec124cc..9fa292250ea 100644 --- a/TAO/tao/CSD_Framework/CSD_POA.h +++ b/TAO/tao/CSD_Framework/CSD_POA.h @@ -38,7 +38,7 @@ class TAO_CSD_FW_Export TAO_CSD_POA public virtual TAO_Regular_POA { public: - //Constructor + /// Constructor TAO_CSD_POA (const String &name, PortableServer::POAManager_ptr poa_manager, const TAO_POA_Policy_Set &policies, @@ -48,7 +48,7 @@ public: TAO_ORB_Core &orb_core, TAO_Object_Adapter *object_adapter); - //Destructor + /// Destructor virtual ~TAO_CSD_POA (void); /// Pass the Strategy object reference to the CSD poa. @@ -69,7 +69,7 @@ public: virtual void servant_deactivated_hook (PortableServer::Servant servant, const PortableServer::ObjectId& oid); - ///Method for creating new CSD POA. + /// Method for creating new CSD POA. TAO_Root_POA * new_POA (const String &name, PortableServer::POAManager_ptr poa_manager, const TAO_POA_Policy_Set &policies, diff --git a/TAO/tao/Client_Strategy_Factory.cpp b/TAO/tao/Client_Strategy_Factory.cpp index aae2ca94ca0..f8c25ad3e2e 100644 --- a/TAO/tao/Client_Strategy_Factory.cpp +++ b/TAO/tao/Client_Strategy_Factory.cpp @@ -9,18 +9,6 @@ TAO_Client_Strategy_Factory::~TAO_Client_Strategy_Factory (void) { } -ACE_Lock * -TAO_Client_Strategy_Factory::create_profile_lock (void) -{ - return 0; -} - -TAO_Configurable_Refcount -TAO_Client_Strategy_Factory::create_profile_refcount (void) -{ - return TAO_Configurable_Refcount (TAO_Configurable_Refcount::TAO_NULL_LOCK); -} - TAO_Transport_Mux_Strategy * TAO_Client_Strategy_Factory::create_transport_mux_strategy (TAO_Transport *) { diff --git a/TAO/tao/Client_Strategy_Factory.h b/TAO/tao/Client_Strategy_Factory.h index 69ce9e9d325..9cfaacfac72 100644 --- a/TAO/tao/Client_Strategy_Factory.h +++ b/TAO/tao/Client_Strategy_Factory.h @@ -23,7 +23,6 @@ #endif /* ACE_LACKS_PRAGMA_ONCE */ #include /**/ "tao/Versioned_Namespace.h" -#include "tao/Configurable_Refcount.h" #include "ace/Service_Object.h" @@ -52,14 +51,6 @@ public: /// Destructor virtual ~TAO_Client_Strategy_Factory (void); - /** - * Create the lock for the stub and the profile - */ - virtual ACE_Lock* create_profile_lock (void); - - /// Create the refcount for the profile - virtual TAO_Configurable_Refcount create_profile_refcount (void); - /// Create the correct client request muxing strategy. virtual TAO_Transport_Mux_Strategy *create_transport_mux_strategy (TAO_Transport *transport); diff --git a/TAO/tao/Configurable_Refcount.cpp b/TAO/tao/Configurable_Refcount.cpp deleted file mode 100644 index 26c0753d175..00000000000 --- a/TAO/tao/Configurable_Refcount.cpp +++ /dev/null @@ -1,7 +0,0 @@ -// $Id$ - -#include "Configurable_Refcount.h" - -#if !defined (__ACE_INLINE__) -# include "Configurable_Refcount.inl" -#endif /* __ACE_INLINE__ */ diff --git a/TAO/tao/Configurable_Refcount.h b/TAO/tao/Configurable_Refcount.h deleted file mode 100644 index e73d1f22cc5..00000000000 --- a/TAO/tao/Configurable_Refcount.h +++ /dev/null @@ -1,69 +0,0 @@ -// This may look like C, but it's really -// -*- C++ -*- - -//============================================================================= -/** - * @file Configurable_Refcount.h - * - * $Id$ - * - * Definition for a synchronised refcountable interface. - * - * @author Fred Kuhns <fredk@cs.wustl.edu> - */ -//============================================================================= - -#ifndef TAO_CONFIGURABLE_REFCOUNT_H -#define TAO_CONFIGURABLE_REFCOUNT_H - -#include /**/ "ace/pre.h" -#include "ace/Atomic_Op.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Null_Mutex.h" -#include /**/ "tao/TAO_Export.h" -#include "tao/orbconf.h" - -TAO_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class TAO_Configurable_Refcount - * - * @brief Definition for a synchronised refcountable interface. - */ -class TAO_Export TAO_Configurable_Refcount -{ -public: - enum Lock_Type - { - TAO_NULL_LOCK, - TAO_THREAD_LOCK - }; - - TAO_Configurable_Refcount (Lock_Type type = TAO_THREAD_LOCK, - unsigned long value = 1); - - unsigned long increment (void); - unsigned long decrement (void); - - unsigned long value (void) const; - -private: - Lock_Type type_; - ACE_Atomic_Op<ACE_SYNCH_NULL_MUTEX, unsigned long> null_refcount_; - ACE_Atomic_Op<TAO_SYNCH_MUTEX, unsigned long> mutex_refcount_; -}; - - -TAO_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -# include "Configurable_Refcount.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" - -#endif /* TAO_CONFIGURABLE_REFCOUNT */ diff --git a/TAO/tao/Configurable_Refcount.inl b/TAO/tao/Configurable_Refcount.inl deleted file mode 100644 index c885976bbc6..00000000000 --- a/TAO/tao/Configurable_Refcount.inl +++ /dev/null @@ -1,55 +0,0 @@ -// -*- C++ -*- -//$Id$ - -TAO_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE -TAO_Configurable_Refcount::TAO_Configurable_Refcount ( - TAO_Configurable_Refcount::Lock_Type type, - unsigned long value) - : type_ (type), - null_refcount_ (value), - mutex_refcount_ (value) -{ -} - -ACE_INLINE unsigned long -TAO_Configurable_Refcount::increment (void) -{ - switch(this->type_) - { - case TAO_NULL_LOCK: - return this->null_refcount_++; - case TAO_THREAD_LOCK: - default: - return this->mutex_refcount_++; - } -} - -ACE_INLINE unsigned long -TAO_Configurable_Refcount::decrement (void) -{ - switch(this->type_) - { - case TAO_NULL_LOCK: - return --this->null_refcount_; - case TAO_THREAD_LOCK: - default: - return --this->mutex_refcount_; - } -} - -ACE_INLINE unsigned long -TAO_Configurable_Refcount::value (void) const -{ - switch(this->type_) - { - case TAO_NULL_LOCK: - return this->null_refcount_.value (); - case TAO_THREAD_LOCK: - default: - return this->mutex_refcount_.value (); - } -} - -TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/Connection_Handler.h b/TAO/tao/Connection_Handler.h index 43c7f451e00..2a7fefbcd94 100644 --- a/TAO/tao/Connection_Handler.h +++ b/TAO/tao/Connection_Handler.h @@ -27,7 +27,6 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL class ACE_SOCK; -class ACE_Lock; class ACE_Event_Handler; ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/DLL_Parser.cpp b/TAO/tao/DLL_Parser.cpp index 4842b89eedc..963534d0ebc 100644 --- a/TAO/tao/DLL_Parser.cpp +++ b/TAO/tao/DLL_Parser.cpp @@ -68,7 +68,6 @@ ACE_STATIC_SVC_DEFINE (TAO_DLL_Parser, ACE_Service_Type::DELETE_OBJ, 0) - ACE_FACTORY_DEFINE (TAO, TAO_DLL_Parser) TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/DynamicInterface/AMH_DSI_Response_Handler.h b/TAO/tao/DynamicInterface/AMH_DSI_Response_Handler.h index 3bfd2888893..943d42afebd 100644 --- a/TAO/tao/DynamicInterface/AMH_DSI_Response_Handler.h +++ b/TAO/tao/DynamicInterface/AMH_DSI_Response_Handler.h @@ -6,7 +6,7 @@ * * $Id$ * - * @brief Handle the Repsonse appropriately. + * @brief Handle the Response appropriately. */ //===================================================================== diff --git a/TAO/tao/Environment.cpp b/TAO/tao/Environment.cpp index a0dc085d790..347f302c616 100644 --- a/TAO/tao/Environment.cpp +++ b/TAO/tao/Environment.cpp @@ -56,7 +56,7 @@ CORBA::Environment::~Environment (void) this->clear (); // If previous is 0 then this is the first Environment, allocated - // with the ORB, it shouldn't try to pop because the ORB is beign + // with the ORB, it shouldn't try to pop because the ORB is being // destroyed also. if (this->previous_ != 0) TAO_ORB_Core_instance ()->default_environment (this->previous_); diff --git a/TAO/tao/IORTable/Table_Adapter.cpp b/TAO/tao/IORTable/Table_Adapter.cpp index 005db23e309..34634eae681 100644 --- a/TAO/tao/IORTable/Table_Adapter.cpp +++ b/TAO/tao/IORTable/Table_Adapter.cpp @@ -23,10 +23,8 @@ TAO_Table_Adapter::TAO_Table_Adapter (TAO_ORB_Core &orb_core) : orb_core_ (orb_core), root_ (), closed_ (true), - enable_locking_ (orb_core_.server_factory ()->enable_poa_locking ()), thread_lock_ (), - lock_ (TAO_Table_Adapter::create_lock (enable_locking_, - thread_lock_)) + lock_ (TAO_Table_Adapter::create_lock (thread_lock_)) { } @@ -37,26 +35,11 @@ TAO_Table_Adapter::~TAO_Table_Adapter (void) /* static */ ACE_Lock * -TAO_Table_Adapter::create_lock (bool enable_locking, - TAO_SYNCH_MUTEX &thread_lock) +TAO_Table_Adapter::create_lock (TAO_SYNCH_MUTEX &thread_lock) { -#if defined (ACE_HAS_THREADS) - if (enable_locking) - { - ACE_Lock *the_lock = 0; - ACE_NEW_RETURN (the_lock, - ACE_Lock_Adapter<TAO_SYNCH_MUTEX> (thread_lock), - 0); - return the_lock; - } -#else - ACE_UNUSED_ARG (enable_locking); - ACE_UNUSED_ARG (thread_lock); -#endif /* ACE_HAS_THREADS */ - ACE_Lock *the_lock = 0; ACE_NEW_RETURN (the_lock, - ACE_Lock_Adapter<ACE_SYNCH_NULL_MUTEX> (), + ACE_Lock_Adapter<TAO_SYNCH_MUTEX> (thread_lock), 0); return the_lock; } diff --git a/TAO/tao/IORTable/Table_Adapter.h b/TAO/tao/IORTable/Table_Adapter.h index 1d09c1c91a0..b0bef6fc05b 100644 --- a/TAO/tao/IORTable/Table_Adapter.h +++ b/TAO/tao/IORTable/Table_Adapter.h @@ -59,7 +59,8 @@ public: virtual CORBA::Long initialize_collocated_object (TAO_Stub *stub); private: - static ACE_Lock * create_lock (bool enable_locking, TAO_SYNCH_MUTEX &l); + static ACE_Lock * create_lock (TAO_SYNCH_MUTEX &l); + /// Helper method to find an object bound in the table. bool find_object (TAO::ObjectKey &key, CORBA::Object_out forward_to); @@ -71,7 +72,6 @@ private: TAO_IOR_Table_Impl_var root_; bool closed_; - bool enable_locking_; TAO_SYNCH_MUTEX thread_lock_; ACE_Lock *lock_; }; diff --git a/TAO/tao/MProfile.cpp b/TAO/tao/MProfile.cpp index cef1f76f538..55577afaeef 100644 --- a/TAO/tao/MProfile.cpp +++ b/TAO/tao/MProfile.cpp @@ -270,7 +270,7 @@ TAO_MProfile::remove_profiles (const TAO_MProfile *pfiles) CORBA::Boolean TAO_MProfile::is_equivalent (const TAO_MProfile *rhs) { - // Two profile lists are equivalent iff at least one of the profiles + // Two profile lists are equivalent if at least one of the profiles // from the first list is_equivalent to at least one of the profiles // from the second list!! for (TAO_PHandle h1 = 0; h1 < this->last_; ++h1) diff --git a/TAO/tao/Messaging/AMH_Response_Handler.cpp b/TAO/tao/Messaging/AMH_Response_Handler.cpp index 0ad4459adb3..65e1103bcde 100644 --- a/TAO/tao/Messaging/AMH_Response_Handler.cpp +++ b/TAO/tao/Messaging/AMH_Response_Handler.cpp @@ -296,18 +296,18 @@ TAO_AMH_Response_Handler::_tao_rh_send_location_forward (CORBA::Object_ptr fwd, void TAO_AMH_Response_Handler::_remove_ref (void) { - if (this->refcount_.decrement () > 0) - return; - - if (this->allocator_) + if (--this->refcount_ == 0) { - TAO::TAO_Buffer_Allocator<TAO_AMH_Response_Handler, TAO_AMH_BUFFER_ALLOCATOR> allocator (this->allocator_); + if (this->allocator_) + { + TAO::TAO_Buffer_Allocator<TAO_AMH_Response_Handler, TAO_AMH_BUFFER_ALLOCATOR> allocator (this->allocator_); - allocator.release (this); - } - else - { - delete this; + allocator.release (this); + } + else + { + delete this; + } } } diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp index 56a709b3adc..4fed1c68ef1 100644 --- a/TAO/tao/ORB_Core.cpp +++ b/TAO/tao/ORB_Core.cpp @@ -1262,9 +1262,6 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) ssf->open (this); - // Open the ObjectKey_Table - (void) this->object_key_table_.init (this); - // Obtain the timeout value for the thread-per-connection model this->thread_per_connection_use_timeout_ = ssf->thread_per_connection_timeout (this->thread_per_connection_timeout_); @@ -1279,7 +1276,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) else { this->thread_per_connection_use_timeout_ = 1; - int milliseconds = + int const milliseconds = ACE_OS::atoi (TAO_DEFAULT_THREAD_PER_CONNECTION_TIMEOUT); // Use a temporary to obtain automatic normalization. this->thread_per_connection_timeout_ = diff --git a/TAO/tao/ORB_Core.h b/TAO/tao/ORB_Core.h index a1cdaa60e22..136d43e24d8 100644 --- a/TAO/tao/ORB_Core.h +++ b/TAO/tao/ORB_Core.h @@ -821,7 +821,7 @@ public: TAO_Valuetype_Adapter *valuetype_adapter (void); #if !defined(CORBA_E_MICRO) - // Value factory operations (CORBA 2.3 ptc/98-10-05 Ch. 4.2 p.4-7) + /// Value factory operations (CORBA 2.3 ptc/98-10-05 Ch. 4.2 p.4-7) CORBA::ValueFactory register_value_factory ( const char *repository_id, CORBA::ValueFactory factory); @@ -862,7 +862,7 @@ public: /// gets called at initialization. void request_dispatcher (TAO_Request_Dispatcher *rd); - /// Call the libraries to handover the validators if they havent + /// Call the libraries to handover the validators if they haven't /// registered yet with the list of validators. void load_policy_validators (TAO_Policy_Validator &validator); @@ -919,7 +919,7 @@ protected: ~TAO_ORB_Core (void); /// Initialize the guts of the ORB Core. It is intended that this be - /// called by <CORBA::ORB_init>. + /// called by CORBA::ORB_init(). int init (int &argc, char *argv[]); /// Final termination hook, typically called by CORBA::ORB's diff --git a/TAO/tao/Object.cpp b/TAO/tao/Object.cpp index 38bebc56ef1..7725726c9ac 100644 --- a/TAO/tao/Object.cpp +++ b/TAO/tao/Object.cpp @@ -34,20 +34,18 @@ CORBA::Object::~Object (void) { if (this->protocol_proxy_) (void) this->protocol_proxy_->_decr_refcnt (); - - delete this->object_init_lock_; } CORBA::Object::Object (TAO_Stub * protocol_proxy, CORBA::Boolean collocated, TAO_Abstract_ServantBase * servant, TAO_ORB_Core *orb_core) - : is_local_ (false) + : refcount_ (1) + , is_local_ (false) , is_evaluated_ (true) , ior_ (0) , orb_core_ (orb_core) , protocol_proxy_ (protocol_proxy) - , object_init_lock_ (0) { /// This constructor should not be called when the protocol proxy is /// null ie. when the object is a LocalObject. Assert that @@ -57,12 +55,6 @@ CORBA::Object::Object (TAO_Stub * protocol_proxy, if (this->orb_core_ == 0) this->orb_core_ = this->protocol_proxy_->orb_core (); - this->object_init_lock_ = - this->orb_core_->resource_factory ()->create_corba_object_lock (); - - this->refcount_ = - this->orb_core_->resource_factory ()->create_corba_object_refcount (); - // Set the collocation marker on the stub. This may not be news to it. // This may also change the stub's object proxy broker. this->protocol_proxy_->is_collocated (collocated); @@ -73,18 +65,13 @@ CORBA::Object::Object (TAO_Stub * protocol_proxy, CORBA::Object::Object (IOP::IOR *ior, TAO_ORB_Core *orb_core) - : is_local_ (false) + : refcount_ (1) + , is_local_ (false) , is_evaluated_ (false) , ior_ (ior) , orb_core_ (orb_core) , protocol_proxy_ (0) - , object_init_lock_ (0) { - this->object_init_lock_ = - this->orb_core_->resource_factory ()->create_corba_object_lock (); - - this->refcount_ = - this->orb_core_->resource_factory ()->create_corba_object_refcount (); } // Too lazy to do this check in every method properly! This is useful @@ -92,7 +79,7 @@ CORBA::Object::Object (IOP::IOR *ior, #define TAO_OBJECT_IOR_EVALUATE \ if (!this->is_evaluated_) \ { \ - ACE_GUARD (ACE_Lock , mon, *this->object_init_lock_); \ + ACE_GUARD (TAO_SYNCH_MUTEX , mon, this->object_init_lock_); \ if (!this->is_evaluated_) \ CORBA::Object::tao_object_initialize (this); \ } @@ -100,7 +87,7 @@ if (!this->is_evaluated_) \ #define TAO_OBJECT_IOR_EVALUATE_RETURN \ if (!this->is_evaluated_) \ { \ - ACE_GUARD_RETURN (ACE_Lock , mon, *this->object_init_lock_, 0); \ + ACE_GUARD_RETURN (TAO_SYNCH_MUTEX , mon, this->object_init_lock_, 0); \ if (!this->is_evaluated_) \ CORBA::Object::tao_object_initialize (this); \ } @@ -108,16 +95,16 @@ if (!this->is_evaluated_) \ void CORBA::Object::_add_ref (void) { - this->refcount_.increment (); + ++this->refcount_; } void CORBA::Object::_remove_ref (void) { - if (this->refcount_.decrement () != 0) - return; - - delete this; + if (--this->refcount_ == 0) + { + delete this; + } } CORBA::ULong diff --git a/TAO/tao/Object.h b/TAO/tao/Object.h index a08df8e3c77..932cff0dfc7 100644 --- a/TAO/tao/Object.h +++ b/TAO/tao/Object.h @@ -32,7 +32,7 @@ #include "tao/Object_Argument_T.h" #include "tao/Arg_Traits_T.h" #include "tao/Any_Insert_Policy_T.h" -#include "tao/Configurable_Refcount.h" +#include "ace/Atomic_Op.h" #if defined (HPUX) && defined (IOR) /* HP-UX 11.11 defines IOR in /usr/include/pa/inline.h @@ -40,10 +40,6 @@ # undef IOR #endif /* HPUX && IOR */ -ACE_BEGIN_VERSIONED_NAMESPACE_DECL -class ACE_Lock; -ACE_END_VERSIONED_NAMESPACE_DECL - TAO_BEGIN_VERSIONED_NAMESPACE_DECL class TAO_Stub; @@ -223,7 +219,7 @@ namespace CORBA virtual CORBA::ORB_ptr _get_orb (void); /** - * @name Reference Count Managment + * @name Reference Count Management * * These are the standard CORBA object reference count manipulations * methods. @@ -356,7 +352,7 @@ namespace CORBA TAO::Object_Proxy_Broker *proxy_broker () const; /// Number of outstanding references to this object. - TAO_Configurable_Refcount refcount_; + ACE_Atomic_Op<TAO_SYNCH_MUTEX, unsigned long> refcount_; private: @@ -405,7 +401,7 @@ namespace CORBA * not require reference counting (the default) may be * instantiated in the critical path. */ - ACE_Lock * object_init_lock_; + TAO_SYNCH_MUTEX object_init_lock_; }; } // End CORBA namespace. diff --git a/TAO/tao/Object.inl b/TAO/tao/Object.inl index 7dfe8654fa9..b78e3244084 100644 --- a/TAO/tao/Object.inl +++ b/TAO/tao/Object.inl @@ -23,12 +23,12 @@ CORBA::is_nil<> (CORBA::Object_ptr obj) ACE_INLINE CORBA::Object::Object (int) - : is_local_ (true), + : refcount_ (1), + is_local_ (true), is_evaluated_ (true), ior_ (), orb_core_ (0), - protocol_proxy_ (0), - object_init_lock_ (0) + protocol_proxy_ (0) { } diff --git a/TAO/tao/ObjectKey_Table.cpp b/TAO/tao/ObjectKey_Table.cpp index b4a287c1443..c4488fb8f33 100644 --- a/TAO/tao/ObjectKey_Table.cpp +++ b/TAO/tao/ObjectKey_Table.cpp @@ -4,6 +4,10 @@ #include "tao/ORB_Core.h" #include "tao/Refcounted_ObjectKey.h" +#if !defined (__ACE_INLINE__) +# include "tao/ObjectKey_Table.inl" +#endif /* ! __ACE_INLINE__ */ + TAO_BEGIN_VERSIONED_NAMESPACE_DECL bool @@ -30,8 +34,7 @@ TAO::Less_Than_ObjectKey::operator () (const TAO::ObjectKey &lhs, /********************************************************/ TAO::ObjectKey_Table::ObjectKey_Table (void) - : lock_ (0) - , table_ () + : table_ () { } @@ -39,71 +42,6 @@ TAO::ObjectKey_Table::ObjectKey_Table (void) TAO::ObjectKey_Table::~ObjectKey_Table (void) { this->table_.close (); - delete this->lock_; -} - -int -TAO::ObjectKey_Table::init (TAO_ORB_Core *oc) -{ - /// Create the lock that is needed for internal usage. - this->lock_ = - oc->resource_factory ()->create_object_key_table_lock (); - - return 0; -} - -int -TAO::ObjectKey_Table::bind (const TAO::ObjectKey &key, - TAO::Refcounted_ObjectKey *&key_new) - -{ - key_new = 0; - - int retval = 0; - - { - ACE_GUARD_RETURN (ACE_Lock, - ace_mon, - *this->lock_, - 0); - - // This is a tradeoff.. We could avoid this two stage process of - // using a find () and then a bind () , which would make things - // efficient. BUT we may have to do allocation upfront and delete if - // bind () returns with an entry. We take one of the routes that - // avoids allocation. - retval = this->table_.find (key, - key_new); - - if (retval == -1) - { - return this->bind_i (key, - key_new); - } - - (void) key_new->incr_refcount (); - } - - return retval; -} - -int -TAO::ObjectKey_Table::unbind (TAO::Refcounted_ObjectKey *&key_new) - -{ - ACE_GUARD_RETURN (ACE_Lock, - ace_mon, - *this->lock_, - 0); - - // If the refcount has dropped to 1, just go ahead and unbind it - // from the table. - if (key_new && key_new->decr_refcount () == 1) - { - return this->unbind_i (key_new); - } - - return 0; } int @@ -111,9 +49,9 @@ TAO::ObjectKey_Table::destroy (void) { if (this->table_.current_size ()) { - ACE_GUARD_RETURN (ACE_Lock, + ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, - *this->lock_, + this->lock_, 0); TABLE::ITERATOR end_iter = this->table_.end (); diff --git a/TAO/tao/ObjectKey_Table.h b/TAO/tao/ObjectKey_Table.h index 4e2f8c13df4..aa654b4464b 100644 --- a/TAO/tao/ObjectKey_Table.h +++ b/TAO/tao/ObjectKey_Table.h @@ -21,6 +21,7 @@ #endif /* ACE_LACKS_PRAGMA_ONCE */ #include "ace/Null_Mutex.h" +#include "ace/Copy_Disabled.h" #include "tao/Object_KeyC.h" #include /**/ "tao/Versioned_Namespace.h" @@ -75,7 +76,7 @@ namespace TAO * @note This class uses the ACE_RB_Tree to maintain the table of * ObjectKeys. The RB_Tree has good insertion and lookup * properties. Its Iteration properties are not that good, but we - * dont need to do much iteration unless we are closing down the + * don't need to do much iteration unless we are closing down the * table. * * @note The reasons to use RB_Tree are its good dynamic @@ -85,7 +86,7 @@ namespace TAO * will do that if our instrumentation shows the need for it. * */ - class TAO_Export ObjectKey_Table + class TAO_Export ObjectKey_Table : private ACE_Copy_Disabled { public: /// Default Constructor and destructor.. @@ -93,10 +94,6 @@ namespace TAO ~ObjectKey_Table (void); - /// Initialize method that sets up the underlying lock and other - /// related stuff. - int init (TAO_ORB_Core *orb); - /// Iterates and unbinds the contents of the table. int destroy (void); @@ -122,19 +119,14 @@ namespace TAO int unbind_i (Refcounted_ObjectKey *&key); private: - void operator= (const ObjectKey_Table &); - ObjectKey_Table (const ObjectKey_Table &); - - private: - - // Some useful typedefs. + /// Some useful typedefs. typedef ACE_RB_Tree<TAO::ObjectKey, TAO::Refcounted_ObjectKey *, TAO::Less_Than_ObjectKey, ACE_Null_Mutex> TABLE; /// Lock for the table. - ACE_Lock *lock_; + TAO_SYNCH_MUTEX lock_; /// Table that contains the data TABLE table_; @@ -143,6 +135,10 @@ namespace TAO TAO_END_VERSIONED_NAMESPACE_DECL +#if defined (__ACE_INLINE__) +# include "tao/ObjectKey_Table.inl" +#endif /* __ACE_INLINE__ */ + #include /**/ "ace/post.h" #endif /*TAO_OBJECT_KEY_TABLE_H*/ diff --git a/TAO/tao/ObjectKey_Table.inl b/TAO/tao/ObjectKey_Table.inl new file mode 100644 index 00000000000..8670aa0d8c5 --- /dev/null +++ b/TAO/tao/ObjectKey_Table.inl @@ -0,0 +1,61 @@ +// $Id$ + +#include "tao/Refcounted_ObjectKey.h" + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + +ACE_INLINE +int +TAO::ObjectKey_Table::bind (const TAO::ObjectKey &key, + TAO::Refcounted_ObjectKey *&key_new) + +{ + key_new = 0; + + int retval = 0; + + { + ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, + ace_mon, + this->lock_, + 0); + + // This is a tradeoff.. We could avoid this two stage process of + // using a find () and then a bind () , which would make things + // efficient. BUT we may have to do allocation upfront and delete if + // bind () returns with an entry. We take one of the routes that + // avoids allocation. + retval = this->table_.find (key, key_new); + + if (retval == -1) + { + return this->bind_i (key, key_new); + } + + (void) key_new->incr_refcount (); + } + + return retval; +} + +ACE_INLINE +int +TAO::ObjectKey_Table::unbind (TAO::Refcounted_ObjectKey *&key_new) + +{ + ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, + ace_mon, + this->lock_, + 0); + + // If the refcount has dropped to 1, just go ahead and unbind it + // from the table. + if (key_new && key_new->decr_refcount () == 1) + { + return this->unbind_i (key_new); + } + + return 0; +} + +TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/Objref_VarOut_T.h b/TAO/tao/Objref_VarOut_T.h index d0f4a49414d..c8e49d96b22 100644 --- a/TAO/tao/Objref_VarOut_T.h +++ b/TAO/tao/Objref_VarOut_T.h @@ -106,7 +106,7 @@ public: TAO_Objref_Out_T &operator= (const TAO_Objref_Out_T<T> &p); TAO_Objref_Out_T &operator= (const TAO_Objref_Var_T<T> &p); - // Cast operator. + /// Cast operator. operator T *& (); T *& ptr (void); diff --git a/TAO/tao/On_Demand_Fragmentation_Strategy.h b/TAO/tao/On_Demand_Fragmentation_Strategy.h index 8ac103f5bc7..c2fd581790e 100644 --- a/TAO/tao/On_Demand_Fragmentation_Strategy.h +++ b/TAO/tao/On_Demand_Fragmentation_Strategy.h @@ -28,7 +28,6 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL class TAO_OutputCDR; class TAO_Transport; - /** * @class TAO_On_Demand_Fragmenation_Strategy * @@ -41,7 +40,8 @@ class TAO_Transport; * @see TAO_GIOP_Fragmentation_Strategy */ class TAO_On_Demand_Fragmentation_Strategy - : public TAO_GIOP_Fragmentation_Strategy + : public TAO_GIOP_Fragmentation_Strategy, + private ACE_Copy_Disabled { public: @@ -55,19 +55,11 @@ public: ACE_CDR::ULong pending_length); private: - - // Disallow copying and assignment. - TAO_On_Demand_Fragmentation_Strategy (TAO_On_Demand_Fragmentation_Strategy const &); - void operator= (TAO_On_Demand_Fragmentation_Strategy const &); - -private: - /// Pointer to the underlying transport object. TAO_Transport * const transport_; /// Size of GIOP message at which fragmentation will occur. ACE_CDR::ULong const max_message_size_; - }; TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/PortableServer/Non_Servant_Upcall.cpp b/TAO/tao/PortableServer/Non_Servant_Upcall.cpp index 1702524039e..0c99cbe2881 100644 --- a/TAO/tao/PortableServer/Non_Servant_Upcall.cpp +++ b/TAO/tao/PortableServer/Non_Servant_Upcall.cpp @@ -78,10 +78,8 @@ namespace TAO } } - // If locking is enabled. - if (this->object_adapter_.enable_locking_) - // Wakeup all waiting threads. - this->object_adapter_.non_servant_upcall_condition_.broadcast (); + // Wakeup all waiting threads. + this->object_adapter_.non_servant_upcall_condition_.broadcast (); } } } diff --git a/TAO/tao/PortableServer/Object_Adapter.cpp b/TAO/tao/PortableServer/Object_Adapter.cpp index 7e487f8bd2c..8686ad9979d 100644 --- a/TAO/tao/PortableServer/Object_Adapter.cpp +++ b/TAO/tao/PortableServer/Object_Adapter.cpp @@ -143,10 +143,8 @@ TAO_Object_Adapter::TAO_Object_Adapter (const TAO_Server_Strategy_Factory::Activ persistent_poa_name_map_ (0), transient_poa_map_ (0), orb_core_ (orb_core), - enable_locking_ (orb_core_.server_factory ()->enable_poa_locking ()), thread_lock_ (), - lock_ (TAO_Object_Adapter::create_lock (enable_locking_, - thread_lock_)), + lock_ (TAO_Object_Adapter::create_lock (thread_lock_)), reverse_lock_ (*lock_), non_servant_upcall_condition_ (thread_lock_), non_servant_upcall_in_progress_ (0), @@ -310,26 +308,11 @@ TAO_Object_Adapter::~TAO_Object_Adapter (void) /* static */ ACE_Lock * -TAO_Object_Adapter::create_lock (int enable_locking, - TAO_SYNCH_MUTEX &thread_lock) +TAO_Object_Adapter::create_lock (TAO_SYNCH_MUTEX &thread_lock) { -#if defined (ACE_HAS_THREADS) - if (enable_locking) - { - ACE_Lock *the_lock = 0; - ACE_NEW_RETURN (the_lock, - ACE_Lock_Adapter<TAO_SYNCH_MUTEX> (thread_lock), - 0); - return the_lock; - } -#else - ACE_UNUSED_ARG (enable_locking); - ACE_UNUSED_ARG (thread_lock); -#endif /* ACE_HAS_THREADS */ - ACE_Lock *the_lock = 0; ACE_NEW_RETURN (the_lock, - ACE_Lock_Adapter<ACE_SYNCH_NULL_MUTEX> (), + ACE_Lock_Adapter<TAO_SYNCH_MUTEX> (thread_lock), 0); return the_lock; } @@ -895,7 +878,7 @@ TAO_Object_Adapter::initialize_collocated_object (TAO_Stub *stub) // proxy broker if required. stub->is_collocated (true); - // Return 0 (success) iff we found a servant. + // Return 0 (success) if we found a servant. return ! sb; } @@ -1172,8 +1155,7 @@ TAO_Object_Adapter::wait_for_non_servant_upcalls_to_complete (void) // Check if a non-servant upcall is in progress. If a non-servant // upcall is in progress, wait for it to complete. Unless of // course, the thread making the non-servant upcall is this thread. - while (this->enable_locking_ && - this->non_servant_upcall_in_progress_ && + while (this->non_servant_upcall_in_progress_ && ! ACE_OS::thr_equal (this->non_servant_upcall_thread_, ACE_OS::thr_self ())) { diff --git a/TAO/tao/PortableServer/Object_Adapter.h b/TAO/tao/PortableServer/Object_Adapter.h index 95e81dd97c0..f1ba04ddbdd 100644 --- a/TAO/tao/PortableServer/Object_Adapter.h +++ b/TAO/tao/PortableServer/Object_Adapter.h @@ -138,8 +138,6 @@ public: /// Return the validator. TAO_Policy_Validator &validator (void); - int enable_locking() const; - /// Return the set of default policies. TAO_POA_Policy_Set &default_poa_policies (void); @@ -149,8 +147,7 @@ public: void servant_dispatcher (TAO_Servant_Dispatcher *dispatcher); /// Initialize the default set of POA policies. - void init_default_policies (TAO_POA_Policy_Set &policies - ); + void init_default_policies (TAO_POA_Policy_Set &policies); // = The TAO_Adapter methods, please check tao/Adapter.h for the // documentation @@ -201,8 +198,7 @@ protected: int unbind_persistent_poa (const poa_name &folded_name, const poa_name &system_name); - static ACE_Lock *create_lock (int enable_locking, - TAO_SYNCH_MUTEX &thread_lock); + static ACE_Lock *create_lock (TAO_SYNCH_MUTEX &thread_lock); virtual void do_dispatch (TAO_ServerRequest& req, TAO::Portable_Server::Servant_Upcall& upcall); @@ -379,8 +375,6 @@ protected: TAO_ORB_Core &orb_core_; - int enable_locking_; - TAO_SYNCH_MUTEX thread_lock_; ACE_Lock *lock_; diff --git a/TAO/tao/PortableServer/Object_Adapter.inl b/TAO/tao/PortableServer/Object_Adapter.inl index 2d4414b1b93..ed4707efc3c 100644 --- a/TAO/tao/PortableServer/Object_Adapter.inl +++ b/TAO/tao/PortableServer/Object_Adapter.inl @@ -13,12 +13,6 @@ TAO_Object_Adapter::validator (void) return this->default_validator_; } -ACE_INLINE int -TAO_Object_Adapter::enable_locking (void) const -{ - return this->enable_locking_; -} - ACE_INLINE TAO_POA_Policy_Set & TAO_Object_Adapter::default_poa_policies (void) { diff --git a/TAO/tao/PortableServer/Regular_POA.h b/TAO/tao/PortableServer/Regular_POA.h index 7218e6d581a..d8fe570f27d 100644 --- a/TAO/tao/PortableServer/Regular_POA.h +++ b/TAO/tao/PortableServer/Regular_POA.h @@ -47,8 +47,7 @@ public: ACE_Lock &lock, TAO_SYNCH_MUTEX &thread_lock, TAO_ORB_Core &orb_core, - TAO_Object_Adapter *object_adapter - ); + TAO_Object_Adapter *object_adapter); virtual ~TAO_Regular_POA (void); diff --git a/TAO/tao/PortableServer/Root_POA.cpp b/TAO/tao/PortableServer/Root_POA.cpp index 6855aa5d894..4b72c25a4cd 100644 --- a/TAO/tao/PortableServer/Root_POA.cpp +++ b/TAO/tao/PortableServer/Root_POA.cpp @@ -1197,13 +1197,12 @@ TAO_Root_POA::deactivate_all_objects_i (CORBA::Boolean etherealize_objects, void TAO_Root_POA::wait_for_completions (CORBA::Boolean wait_for_completion) { - while (this->object_adapter ().enable_locking_ && - wait_for_completion && + while (wait_for_completion && this->outstanding_requests_ > 0) { - this->wait_for_completion_pending_ = 1; + this->wait_for_completion_pending_ = true; - int result = this->outstanding_requests_condition_.wait (); + int const result = this->outstanding_requests_condition_.wait (); if (result == -1) { throw ::CORBA::OBJ_ADAPTER (); diff --git a/TAO/tao/PortableServer/Root_POA.h b/TAO/tao/PortableServer/Root_POA.h index a9c1a911550..ee14f22a65d 100644 --- a/TAO/tao/PortableServer/Root_POA.h +++ b/TAO/tao/PortableServer/Root_POA.h @@ -675,8 +675,6 @@ protected: static CORBA::ULong root_key_type_length (void); - void outstanding_requests (CORBA::ULong new_outstanding_requests); - CORBA::ULong increment_outstanding_requests (void); CORBA::ULong decrement_outstanding_requests (void); diff --git a/TAO/tao/PortableServer/Root_POA.inl b/TAO/tao/PortableServer/Root_POA.inl index d9da3792237..8a7338e4908 100644 --- a/TAO/tao/PortableServer/Root_POA.inl +++ b/TAO/tao/PortableServer/Root_POA.inl @@ -185,12 +185,6 @@ TAO_Root_POA::outstanding_requests (void) const return this->outstanding_requests_; } -ACE_INLINE void -TAO_Root_POA::outstanding_requests (CORBA::ULong new_outstanding_requests) -{ - this->outstanding_requests_ = new_outstanding_requests; -} - ACE_INLINE CORBA::ULong TAO_Root_POA::increment_outstanding_requests (void) { diff --git a/TAO/tao/PortableServer/ServantRetentionStrategyRetain.cpp b/TAO/tao/PortableServer/ServantRetentionStrategyRetain.cpp index ae04c2ae17c..503131137db 100644 --- a/TAO/tao/PortableServer/ServantRetentionStrategyRetain.cpp +++ b/TAO/tao/PortableServer/ServantRetentionStrategyRetain.cpp @@ -375,8 +375,7 @@ namespace TAO ++this->waiting_servant_deactivation_; - if (this->poa_->object_adapter ().enable_locking ()) - this->poa_->servant_deactivation_condition ().wait (); + this->poa_->servant_deactivation_condition ().wait (); --this->waiting_servant_deactivation_; @@ -423,8 +422,7 @@ namespace TAO ++this->waiting_servant_deactivation_; - if (this->poa_->object_adapter ().enable_locking ()) - this->poa_->servant_deactivation_condition ().wait (); + this->poa_->servant_deactivation_condition ().wait (); --this->waiting_servant_deactivation_; diff --git a/TAO/tao/PortableServer/Servant_Dispatcher.h b/TAO/tao/PortableServer/Servant_Dispatcher.h index 1d7a368a914..592f0115b4c 100644 --- a/TAO/tao/PortableServer/Servant_Dispatcher.h +++ b/TAO/tao/PortableServer/Servant_Dispatcher.h @@ -57,15 +57,13 @@ public: TAO_Root_POA &poa, CORBA::Short servant_priority, TAO_ServerRequest &req, - TAO::Portable_Server::Servant_Upcall::Pre_Invoke_State &pre_invoke_state - ) = 0; + TAO::Portable_Server::Servant_Upcall::Pre_Invoke_State &pre_invoke_state) = 0; /// Pre_invoke collocated request. virtual void pre_invoke_collocated_request ( TAO_Root_POA &poa, CORBA::Short servant_priority, - TAO::Portable_Server::Servant_Upcall::Pre_Invoke_State &pre_invoke_state - ) = 0; + TAO::Portable_Server::Servant_Upcall::Pre_Invoke_State &pre_invoke_state) = 0; /// Post_invoke request. virtual void post_invoke ( diff --git a/TAO/tao/PortableServer/Servant_Upcall.cpp b/TAO/tao/PortableServer/Servant_Upcall.cpp index 0e6b76a9ace..5b3383148c2 100644 --- a/TAO/tao/PortableServer/Servant_Upcall.cpp +++ b/TAO/tao/PortableServer/Servant_Upcall.cpp @@ -361,8 +361,7 @@ namespace TAO // Ignore errors from servant cleanup .... } - if (this->poa_->waiting_servant_deactivation() > 0 && - this->object_adapter_->enable_locking_) + if (this->poa_->waiting_servant_deactivation() > 0) { // Wakeup all waiting threads. this->poa_->servant_deactivation_condition_.broadcast (); @@ -386,8 +385,7 @@ namespace TAO if (outstanding_requests == 0) { // If locking is enabled and some thread is waiting in POA::destroy. - if (this->object_adapter_->enable_locking_ && - this->poa_->wait_for_completion_pending_) + if (this->poa_->wait_for_completion_pending_) { // Wakeup all waiting threads. this->poa_->outstanding_requests_condition_.broadcast (); diff --git a/TAO/tao/Profile.cpp b/TAO/tao/Profile.cpp index 3d5b7d38d34..81843866050 100644 --- a/TAO/tao/Profile.cpp +++ b/TAO/tao/Profile.cpp @@ -34,8 +34,7 @@ TAO_Profile::TAO_Profile (CORBA::ULong tag, , tag_ (tag) , orb_core_ (orb_core) , forward_to_ (0) - , refcount_ (this->orb_core_-> - client_factory ()->create_profile_refcount ()) + , refcount_ (1) , tagged_profile_lock_ () , tagged_profile_created_ (false) { @@ -54,8 +53,7 @@ TAO_Profile::TAO_Profile (CORBA::ULong tag, , tag_ (tag) , orb_core_ (orb_core) , forward_to_ (0) - , refcount_ (this->orb_core_-> - client_factory ()->create_profile_refcount ()) + , refcount_ (1) , tagged_profile_lock_ () , tagged_profile_created_ (false) { diff --git a/TAO/tao/Profile.h b/TAO/tao/Profile.h index e7cd647e670..6b5570c9481 100644 --- a/TAO/tao/Profile.h +++ b/TAO/tao/Profile.h @@ -24,7 +24,7 @@ #include "tao/GIOP_Message_Version.h" #include "tao/Refcounted_ObjectKey.h" #include "tao/Service_Callbacks.h" -#include "tao/Configurable_Refcount.h" +#include "ace/Atomic_Op.h" ACE_BEGIN_VERSIONED_NAMESPACE_DECL class ACE_Lock; @@ -54,7 +54,6 @@ namespace CORBA class TAO_Export TAO_Profile { public: - /// Constructor TAO_Profile (CORBA::ULong tag, TAO_ORB_Core *orb_core, @@ -383,7 +382,7 @@ private: TAO_MProfile* forward_to_; /// Number of outstanding references to this object. - TAO_Configurable_Refcount refcount_; + ACE_Atomic_Op<TAO_SYNCH_MUTEX, unsigned long> refcount_; /// A lock that protects creation of the tagged profile TAO_SYNCH_MUTEX tagged_profile_lock_; diff --git a/TAO/tao/Profile.inl b/TAO/tao/Profile.inl index 676b90e438b..00f4089d984 100644 --- a/TAO/tao/Profile.inl +++ b/TAO/tao/Profile.inl @@ -67,20 +67,20 @@ TAO_Profile::object_key (void) const ACE_INLINE unsigned long TAO_Profile::_incr_refcnt (void) { - return this->refcount_.increment (); + return ++this->refcount_; } ACE_INLINE unsigned long TAO_Profile::_decr_refcnt (void) { - unsigned long count = this->refcount_.decrement (); - if (count != 0) - return count; - - // refcount is 0, so delete us! - // delete will call our ~ destructor which in turn deletes stuff. - delete this; - return 0; + unsigned long count = --this->refcount_; + if (count == 0) + { + // refcount is 0, so delete us! + // delete will call our ~ destructor which in turn deletes stuff. + delete this; + } + return count; } diff --git a/TAO/tao/Protocol_Factory.h b/TAO/tao/Protocol_Factory.h index 0bb0f258dc5..d282c286cb9 100644 --- a/TAO/tao/Protocol_Factory.h +++ b/TAO/tao/Protocol_Factory.h @@ -64,7 +64,7 @@ public: /** * Some protocols should not create a default endpoint unless the * user specifies a -ORBEndpoint option. For example, local IPC - * (aka UNIX domain sockets) is unable to remove the rendesvouz + * (aka UNIX domain sockets) is unable to remove the rendezvous * point if the server crashes. For those protocols it is better to * create the endpoint only if the user requests one. */ diff --git a/TAO/tao/Protocols_Hooks.h b/TAO/tao/Protocols_Hooks.h index 0dd3aca17f7..a69dc713be6 100644 --- a/TAO/tao/Protocols_Hooks.h +++ b/TAO/tao/Protocols_Hooks.h @@ -110,7 +110,7 @@ public: class TAO_Export TAO_Protocols_Hooks : public ACE_Service_Object { public: - /// destructor + /// Destructor virtual ~TAO_Protocols_Hooks (void); /// Initialize the protocols hooks instance. diff --git a/TAO/tao/Refcounted_ObjectKey.cpp b/TAO/tao/Refcounted_ObjectKey.cpp index 821ec89af36..053be83afcb 100644 --- a/TAO/tao/Refcounted_ObjectKey.cpp +++ b/TAO/tao/Refcounted_ObjectKey.cpp @@ -20,19 +20,4 @@ TAO::Refcounted_ObjectKey::~Refcounted_ObjectKey (void) { } -CORBA::ULong -TAO::Refcounted_ObjectKey::decr_refcount (void) -{ - if (--this->ref_count_ > 0) - { - return this->ref_count_; - } - - ACE_ASSERT (this->ref_count_ == 0); - - delete this; - - return 0; -} - TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/Refcounted_ObjectKey.inl b/TAO/tao/Refcounted_ObjectKey.inl index 117f9db4ee9..444ea27d38f 100644 --- a/TAO/tao/Refcounted_ObjectKey.inl +++ b/TAO/tao/Refcounted_ObjectKey.inl @@ -1,8 +1,6 @@ // -*- C++ -*- -// // $Id$ - TAO_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE void @@ -17,4 +15,20 @@ TAO::Refcounted_ObjectKey::object_key (void) const return this->object_key_; } +ACE_INLINE CORBA::ULong +TAO::Refcounted_ObjectKey::decr_refcount (void) +{ + if (--this->ref_count_ > 0) + { + return this->ref_count_; + } + + ACE_ASSERT (this->ref_count_ == 0); + + delete this; + + return 0; +} + + TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/Resource_Factory.cpp b/TAO/tao/Resource_Factory.cpp index a7a8f63d612..6b050ea23c3 100644 --- a/TAO/tao/Resource_Factory.cpp +++ b/TAO/tao/Resource_Factory.cpp @@ -196,25 +196,6 @@ TAO_Resource_Factory::locked_transport_cache (void) return 0; } -ACE_Lock * -TAO_Resource_Factory::create_object_key_table_lock (void) -{ - return 0; -} - -ACE_Lock * -TAO_Resource_Factory::create_corba_object_lock (void) -{ - return 0; -} - -TAO_Configurable_Refcount -TAO_Resource_Factory::create_corba_object_refcount (void) -{ - return TAO_Configurable_Refcount ( - TAO_Configurable_Refcount::TAO_NULL_LOCK); -} - int TAO_Resource_Factory::load_default_protocols (void) { diff --git a/TAO/tao/Resource_Factory.h b/TAO/tao/Resource_Factory.h index d77c18d1241..19f8d28b24f 100644 --- a/TAO/tao/Resource_Factory.h +++ b/TAO/tao/Resource_Factory.h @@ -24,7 +24,6 @@ #include /**/ "tao/Versioned_Namespace.h" #include "tao/Basic_Types.h" -#include "tao/Configurable_Refcount.h" #include "ace/Service_Object.h" #include "ace/Unbounded_Set.h" @@ -226,15 +225,6 @@ public: /// transport cache needs to be locked else return 0 virtual int locked_transport_cache (void); - /// Creates a lock needed for the table that stores the object keys. - virtual ACE_Lock *create_object_key_table_lock (void); - - /// Creates the lock for the CORBA Object - virtual ACE_Lock *create_corba_object_lock (void); - - /// Creates the configurable refcount for the CORBA Object - virtual TAO_Configurable_Refcount create_corba_object_refcount (void); - /// Creates the flushing strategy. The new instance is owned by the /// caller. virtual TAO_Flushing_Strategy *create_flushing_strategy (void) = 0; diff --git a/TAO/tao/Server_Strategy_Factory.cpp b/TAO/tao/Server_Strategy_Factory.cpp index 079b96605db..f4406f2696f 100644 --- a/TAO/tao/Server_Strategy_Factory.cpp +++ b/TAO/tao/Server_Strategy_Factory.cpp @@ -21,12 +21,6 @@ TAO_Server_Strategy_Factory::open (TAO_ORB_Core*) } int -TAO_Server_Strategy_Factory::enable_poa_locking (void) -{ - return -1; -} - -int TAO_Server_Strategy_Factory::activate_server_connections (void) { return 0; diff --git a/TAO/tao/Server_Strategy_Factory.h b/TAO/tao/Server_Strategy_Factory.h index db38f2b0034..fd6f34e7a66 100644 --- a/TAO/tao/Server_Strategy_Factory.h +++ b/TAO/tao/Server_Strategy_Factory.h @@ -101,9 +101,6 @@ public: */ virtual int open (TAO_ORB_Core* orb_core); - /// Enable POA locking? - virtual int enable_poa_locking (void); - /// Are server connections active (i.e. run in their own thread) virtual int activate_server_connections (void); diff --git a/TAO/tao/Strategies/COIOP_Acceptor.h b/TAO/tao/Strategies/COIOP_Acceptor.h index 1f1756037ca..d3196e08785 100644 --- a/TAO/tao/Strategies/COIOP_Acceptor.h +++ b/TAO/tao/Strategies/COIOP_Acceptor.h @@ -33,7 +33,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -// TAO COIOP_Acceptor concrete call defination +// TAO COIOP_Acceptor concrete call definition /** * @class TAO_COIOP_Acceptor diff --git a/TAO/tao/Strategies/COIOP_Endpoint.h b/TAO/tao/Strategies/COIOP_Endpoint.h index 9828c1fd510..0d1cf2abb35 100644 --- a/TAO/tao/Strategies/COIOP_Endpoint.h +++ b/TAO/tao/Strategies/COIOP_Endpoint.h @@ -69,8 +69,8 @@ public: virtual int addr_to_string (char *buffer, size_t length); virtual TAO_Endpoint *duplicate (void); - /// Return true if this endpoint is equivalent to <other_endpoint>. Two - /// endpoints are equivalent iff their port and host are the same. + /// Return true if this endpoint is equivalent to @a other_endpoint. Two + /// endpoints are equivalent if their port and host are the same. CORBA::Boolean is_equivalent (const TAO_Endpoint *other_endpoint); /// Return a hash value for this object. diff --git a/TAO/tao/Strategies/DIOP_Acceptor.h b/TAO/tao/Strategies/DIOP_Acceptor.h index d69693f9820..5346aac5d4d 100644 --- a/TAO/tao/Strategies/DIOP_Acceptor.h +++ b/TAO/tao/Strategies/DIOP_Acceptor.h @@ -34,7 +34,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -// TAO DIOP_Acceptor concrete call defination +// TAO DIOP_Acceptor concrete call definition /** * @class TAO_DIOP_Acceptor diff --git a/TAO/tao/Strategies/DIOP_Endpoint.h b/TAO/tao/Strategies/DIOP_Endpoint.h index 0a54dec186e..0a28d175002 100644 --- a/TAO/tao/Strategies/DIOP_Endpoint.h +++ b/TAO/tao/Strategies/DIOP_Endpoint.h @@ -82,8 +82,8 @@ public: virtual int addr_to_string (char *buffer, size_t length); virtual TAO_Endpoint *duplicate (void); - /// Return true if this endpoint is equivalent to <other_endpoint>. Two - /// endpoints are equivalent iff their port and host are the same. + /// Return true if this endpoint is equivalent to @a other_endpoint. Two + /// endpoints are equivalent if their port and host are the same. CORBA::Boolean is_equivalent (const TAO_Endpoint *other_endpoint); /// Return a hash value for this object. @@ -101,7 +101,7 @@ public: /// ownership of this string. const char *host (void) const; - /// Copy the string <h> into <host_> and return the resulting pointer. + /// Copy the string @a h into <host_> and return the resulting pointer. /// This object maintains ownership of this string. const char *host (const char *h); diff --git a/TAO/tao/Strategies/SCIOP_Acceptor.h b/TAO/tao/Strategies/SCIOP_Acceptor.h index b3110867917..9b6428d3a18 100644 --- a/TAO/tao/Strategies/SCIOP_Acceptor.h +++ b/TAO/tao/Strategies/SCIOP_Acceptor.h @@ -35,7 +35,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -// TAO SCIOP_Acceptor concrete call defination +// TAO SCIOP_Acceptor concrete call definition /** * @class TAO_SCIOP_Acceptor diff --git a/TAO/tao/Strategies/SCIOP_Endpoint.h b/TAO/tao/Strategies/SCIOP_Endpoint.h index b945845634b..2de5c4db140 100644 --- a/TAO/tao/Strategies/SCIOP_Endpoint.h +++ b/TAO/tao/Strategies/SCIOP_Endpoint.h @@ -82,8 +82,8 @@ public: virtual int addr_to_string (char *buffer, size_t length); virtual TAO_Endpoint *duplicate (void); - /// Return true if this endpoint is equivalent to <other_endpoint>. Two - /// endpoints are equivalent iff their port and host are the same. + /// Return true if this endpoint is equivalent to @a other_endpoint. Two + /// endpoints are equivalent if their port and host are the same. virtual CORBA::Boolean is_equivalent (const TAO_Endpoint *other_endpoint); /// Return a hash value for this object. @@ -98,7 +98,7 @@ public: /// ownership of this string. const char *host (void) const; - /// Copy the string <h> into <host_> and return the resulting pointer. + /// Copy the string @a h into <host_> and return the resulting pointer. /// This object maintains ownership of this string. const char *host (const char *h); @@ -130,7 +130,7 @@ private: /// Canonical copy constructor /** * In private section to prevent clients from invoking this - * accidentally. Clients should only use duplicate () to make a depp + * accidentally. Clients should only use duplicate () to make a deep * copy */ TAO_SCIOP_Endpoint (const TAO_SCIOP_Endpoint &); diff --git a/TAO/tao/Strategies/SHMIOP_Endpoint.h b/TAO/tao/Strategies/SHMIOP_Endpoint.h index d36a906b79c..829e57929d9 100644 --- a/TAO/tao/Strategies/SHMIOP_Endpoint.h +++ b/TAO/tao/Strategies/SHMIOP_Endpoint.h @@ -87,7 +87,7 @@ public: virtual TAO_Endpoint *duplicate (void); /// Return true if this endpoint is equivalent to @a other_endpoint. Two - /// endpoints are equivalent iff their port and host are the same. + /// endpoints are equivalent if their port and host are the same. CORBA::Boolean is_equivalent (const TAO_Endpoint *other_endpoint); /// Return a hash value for this object. @@ -103,7 +103,7 @@ public: /// ownership of this string. const char *host (void) const; - /// Copy the string <h> into <host_> and return the resulting pointer. + /// Copy the string @a h into <host_> and return the resulting pointer. /// This object maintains ownership of this string. const char *host (const char *h); diff --git a/TAO/tao/Strategies/UIOP_Endpoint.h b/TAO/tao/Strategies/UIOP_Endpoint.h index 5b82b92ad95..45fc4413601 100644 --- a/TAO/tao/Strategies/UIOP_Endpoint.h +++ b/TAO/tao/Strategies/UIOP_Endpoint.h @@ -65,8 +65,8 @@ public: virtual int addr_to_string (char *buffer, size_t length); virtual TAO_Endpoint *duplicate (void); - /// Return true if this endpoint is equivalent to <other_endpoint>. Two - /// endpoints are equivalent iff their rendezvous points are the same. + /// Return true if this endpoint is equivalent to @a other_endpoint. Two + /// endpoints are equivalent if their rendezvous points are the same. CORBA::Boolean is_equivalent (const TAO_Endpoint *other_endpoint); /// Return a hash value for this object. diff --git a/TAO/tao/Stub.cpp b/TAO/tao/Stub.cpp index a983f392794..79fb25b12ec 100644 --- a/TAO/tao/Stub.cpp +++ b/TAO/tao/Stub.cpp @@ -43,7 +43,6 @@ TAO_Stub::TAO_Stub (const char *repository_id, , forward_profiles_ (0) , forward_profiles_perm_ (0) , profile_in_use_ (0) - , profile_lock_ptr_ (0) , profile_success_ (false) , refcount_ (1) #if (TAO_HAS_CORBA_MESSAGING == 1) @@ -74,9 +73,6 @@ TAO_Stub::TAO_Stub (const char *repository_id, // Cache the ORB pointer to respond faster to certain queries. this->orb_ = CORBA::ORB::_duplicate (this->orb_core_->orb ()); - this->profile_lock_ptr_ = - this->orb_core_->client_factory ()->create_profile_lock (); - this->base_profiles (profiles); } @@ -97,8 +93,6 @@ TAO_Stub::~TAO_Stub (void) this->profile_in_use_ = 0; } - delete this->profile_lock_ptr_; - #if (TAO_HAS_CORBA_MESSAGING == 1) delete this->policies_; #endif @@ -114,9 +108,9 @@ TAO_Stub::add_forward_profiles (const TAO_MProfile &mprofiles, { // we assume that the profile_in_use_ is being // forwarded! Grab the lock so things don't change. - ACE_MT (ACE_GUARD (ACE_Lock, + ACE_MT (ACE_GUARD (TAO_SYNCH_MUTEX, guard, - *this->profile_lock_ptr_)); + this->profile_lock_)); if (permanent_forward) { @@ -156,9 +150,9 @@ TAO_Stub::create_ior_info (IOP::IOR *&ior_info, CORBA::ULong &index) { // We are creating the IOR info. Let us not be disturbed. So grab a // lock. - ACE_MT (ACE_GUARD_RETURN (ACE_Lock, + ACE_MT (ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, guard, - *this->profile_lock_ptr_, + this->profile_lock_, -1)); IOP::IOR *tmp_info = 0; @@ -224,7 +218,7 @@ TAO_Stub::object_key (void) const { // Double-checked // FUZZ: disable check_for_ACE_Guard - ACE_Guard<ACE_Lock> obj (*this->profile_lock_ptr_); + ACE_Guard<TAO_SYNCH_MUTEX> obj (this->profile_lock_); // FUZZ: enable check_for_ACE_Guard if (obj.locked () != 0 && this->forward_profiles_ != 0) @@ -517,9 +511,9 @@ TAO_Stub::marshal (TAO_OutputCDR &cdr) } else { - ACE_MT (ACE_GUARD_RETURN (ACE_Lock, + ACE_MT (ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, guard, - *this->profile_lock_ptr_, + this->profile_lock_, 0)); ACE_ASSERT(this->forward_profiles_ !=0); @@ -550,17 +544,4 @@ TAO_Stub::marshal (TAO_OutputCDR &cdr) return (CORBA::Boolean) cdr.good_bit (); } -void -TAO_Stub::_incr_refcnt (void) -{ - ++this->refcount_; -} - -void -TAO_Stub::_decr_refcnt (void) -{ - if (--this->refcount_ == 0) - delete this; -} - TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/Stub.h b/TAO/tao/Stub.h index 66bb2ed25ce..d0b11dd5509 100644 --- a/TAO/tao/Stub.h +++ b/TAO/tao/Stub.h @@ -116,10 +116,6 @@ public: void _incr_refcnt (void); void _decr_refcnt (void); - /// Return the Profile lock. This lock can be used at places where - /// profiles need to be edited. - ACE_Lock *profile_lock (void) const; - /// Manage the base (non-forwarded) profiles. /// Returns a pointer to the profile_in_use object. This object /// retains ownership of this profile. @@ -265,6 +261,8 @@ public: void forwarded_on_exception (bool forwarded); bool forwarded_on_exception () const; + TAO_SYNCH_MUTEX& profile_lock () const; + protected: /// Destructor is to be called only through _decr_refcnt() to @@ -369,7 +367,7 @@ protected: TAO_Profile *profile_in_use_; /// Mutex to protect access to the forwarding profile. - ACE_Lock* profile_lock_ptr_; + mutable TAO_SYNCH_MUTEX profile_lock_; /// Have we successfully talked to the forward profile yet? CORBA::Boolean profile_success_; @@ -403,9 +401,8 @@ protected: */ CORBA::Boolean const collocation_opt_; - - // True if forwarding request upon some specific exceptions - // (e.g. OBJECT_NOT_EXIST) already happened. + /// True if forwarding request upon some specific exceptions + /// (e.g. OBJECT_NOT_EXIST) already happened. ACE_Atomic_Op<TAO_SYNCH_MUTEX, bool> forwarded_on_exception_; }; diff --git a/TAO/tao/Stub.inl b/TAO/tao/Stub.inl index a0ecaed898c..1a756d12e57 100644 --- a/TAO/tao/Stub.inl +++ b/TAO/tao/Stub.inl @@ -1,11 +1,17 @@ // -*- C++ -*- -// // $Id$ #include "tao/ORB_Core.h" TAO_BEGIN_VERSIONED_NAMESPACE_DECL +ACE_INLINE +TAO_SYNCH_MUTEX& +TAO_Stub::profile_lock () const +{ + return this->profile_lock_; +} + ACE_INLINE void TAO_Stub::reset_base (void) { @@ -16,12 +22,6 @@ TAO_Stub::reset_base (void) } -ACE_INLINE ACE_Lock* -TAO_Stub::profile_lock (void) const -{ - return this->profile_lock_ptr_; -} - ACE_INLINE void TAO_Stub::reset_forward (void) { @@ -53,9 +53,9 @@ TAO_Stub::reset_profiles_i (void) ACE_INLINE void TAO_Stub::reset_profiles (void) { - ACE_MT (ACE_GUARD (ACE_Lock, + ACE_MT (ACE_GUARD (TAO_SYNCH_MUTEX, guard, - *this->profile_lock_ptr_)); + this->profile_lock_)); this->reset_profiles_i (); } @@ -156,9 +156,9 @@ TAO_Stub::next_profile_i (void) ACE_INLINE TAO_Profile * TAO_Stub::next_profile (void) { - ACE_MT (ACE_GUARD_RETURN (ACE_Lock, + ACE_MT (ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, guard, - *this->profile_lock_ptr_, + this->profile_lock_, 0)); return this->next_profile_i (); } @@ -184,9 +184,9 @@ TAO_Stub::valid_profile (void) const ACE_INLINE TAO_Profile * TAO_Stub::base_profiles (const TAO_MProfile &mprofiles) { - ACE_MT (ACE_GUARD_RETURN (ACE_Lock, + ACE_MT (ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, guard, - *this->profile_lock_ptr_, + this->profile_lock_, 0)); // first reset things so we start from scratch! @@ -204,9 +204,9 @@ TAO_Stub::base_profiles (const TAO_MProfile &mprofiles) ACE_INLINE CORBA::Boolean TAO_Stub::next_profile_retry (void) { - ACE_MT (ACE_GUARD_RETURN (ACE_Lock, + ACE_MT (ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, guard, - *this->profile_lock_ptr_, + this->profile_lock_, 0)); if (this->profile_success_ && this->forward_profiles_) @@ -347,6 +347,20 @@ bool TAO_Stub::forwarded_on_exception () const return forwarded_on_exception_.value (); } +ACE_INLINE +void +TAO_Stub::_incr_refcnt (void) +{ + ++this->refcount_; +} + +ACE_INLINE +void +TAO_Stub::_decr_refcnt (void) +{ + if (--this->refcount_ == 0) + delete this; +} // --------------------------------------------------------------- diff --git a/TAO/tao/SystemException.cpp b/TAO/tao/SystemException.cpp index cbd8b77202a..4969bcc967d 100644 --- a/TAO/tao/SystemException.cpp +++ b/TAO/tao/SystemException.cpp @@ -608,7 +608,6 @@ CORBA::SystemException::_tao_get_omg_exception_description ( "Registration of TaggedComponentFactory failed because a factory already exists for the given id.", // 24 "Iteration has no more elements.", // 25 "Invocation of this operation not allowed in post_init." // 26 - }; static const char *TRANSIENT_TABLE[] = diff --git a/TAO/tao/Transport_Mux_Strategy.h b/TAO/tao/Transport_Mux_Strategy.h index cd2b6fac2cd..94eeef24060 100644 --- a/TAO/tao/Transport_Mux_Strategy.h +++ b/TAO/tao/Transport_Mux_Strategy.h @@ -24,10 +24,6 @@ #include "tao/Basic_Types.h" #include "tao/Reply_Dispatcher.h" -ACE_BEGIN_VERSIONED_NAMESPACE_DECL -class ACE_Lock; -ACE_END_VERSIONED_NAMESPACE_DECL - TAO_BEGIN_VERSIONED_NAMESPACE_DECL class TAO_Transport; diff --git a/TAO/tao/Valuetype/AbstractBase.cpp b/TAO/tao/Valuetype/AbstractBase.cpp index bf5dac9f8e3..ece68afe9ea 100644 --- a/TAO/tao/Valuetype/AbstractBase.cpp +++ b/TAO/tao/Valuetype/AbstractBase.cpp @@ -18,6 +18,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL CORBA::AbstractBase::AbstractBase (void) : is_objref_ (false) + , refcount_ (1) , is_collocated_ (false) , servant_ (0) , equivalent_obj_ (CORBA::Object::_nil ()) @@ -26,6 +27,7 @@ CORBA::AbstractBase::AbstractBase (void) CORBA::AbstractBase::AbstractBase (const CORBA::AbstractBase &rhs) : is_objref_ (rhs.is_objref_) + , refcount_ (1) , is_collocated_ (rhs.is_collocated_) , servant_ (rhs.servant_) , equivalent_obj_ (CORBA::Object::_nil ()) @@ -35,12 +37,6 @@ CORBA::AbstractBase::AbstractBase (const CORBA::AbstractBase &rhs) // Need to duplicate equivalent obj only if it's objref. this->equivalent_obj_ = CORBA::Object::_duplicate (rhs.equivalent_obj_.in ()); - - if (!CORBA::is_nil (this->equivalent_obj_.in ())) - { - this->refcount_ = this->equivalent_obj_->orb_core ()-> - resource_factory ()->create_corba_object_refcount (); - } } } @@ -48,18 +44,11 @@ CORBA::AbstractBase::AbstractBase (TAO_Stub * protocol_proxy, CORBA::Boolean collocated, TAO_Abstract_ServantBase * servant) : is_objref_ (true) + , refcount_ (1) , is_collocated_ (collocated) , servant_ (servant) , equivalent_obj_ (this->create_object (protocol_proxy)) { - if (this->is_objref_) - { - if (!CORBA::is_nil (this->equivalent_obj_.in ())) - { - this->refcount_ = this->equivalent_obj_->orb_core ()-> - resource_factory ()->create_corba_object_refcount (); - } - } } CORBA::AbstractBase::~AbstractBase (void) @@ -69,7 +58,7 @@ CORBA::AbstractBase::~AbstractBase (void) void CORBA::AbstractBase::_add_ref (void) { - this->refcount_.increment (); + ++this->refcount_; // This is required by the C++ Mapping 1.2. if (this->is_objref_) @@ -88,14 +77,14 @@ CORBA::AbstractBase::_remove_ref (void) CORBA::release (this->equivalent_obj_.in ()); } - if (this->refcount_.decrement () != 0) - return; - - // If this object is going to be deleted here then the reference to - // equivalent_obj_ that it owned is already released a few lines above. - this->equivalent_obj_._retn (); + if (--this->refcount_ == 0) + { + // If this object is going to be deleted here then the reference to + // equivalent_obj_ that it owned is already released a few lines above. + this->equivalent_obj_._retn (); - delete this; + delete this; + } } void diff --git a/TAO/tao/Valuetype/AbstractBase.h b/TAO/tao/Valuetype/AbstractBase.h index 67f2d82dc79..c03a2061f3f 100644 --- a/TAO/tao/Valuetype/AbstractBase.h +++ b/TAO/tao/Valuetype/AbstractBase.h @@ -150,7 +150,7 @@ namespace CORBA private: /// Number of outstanding references to this object. - TAO_Configurable_Refcount refcount_; + ACE_Atomic_Op<TAO_SYNCH_MUTEX, unsigned long> refcount_; CORBA::Boolean is_collocated_; TAO_Abstract_ServantBase *servant_; diff --git a/TAO/tao/default_client.cpp b/TAO/tao/default_client.cpp index c17dc12b627..e95a81ca2d1 100644 --- a/TAO/tao/default_client.cpp +++ b/TAO/tao/default_client.cpp @@ -22,8 +22,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_Default_Client_Strategy_Factory::TAO_Default_Client_Strategy_Factory (void) - : profile_lock_type_ (TAO_THREAD_LOCK) - , transport_mux_strategy_ (TAO_MUXED_TMS) + : transport_mux_strategy_ (TAO_MUXED_TMS) , wait_strategy_ (TAO_WAIT_ON_LEADER_FOLLOWER) , connect_strategy_ (TAO_LEADER_FOLLOWER_CONNECT) , rd_table_size_ (TAO_RD_TABLE_SIZE) @@ -69,51 +68,10 @@ TAO_Default_Client_Strategy_Factory::parse_args (int argc, ACE_TCHAR* argv[]) for (curarg = 0; curarg < argc && argv[curarg]; ++curarg) { if (ACE_OS::strcasecmp (argv[curarg], - ACE_TEXT("-ORBProfileLock")) == 0) - { - curarg++; - if (curarg < argc) - { - ACE_TCHAR* name = argv[curarg]; - - if (ACE_OS::strcasecmp (name, - ACE_TEXT("thread")) == 0) - this->profile_lock_type_ = TAO_THREAD_LOCK; - else if (ACE_OS::strcasecmp (name, - ACE_TEXT("null")) == 0) - this->profile_lock_type_ = TAO_NULL_LOCK; - else - this->report_option_value_error (ACE_TEXT("-ORBProfileLock"), name); - } - } - else if (ACE_OS::strcasecmp (argv[curarg], - ACE_TEXT("-ORBIIOPProfileLock")) == 0) - { - ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("WARNING: The -ORBIIOPProfileLock option") - ACE_TEXT (" is deprecated and will be removed.\n") - ACE_TEXT (" Please use -ORBProfileLock instead\n"))); - curarg++; - if (curarg < argc) - { - ACE_TCHAR* name = argv[curarg]; - - if (ACE_OS::strcasecmp (name, - ACE_TEXT("thread")) == 0) - this->profile_lock_type_ = TAO_THREAD_LOCK; - else if (ACE_OS::strcasecmp (name, - ACE_TEXT("null")) == 0) - this->profile_lock_type_ = TAO_NULL_LOCK; - else - this->report_option_value_error (ACE_TEXT("-ORBIIOPProfileLock"), name); - } - } - - else if (ACE_OS::strcasecmp (argv[curarg], - ACE_TEXT("-ORBClientConnectionHandler")) == 0 - || - ACE_OS::strcasecmp (argv[curarg], - ACE_TEXT("-ORBWaitStrategy")) == 0) + ACE_TEXT("-ORBClientConnectionHandler")) == 0 + || + ACE_OS::strcasecmp (argv[curarg], + ACE_TEXT("-ORBWaitStrategy")) == 0) { curarg++; if (curarg < argc) @@ -242,47 +200,6 @@ TAO_Default_Client_Strategy_Factory::parse_args (int argc, ACE_TCHAR* argv[]) return 0; } -ACE_Lock * -TAO_Default_Client_Strategy_Factory::create_profile_lock (void) -{ - ACE_Lock *the_lock = 0; - - switch (this->profile_lock_type_) - { - case TAO_NULL_LOCK: - { - ACE_NEW_RETURN (the_lock, - ACE_Lock_Adapter<ACE_SYNCH_NULL_MUTEX> (), - 0); - break; - } - case TAO_THREAD_LOCK: - { - ACE_NEW_RETURN (the_lock, - ACE_Lock_Adapter<TAO_SYNCH_MUTEX> (), - 0); - break; - } - } - - return the_lock; -} - -TAO_Configurable_Refcount -TAO_Default_Client_Strategy_Factory::create_profile_refcount (void) -{ - switch (this->profile_lock_type_) - { - case TAO_NULL_LOCK: - return TAO_Configurable_Refcount ( - TAO_Configurable_Refcount::TAO_NULL_LOCK); - case TAO_THREAD_LOCK: - default: - return TAO_Configurable_Refcount ( - TAO_Configurable_Refcount::TAO_THREAD_LOCK); - } -} - /// Create the correct client transport muxing strategy. TAO_Transport_Mux_Strategy * TAO_Default_Client_Strategy_Factory::create_transport_mux_strategy (TAO_Transport *transport) diff --git a/TAO/tao/default_client.h b/TAO/tao/default_client.h index 45b13292db3..3d7ea54f599 100644 --- a/TAO/tao/default_client.h +++ b/TAO/tao/default_client.h @@ -53,8 +53,6 @@ public: // = Check Client_Strategy_Factory.h for the documentation of the // following methods. - virtual ACE_Lock* create_profile_lock (void); - virtual TAO_Configurable_Refcount create_profile_refcount (void); virtual TAO_Transport_Mux_Strategy *create_transport_mux_strategy (TAO_Transport *transport); virtual ACE_Lock *create_transport_mux_strategy_lock (void); virtual int reply_dispatcher_table_size (void) const; @@ -75,9 +73,6 @@ private: TAO_THREAD_LOCK }; - /// the lock type for forwarding IIOP Profile - Lock_Type profile_lock_type_; - enum Transport_Mux_Strategy { TAO_MUXED_TMS, diff --git a/TAO/tao/default_resource.cpp b/TAO/tao/default_resource.cpp index f46a84c3113..ed57244617e 100644 --- a/TAO/tao/default_resource.cpp +++ b/TAO/tao/default_resource.cpp @@ -119,8 +119,6 @@ TAO_Default_Resource_Factory::TAO_Default_Resource_Factory (void) , use_local_memory_pool_ (false) #endif , cached_connection_lock_type_ (TAO_THREAD_LOCK) - , object_key_table_lock_type_ (TAO_THREAD_LOCK) - , corba_object_lock_type_ (TAO_THREAD_LOCK) , flushing_strategy_type_ (TAO_LEADER_FOLLOWER_FLUSHING) , char_codeset_parameters_ () , wchar_codeset_parameters_ () @@ -274,43 +272,6 @@ TAO_Default_Resource_Factory::init (int argc, ACE_TCHAR *argv[]) if (curarg < argc) this->wchar_codeset_parameters_.add_translator (argv[curarg]); } - - else if (ACE_OS::strcasecmp (argv[curarg], - ACE_TEXT("-ORBConnectionCachingStrategy")) == 0) - { - ++curarg; - - // @todo: This needs to be removed after a few betas. The - // note is being written during 1.2.3 timeframe. - ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("(%P|%t) This option would be deprecated\n") - ACE_TEXT ("(%P|%t) Please use -ORBConnectionPurgingStrategy ") - ACE_TEXT ("instead\n"))); - - if (curarg < argc) - { - ACE_TCHAR* name = argv[curarg]; - - if (ACE_OS::strcasecmp (name, - ACE_TEXT ("lru")) == 0) - this->connection_purging_type_ = - TAO_Resource_Factory::LRU; - else if (ACE_OS::strcasecmp (name, - ACE_TEXT ("lfu")) == 0) - this->connection_purging_type_ = - TAO_Resource_Factory::LFU; - else if (ACE_OS::strcasecmp (name, - ACE_TEXT ("fifo")) == 0) - this->connection_purging_type_ = - TAO_Resource_Factory::FIFO; - else if (ACE_OS::strcasecmp (name, - ACE_TEXT ("null")) == 0) - this->connection_purging_type_ = - TAO_Resource_Factory::NOOP; - else - this->report_option_value_error (ACE_TEXT ("-ORBConnectionCachingStrategy"), name); - } - } else if (ACE_OS::strcasecmp (argv[curarg], ACE_TEXT("-ORBConnectionPurgingStrategy")) == 0) { @@ -396,52 +357,6 @@ TAO_Default_Resource_Factory::init (int argc, ACE_TCHAR *argv[]) } } else if (ACE_OS::strcasecmp (argv[curarg], - ACE_TEXT("-ORBObjectKeyTableLock")) == 0) - { - ++curarg; - if (curarg < argc) - { - ACE_TCHAR* name = argv[curarg]; - - if (ACE_OS::strcasecmp (name, - ACE_TEXT("thread")) == 0) - this->object_key_table_lock_type_ = TAO_THREAD_LOCK; - else if (ACE_OS::strcasecmp (name, - ACE_TEXT("null")) == 0) - { - // @@ Bug 940 :This is a sort of hack now. We need to put - // this in a common place once we get the common - // switch that is documented in bug 940... - this->object_key_table_lock_type_ = TAO_NULL_LOCK; - } - else - this->report_option_value_error (ACE_TEXT("-ORBObjectKeyTableLock"), name); - } - } - else if (ACE_OS::strcasecmp (argv[curarg], - ACE_TEXT("-ORBCorbaObjectLock")) == 0) - { - ++curarg; - if (curarg < argc) - { - ACE_TCHAR* name = argv[curarg]; - - if (ACE_OS::strcasecmp (name, - ACE_TEXT("thread")) == 0) - this->corba_object_lock_type_ = TAO_THREAD_LOCK; - else if (ACE_OS::strcasecmp (name, - ACE_TEXT("null")) == 0) - { - // @@ Bug 940 :This is a sort of hack now. We need to put - // this in a common place once we get the common - // switch that is documented in bug 940... - this->corba_object_lock_type_ = TAO_NULL_LOCK; - } - else - this->report_option_value_error (ACE_TEXT("-ORBCorbaObjectLock"), name); - } - } - else if (ACE_OS::strcasecmp (argv[curarg], ACE_TEXT("-ORBResourceUsage")) == 0) { ++curarg; @@ -1070,56 +985,6 @@ TAO_Default_Resource_Factory::locked_transport_cache (void) return 1; } - -ACE_Lock * -TAO_Default_Resource_Factory::create_object_key_table_lock (void) -{ - ACE_Lock *the_lock = 0; - - if (this->object_key_table_lock_type_ == TAO_NULL_LOCK) - ACE_NEW_RETURN (the_lock, - ACE_Lock_Adapter<ACE_SYNCH_NULL_MUTEX>, - 0); - else - ACE_NEW_RETURN (the_lock, - ACE_Lock_Adapter<TAO_SYNCH_MUTEX>, - 0); - - return the_lock; -} - -ACE_Lock * -TAO_Default_Resource_Factory::create_corba_object_lock (void) -{ - ACE_Lock *the_lock = 0; - - if (this->corba_object_lock_type_ == TAO_NULL_LOCK) - ACE_NEW_RETURN (the_lock, - ACE_Lock_Adapter<ACE_SYNCH_NULL_MUTEX>, - 0); - else - ACE_NEW_RETURN (the_lock, - ACE_Lock_Adapter<TAO_SYNCH_MUTEX>, - 0); - - return the_lock; -} - -TAO_Configurable_Refcount -TAO_Default_Resource_Factory::create_corba_object_refcount (void) -{ - switch (this->corba_object_lock_type_) - { - case TAO_NULL_LOCK: - return TAO_Configurable_Refcount ( - TAO_Configurable_Refcount::TAO_NULL_LOCK); - case TAO_THREAD_LOCK: - default: - return TAO_Configurable_Refcount ( - TAO_Configurable_Refcount::TAO_THREAD_LOCK); - } -} - TAO_Flushing_Strategy * TAO_Default_Resource_Factory::create_flushing_strategy (void) { diff --git a/TAO/tao/default_resource.h b/TAO/tao/default_resource.h index 4c7d67f6194..9b5e7907d98 100644 --- a/TAO/tao/default_resource.h +++ b/TAO/tao/default_resource.h @@ -176,9 +176,6 @@ public: virtual int purge_percentage (void) const; virtual int max_muxed_connections (void) const; virtual ACE_Lock *create_cached_connection_lock (void); - virtual ACE_Lock *create_object_key_table_lock (void); - virtual TAO_Configurable_Refcount create_corba_object_refcount (void); - virtual ACE_Lock *create_corba_object_lock (void); virtual int locked_transport_cache (void); virtual TAO_Flushing_Strategy *create_flushing_strategy (void); virtual TAO_Connection_Purging_Strategy *create_purging_strategy (void); @@ -236,7 +233,7 @@ protected: /// limit int max_muxed_connections_; - /// If <0> then we create reactors with signal handling disabled. + /// If 0 then we create reactors with signal handling disabled. int reactor_mask_signals_; /** @@ -290,12 +287,6 @@ private: /// Type of lock used by the cached connector. Lock_Type cached_connection_lock_type_; - /// Type of lock used by the corba object. - Lock_Type object_key_table_lock_type_; - - /// Type of lock used by the corba object. - Lock_Type corba_object_lock_type_; - enum Flushing_Strategy_Type { TAO_LEADER_FOLLOWER_FLUSHING, @@ -306,8 +297,8 @@ private: /// Type of flushing strategy configured Flushing_Strategy_Type flushing_strategy_type_; - // Initialization options. To be used later when creating a codeset - // manager instance (s) + /// Initialization options. To be used later when creating a codeset + /// manager instance (s) TAO_Codeset_Parameters char_codeset_parameters_; TAO_Codeset_Parameters wchar_codeset_parameters_; diff --git a/TAO/tao/default_server.cpp b/TAO/tao/default_server.cpp index a9a07a7181e..424b43e5806 100644 --- a/TAO/tao/default_server.cpp +++ b/TAO/tao/default_server.cpp @@ -10,7 +10,6 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_Default_Server_Strategy_Factory::TAO_Default_Server_Strategy_Factory (void) : activate_server_connections_ (0), thread_flags_ (THR_BOUND | THR_DETACHED), - poa_lock_type_ (TAO_THREAD_LOCK), thread_per_connection_use_timeout_ (-1) { } @@ -21,19 +20,6 @@ TAO_Default_Server_Strategy_Factory::~TAO_Default_Server_Strategy_Factory (void) } int -TAO_Default_Server_Strategy_Factory::enable_poa_locking (void) -{ - switch (this->poa_lock_type_) - { - case TAO_NULL_LOCK: - return 0; - case TAO_THREAD_LOCK: - default: - return 1; - } -} - -int TAO_Default_Server_Strategy_Factory::activate_server_connections (void) { return this->activate_server_connections_; @@ -321,24 +307,6 @@ TAO_Default_Server_Strategy_Factory::parse_args (int argc, ACE_TCHAR* argv[]) } } else if (ACE_OS::strcasecmp (argv[curarg], - ACE_TEXT("-ORBPOALock")) == 0) - { - ++curarg; - if (curarg < argc) - { - ACE_TCHAR* name = argv[curarg]; - - if (ACE_OS::strcasecmp (name, - ACE_TEXT("thread")) == 0) - this->poa_lock_type_ = TAO_THREAD_LOCK; - else if (ACE_OS::strcasecmp (name, - ACE_TEXT("null")) == 0) - this->poa_lock_type_ = TAO_NULL_LOCK; - else - this->report_option_value_error (ACE_TEXT("-ORBPOALock"), name); - } - } - else if (ACE_OS::strcasecmp (argv[curarg], ACE_TEXT("-ORBThreadFlags")) == 0) { ++curarg; diff --git a/TAO/tao/default_server.h b/TAO/tao/default_server.h index e37cf95a468..1e6516c7d47 100644 --- a/TAO/tao/default_server.h +++ b/TAO/tao/default_server.h @@ -49,7 +49,6 @@ public: // = The TAO_Server_Strategy_Factory methods, please read the // documentation in "tao/Server_Strategy_Factory.h" virtual int open (TAO_ORB_Core*); - virtual int enable_poa_locking (void); virtual int activate_server_connections (void); virtual int thread_per_connection_timeout (ACE_Time_Value &timeout); virtual int server_connection_thread_flags (void); @@ -72,15 +71,6 @@ protected: /// Default thread flags passed to thr_create(). int thread_flags_; - enum Lock_Type - { - TAO_NULL_LOCK, - TAO_THREAD_LOCK - }; - - /// The type of lock to be returned by <create_poa_lock()>. - Lock_Type poa_lock_type_; - /// The timeout flag and value for the thread-per-connection model int thread_per_connection_use_timeout_; ACE_Time_Value thread_per_connection_timeout_; diff --git a/TAO/tao/operation_details.h b/TAO/tao/operation_details.h index d2cee96e030..f7ee74f340f 100644 --- a/TAO/tao/operation_details.h +++ b/TAO/tao/operation_details.h @@ -142,10 +142,10 @@ public: */ //@{ - /// Marshals the list of <this->arg_> into the \a cdr. + /// Marshals the list of @c this->arg_ into the \a cdr. bool marshal_args (TAO_OutputCDR &cdr); - /// Demarshals the list of <this->arg_> into the \a cdr. + /// Demarshals the list of @c this->arg_ into the \a cdr. bool demarshal_args (TAO_InputCDR &cdr); /// Accessors for the argument list @@ -197,7 +197,7 @@ private: /// valid when sending a request. TAO_Service_Context reply_service_info_; - /// Addressing mode for this request. + /// Addressing mode for this request. TAO_Target_Specification::TAO_Target_Address addressing_mode_; /** diff --git a/TAO/tao/orbconf.h b/TAO/tao/orbconf.h index 43f37fed20d..91b43a1f739 100644 --- a/TAO/tao/orbconf.h +++ b/TAO/tao/orbconf.h @@ -143,18 +143,9 @@ const size_t TAO_DEFAULT_OBJECT_REF_TABLE_SIZE = 256; const size_t TAO_DEFAULT_VALUE_FACTORY_TABLE_SIZE = 128; #endif /* !TAO_DEFAULT_ORB_TABLE_SIZE */ - // The default size of TAO's server active object map. #if !defined (TAO_DEFAULT_SERVER_ACTIVE_OBJECT_MAP_SIZE) -# if defined (TAO_DEFAULT_SERVER_OBJECT_TABLE_SIZE) -// -// TAO_DEFAULT_SERVER_OBJECT_TABLE_SIZE is deprecated. Please use -// TAO_DEFAULT_SERVER_ACTIVE_OBJECT_MAP_SIZE. -// -# define TAO_DEFAULT_SERVER_ACTIVE_OBJECT_MAP_SIZE TAO_DEFAULT_SERVER_OBJECT_TABLE_SIZE -# else -# define TAO_DEFAULT_SERVER_ACTIVE_OBJECT_MAP_SIZE 64 -# endif /* TAO_DEFAULT_SERVER_OBJECT_TABLE_SIZE */ +# define TAO_DEFAULT_SERVER_ACTIVE_OBJECT_MAP_SIZE 64 #endif /* ! TAO_DEFAULT_SERVER_ACTIVE_OBJECT_MAP_SIZE */ // The default size of TAO's server poa map. @@ -836,11 +827,6 @@ enum TAO_Policy_Scope # endif /* TAO_MIN_IPV6_IIOP_MINOR */ #endif /* ACE_HAS_IPV6 */ -// @todo this needs to be deprecated. Use TAO_MAXBUFSIZE instead. -#if !defined (TAO_CONNECTION_HANDLER_STACK_BUF_SIZE) -# define TAO_CONNECTION_HANDLER_STACK_BUF_SIZE 1024 -#endif /*TAO_CONNECTION_HANDLER_STACK_BUF_SIZE */ - // By default TAO generate the OMG standard profile components // (ORB_TYPE and CODE_SETS) #define TAO_STD_PROFILE_COMPONENTS diff --git a/TAO/tao/tao.mpc b/TAO/tao/tao.mpc index 8e354a5a310..650facb183b 100644 --- a/TAO/tao/tao.mpc +++ b/TAO/tao/tao.mpc @@ -99,7 +99,6 @@ project(TAO) : acelib, install, tao_output, taodefaults, pidl, extra_core, taoid Collocated_Invocation.cpp Collocation_Proxy_Broker.cpp Collocation_Resolver.cpp - Configurable_Refcount.cpp Connect_Strategy.cpp Connection_Handler.cpp Connection_Purging_Strategy.cpp diff --git a/TAO/tests/AMI/exclusive.conf b/TAO/tests/AMI/exclusive.conf index b269154099f..739a367e939 100644 --- a/TAO/tests/AMI/exclusive.conf +++ b/TAO/tests/AMI/exclusive.conf @@ -1,2 +1,2 @@ -static Client_Strategy_Factory "-ORBTransportMuxStrategy EXCLUSIVE -ORBProfileLock null -ORBclientconnectionhandler ST" +static Client_Strategy_Factory "-ORBTransportMuxStrategy EXCLUSIVE -ORBclientconnectionhandler ST" diff --git a/TAO/tests/AMI/exclusive.conf.xml b/TAO/tests/AMI/exclusive.conf.xml index 6724ae56996..33db7f50d83 100644 --- a/TAO/tests/AMI/exclusive.conf.xml +++ b/TAO/tests/AMI/exclusive.conf.xml @@ -1,5 +1,5 @@ <?xml version='1.0'?> <!-- Converted from ./tests/AMI/exclusive.conf by svcconf-convert.pl --> <ACE_Svc_Conf> - <static id="Client_Strategy_Factory" params="-ORBTransportMuxStrategy EXCLUSIVE -ORBProfileLock null -ORBclientconnectionhandler ST"/> + <static id="Client_Strategy_Factory" params="-ORBTransportMuxStrategy EXCLUSIVE -ORBclientconnectionhandler ST"/> </ACE_Svc_Conf> diff --git a/TAO/tests/AMI/muxed.conf b/TAO/tests/AMI/muxed.conf index a7f2f5f608a..22c615043f9 100644 --- a/TAO/tests/AMI/muxed.conf +++ b/TAO/tests/AMI/muxed.conf @@ -1,2 +1,2 @@ -static Client_Strategy_Factory "-ORBTransportMuxStrategy MUXED -ORBProfileLock null -ORBClientConnectionHandler ST" +static Client_Strategy_Factory "-ORBTransportMuxStrategy MUXED -ORBClientConnectionHandler ST" diff --git a/TAO/tests/AMI/muxed.conf.xml b/TAO/tests/AMI/muxed.conf.xml index 812cb7376db..cf063034ce0 100644 --- a/TAO/tests/AMI/muxed.conf.xml +++ b/TAO/tests/AMI/muxed.conf.xml @@ -1,5 +1,5 @@ <?xml version='1.0'?> <!-- Converted from ./tests/AMI/muxed.conf by svcconf-convert.pl --> <ACE_Svc_Conf> - <static id="Client_Strategy_Factory" params="-ORBTransportMuxStrategy MUXED -ORBProfileLock null -ORBClientConnectionHandler ST"/> + <static id="Client_Strategy_Factory" params="-ORBTransportMuxStrategy MUXED -ORBClientConnectionHandler ST"/> </ACE_Svc_Conf> diff --git a/TAO/tests/Bug_3163_Regression/server.conf b/TAO/tests/Bug_3163_Regression/server.conf index 14378c72309..c328379cf34 100644 --- a/TAO/tests/Bug_3163_Regression/server.conf +++ b/TAO/tests/Bug_3163_Regression/server.conf @@ -1,3 +1,3 @@ -static Server_Strategy_Factory "-ORBConcurrency reactive -ORBPOALock thread -ORBAllowReactivationOfSystemids 0" +static Server_Strategy_Factory "-ORBConcurrency reactive -ORBAllowReactivationOfSystemids 0" static Resource_Factory "-ORBConnectionCacheMax 10 -ORBNativeWcharCodeSet 0x00010109 -ORBFlushingStrategy blocking" static Client_Strategy_Factory "-ORBWaitStrategy rw -ORBTransportMuxStrategy exclusive -ORBConnectStrategy blocked -ORBConnectionHandlerCleanup 1" diff --git a/TAO/tests/Bug_3647_Regression/svc.conf b/TAO/tests/Bug_3647_Regression/svc.conf index b3efd649ff2..38a55ae3039 100644 --- a/TAO/tests/Bug_3647_Regression/svc.conf +++ b/TAO/tests/Bug_3647_Regression/svc.conf @@ -2,5 +2,3 @@ # $Id$ # static Advanced_Resource_Factory "-ORBReactorType select_st -ORBInputCDRAllocator null -ORBConnectionCacheLock null" -static Server_Strategy_Factory "-ORBPOALock null" -static Client_Strategy_Factory "-ORBProfileLock null" diff --git a/TAO/tests/Bug_3801_Regression/exclusive.conf b/TAO/tests/Bug_3801_Regression/exclusive.conf index b269154099f..739a367e939 100644 --- a/TAO/tests/Bug_3801_Regression/exclusive.conf +++ b/TAO/tests/Bug_3801_Regression/exclusive.conf @@ -1,2 +1,2 @@ -static Client_Strategy_Factory "-ORBTransportMuxStrategy EXCLUSIVE -ORBProfileLock null -ORBclientconnectionhandler ST" +static Client_Strategy_Factory "-ORBTransportMuxStrategy EXCLUSIVE -ORBclientconnectionhandler ST" diff --git a/TAO/tests/Bug_3801_Regression/exclusive.conf.xml b/TAO/tests/Bug_3801_Regression/exclusive.conf.xml index 6724ae56996..33db7f50d83 100644 --- a/TAO/tests/Bug_3801_Regression/exclusive.conf.xml +++ b/TAO/tests/Bug_3801_Regression/exclusive.conf.xml @@ -1,5 +1,5 @@ <?xml version='1.0'?> <!-- Converted from ./tests/AMI/exclusive.conf by svcconf-convert.pl --> <ACE_Svc_Conf> - <static id="Client_Strategy_Factory" params="-ORBTransportMuxStrategy EXCLUSIVE -ORBProfileLock null -ORBclientconnectionhandler ST"/> + <static id="Client_Strategy_Factory" params="-ORBTransportMuxStrategy EXCLUSIVE -ORBclientconnectionhandler ST"/> </ACE_Svc_Conf> diff --git a/TAO/tests/Bug_3801_Regression/muxed.conf b/TAO/tests/Bug_3801_Regression/muxed.conf index a7f2f5f608a..22c615043f9 100644 --- a/TAO/tests/Bug_3801_Regression/muxed.conf +++ b/TAO/tests/Bug_3801_Regression/muxed.conf @@ -1,2 +1,2 @@ -static Client_Strategy_Factory "-ORBTransportMuxStrategy MUXED -ORBProfileLock null -ORBClientConnectionHandler ST" +static Client_Strategy_Factory "-ORBTransportMuxStrategy MUXED -ORBClientConnectionHandler ST" diff --git a/TAO/tests/Bug_3801_Regression/muxed.conf.xml b/TAO/tests/Bug_3801_Regression/muxed.conf.xml index 812cb7376db..cf063034ce0 100644 --- a/TAO/tests/Bug_3801_Regression/muxed.conf.xml +++ b/TAO/tests/Bug_3801_Regression/muxed.conf.xml @@ -1,5 +1,5 @@ <?xml version='1.0'?> <!-- Converted from ./tests/AMI/muxed.conf by svcconf-convert.pl --> <ACE_Svc_Conf> - <static id="Client_Strategy_Factory" params="-ORBTransportMuxStrategy MUXED -ORBProfileLock null -ORBClientConnectionHandler ST"/> + <static id="Client_Strategy_Factory" params="-ORBTransportMuxStrategy MUXED -ORBClientConnectionHandler ST"/> </ACE_Svc_Conf> diff --git a/TAO/tests/CSD_Collocation/svc.conf b/TAO/tests/CSD_Collocation/svc.conf index 285b1297bd4..826ce10d8f7 100644 --- a/TAO/tests/CSD_Collocation/svc.conf +++ b/TAO/tests/CSD_Collocation/svc.conf @@ -8,7 +8,7 @@ static Advanced_Resource_Factory "-ORBReactorType select_st -ORBInputCDRAllocato # Make sure we use RW client handler so if something goes wrong, the program will bloc, # i.e., won't work. -static Client_Strategy_Factory "-ORBProfileLock null -ORBClientConnectionHandler RW" +static Client_Strategy_Factory "-ORBClientConnectionHandler RW" # Not absolutely necessary for this test, but we add it for fun. -static Server_Strategy_Factory "-ORBConcurrency reactive -ORBPOALock null" +static Server_Strategy_Factory "-ORBConcurrency reactive" diff --git a/TAO/tests/CSD_Collocation/svc.conf.xml b/TAO/tests/CSD_Collocation/svc.conf.xml index 36246c69725..f5c0a307879 100644 --- a/TAO/tests/CSD_Collocation/svc.conf.xml +++ b/TAO/tests/CSD_Collocation/svc.conf.xml @@ -9,7 +9,7 @@ <static id="Advanced_Resource_Factory" params="-ORBReactorType select_st -ORBInputCDRAllocator null -ORBConnectionCacheLock null"/> <!-- Make sure we use RW client handler so if something goes wrong, the program will bloc, --> <!-- i.e., won't work. --> - <static id="Client_Strategy_Factory" params="-ORBProfileLock null -ORBClientConnectionHandler RW"/> + <static id="Client_Strategy_Factory" params="-ORBClientConnectionHandler RW"/> <!-- Not absolutely necessary for this test, but we add it for fun. --> - <static id="Server_Strategy_Factory" params="-ORBConcurrency reactive -ORBPOALock null"/> + <static id="Server_Strategy_Factory" params="-ORBConcurrency reactive"/> </ACE_Svc_Conf> diff --git a/TAO/tests/Collocation/svc.conf b/TAO/tests/Collocation/svc.conf index 285b1297bd4..826ce10d8f7 100644 --- a/TAO/tests/Collocation/svc.conf +++ b/TAO/tests/Collocation/svc.conf @@ -8,7 +8,7 @@ static Advanced_Resource_Factory "-ORBReactorType select_st -ORBInputCDRAllocato # Make sure we use RW client handler so if something goes wrong, the program will bloc, # i.e., won't work. -static Client_Strategy_Factory "-ORBProfileLock null -ORBClientConnectionHandler RW" +static Client_Strategy_Factory "-ORBClientConnectionHandler RW" # Not absolutely necessary for this test, but we add it for fun. -static Server_Strategy_Factory "-ORBConcurrency reactive -ORBPOALock null" +static Server_Strategy_Factory "-ORBConcurrency reactive" diff --git a/TAO/tests/Collocation/svc.conf.xml b/TAO/tests/Collocation/svc.conf.xml index 36246c69725..f5c0a307879 100644 --- a/TAO/tests/Collocation/svc.conf.xml +++ b/TAO/tests/Collocation/svc.conf.xml @@ -9,7 +9,7 @@ <static id="Advanced_Resource_Factory" params="-ORBReactorType select_st -ORBInputCDRAllocator null -ORBConnectionCacheLock null"/> <!-- Make sure we use RW client handler so if something goes wrong, the program will bloc, --> <!-- i.e., won't work. --> - <static id="Client_Strategy_Factory" params="-ORBProfileLock null -ORBClientConnectionHandler RW"/> + <static id="Client_Strategy_Factory" params="-ORBClientConnectionHandler RW"/> <!-- Not absolutely necessary for this test, but we add it for fun. --> - <static id="Server_Strategy_Factory" params="-ORBConcurrency reactive -ORBPOALock null"/> + <static id="Server_Strategy_Factory" params="-ORBConcurrency reactive"/> </ACE_Svc_Conf> diff --git a/TAO/tests/MT_Client/client_muxed.conf b/TAO/tests/MT_Client/client_muxed.conf index 05145bd0896..924b53fcb2a 100644 --- a/TAO/tests/MT_Client/client_muxed.conf +++ b/TAO/tests/MT_Client/client_muxed.conf @@ -1,3 +1,3 @@ # $Id$ -static Client_Strategy_Factory "-ORBProfileLock null -ORBClientConnectionHandler MT -ORBTransportMuxStrategy MUXED" +static Client_Strategy_Factory "-ORBClientConnectionHandler MT -ORBTransportMuxStrategy MUXED" diff --git a/TAO/tests/MT_Client/client_muxed.conf.xml b/TAO/tests/MT_Client/client_muxed.conf.xml index ba4727350fc..a03048a0550 100644 --- a/TAO/tests/MT_Client/client_muxed.conf.xml +++ b/TAO/tests/MT_Client/client_muxed.conf.xml @@ -2,5 +2,5 @@ <!-- Converted from ./tests/MT_Client/client_muxed.conf by svcconf-convert.pl --> <ACE_Svc_Conf> <!-- $Id$ --> - <static id="Client_Strategy_Factory" params="-ORBProfileLock null -ORBClientConnectionHandler MT -ORBTransportMuxStrategy MUXED"/> + <static id="Client_Strategy_Factory" params="-ORBClientConnectionHandler MT -ORBTransportMuxStrategy MUXED"/> </ACE_Svc_Conf> diff --git a/TAO/tests/Smart_Proxies/Collocation/svc.conf b/TAO/tests/Smart_Proxies/Collocation/svc.conf index 285b1297bd4..826ce10d8f7 100644 --- a/TAO/tests/Smart_Proxies/Collocation/svc.conf +++ b/TAO/tests/Smart_Proxies/Collocation/svc.conf @@ -8,7 +8,7 @@ static Advanced_Resource_Factory "-ORBReactorType select_st -ORBInputCDRAllocato # Make sure we use RW client handler so if something goes wrong, the program will bloc, # i.e., won't work. -static Client_Strategy_Factory "-ORBProfileLock null -ORBClientConnectionHandler RW" +static Client_Strategy_Factory "-ORBClientConnectionHandler RW" # Not absolutely necessary for this test, but we add it for fun. -static Server_Strategy_Factory "-ORBConcurrency reactive -ORBPOALock null" +static Server_Strategy_Factory "-ORBConcurrency reactive" diff --git a/TAO/tests/Smart_Proxies/Collocation/svc.conf.xml b/TAO/tests/Smart_Proxies/Collocation/svc.conf.xml index 866550b8838..17e28d20bbd 100644 --- a/TAO/tests/Smart_Proxies/Collocation/svc.conf.xml +++ b/TAO/tests/Smart_Proxies/Collocation/svc.conf.xml @@ -9,7 +9,7 @@ <static id="Resource_Factory" params="-ORBReactorType select_st -ORBInputCDRAllocator null -ORBConnectionCacheLock null"/> <!-- Make sure we use RW client handler so if something goes wrong, the program will bloc, --> <!-- i.e., won't work. --> - <static id="Client_Strategy_Factory" params="-ORBProfileLock null -ORBClientConnectionHandler RW"/> + <static id="Client_Strategy_Factory" params="-ORBClientConnectionHandler RW"/> <!-- Not absolutely necessary for this test, but we add it for fun. --> - <static id="Server_Strategy_Factory" params="-ORBConcurrency reactive -ORBPOALock null"/> + <static id="Server_Strategy_Factory" params="-ORBConcurrency reactive"/> </ACE_Svc_Conf> |