summaryrefslogtreecommitdiff
path: root/TAO/tests/TransportCurrent
diff options
context:
space:
mode:
authoriliyan <iliyan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-01-05 04:25:15 +0000
committeriliyan <iliyan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-01-05 04:25:15 +0000
commitd4ac8c3314bd6e61e01de82b28efa52c1fb861a1 (patch)
tree62e172657d639652667d2b224d3ff156ec02610b /TAO/tests/TransportCurrent
parentba9e3687f537687f99426a957a5bd54f8705e74c (diff)
downloadATCD-d4ac8c3314bd6e61e01de82b28efa52c1fb861a1.tar.gz
ChangeLogTag: Fri Jan 5 04:09:08 UTC 2007 Iliyan Jeliazkov <iliyan@ociweb.com>
Diffstat (limited to 'TAO/tests/TransportCurrent')
-rw-r--r--TAO/tests/TransportCurrent/lib/Client_ORBInitializer.cpp16
-rw-r--r--TAO/tests/TransportCurrent/lib/Client_ORBInitializer.h68
-rw-r--r--TAO/tests/TransportCurrent/lib/Client_Request_Interceptor.cpp85
-rw-r--r--TAO/tests/TransportCurrent/lib/Client_Request_Interceptor.h59
-rw-r--r--TAO/tests/TransportCurrent/lib/Current_Test_Impl.h23
-rw-r--r--TAO/tests/TransportCurrent/lib/Server_ORBInitializer.cpp16
-rw-r--r--TAO/tests/TransportCurrent/lib/Server_ORBInitializer.h124
-rw-r--r--TAO/tests/TransportCurrent/lib/Server_Request_Interceptor.cpp93
-rw-r--r--TAO/tests/TransportCurrent/lib/Server_Request_Interceptor.h65
9 files changed, 151 insertions, 398 deletions
diff --git a/TAO/tests/TransportCurrent/lib/Client_ORBInitializer.cpp b/TAO/tests/TransportCurrent/lib/Client_ORBInitializer.cpp
index fe0faed7c90..40112cc0b5a 100644
--- a/TAO/tests/TransportCurrent/lib/Client_ORBInitializer.cpp
+++ b/TAO/tests/TransportCurrent/lib/Client_ORBInitializer.cpp
@@ -12,8 +12,10 @@ ACE_RCSID (Current_Test_Lib,
namespace Test
{
- Client_ORBInitializer::Client_ORBInitializer (PortableInterceptor::ClientRequestInterceptor_ptr interceptor)
- : interceptor_ (PortableInterceptor::ClientRequestInterceptor::_duplicate (interceptor))
+ Client_ORBInitializer::Client_ORBInitializer
+ (PortableInterceptor::ClientRequestInterceptor_ptr interceptor)
+ : interceptor_
+ (PortableInterceptor::ClientRequestInterceptor::_duplicate (interceptor))
{
/* no-op */
}
@@ -24,17 +26,15 @@ namespace Test
}
void
- Client_ORBInitializer::pre_init(PortableInterceptor::ORBInitInfo*
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException))
+ Client_ORBInitializer::pre_init(PortableInterceptor::ORBInitInfo*)
+ throw (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))
+ void Client_ORBInitializer::post_init (PortableInterceptor::ORBInitInfo* oii)
+ throw (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
index f8ac5cf901e..dcafa6638f4 100644
--- a/TAO/tests/TransportCurrent/lib/Client_ORBInitializer.h
+++ b/TAO/tests/TransportCurrent/lib/Client_ORBInitializer.h
@@ -13,7 +13,7 @@
#ifndef CLIENT_ORBINITIALIZER_T_H
#define CLIENT_ORBINITIALIZER_T_H
#include /**/ "ace/pre.h"
-#include /**/ "ace/config-all.h"
+#include /**/ "ace/config.h"
#include /**/ "Current_Test_Export.h"
@@ -27,19 +27,18 @@
namespace Test
{
- class Current_Test_Export Client_ORBInitializer : public PortableInterceptor::ORBInitializer
+ 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 pre_init(PortableInterceptor::ORBInitInfo*)
+ throw (CORBA::SystemException);
- virtual void post_init(PortableInterceptor::ORBInitInfo*
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
+ virtual void post_init(PortableInterceptor::ORBInitInfo*)
+ throw (CORBA::SystemException);
private:
PortableInterceptor::ClientRequestInterceptor_var interceptor_;
@@ -52,57 +51,4 @@ namespace Test
#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 398d8e92724..f62ed6e1df1 100644
--- a/TAO/tests/TransportCurrent/lib/Client_Request_Interceptor.cpp
+++ b/TAO/tests/TransportCurrent/lib/Client_Request_Interceptor.cpp
@@ -29,17 +29,15 @@ namespace Test
}
char *
- Client_Request_Interceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
+ Client_Request_Interceptor::name (void)
+ throw (CORBA::SystemException)
{
return CORBA::string_dup ("Client_Request_Interceptor");
}
void
- Client_Request_Interceptor::test_transport_current (const ACE_TCHAR* amethod
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- CORBA::UserException))
+ Client_Request_Interceptor::test_transport_current (const ACE_TCHAR* amethod)
+ throw (CORBA::SystemException, CORBA::UserException)
{
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("CRI (%P|%t) Test accessing Transport Current from %s\n"),
@@ -50,13 +48,11 @@ namespace Test
int tmp = 0;
CORBA::ORB_var orb = CORBA::ORB_init (tmp,
0,
- orb_id_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ orb_id_.in ());
-
- (*this->test_) (orb.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ // Call the test function, which will throw an exception on
+ // failure
+ (*this->test_) (orb.in ());
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("CRI (%P|%t) Successfully tested Transport Current from %s\n"),
@@ -64,26 +60,20 @@ namespace Test
}
void
- Client_Request_Interceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
+ Client_Request_Interceptor::destroy (void)
+ throw (CORBA::SystemException)
{
}
void
- Client_Request_Interceptor::send_request (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
+ Client_Request_Interceptor::send_request (PortableInterceptor::ClientRequestInfo_ptr ri)
+ throw (CORBA::SystemException, PortableInterceptor::ForwardRequest)
{
//Test TC
-
- test_transport_current ("send_request"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ test_transport_current ("send_request");
CORBA::Boolean response_expected =
- ri->response_expected (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ ri->response_expected ();
// Oneway?
if (response_expected)
@@ -92,12 +82,11 @@ namespace Test
ACE_DEBUG ((LM_DEBUG, ACE_TEXT("CRI (%P|%t) Sending a one-way\n")));
// Make the context to send the context to the target
-
IOP::ServiceContext sc;
sc.context_id = Test::Transport::CurrentTest::ContextTag;
+ // How long can a number really get?
char temp[32];
-
{
ACE_GUARD (TAO_SYNCH_MUTEX, monitor, this->lock_);
@@ -112,53 +101,35 @@ namespace Test
sc.context_data.replace (string_len, string_len, buf, 1);
// Add this context to the service context list.
- ri->add_request_service_context (sc, 0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
+ ri->add_request_service_context (sc, 0);
}
void
- Client_Request_Interceptor::send_poll (PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
+ Client_Request_Interceptor::send_poll (PortableInterceptor::ClientRequestInfo_ptr)
+ throw (CORBA::SystemException)
{
- test_transport_current ("send_poll"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ test_transport_current ("send_poll");
}
void
- Client_Request_Interceptor::receive_reply (PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
+ Client_Request_Interceptor::receive_reply (PortableInterceptor::ClientRequestInfo_ptr)
+ throw (CORBA::SystemException)
{
- test_transport_current ("receive_reply"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ test_transport_current ("receive_reply");
}
void
- Client_Request_Interceptor::receive_exception (PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
+ Client_Request_Interceptor::receive_exception (PortableInterceptor::ClientRequestInfo_ptr)
+ throw (CORBA::SystemException, PortableInterceptor::ForwardRequest)
{
- test_transport_current ("receive_exception"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ test_transport_current ("receive_exception");
}
void
- Client_Request_Interceptor::receive_other (PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
+ Client_Request_Interceptor::receive_other (PortableInterceptor::ClientRequestInfo_ptr)
+ throw (CORBA::SystemException, PortableInterceptor::ForwardRequest)
{
-
- test_transport_current ("receive_other"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
+ test_transport_current ("receive_other");
}
}
diff --git a/TAO/tests/TransportCurrent/lib/Client_Request_Interceptor.h b/TAO/tests/TransportCurrent/lib/Client_Request_Interceptor.h
index c5ceadbf3f6..8b9d16adcc9 100644
--- a/TAO/tests/TransportCurrent/lib/Client_Request_Interceptor.h
+++ b/TAO/tests/TransportCurrent/lib/Client_Request_Interceptor.h
@@ -16,7 +16,7 @@
#ifndef CLIENT_REQUEST_INTERCEPTOR_H
#define CLIENT_REQUEST_INTERCEPTOR_H
-#include /**/ "ace/config-all.h"
+#include /**/ "ace/config.h"
#include /**/ "Current_Test_Export.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
@@ -34,8 +34,7 @@ namespace Test
/// A metod doing the actual testing, so we could change it for the
/// different traits implementations
-
- typedef int (*TEST) (CORBA::ORB_ptr ACE_ENV_ARG_DECL_WITH_DEFAULTS);
+ typedef int (*TEST) (CORBA::ORB_ptr);
/**
@@ -69,41 +68,35 @@ namespace Test
*/
//@{
/// Return the name of this ClientRequestinterceptor.
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_request (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_poll (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_reply (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_exception (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_other (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
+ virtual char * name (void) throw (CORBA::SystemException);
+
+ virtual void destroy (void) throw (CORBA::SystemException);
+
+ virtual void send_request (PortableInterceptor::ClientRequestInfo_ptr ri)
+ throw (CORBA::SystemException, PortableInterceptor::ForwardRequest);
+
+ virtual void send_poll (PortableInterceptor::ClientRequestInfo_ptr ri)
+ throw (CORBA::SystemException);
+
+ virtual void receive_reply (PortableInterceptor::ClientRequestInfo_ptr ri)
+ throw (CORBA::SystemException);
+
+
+ virtual void receive_exception (PortableInterceptor::ClientRequestInfo_ptr ri)
+ throw (CORBA::SystemException, PortableInterceptor::ForwardRequest);
+
+ virtual void receive_other (PortableInterceptor::ClientRequestInfo_ptr ri)
+ throw (CORBA::SystemException, PortableInterceptor::ForwardRequest);
//@}
+ // Number of interceptions
CORBA::Long interceptions (void);
private:
- void test_transport_current (const ACE_TCHAR* amethod ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException, CORBA::UserException));
+ // Implementation method, every inteception point will have to
+ // call it, supplying a name.
+ void test_transport_current (const ACE_TCHAR* amethod)
+ throw (CORBA::SystemException, CORBA::UserException);
private:
///The ID of the ORB this interceptor is registered with.
diff --git a/TAO/tests/TransportCurrent/lib/Current_Test_Impl.h b/TAO/tests/TransportCurrent/lib/Current_Test_Impl.h
index 84710ddbd86..f8dfc3f3ef3 100644
--- a/TAO/tests/TransportCurrent/lib/Current_Test_Impl.h
+++ b/TAO/tests/TransportCurrent/lib/Current_Test_Impl.h
@@ -37,21 +37,19 @@ public:
~Current_Test_Impl (void);
/// Main servant test method.
- virtual void invoked_by_client (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
+ virtual void invoked_by_client (void) throw (CORBA::SystemException);
/// No-op method used so that a client request interceptor will be
/// invoked when invoking this method from the above invoke_me()
/// method. Say that 10 times fast. :-)
- virtual void invoked_during_upcall (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
+ virtual void invoked_during_upcall (void)
+ throw (CORBA::SystemException);
/// Shutdown the ORB.
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
+ virtual void shutdown (void) throw (CORBA::SystemException);
- virtual ::CORBA::Long self_test (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((::CORBA::SystemException));
+ // A self-test for coherency
+ virtual ::CORBA::Long self_test (void) throw (CORBA::SystemException);
public:
/// Reports if unexpected errors have been encountered for the
@@ -59,12 +57,11 @@ public:
bool is_successful (void) const;
private:
- void test_transport_current (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
+ void test_transport_current (void) throw (CORBA::SystemException);
/// Main servant test method.
- void invoked_by_client_i (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((::CORBA::SystemException, TAO::Transport::NoContext));
+ void invoked_by_client_i (void)
+ throw (CORBA::SystemException, TAO::Transport::NoContext);
private:
/// Pseudo-reference to the ORB.
@@ -73,7 +70,7 @@ private:
/// Pseudo-reference to the POA (cache)
PortableServer::POA_var poa_;
- ///
+ /// To do or not to do ...
int do_collocated_calls_;
};
diff --git a/TAO/tests/TransportCurrent/lib/Server_ORBInitializer.cpp b/TAO/tests/TransportCurrent/lib/Server_ORBInitializer.cpp
index 1d7c110ac28..72cc1b34782 100644
--- a/TAO/tests/TransportCurrent/lib/Server_ORBInitializer.cpp
+++ b/TAO/tests/TransportCurrent/lib/Server_ORBInitializer.cpp
@@ -12,8 +12,10 @@ ACE_RCSID (Current_Test_Lib,
namespace Test
{
- Server_ORBInitializer::Server_ORBInitializer (PortableInterceptor::ServerRequestInterceptor_ptr interceptor)
- : interceptor_ (PortableInterceptor::ServerRequestInterceptor::_duplicate (interceptor))
+ Server_ORBInitializer::Server_ORBInitializer
+ (PortableInterceptor::ServerRequestInterceptor_ptr interceptor)
+ : interceptor_
+ (PortableInterceptor::ServerRequestInterceptor::_duplicate (interceptor))
{
/* no-op */
}
@@ -24,17 +26,15 @@ namespace Test
}
void
- Server_ORBInitializer::pre_init(PortableInterceptor::ORBInitInfo*
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException))
+ Server_ORBInitializer::pre_init(PortableInterceptor::ORBInitInfo*)
+ throw (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))
+ void Server_ORBInitializer::post_init (PortableInterceptor::ORBInitInfo* oii)
+ throw (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
index 0bb4b868cde..6a00e61fca1 100644
--- a/TAO/tests/TransportCurrent/lib/Server_ORBInitializer.h
+++ b/TAO/tests/TransportCurrent/lib/Server_ORBInitializer.h
@@ -13,7 +13,7 @@
#ifndef SERVER_ORBINITIALIZER_T_H
#define SERVER_ORBINITIALIZER_T_H
#include /**/ "ace/pre.h"
-#include /**/ "ace/config-all.h"
+#include /**/ "ace/config.h"
#include /**/ "Current_Test_Export.h"
@@ -27,19 +27,18 @@
namespace Test
{
- class Current_Test_Export Server_ORBInitializer : public PortableInterceptor::ORBInitializer
+ 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 pre_init(PortableInterceptor::ORBInitInfo*)
+ throw (CORBA::SystemException);
- virtual void post_init(PortableInterceptor::ORBInitInfo*
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
+ virtual void post_init(PortableInterceptor::ORBInitInfo*)
+ throw (CORBA::SystemException);
private:
PortableInterceptor::ServerRequestInterceptor_var interceptor_;
@@ -51,112 +50,3 @@ namespace Test
#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 5512951bffa..1f05e06e8ac 100644
--- a/TAO/tests/TransportCurrent/lib/Server_Request_Interceptor.cpp
+++ b/TAO/tests/TransportCurrent/lib/Server_Request_Interceptor.cpp
@@ -2,7 +2,7 @@
#include "ace/Log_Msg.h"
-ACE_RCSID (Framework,
+ACE_RCSID (Current_Test_Lib,
Server_Request_Interceptor,
"$Id$")
@@ -24,9 +24,8 @@ namespace Test
}
void
- Server_Request_Interceptor::test_transport_current (const ACE_TCHAR* amethod
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
+ Server_Request_Interceptor::test_transport_current (const ACE_TCHAR* amethod)
+ throw (CORBA::SystemException)
{
CORBA::String_var name (this->name ());
ACE_DEBUG ((LM_DEBUG,
@@ -44,106 +43,78 @@ namespace Test
int tmpargc = 0;
CORBA::ORB_var orb = CORBA::ORB_init (tmpargc,
0,
- this->orb_id_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
+ this->orb_id_.in ());
if (TAO_debug_level >=1)
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("%s (%P|%t) Resolving the TC\n"),
name.in ()));
CORBA::Object_var tcobject =
- orb->resolve_initial_references ("TAO::Transport::Current"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ orb->resolve_initial_references ("TAO::Transport::Current");
- (*this->test_) (orb.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ // Run the test function
+ (*this->test_) (orb.in ());
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("%s (%P|%t) Success - Transport Current from %s\n"),
- name.in (),
- amethod));
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("%s (%P|%t) Success - Transport Current from %s\n"),
+ name.in (),
+ amethod));
}
/// queries the status of the test
bool
- Server_Request_Interceptor::self_test ()
+ Server_Request_Interceptor::self_test (void)
{
return true;
}
char *
- Server_Request_Interceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
+ Server_Request_Interceptor::name (void)
+ throw (CORBA::SystemException)
{
- return CORBA::string_dup ("SRI ");
+ return CORBA::string_dup ("SRI ");
}
void
- Server_Request_Interceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
+ Server_Request_Interceptor::destroy (void)
+ throw (CORBA::SystemException)
{
}
void
- Server_Request_Interceptor::receive_request_service_contexts (PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
+ Server_Request_Interceptor::receive_request_service_contexts (PortableInterceptor::ServerRequestInfo_ptr)
+ throw (CORBA::SystemException, PortableInterceptor::ForwardRequest)
{
- test_transport_current ("receive_request_service_contexts"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
+ test_transport_current ("receive_request_service_contexts");
}
void
- Server_Request_Interceptor::receive_request (PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
+ Server_Request_Interceptor::receive_request (PortableInterceptor::ServerRequestInfo_ptr)
+ throw (CORBA::SystemException, PortableInterceptor::ForwardRequest)
{
- test_transport_current ("receive_request"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
+ test_transport_current ("receive_request");
}
void
- Server_Request_Interceptor::send_reply (PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
+ Server_Request_Interceptor::send_reply (PortableInterceptor::ServerRequestInfo_ptr)
+ throw (CORBA::SystemException)
{
- test_transport_current ("send_reply"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ test_transport_current ("send_reply");
}
void
- Server_Request_Interceptor::send_exception (PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
+ Server_Request_Interceptor::send_exception (PortableInterceptor::ServerRequestInfo_ptr)
+ throw (CORBA::SystemException, PortableInterceptor::ForwardRequest)
{
- test_transport_current ("send_exception"
- ACE_ENV_ARG_PARAMETER);
-
- ACE_CHECK;
+ test_transport_current ("send_exception");
}
void
- Server_Request_Interceptor::send_other (PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
+ Server_Request_Interceptor::send_other (PortableInterceptor::ServerRequestInfo_ptr)
+ throw (CORBA::SystemException, PortableInterceptor::ForwardRequest)
{
- test_transport_current ("send_other"
- ACE_ENV_ARG_PARAMETER);
-
- ACE_CHECK;
+ test_transport_current ("send_other");
}
} /* namespace Test */
diff --git a/TAO/tests/TransportCurrent/lib/Server_Request_Interceptor.h b/TAO/tests/TransportCurrent/lib/Server_Request_Interceptor.h
index a1d96b50b38..f489156c2ae 100644
--- a/TAO/tests/TransportCurrent/lib/Server_Request_Interceptor.h
+++ b/TAO/tests/TransportCurrent/lib/Server_Request_Interceptor.h
@@ -16,7 +16,7 @@
#ifndef SERVER_REQUEST_INTERCEPTOR_H
#define SERVER_REQUEST_INTERCEPTOR_H
-#include /**/ "ace/config-all.h"
+#include /**/ "ace/config.h"
#include /**/ "Current_Test_Export.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
@@ -26,7 +26,6 @@
#include "Current_TestC.h"
#include "tao/TransportCurrent/TCC.h"
-
#include "tao/PortableInterceptorC.h"
#include "tao/LocalObject.h"
#include "tao/PI_Server/PI_Server.h"
@@ -37,7 +36,7 @@ namespace Test
/// A metod doing the actual testing, so we could change it for the
/// different traits implementations
- typedef int (*TEST) (CORBA::ORB_ptr ACE_ENV_ARG_DECL_WITH_DEFAULTS);
+ typedef int (*TEST) (CORBA::ORB_ptr);
/**
* @class Server_Request_Interceptor
@@ -52,15 +51,16 @@ namespace Test
public:
/// Constructor.
- Server_Request_Interceptor (const char*orb_id, TEST test);
+ Server_Request_Interceptor (const char*orb_id,
+ TEST test);
/// Destructor.
virtual ~Server_Request_Interceptor (void);
- virtual void test_transport_current (const char* amethod
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
+ virtual void test_transport_current (const char* amethod)
+ throw (CORBA::SystemException);
+ /// Coherency test
virtual bool self_test (void);
/**
@@ -73,39 +73,24 @@ namespace Test
*/
//@{
/// Return the name of this ServerRequestinterceptor.
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_request_service_contexts (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_request (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_reply (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_exception (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_other (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
+ virtual char * name (void) throw (CORBA::SystemException);
+
+ virtual void destroy (void) throw (CORBA::SystemException);
+
+ virtual void receive_request_service_contexts (PortableInterceptor::ServerRequestInfo_ptr ri)
+ throw (CORBA::SystemException, PortableInterceptor::ForwardRequest);
+
+ virtual void receive_request (PortableInterceptor::ServerRequestInfo_ptr ri)
+ throw (CORBA::SystemException, PortableInterceptor::ForwardRequest);
+
+ virtual void send_reply (PortableInterceptor::ServerRequestInfo_ptr ri)
+ throw (CORBA::SystemException);
+
+ virtual void send_exception (PortableInterceptor::ServerRequestInfo_ptr ri)
+ throw (CORBA::SystemException, PortableInterceptor::ForwardRequest);
+
+ virtual void send_other (PortableInterceptor::ServerRequestInfo_ptr ri)
+ throw (CORBA::SystemException, PortableInterceptor::ForwardRequest);
//@}
protected: