diff options
author | iliyan <iliyan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-01-04 21:26:15 +0000 |
---|---|---|
committer | iliyan <iliyan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-01-04 21:26:15 +0000 |
commit | ed256d599f737eb8623f085b157de51e89ed4e41 (patch) | |
tree | e7a41aeba96f3052fd9e2fe2f059e208aae8ca3a | |
parent | dd0a8fa92b5f7b45258136e54da5e8a7c319acf3 (diff) | |
download | ATCD-ed256d599f737eb8623f085b157de51e89ed4e41.tar.gz |
ChangeLogTag: Thu Jan 4 20:10:38 UTC 2007 Iliyan Jeliazkov <iliyan@ociweb.com>
-rw-r--r-- | TAO/ChangeLog | 51 | ||||
-rw-r--r-- | TAO/tests/TransportCurrent/Framework/client.cpp | 4 | ||||
-rwxr-xr-x | TAO/tests/TransportCurrent/Framework/run_test.pl | 4 | ||||
-rw-r--r-- | TAO/tests/TransportCurrent/Framework/server.cpp | 4 | ||||
-rw-r--r-- | TAO/tests/TransportCurrent/IIOP/client.cpp | 4 | ||||
-rwxr-xr-x | TAO/tests/TransportCurrent/IIOP/run_test.pl | 4 | ||||
-rw-r--r-- | TAO/tests/TransportCurrent/IIOP/server.cpp | 4 | ||||
-rw-r--r-- | TAO/tests/TransportCurrent/lib/Client_ORBInitializer.cpp | 42 | ||||
-rw-r--r-- | TAO/tests/TransportCurrent/lib/Client_ORBInitializer.h | 108 | ||||
-rw-r--r-- | TAO/tests/TransportCurrent/lib/Client_Request_Interceptor.cpp | 12 | ||||
-rw-r--r-- | TAO/tests/TransportCurrent/lib/Current_Test_Lib.mpc | 18 | ||||
-rw-r--r-- | TAO/tests/TransportCurrent/lib/ORBInitializer_T.cpp | 46 | ||||
-rw-r--r-- | TAO/tests/TransportCurrent/lib/ORBInitializer_T.h | 64 | ||||
-rw-r--r-- | TAO/tests/TransportCurrent/lib/Server_ORBInitializer.cpp | 42 | ||||
-rw-r--r-- | TAO/tests/TransportCurrent/lib/Server_ORBInitializer.h | 162 | ||||
-rw-r--r-- | TAO/tests/TransportCurrent/lib/Server_Request_Interceptor.cpp | 13 |
16 files changed, 419 insertions, 163 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index c28e4369d34..931eb64504c 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,14 +1,51 @@ +Thu Jan 4 20:10:38 UTC 2007 Iliyan Jeliazkov <iliyan@ociweb.com> + + This is in addition to the change from "Thu Jan 4 04:11:02 UTC + 2007" + + * tests/TransportCurrent/Framework/client.cpp: + * tests/TransportCurrent/Framework/server.cpp: + * tests/TransportCurrent/IIOP/client.cpp: + * tests/TransportCurrent/IIOP/server.cpp: + * tests/TransportCurrent/lib/Client_ORBInitializer.h: + * tests/TransportCurrent/lib/Client_ORBInitializer.cpp: + * tests/TransportCurrent/lib/Server_ORBInitializer.cpp: + * tests/TransportCurrent/lib/Server_ORBInitializer.h: + + Eliminated trivial template usage for the ORB initializers, + where a simple class is sufficient. + + * tests/TransportCurrent/Framework/run_test.pl: + * tests/TransportCurrent/IIOP/run_test.pl: + + Modified so they now run on Windows, too. + + * tests/TransportCurrent/lib/Client_Request_Interceptor.cpp: + * tests/TransportCurrent/lib/Server_Request_Interceptor.cpp: + + Removed superfluous template and replaced with two simple + classes. + + * tests/TransportCurrent/lib/Current_Test_Lib.mpc: + + Updated to add pi to the list of base projects. + + * tests/TransportCurrent/lib/ORBInitializer_T.h: + * tests/TransportCurrent/lib/ORBInitializer_T.cpp: + + Removed these files. + Thu Jan 4 19:55:35 UTC 2007 Chris Cleeland <cleeland_c@ociweb.com> * orbsvcs/orbsvcs/Notify/Sequence/SequencePushConsumer.cpp (init): - + Fixed conversion warnings in RTEMS build...the old .in() for a _var problem. Thu Jan 4 16:32:38 UTC 2007 Chris Cleeland <cleeland_c@ociweb.com> * tests/Bug_2702_Regression/fakeserver2.pl: - + Added "use" for Socket and IO::Socket packages. The script works just fine on many platforms without this for some reason, but gave errors on the BCB build. @@ -22,16 +59,16 @@ Thu Jan 4 14:08:45 UTC 2007 J.T. Conklin <jtc@acorntoolworks.com> Thu Jan 4 14:00:16 UTC 2007 J.T. Conklin <jtc@acorntoolworks.com> - * orbsvcs/orbsvcs/Makefile.am: - * orbsvcs/ImplRepo_Service/Makefile.am: - * tao/Makefile.am: - * tests/Compression/Makefile.am: + * orbsvcs/orbsvcs/Makefile.am: + * orbsvcs/ImplRepo_Service/Makefile.am: + * tao/Makefile.am: + * tests/Compression/Makefile.am: Tweak to use ACE_{ZLIB,ZZIP}_{CPPFLAGS,LDFLAGS,LIBS} instead of -I${ZLIB_ROOT}/include, etc. The former are substituted by the configure script. - * configure.ac: + * configure.ac: Use ACE_PATH_ZLIB and ACE_PATH_ZZIP autoconf macros. zlib and zzip can now be enabled at configure time diff --git a/TAO/tests/TransportCurrent/Framework/client.cpp b/TAO/tests/TransportCurrent/Framework/client.cpp index 39729fc24a2..12207234dd4 100644 --- a/TAO/tests/TransportCurrent/Framework/client.cpp +++ b/TAO/tests/TransportCurrent/Framework/client.cpp @@ -11,7 +11,7 @@ #include "Client_Request_Interceptor.h" #include "Current_TestC.h" -#include "ORBInitializer_T.h" +#include "Client_ORBInitializer.h" ACE_RCSID (PICurrent, client, @@ -170,7 +170,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) PortableInterceptor::ORBInitializer::_nil (); ACE_NEW_RETURN (temp_initializer, - Test::ORBInitializer<PortableInterceptor::ClientRequestInterceptor> (&cri), + Test::Client_ORBInitializer (&cri), -1); PortableInterceptor::ORBInitializer_var orb_initializer = diff --git a/TAO/tests/TransportCurrent/Framework/run_test.pl b/TAO/tests/TransportCurrent/Framework/run_test.pl index 278f652e875..f714965a33a 100755 --- a/TAO/tests/TransportCurrent/Framework/run_test.pl +++ b/TAO/tests/TransportCurrent/Framework/run_test.pl @@ -6,13 +6,14 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; +use Config; use PerlACE::Run_Test; sub add_path { my($name) = shift; my($value) = shift; if (defined $ENV{$name}) { - $ENV{$name} .= ':' . $value + $ENV{$name} .= $Config{'path_sep'} . $value } else { $ENV{$name} = $value; @@ -24,6 +25,7 @@ sub add_path { add_path('LD_LIBRARY_PATH', '../lib'); add_path('LIBPATH', '../lib'); add_path('SHLIB_PATH', '../lib'); +add_path('PATH', '../lib'); my $status = 0; my $confmod = ""; diff --git a/TAO/tests/TransportCurrent/Framework/server.cpp b/TAO/tests/TransportCurrent/Framework/server.cpp index 31dbb014e90..579f11d7726 100644 --- a/TAO/tests/TransportCurrent/Framework/server.cpp +++ b/TAO/tests/TransportCurrent/Framework/server.cpp @@ -8,7 +8,7 @@ #include "Current_Test_Impl.h" #include "Server_Request_Interceptor.h" -#include "ORBInitializer_T.h" +#include "Server_ORBInitializer.h" ACE_RCSID (Transport_Current, @@ -115,7 +115,7 @@ server_main (int argc, PortableInterceptor::ORBInitializer::_nil (); ACE_NEW_RETURN (temp_initializer, - Test::ORBInitializer <PortableInterceptor::ServerRequestInterceptor> (cri), + Test::Server_ORBInitializer (cri), -1); // No exceptions yet! PortableInterceptor::ORBInitializer_var orb_initializer = diff --git a/TAO/tests/TransportCurrent/IIOP/client.cpp b/TAO/tests/TransportCurrent/IIOP/client.cpp index f910a35d8e2..21e7caf1456 100644 --- a/TAO/tests/TransportCurrent/IIOP/client.cpp +++ b/TAO/tests/TransportCurrent/IIOP/client.cpp @@ -11,7 +11,7 @@ #include "Client_Request_Interceptor.h" #include "Current_TestC.h" -#include "ORBInitializer_T.h" +#include "Client_ORBInitializer.h" ACE_RCSID (PICurrent, client, @@ -170,7 +170,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) PortableInterceptor::ORBInitializer::_nil (); ACE_NEW_RETURN (temp_initializer, - Test::ORBInitializer<PortableInterceptor::ClientRequestInterceptor> (&cri), + Test::Client_ORBInitializer (&cri), -1); PortableInterceptor::ORBInitializer_var orb_initializer = diff --git a/TAO/tests/TransportCurrent/IIOP/run_test.pl b/TAO/tests/TransportCurrent/IIOP/run_test.pl index 9db8ca35798..f6bf4160a73 100755 --- a/TAO/tests/TransportCurrent/IIOP/run_test.pl +++ b/TAO/tests/TransportCurrent/IIOP/run_test.pl @@ -6,13 +6,14 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; +use Config; use PerlACE::Run_Test; sub add_path { my($name) = shift; my($value) = shift; if (defined $ENV{$name}) { - $ENV{$name} .= ':' . $value + $ENV{$name} .= $Config{'path_sep'} . $value } else { $ENV{$name} = $value; @@ -24,6 +25,7 @@ sub add_path { add_path('LD_LIBRARY_PATH', '../lib'); add_path('LIBPATH', '../lib'); add_path('SHLIB_PATH', '../lib'); +add_path('PATH', '../lib'); $status = 0; diff --git a/TAO/tests/TransportCurrent/IIOP/server.cpp b/TAO/tests/TransportCurrent/IIOP/server.cpp index 31dbb014e90..579f11d7726 100644 --- a/TAO/tests/TransportCurrent/IIOP/server.cpp +++ b/TAO/tests/TransportCurrent/IIOP/server.cpp @@ -8,7 +8,7 @@ #include "Current_Test_Impl.h" #include "Server_Request_Interceptor.h" -#include "ORBInitializer_T.h" +#include "Server_ORBInitializer.h" ACE_RCSID (Transport_Current, @@ -115,7 +115,7 @@ server_main (int argc, PortableInterceptor::ORBInitializer::_nil (); ACE_NEW_RETURN (temp_initializer, - Test::ORBInitializer <PortableInterceptor::ServerRequestInterceptor> (cri), + Test::Server_ORBInitializer (cri), -1); // No exceptions yet! PortableInterceptor::ORBInitializer_var orb_initializer = diff --git a/TAO/tests/TransportCurrent/lib/Client_ORBInitializer.cpp b/TAO/tests/TransportCurrent/lib/Client_ORBInitializer.cpp new file mode 100644 index 00000000000..fe0faed7c90 --- /dev/null +++ b/TAO/tests/TransportCurrent/lib/Client_ORBInitializer.cpp @@ -0,0 +1,42 @@ +// -*- C++ -*- + +#include "ace/Log_Msg.h" + +ACE_RCSID (Current_Test_Lib, + Client_ORBInitializer, + "$Id$") + +#include "Client_Request_Interceptor.h" +#include "Client_ORBInitializer.h" + +namespace Test +{ + + Client_ORBInitializer::Client_ORBInitializer (PortableInterceptor::ClientRequestInterceptor_ptr interceptor) + : interceptor_ (PortableInterceptor::ClientRequestInterceptor::_duplicate (interceptor)) + { + /* no-op */ + } + + Client_ORBInitializer::~Client_ORBInitializer (void) + { + /* no-op */ + } + + void + Client_ORBInitializer::pre_init(PortableInterceptor::ORBInitInfo* + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)) + { + /* no-op */ + } + + // A specialization to handle client-side interceptors + void Client_ORBInitializer::post_init (PortableInterceptor::ORBInitInfo* oii + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)) + { + oii->add_client_request_interceptor (this->interceptor_.in ()); + } + +} diff --git a/TAO/tests/TransportCurrent/lib/Client_ORBInitializer.h b/TAO/tests/TransportCurrent/lib/Client_ORBInitializer.h new file mode 100644 index 00000000000..f8ac5cf901e --- /dev/null +++ b/TAO/tests/TransportCurrent/lib/Client_ORBInitializer.h @@ -0,0 +1,108 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file Client_ORBInitializer.h + * + * $Id$ + * + * @author Iliyan jeliazkov <iliyan@ociweb.com> + */ +//============================================================================= + +#ifndef CLIENT_ORBINITIALIZER_T_H +#define CLIENT_ORBINITIALIZER_T_H +#include /**/ "ace/pre.h" +#include /**/ "ace/config-all.h" + +#include /**/ "Current_Test_Export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/PI/PI.h" +#include "tao/PortableInterceptorC.h" + +namespace Test +{ + + class Current_Test_Export Client_ORBInitializer : public PortableInterceptor::ORBInitializer + { + public: + Client_ORBInitializer (PortableInterceptor::ClientRequestInterceptor_ptr interceptor); + ~Client_ORBInitializer (void); + + virtual void pre_init(PortableInterceptor::ORBInitInfo* + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + + virtual void post_init(PortableInterceptor::ORBInitInfo* + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + + private: + PortableInterceptor::ClientRequestInterceptor_var interceptor_; + }; + +} + +#include /**/ "ace/post.h" + +#endif /* CLIENT_ORBINITIALIZER_T_H */ + + +// -*- C++ -*- + +//============================================================================= +/** + * @file Client_ORBInitializer.h + * + * $Id$ + * + * @author Iliyan jeliazkov <iliyan@ociweb.com> + */ +//============================================================================= + +#ifndef CLIENT_ORBINITIALIZER_T_H +#define CLIENT_ORBINITIALIZER_T_H +#include /**/ "ace/pre.h" +#include /**/ "ace/config-all.h" + +#include /**/ "Current_Test_Export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/PI/PI.h" +#include "tao/PortableInterceptorC.h" + +namespace Test +{ + + class Current_Test_Export Client_ORBInitializer : public PortableInterceptor::ORBInitializer + { + public: + Client_ORBInitializer (PortableInterceptor::ClientRequestInterceptor_ptr interceptor); + ~Client_ORBInitializer (void); + + virtual void pre_init(PortableInterceptor::ORBInitInfo* + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + + virtual void post_init(PortableInterceptor::ORBInitInfo* + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + + private: + PortableInterceptor::ClientRequestInterceptor_var interceptor_; + }; + +} + +#include /**/ "ace/post.h" + +#endif /* CLIENT_ORBINITIALIZER_T_H */ + + diff --git a/TAO/tests/TransportCurrent/lib/Client_Request_Interceptor.cpp b/TAO/tests/TransportCurrent/lib/Client_Request_Interceptor.cpp index 723fda12963..398d8e92724 100644 --- a/TAO/tests/TransportCurrent/lib/Client_Request_Interceptor.cpp +++ b/TAO/tests/TransportCurrent/lib/Client_Request_Interceptor.cpp @@ -8,21 +8,11 @@ ACE_RCSID (ForwardRequest, #include "Current_TestC.h" #include "Client_Request_Interceptor.h" -#include "ORBInitializer_T.h" +#include "Client_ORBInitializer.h" namespace Test { - // A specialization to handle client-side interceptors - template <> - void - ORBInitializer<PortableInterceptor::ClientRequestInterceptor>::post_init (PortableInterceptor::ORBInitInfo* oii - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - oii->add_client_request_interceptor (this->interceptor_.in ()); - } - Client_Request_Interceptor::Client_Request_Interceptor (const char *orb_id, TEST test) : orb_id_ (CORBA::string_dup (orb_id)) diff --git a/TAO/tests/TransportCurrent/lib/Current_Test_Lib.mpc b/TAO/tests/TransportCurrent/lib/Current_Test_Lib.mpc index 2e1e35b150e..212e0b3ca1b 100644 --- a/TAO/tests/TransportCurrent/lib/Current_Test_Lib.mpc +++ b/TAO/tests/TransportCurrent/lib/Current_Test_Lib.mpc @@ -7,8 +7,6 @@ project(*idl): taoidldefaults { idlflags += -Wb,export_include=Current_Test_Export.h \ -Wb,export_macro=Current_Test_Export - idlflags -= -Sa -St - IDL_Files { Current_Test.idl } @@ -16,38 +14,36 @@ project(*idl): taoidldefaults { custom_only = 1 } -project(*Client): taolib_with_idl, tao_versioning_idl_defaults { +project(*Client): taolib_with_idl, tao_versioning_idl_defaults, pi { - after += *idl + after += *idl TAO_TC includes += . libout = . dynamicflags += CURRENT_TEST_BUILD_DLL Source_Files { Client_Request_Interceptor.cpp + Client_ORBInitializer.cpp } Source_Files { Current_TestC.cpp } - Template_Files { - ORBInitializer_T.cpp - } - IDL_Files { } } project(*Server): taolib_with_idl, tao_versioning_idl_defaults, pi_server { - after += *idl + after += *Client includes += . libout = . dynamicflags += CURRENT_TEST_BUILD_DLL Source_Files { Server_Request_Interceptor.cpp + Server_ORBInitializer.cpp } Source_Files { @@ -55,10 +51,6 @@ project(*Server): taolib_with_idl, tao_versioning_idl_defaults, pi_server { Current_TestS.cpp } - Template_Files { - ORBInitializer_T.cpp - } - IDL_Files { } } diff --git a/TAO/tests/TransportCurrent/lib/ORBInitializer_T.cpp b/TAO/tests/TransportCurrent/lib/ORBInitializer_T.cpp deleted file mode 100644 index 31781bcb5cf..00000000000 --- a/TAO/tests/TransportCurrent/lib/ORBInitializer_T.cpp +++ /dev/null @@ -1,46 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file ORBInitializer_T.cpp - * - * $Id$ - * - * @author Iliyan jeliazkov <iliyan@ociweb.com> - */ -//============================================================================= - - -#ifndef ORBINITIALIZER_T_CPP -#define ORBINITIALIZER_T_CPP - -#include "ORBInitializer_T.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -namespace Test -{ - - template <typename I> - ORBInitializer<I>::ORBInitializer (typename I::_ptr_type interceptor) - : interceptor_ (I::_duplicate (interceptor)) - { - } - - template <typename I> - ORBInitializer<I>::~ORBInitializer (void) - { - } - - template <typename I> - void - ORBInitializer<I>::pre_init(PortableInterceptor::ORBInitInfo* - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - } - -} -#endif /* ORBINITIALIZER_T_CPP */ diff --git a/TAO/tests/TransportCurrent/lib/ORBInitializer_T.h b/TAO/tests/TransportCurrent/lib/ORBInitializer_T.h deleted file mode 100644 index 00d0fc7de9d..00000000000 --- a/TAO/tests/TransportCurrent/lib/ORBInitializer_T.h +++ /dev/null @@ -1,64 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file ORBInitializer_T.h - * - * $Id$ - * - * @author Iliyan jeliazkov <iliyan@ociweb.com> - */ -//============================================================================= - -#ifndef ORBINITIALIZER_T_H -#define ORBINITIALIZER_T_H -#include /**/ "ace/pre.h" -#include /**/ "ace/config-all.h" -#include /**/ "Current_Test_Export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "tao/PI/PI.h" -#include "tao/PortableInterceptorC.h" - -namespace Test -{ - // A template class for ORBInitializer, which registers - // interceptors. Partial specializations exist to handle client and - // server request interceptors. - template <typename I> - class Current_Test_Export ORBInitializer : public PortableInterceptor::ORBInitializer - { - public: - ORBInitializer (typename I::_ptr_type interceptor); - ~ORBInitializer (void); - - virtual void pre_init(PortableInterceptor::ORBInitInfo* - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual void post_init(PortableInterceptor::ORBInitInfo* - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - private: - typename I::_var_type interceptor_; - }; - -} - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ORBInitializer_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("ORBInitializer_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" - -#endif /* ORBINITIALIZER_T_H */ - - diff --git a/TAO/tests/TransportCurrent/lib/Server_ORBInitializer.cpp b/TAO/tests/TransportCurrent/lib/Server_ORBInitializer.cpp new file mode 100644 index 00000000000..1d7c110ac28 --- /dev/null +++ b/TAO/tests/TransportCurrent/lib/Server_ORBInitializer.cpp @@ -0,0 +1,42 @@ +// -*- C++ -*- + +#include "ace/Log_Msg.h" + +ACE_RCSID (Current_Test_Lib, + Server_ORBInitializer, + "$Id$") + +#include "Server_Request_Interceptor.h" +#include "Server_ORBInitializer.h" + +namespace Test +{ + + Server_ORBInitializer::Server_ORBInitializer (PortableInterceptor::ServerRequestInterceptor_ptr interceptor) + : interceptor_ (PortableInterceptor::ServerRequestInterceptor::_duplicate (interceptor)) + { + /* no-op */ + } + + Server_ORBInitializer::~Server_ORBInitializer (void) + { + /* no-op */ + } + + void + Server_ORBInitializer::pre_init(PortableInterceptor::ORBInitInfo* + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)) + { + /* no-op */ + } + + // A specialization to handle client-side interceptors + void Server_ORBInitializer::post_init (PortableInterceptor::ORBInitInfo* oii + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)) + { + oii->add_server_request_interceptor (this->interceptor_.in ()); + } + +} diff --git a/TAO/tests/TransportCurrent/lib/Server_ORBInitializer.h b/TAO/tests/TransportCurrent/lib/Server_ORBInitializer.h new file mode 100644 index 00000000000..0bb4b868cde --- /dev/null +++ b/TAO/tests/TransportCurrent/lib/Server_ORBInitializer.h @@ -0,0 +1,162 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file Server_ORBInitializer.h + * + * $Id$ + * + * @author Iliyan jeliazkov <iliyan@ociweb.com> + */ +//============================================================================= + +#ifndef SERVER_ORBINITIALIZER_T_H +#define SERVER_ORBINITIALIZER_T_H +#include /**/ "ace/pre.h" +#include /**/ "ace/config-all.h" + +#include /**/ "Current_Test_Export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/PI/PI.h" +#include "tao/PortableInterceptorC.h" + +namespace Test +{ + + class Current_Test_Export Server_ORBInitializer : public PortableInterceptor::ORBInitializer + { + public: + Server_ORBInitializer (PortableInterceptor::ServerRequestInterceptor_ptr interceptor); + ~Server_ORBInitializer (void); + + virtual void pre_init(PortableInterceptor::ORBInitInfo* + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + + virtual void post_init(PortableInterceptor::ORBInitInfo* + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + + private: + PortableInterceptor::ServerRequestInterceptor_var interceptor_; + }; + +} + +#include /**/ "ace/post.h" + +#endif /* SERVER_ORBINITIALIZER_T_H */ + + +// -*- C++ -*- + +//============================================================================= +/** + * @file Server_ORBInitializer.h + * + * $Id$ + * + * @author Iliyan jeliazkov <iliyan@ociweb.com> + */ +//============================================================================= + +#ifndef SERVER_ORBINITIALIZER_T_H +#define SERVER_ORBINITIALIZER_T_H +#include /**/ "ace/pre.h" +#include /**/ "ace/config-all.h" + +#include /**/ "Current_Test_Export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/PI/PI.h" +#include "tao/PortableInterceptorC.h" + +namespace Test +{ + + class Current_Test_Export Server_ORBInitializer : public PortableInterceptor::ORBInitializer + { + public: + Server_ORBInitializer (PortableInterceptor::ServerRequestInterceptor_ptr interceptor); + ~Server_ORBInitializer (void); + + virtual void pre_init(PortableInterceptor::ORBInitInfo* + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + + virtual void post_init(PortableInterceptor::ORBInitInfo* + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + + private: + PortableInterceptor::ServerRequestInterceptor_var interceptor_; + }; + +} + +#include /**/ "ace/post.h" + +#endif /* SERVER_ORBINITIALIZER_T_H */ + + +// -*- C++ -*- + +//============================================================================= +/** + * @file Server_ORBInitializer.h + * + * $Id$ + * + * @author Iliyan jeliazkov <iliyan@ociweb.com> + */ +//============================================================================= + +#ifndef SERVER_ORBINITIALIZER_T_H +#define SERVER_ORBINITIALIZER_T_H +#include /**/ "ace/pre.h" +#include /**/ "ace/config-all.h" + +#include /**/ "Current_Test_Export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/PI/PI.h" +#include "tao/PortableInterceptorC.h" + +namespace Test +{ + + class Current_Test_Export Server_ORBInitializer : public PortableInterceptor::ORBInitializer + { + public: + Server_ORBInitializer (PortableInterceptor::ServerRequestInterceptor_ptr interceptor); + ~Server_ORBInitializer (void); + + virtual void pre_init(PortableInterceptor::ORBInitInfo* + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + + virtual void post_init(PortableInterceptor::ORBInitInfo* + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + + private: + PortableInterceptor::ServerRequestInterceptor_var interceptor_; + }; + +} + +#include /**/ "ace/post.h" + +#endif /* SERVER_ORBINITIALIZER_T_H */ + + diff --git a/TAO/tests/TransportCurrent/lib/Server_Request_Interceptor.cpp b/TAO/tests/TransportCurrent/lib/Server_Request_Interceptor.cpp index 7b287231601..5512951bffa 100644 --- a/TAO/tests/TransportCurrent/lib/Server_Request_Interceptor.cpp +++ b/TAO/tests/TransportCurrent/lib/Server_Request_Interceptor.cpp @@ -7,22 +7,11 @@ ACE_RCSID (Framework, "$Id$") #include "Server_Request_Interceptor.h" -#include "ORBInitializer_T.h" +#include "Server_ORBInitializer.h" namespace Test { - template <> - void - ORBInitializer<PortableInterceptor::ServerRequestInterceptor>::post_init (PortableInterceptor::ORBInitInfo* oii - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - oii->add_server_request_interceptor (this->interceptor_.in ()); - } - - - Server_Request_Interceptor::Server_Request_Interceptor (const char* orbid, TEST test) : request_count_ (0) , orb_id_ (::CORBA::string_dup (orbid)) |