summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs
diff options
context:
space:
mode:
authorsmcqueen <smcqueen@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2008-10-17 13:03:49 +0000
committersmcqueen <smcqueen@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2008-10-17 13:03:49 +0000
commit502138e3d4bf83f95d264ea61694e122f1eab3e7 (patch)
tree61f558cca915d26509d1acdfcb3557c5ec1e4a65 /TAO/orbsvcs
parent94a5ed4c9dacc23d00d0e4586f3f40c79250794b (diff)
downloadATCD-502138e3d4bf83f95d264ea61694e122f1eab3e7.tar.gz
ChangeLogTag: Fri Oct 17 13:03:29 UTC 2008 Simon McQueen <sm@prismtech.com>
Diffstat (limited to 'TAO/orbsvcs')
-rw-r--r--TAO/orbsvcs/tests/Bug_2287_Regression/ServerORBInitializer2.cpp27
-rw-r--r--TAO/orbsvcs/tests/Bug_2287_Regression/ServerORBInitializer2.h18
-rw-r--r--TAO/orbsvcs/tests/Bug_2287_Regression/ServerRequest_Interceptor2.cpp3
-rw-r--r--TAO/orbsvcs/tests/Bug_2287_Regression/ServerRequest_Interceptor2.h65
-rw-r--r--TAO/orbsvcs/tests/Bug_2287_Regression/server.cpp2
5 files changed, 69 insertions, 46 deletions
diff --git a/TAO/orbsvcs/tests/Bug_2287_Regression/ServerORBInitializer2.cpp b/TAO/orbsvcs/tests/Bug_2287_Regression/ServerORBInitializer2.cpp
index 7aff46ebb9d..df3b9bad0f6 100644
--- a/TAO/orbsvcs/tests/Bug_2287_Regression/ServerORBInitializer2.cpp
+++ b/TAO/orbsvcs/tests/Bug_2287_Regression/ServerORBInitializer2.cpp
@@ -8,35 +8,46 @@
#include "tao/Exception.h"
+Server_ORBInitializer2::Server_ORBInitializer2 (void)
+ : sri_ (0)
+{
+}
+
void
Server_ORBInitializer2::pre_init (
- PortableInterceptor::ORBInitInfo_ptr)
+ PortableInterceptor::ORBInitInfo_ptr
+ )
{
-
}
void
Server_ORBInitializer2::post_init (
- PortableInterceptor::ORBInitInfo_ptr info)
+ PortableInterceptor::ORBInitInfo_ptr info
+ )
{
this->register_server_request_interceptors (info);
}
void
Server_ORBInitializer2::register_server_request_interceptors (
- PortableInterceptor::ORBInitInfo_ptr info)
+ PortableInterceptor::ORBInitInfo_ptr info
+ )
{
- PortableInterceptor::ServerRequestInterceptor_ptr sri =
- PortableInterceptor::ServerRequestInterceptor::_nil ();
-
+ TAO249_ServerRequest_Interceptor2 *sri = 0;
ACE_NEW_THROW_EX (sri,
TAO249_ServerRequest_Interceptor2,
CORBA::NO_MEMORY ());
PortableInterceptor::ServerRequestInterceptor_var
server_interceptor = sri;
+ this->sri_ = sri;
info->add_server_request_interceptor (server_interceptor.in ());
}
-
+void
+Server_ORBInitializer2::set_server_iogr (CORBA::Object_ptr obj)
+{
+ if (this->sri_)
+ this->sri_->server_iogr_ = CORBA::Object::_duplicate (obj);
+}
diff --git a/TAO/orbsvcs/tests/Bug_2287_Regression/ServerORBInitializer2.h b/TAO/orbsvcs/tests/Bug_2287_Regression/ServerORBInitializer2.h
index ed30383aacc..eba911281cc 100644
--- a/TAO/orbsvcs/tests/Bug_2287_Regression/ServerORBInitializer2.h
+++ b/TAO/orbsvcs/tests/Bug_2287_Regression/ServerORBInitializer2.h
@@ -20,6 +20,8 @@
#include "tao/LocalObject.h"
+class TAO249_ServerRequest_Interceptor2;
+
/// RTCORBA ORB initializer.
class Server_ORBInitializer2 :
public virtual PortableInterceptor::ORBInitializer,
@@ -27,19 +29,27 @@ class Server_ORBInitializer2 :
{
public:
- virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info);
+ Server_ORBInitializer2 (void);
+
+ virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info
+ );
- virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info);
+ virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info
+ );
+
+ void set_server_iogr (CORBA::Object_ptr obj);
private:
/// Register the necessary interceptors.
void register_server_request_interceptors (
- PortableInterceptor::ORBInitInfo_ptr info);
+ PortableInterceptor::ORBInitInfo_ptr info
+ );
+ // Private temprorary pointer
+ TAO249_ServerRequest_Interceptor2 *sri_;
};
#include /**/ "ace/post.h"
#endif /* TAO249_SERVER_ORBINITIALIZER2_H */
-
diff --git a/TAO/orbsvcs/tests/Bug_2287_Regression/ServerRequest_Interceptor2.cpp b/TAO/orbsvcs/tests/Bug_2287_Regression/ServerRequest_Interceptor2.cpp
index 4755686d754..d009ae9a5ab 100644
--- a/TAO/orbsvcs/tests/Bug_2287_Regression/ServerRequest_Interceptor2.cpp
+++ b/TAO/orbsvcs/tests/Bug_2287_Regression/ServerRequest_Interceptor2.cpp
@@ -19,9 +19,6 @@ ACE_RCSID (FaultTolerance,
TAO249_ServerRequest_Interceptor2,
"$Id$")
-CORBA::Object_var
-TAO249_ServerRequest_Interceptor2::server_iogr_ = CORBA::Object::_nil ();
-
TAO249_ServerRequest_Interceptor2::TAO249_ServerRequest_Interceptor2 (void)
: orb_ (0),
expired_ (0)
diff --git a/TAO/orbsvcs/tests/Bug_2287_Regression/ServerRequest_Interceptor2.h b/TAO/orbsvcs/tests/Bug_2287_Regression/ServerRequest_Interceptor2.h
index a038756837b..0f48024748b 100644
--- a/TAO/orbsvcs/tests/Bug_2287_Regression/ServerRequest_Interceptor2.h
+++ b/TAO/orbsvcs/tests/Bug_2287_Regression/ServerRequest_Interceptor2.h
@@ -30,52 +30,57 @@ class TAO249_ServerRequest_Interceptor2
{
public:
-/// Constructor.
-TAO249_ServerRequest_Interceptor2 (void);
+ /// Constructor.
+ TAO249_ServerRequest_Interceptor2 (void);
-/// Destructor.
-~TAO249_ServerRequest_Interceptor2 (void);
+ /// Destructor.
+ ~TAO249_ServerRequest_Interceptor2 (void);
-/**
- * @name Methods Required by the Server Request Interceptor
- * Interface
- *
- * These are methods that must be implemented since they are pure
- * virtual in the abstract base class. They are the canonical
- * methods required for all server request interceptors.
- */
-//@{
-/// Return the name of this ServerRequestinterceptor.
-virtual char * name (void);
+ /**
+ * @name Methods Required by the Server Request Interceptor
+ * Interface
+ *
+ * These are methods that must be implemented since they are pure
+ * virtual in the abstract base class. They are the canonical
+ * methods required for all server request interceptors.
+ */
+ //@{
+ /// Return the name of this ServerRequestinterceptor.
+ virtual char * name ();
-virtual void destroy (void);
+ virtual void destroy ();
-virtual void receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr ri);
+ virtual void receive_request_service_contexts (
+ PortableInterceptor::ServerRequestInfo_ptr ri
+ );
-virtual void receive_request (
- PortableInterceptor::ServerRequestInfo_ptr ri);
+ virtual void receive_request (
+ PortableInterceptor::ServerRequestInfo_ptr ri
+ );
-virtual void send_reply (
- PortableInterceptor::ServerRequestInfo_ptr ri);
+ virtual void send_reply (
+ PortableInterceptor::ServerRequestInfo_ptr ri
+ );
-virtual void send_exception (
- PortableInterceptor::ServerRequestInfo_ptr ri);
+ virtual void send_exception (
+ PortableInterceptor::ServerRequestInfo_ptr ri
+ );
-virtual void send_other (
- PortableInterceptor::ServerRequestInfo_ptr ri);
-//@}
+ virtual void send_other (
+ PortableInterceptor::ServerRequestInfo_ptr ri
+ );
+ //@}
-static CORBA::Object_var server_iogr_;
+ CORBA::Object_var server_iogr_;
protected:
TimeBase::TimeT get_now (void);
private:
-CORBA::ORB_var orb_;
+ CORBA::ORB_var orb_;
-CORBA::Boolean expired_;
+ CORBA::Boolean expired_;
};
#endif /* TAO249_SERVER_REQUEST_INTERCEPTOR2_H */
diff --git a/TAO/orbsvcs/tests/Bug_2287_Regression/server.cpp b/TAO/orbsvcs/tests/Bug_2287_Regression/server.cpp
index a8cc8651d9e..6b6bf38037b 100644
--- a/TAO/orbsvcs/tests/Bug_2287_Regression/server.cpp
+++ b/TAO/orbsvcs/tests/Bug_2287_Regression/server.cpp
@@ -193,7 +193,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
ACE_OS::fprintf (output_file, "%s", iorgr_string.in ());
ACE_OS::fclose (output_file);
- TAO249_ServerRequest_Interceptor2::server_iogr_ = CORBA::Object::_duplicate (iogr.in ());
+ temp_initializer->set_server_iogr (iogr.in ());
poa_manager->activate ();