summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2009-03-17 10:17:38 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2009-03-17 10:17:38 +0000
commit8995bb9f46383c2e8149099694c65a8de626a16a (patch)
tree85106fba4304c6a62b1ed2b789de4747db2fa488
parent25c65769b52d3b30f4184c532426fc5589efa1f0 (diff)
downloadATCD-8995bb9f46383c2e8149099694c65a8de626a16a.tar.gz
Tue Mar 17 10:09:22 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl>
* orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.cpp: * orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.h: * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Acceptor.h: * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp: * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.h: * tao/BiDir_GIOP/BiDir_Service_Context_Handler.cpp: * tao/BiDir_GIOP/BiDir_Service_Context_Handler.h: * tao/Codeset/Codeset_Manager_i.cpp: * tao/Codeset/Codeset_Manager_i.h: * tao/Codeset_Manager.h: * tao/DiffServPolicy/DiffServ_Protocols_Hooks.cpp: * tao/DiffServPolicy/DiffServ_Protocols_Hooks.h: * tao/DiffServPolicy/DiffServ_Service_Context_Handler.cpp: * tao/DiffServPolicy/DiffServ_Service_Context_Handler.h: * tao/DiffServPolicy/DiffServPolicy_ORBInitializer.cpp: * tao/GIOP_Message_Base.cpp: * tao/IIOP_Transport.cpp: * tao/IIOP_Transport.h: * tao/IORManipulation/IORManip_IIOP_Filter.cpp: * tao/LocateRequest_Invocation.cpp: * tao/Makefile.am: * tao/Network_Priority_Protocols_Hooks.h: * tao/ORB_Core.cpp: * tao/ORB_Core.h: * tao/Protocols_Hooks.h: * tao/Remote_Invocation.cpp: * tao/Remote_Invocation.h: * tao/RTCORBA/RT_Endpoint_Selector_Factory.h: * tao/RTCORBA/RT_ORBInitializer.cpp: * tao/RTCORBA/RT_Protocols_Hooks.cpp: * tao/RTCORBA/RT_Protocols_Hooks.h: * tao/RTCORBA/RT_Service_Context_Handler.cpp: * tao/RTCORBA/RT_Service_Context_Handler.h: * tao/RTCORBA/RT_Thread_Lane_Resources_Manager.h: * tao/Service_Context_Handler.h: * tao/Service_Context_Handler_Registry.cpp: * tao/Service_Context_Handler_Registry.h: * tao/Strategies/SCIOP_Transport.cpp: * tao/Strategies/SCIOP_Transport.h: * tao/Transport.cpp: * tao/Transport.h: * tao/TypeCodeFactory/TypeCodeFactory_i.cpp: Refactored BiDir/Diffserv/RTCORBA/Codeset support. The service contexts are now generated by the specific service context handlers. This way the special RTCORBA/Diffserv hooks are removed from the code, generating the service contexts is now a generic solution. In the near future we will also rework the handling of those service contexts. The generation of the BiDIR service context is now also moved out of the specific transports
-rw-r--r--TAO/ChangeLog54
-rw-r--r--TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.cpp42
-rw-r--r--TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.h7
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Acceptor.h2
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp43
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.h4
-rw-r--r--TAO/tao/BiDir_GIOP/BiDir_Service_Context_Handler.cpp32
-rw-r--r--TAO/tao/BiDir_GIOP/BiDir_Service_Context_Handler.h9
-rw-r--r--TAO/tao/Codeset/Codeset_Manager_i.cpp8
-rw-r--r--TAO/tao/Codeset/Codeset_Manager_i.h2
-rw-r--r--TAO/tao/Codeset_Manager.h2
-rw-r--r--TAO/tao/DiffServPolicy/DiffServPolicy_ORBInitializer.cpp24
-rw-r--r--TAO/tao/DiffServPolicy/DiffServ_Protocols_Hooks.cpp47
-rw-r--r--TAO/tao/DiffServPolicy/DiffServ_Protocols_Hooks.h19
-rw-r--r--TAO/tao/DiffServPolicy/DiffServ_Service_Context_Handler.cpp66
-rw-r--r--TAO/tao/DiffServPolicy/DiffServ_Service_Context_Handler.h43
-rw-r--r--TAO/tao/GIOP_Message_Base.cpp2
-rw-r--r--TAO/tao/IIOP_Transport.cpp37
-rw-r--r--TAO/tao/IIOP_Transport.h4
-rw-r--r--TAO/tao/IORManipulation/IORManip_IIOP_Filter.cpp5
-rw-r--r--TAO/tao/LocateRequest_Invocation.cpp6
-rw-r--r--TAO/tao/Makefile.am6
-rw-r--r--TAO/tao/Network_Priority_Protocols_Hooks.h8
-rw-r--r--TAO/tao/ORB_Core.cpp22
-rw-r--r--TAO/tao/ORB_Core.h6
-rw-r--r--TAO/tao/Protocols_Hooks.h4
-rw-r--r--TAO/tao/RTCORBA/RT_Endpoint_Selector_Factory.h4
-rw-r--r--TAO/tao/RTCORBA/RT_ORBInitializer.cpp7
-rw-r--r--TAO/tao/RTCORBA/RT_Protocols_Hooks.cpp68
-rw-r--r--TAO/tao/RTCORBA/RT_Protocols_Hooks.h7
-rw-r--r--TAO/tao/RTCORBA/RT_Service_Context_Handler.cpp101
-rw-r--r--TAO/tao/RTCORBA/RT_Service_Context_Handler.h47
-rw-r--r--TAO/tao/RTCORBA/RT_Thread_Lane_Resources_Manager.h4
-rw-r--r--TAO/tao/Remote_Invocation.cpp32
-rw-r--r--TAO/tao/Remote_Invocation.h2
-rw-r--r--TAO/tao/Service_Context_Handler.h16
-rw-r--r--TAO/tao/Service_Context_Handler_Registry.cpp23
-rw-r--r--TAO/tao/Service_Context_Handler_Registry.h10
-rw-r--r--TAO/tao/Strategies/SCIOP_Transport.cpp33
-rw-r--r--TAO/tao/Strategies/SCIOP_Transport.h4
-rw-r--r--TAO/tao/Transport.cpp14
-rw-r--r--TAO/tao/Transport.h2
-rw-r--r--TAO/tao/TypeCodeFactory/TypeCodeFactory_i.cpp34
43 files changed, 517 insertions, 395 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index e359d99cf2a..9757d21f62b 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,8 +1,60 @@
+Tue Mar 17 10:09:22 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.cpp:
+ * orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.h:
+ * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Acceptor.h:
+ * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp:
+ * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.h:
+ * tao/BiDir_GIOP/BiDir_Service_Context_Handler.cpp:
+ * tao/BiDir_GIOP/BiDir_Service_Context_Handler.h:
+ * tao/Codeset/Codeset_Manager_i.cpp:
+ * tao/Codeset/Codeset_Manager_i.h:
+ * tao/Codeset_Manager.h:
+ * tao/DiffServPolicy/DiffServ_Protocols_Hooks.cpp:
+ * tao/DiffServPolicy/DiffServ_Protocols_Hooks.h:
+ * tao/DiffServPolicy/DiffServ_Service_Context_Handler.cpp:
+ * tao/DiffServPolicy/DiffServ_Service_Context_Handler.h:
+ * tao/DiffServPolicy/DiffServPolicy_ORBInitializer.cpp:
+ * tao/GIOP_Message_Base.cpp:
+ * tao/IIOP_Transport.cpp:
+ * tao/IIOP_Transport.h:
+ * tao/IORManipulation/IORManip_IIOP_Filter.cpp:
+ * tao/LocateRequest_Invocation.cpp:
+ * tao/Makefile.am:
+ * tao/Network_Priority_Protocols_Hooks.h:
+ * tao/ORB_Core.cpp:
+ * tao/ORB_Core.h:
+ * tao/Protocols_Hooks.h:
+ * tao/Remote_Invocation.cpp:
+ * tao/Remote_Invocation.h:
+ * tao/RTCORBA/RT_Endpoint_Selector_Factory.h:
+ * tao/RTCORBA/RT_ORBInitializer.cpp:
+ * tao/RTCORBA/RT_Protocols_Hooks.cpp:
+ * tao/RTCORBA/RT_Protocols_Hooks.h:
+ * tao/RTCORBA/RT_Service_Context_Handler.cpp:
+ * tao/RTCORBA/RT_Service_Context_Handler.h:
+ * tao/RTCORBA/RT_Thread_Lane_Resources_Manager.h:
+ * tao/Service_Context_Handler.h:
+ * tao/Service_Context_Handler_Registry.cpp:
+ * tao/Service_Context_Handler_Registry.h:
+ * tao/Strategies/SCIOP_Transport.cpp:
+ * tao/Strategies/SCIOP_Transport.h:
+ * tao/Transport.cpp:
+ * tao/Transport.h:
+ * tao/TypeCodeFactory/TypeCodeFactory_i.cpp:
+ Refactored BiDir/Diffserv/RTCORBA/Codeset support. The service contexts are
+ now generated by the specific service context handlers. This way the
+ special RTCORBA/Diffserv hooks are removed from the code, generating
+ the service contexts is now a generic solution. In the near future
+ we will also rework the handling of those service contexts. The
+ generation of the BiDIR service context is now also moved out of the
+ specific transports
+
Tue Mar 17 05:25:49 UTC 2009 Phil Mesnier <mesnier_p@ociweb.com>
* tests/RTCORBA/Collocation/run_test.pl:
Fuzz fix.
-
+
Mon Mar 16 19:26:32 UTC 2009 Phil Mesnier <mesnier_p@ociweb.com>
* configure.ac:
diff --git a/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.cpp b/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.cpp
index f9e57d5a2d4..e8b9460fda3 100644
--- a/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.cpp
+++ b/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.cpp
@@ -194,37 +194,6 @@ TAO::HTIOP::Transport::send_message (TAO_OutputCDR &stream,
}
int
-TAO::HTIOP::Transport::generate_request_header (TAO_Operation_Details &opdetails,
- TAO_Target_Specification &spec,
- TAO_OutputCDR &msg)
-{
- // Check whether we have a Bi Dir HTIOP policy set, whether the
- // messaging objects are ready to handle bidirectional connections
- // and also make sure that we have not recd. or sent any information
- // regarding this before...
- if (this->orb_core ()->bidir_giop_policy () &&
- this->messaging_object ()->is_ready_for_bidirectional (msg) &&
- this->bidirectional_flag () < 0)
- {
- this->set_bidir_context_info (opdetails);
-
- // Set the flag to 1 (i.e., originating side)
- this->bidirectional_flag (1);
-
- // At the moment we enable BiDIR giop we have to get a new
- // request id to make sure that we follow the even/odd rule
- // for request id's. We only need to do this when enabled
- // it, after that the Transport Mux Strategy will make sure
- // that the rule is followed
- opdetails.request_id (this->tms ()->request_id ());
- }
-
- return TAO_Transport::generate_request_header (opdetails,
- spec,
- msg);
-}
-
-int
TAO::HTIOP::Transport::tear_listen_point_list (TAO_InputCDR &cdr)
{
CORBA::Boolean byte_order;
@@ -248,8 +217,6 @@ TAO::HTIOP::Transport::tear_listen_point_list (TAO_InputCDR &cdr)
void
TAO::HTIOP::Transport::set_bidir_context_info (TAO_Operation_Details &opdetails)
{
- ACE_UNUSED_ARG (opdetails);
-
// Get a handle to the acceptor registry
TAO_Acceptor_Registry &ar =
this->orb_core ()->lane_resources ().acceptor_registry ();
@@ -264,7 +231,7 @@ TAO::HTIOP::Transport::set_bidir_context_info (TAO_Operation_Details &opdetails)
acceptor++)
{
// Check whether it is a HTIOP acceptor
- if ((*acceptor)->tag () == OCI_TAG_HTIOP_PROFILE)
+ if ((*acceptor)->tag () == this->tag ())
{
if (this->get_listen_point (listen_point_list,
*acceptor) == -1)
@@ -283,13 +250,12 @@ TAO::HTIOP::Transport::set_bidir_context_info (TAO_Operation_Details &opdetails)
TAO_OutputCDR cdr;
// Marshall the information into the stream
- if ((cdr << ACE_OutputCDR::from_boolean (TAO_ENCAP_BYTE_ORDER) == 0)
- || (cdr << listen_point_list) == 0)
+ if (!(cdr << ACE_OutputCDR::from_boolean (TAO_ENCAP_BYTE_ORDER))
+ || !(cdr << listen_point_list))
return;
// Add this info in to the svc_list
- opdetails.request_service_context ().set_context (IOP::BI_DIR_IIOP,
- cdr);
+ opdetails.request_service_context ().set_context (IOP::BI_DIR_IIOP, cdr);
return;
}
diff --git a/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.h b/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.h
index 51b035662ce..242d7c16eea 100644
--- a/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.h
+++ b/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.h
@@ -114,13 +114,6 @@ namespace TAO
TAO_TWOWAY_REQUEST,
ACE_Time_Value *max_time_wait = 0);
- // @@ This is probably not needed - Priyanka
- // This is needed because we want to send additional information
- // such as session id etc. in the header.
- virtual int generate_request_header (TAO_Operation_Details &opdetails,
- TAO_Target_Specification &spec,
- TAO_OutputCDR &msg);
-
virtual int tear_listen_point_list (TAO_InputCDR &cdr);
virtual TAO_Connection_Handler * connection_handler_i (void);
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Acceptor.h b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Acceptor.h
index 07185f531f1..0bdde1c0a35 100644
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Acceptor.h
+++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Acceptor.h
@@ -151,7 +151,7 @@ namespace TAO
* handshake. This includes both the TCP handshake and the SSL
* handshake.
*/
- const ACE_Time_Value timeout_;
+ ACE_Time_Value const timeout_;
};
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp
index 7da5f41f889..acee802653c 100644
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp
+++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp
@@ -169,50 +169,17 @@ TAO::SSLIOP::Transport::send_message (TAO_OutputCDR &stream,
return 1;
}
-
-int
-TAO::SSLIOP::Transport::generate_request_header (
- TAO_Operation_Details &opdetails,
- TAO_Target_Specification &spec,
- TAO_OutputCDR &msg)
-{
- // Check whether we have a Bi Dir IIOP policy set, whether the
- // messaging objects are ready to handle bidirectional connections
- // and also make sure that we have not recd. or sent any information
- // regarding this before...
- if (this->orb_core ()->bidir_giop_policy ()
- && this->messaging_object ()->is_ready_for_bidirectional (msg)
- && this->bidirectional_flag () < 0)
- {
- this->set_bidir_context_info (opdetails);
-
- // Set the flag to 1
- this->bidirectional_flag (1);
-
- // At the moment we enable BiDIR giop we have to get a new
- // request id to make sure that we follow the even/odd rule
- // for request id's. We only need to do this when enabled
- // it, after that the Transport Mux Strategy will make sure
- // that the rule is followed
- opdetails.request_id (this->tms ()->request_id ());
- }
-
- // We are going to pass on this request to the underlying messaging
- // layer. It should take care of this request
- return TAO_Transport::generate_request_header (opdetails, spec, msg);
-}
-
int
TAO::SSLIOP::Transport::tear_listen_point_list (TAO_InputCDR &cdr)
{
CORBA::Boolean byte_order;
- if ((cdr >> ACE_InputCDR::to_boolean (byte_order)) == 0)
+ if (!(cdr >> ACE_InputCDR::to_boolean (byte_order)))
return -1;
cdr.reset_byte_order (static_cast<int> (byte_order));
IIOP::ListenPointList listen_list;
- if ((cdr >> listen_list) == 0)
+ if (!(cdr >> listen_list))
return -1;
// As we have received a bidirectional information, set the flag to
@@ -242,7 +209,7 @@ TAO::SSLIOP::Transport::set_bidir_context_info (
acceptor++)
{
// Check whether it is a IIOP acceptor
- if ((*acceptor)->tag () == IOP::TAG_INTERNET_IOP)
+ if ((*acceptor)->tag () == this->tag ())
{
if (this->get_listen_point (listen_point_list, *acceptor) == -1)
{
@@ -259,8 +226,8 @@ TAO::SSLIOP::Transport::set_bidir_context_info (
TAO_OutputCDR cdr;
// Marshall the information into the stream
- if ((cdr << ACE_OutputCDR::from_boolean (TAO_ENCAP_BYTE_ORDER) == 0)
- || (cdr << listen_point_list) == 0)
+ if (!(cdr << ACE_OutputCDR::from_boolean (TAO_ENCAP_BYTE_ORDER))
+ || !(cdr << listen_point_list))
return;
// Add this info in to the svc_list
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.h b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.h
index 88a76ed8546..6d32bec493e 100644
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.h
+++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.h
@@ -111,10 +111,6 @@ namespace TAO
TAO_TWOWAY_REQUEST,
ACE_Time_Value *max_time_wait = 0);
- virtual int generate_request_header (TAO_Operation_Details &opdetails,
- TAO_Target_Specification &spec,
- TAO_OutputCDR &msg);
-
/// Open teh service context list and process it.
virtual int tear_listen_point_list (TAO_InputCDR &cdr);
//@}
diff --git a/TAO/tao/BiDir_GIOP/BiDir_Service_Context_Handler.cpp b/TAO/tao/BiDir_GIOP/BiDir_Service_Context_Handler.cpp
index 3a008c59d5f..244e89db3a7 100644
--- a/TAO/tao/BiDir_GIOP/BiDir_Service_Context_Handler.cpp
+++ b/TAO/tao/BiDir_GIOP/BiDir_Service_Context_Handler.cpp
@@ -9,6 +9,10 @@ ACE_RCSID (BiDir_GIOP,
#include "tao/CDR.h"
#include "tao/TAO_Server_Request.h"
#include "tao/Transport.h"
+#include "tao/ORB_Core.h"
+#include "tao/GIOP_Message_Base.h"
+#include "tao/Operation_Details.h"
+#include "tao/Transport_Mux_Strategy.h"
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -23,4 +27,32 @@ TAO_BiDIR_Service_Context_Handler::process_service_context (
return transport.tear_listen_point_list (cdr);
}
+int
+TAO_BiDIR_Service_Context_Handler::generate_service_context (
+ TAO_Stub *,
+ TAO_Transport& transport,
+ TAO_Operation_Details &opdetails,
+ TAO_Target_Specification &spec,
+ TAO_OutputCDR &msg)
+{
+ if (transport.orb_core ()->bidir_giop_policy () &&
+ transport.messaging_object ()->is_ready_for_bidirectional (msg) &&
+ transport.bidirectional_flag () < 0)
+ {
+ transport.set_bidir_context_info (opdetails);
+
+ // Set the flag to 1 (i.e., originating side)
+ transport.bidirectional_flag (1);
+
+ // At the moment we enable BiDIR giop we have to get a new
+ // request id to make sure that we follow the even/odd rule
+ // for request id's. We only need to do this when enabled
+ // it, after that the Transport Mux Strategy will make sure
+ // that the rule is followed
+ opdetails.request_id (transport.tms ()->request_id ());
+ }
+
+ return 0;
+}
+
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/BiDir_GIOP/BiDir_Service_Context_Handler.h b/TAO/tao/BiDir_GIOP/BiDir_Service_Context_Handler.h
index fe81d85889e..dd6999505fd 100644
--- a/TAO/tao/BiDir_GIOP/BiDir_Service_Context_Handler.h
+++ b/TAO/tao/BiDir_GIOP/BiDir_Service_Context_Handler.h
@@ -23,11 +23,20 @@
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
+class TAO_Stub;
+
class TAO_BiDIR_Service_Context_Handler :
public TAO_Service_Context_Handler
{
+public:
virtual int process_service_context (TAO_Transport& transport,
const IOP::ServiceContext& context);
+ virtual int generate_service_context (
+ TAO_Stub* stub,
+ TAO_Transport &transport,
+ TAO_Operation_Details &opdetails,
+ TAO_Target_Specification &spec,
+ TAO_OutputCDR &msg);
};
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/Codeset/Codeset_Manager_i.cpp b/TAO/tao/Codeset/Codeset_Manager_i.cpp
index f510cc67312..0e4b1fb706b 100644
--- a/TAO/tao/Codeset/Codeset_Manager_i.cpp
+++ b/TAO/tao/Codeset/Codeset_Manager_i.cpp
@@ -14,6 +14,7 @@
#include "tao/Codeset/Codeset_Translator_Factory.h"
#include "tao/Codeset/Codeset.h"
#include "tao/Codeset/CodeSetContextC.h"
+#include "tao/Codeset/Codeset_Service_Context_Handler.h"
#include "ace/Dynamic_Service.h"
#include "ace/Codeset_Registry.h"
@@ -347,7 +348,7 @@ TAO_Codeset_Manager_i::computeTCS (CONV_FRAME::CodeSetComponent &remote,
}
void
-TAO_Codeset_Manager_i::open(void)
+TAO_Codeset_Manager_i::open(TAO_ORB_Core& core)
{
#if 0
// These translators help comply with the CORBA 3.0.2 specifcation
@@ -386,6 +387,11 @@ TAO_Codeset_Manager_i::open(void)
));
}
#endif
+ //
+ TAO_Codeset_Service_Context_Handler* h = 0;
+ ACE_NEW (h,
+ TAO_Codeset_Service_Context_Handler());
+ core.service_context_registry ().bind (IOP::CodeSets, h);
// add in from the service configurator
this->codeset_info_.ForCharData.native_code_set =
diff --git a/TAO/tao/Codeset/Codeset_Manager_i.h b/TAO/tao/Codeset/Codeset_Manager_i.h
index a9167804b1c..3efbbfb8d51 100644
--- a/TAO/tao/Codeset/Codeset_Manager_i.h
+++ b/TAO/tao/Codeset/Codeset_Manager_i.h
@@ -94,7 +94,7 @@ public:
/// initialization. This will traverse the list of named codeset
/// translator factories and add any of those that have a native
/// codeset id matching the manager's native codeset id.
- void open(void);
+ void open(TAO_ORB_Core& core);
virtual TAO_Codeset_Descriptor_Base *char_codeset_descriptor (void);
virtual TAO_Codeset_Descriptor_Base *wchar_codeset_descriptor (void);
diff --git a/TAO/tao/Codeset_Manager.h b/TAO/tao/Codeset_Manager.h
index 292ad53fb8d..0afbde23a4f 100644
--- a/TAO/tao/Codeset_Manager.h
+++ b/TAO/tao/Codeset_Manager.h
@@ -87,7 +87,7 @@ public:
virtual TAO_Codeset_Translator_Base * get_wchar_trans (CONV_FRAME::CodeSetId tcs) = 0;
- virtual void open (void) = 0;
+ virtual void open (TAO_ORB_Core& core) = 0;
virtual TAO_Codeset_Descriptor_Base *char_codeset_descriptor (void) = 0;
virtual TAO_Codeset_Descriptor_Base *wchar_codeset_descriptor (void) = 0;
diff --git a/TAO/tao/DiffServPolicy/DiffServPolicy_ORBInitializer.cpp b/TAO/tao/DiffServPolicy/DiffServPolicy_ORBInitializer.cpp
index 88ee37f6d69..100053ff8de 100644
--- a/TAO/tao/DiffServPolicy/DiffServPolicy_ORBInitializer.cpp
+++ b/TAO/tao/DiffServPolicy/DiffServPolicy_ORBInitializer.cpp
@@ -3,6 +3,7 @@
#include "tao/DiffServPolicy/DiffServPolicy_ORBInitializer.h"
#include "tao/DiffServPolicy/DiffServPolicy.h"
#include "tao/DiffServPolicy/DiffServPolicy_Factory.h"
+#include "tao/DiffServPolicy/DiffServ_Service_Context_Handler.h"
#include "tao/DiffServPolicy/DiffServ_Protocols_Hooks.h"
#include "tao/ORB_Core.h"
#include "tao/PI/ORBInitInfo.h"
@@ -15,8 +16,29 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL
void
TAO_DiffServPolicy_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr)
+ PortableInterceptor::ORBInitInfo_ptr info)
{
+ // Narrow to a TAO_ORBInitInfo object to get access to the
+ // orb_core() TAO extension.
+ TAO_ORBInitInfo_var tao_info = TAO_ORBInitInfo::_narrow (info);
+
+ if (CORBA::is_nil (tao_info.in ()))
+ {
+ if (TAO_debug_level > 0)
+ ACE_ERROR ((LM_ERROR,
+ "(%P|%t) TAO_RT_ORBInitializer::pre_init:\n"
+ "(%P|%t) Unable to narrow "
+ "\"PortableInterceptor::ORBInitInfo_ptr\" to\n"
+ "(%P|%t) \"TAO_ORBInitInfo *.\"\n"));
+
+ throw ::CORBA::INTERNAL ();
+ }
+
+ // Bind the service context handler for Diffserv
+ TAO_DiffServ_Service_Context_Handler* h = 0;
+ ACE_NEW (h,
+ TAO_DiffServ_Service_Context_Handler());
+ tao_info->orb_core ()->service_context_registry ().bind (IOP::REP_NWPRIORITY, h);
}
void
diff --git a/TAO/tao/DiffServPolicy/DiffServ_Protocols_Hooks.cpp b/TAO/tao/DiffServPolicy/DiffServ_Protocols_Hooks.cpp
index 117e4757961..e6157404590 100644
--- a/TAO/tao/DiffServPolicy/DiffServ_Protocols_Hooks.cpp
+++ b/TAO/tao/DiffServPolicy/DiffServ_Protocols_Hooks.cpp
@@ -32,57 +32,12 @@ TAO_DS_Network_Priority_Protocols_Hooks::init_hooks (TAO_ORB_Core *orb_core)
this->orb_core_ = orb_core;
}
-void
-TAO_DS_Network_Priority_Protocols_Hooks::np_service_context (
- TAO_Stub *stub,
- TAO_Service_Context &service_context,
- CORBA::Boolean restart)
-{
- // If the restart flag is true, then this call for a
- // reinvocation. We need not prepare the Service Context List once
- // again. We can use the already existing one.
- if (!restart)
- {
- CORBA::Policy_var cnpp =
- stub->get_cached_policy (TAO_CACHED_POLICY_CLIENT_NETWORK_PRIORITY);
-
- if (!CORBA::is_nil (cnpp.in ()))
- {
- TAO::NetworkPriorityPolicy_var cnp =
- TAO::NetworkPriorityPolicy::_narrow (cnpp.in ());
-
- TAO::DiffservCodepoint reply_diffserv_codepoint;
- reply_diffserv_codepoint = cnp->reply_diffserv_codepoint ();
-
- CORBA::Long rep_dscp_codepoint = reply_diffserv_codepoint;
-
- this->add_rep_np_service_context_hook (service_context,
- rep_dscp_codepoint);
- }
- }
-}
-
-void
-TAO_DS_Network_Priority_Protocols_Hooks::add_rep_np_service_context_hook (
- TAO_Service_Context &service_context,
- CORBA::Long &dscp_codepoint)
-{
- TAO_OutputCDR cdr;
- if ((cdr << ACE_OutputCDR::from_boolean (TAO_ENCAP_BYTE_ORDER) == 0)
- || (cdr << dscp_codepoint) == 0)
- {
- throw CORBA::MARSHAL ();
- }
-
- service_context.set_context (IOP::REP_NWPRIORITY, cdr);
-}
-
CORBA::Long
TAO_DS_Network_Priority_Protocols_Hooks::get_dscp_codepoint (
TAO_Service_Context &sc)
{
CORBA::Long dscp_codepoint = 0;
- const IOP::ServiceContext *context;
+ const IOP::ServiceContext *context = 0;
if (sc.get_context (IOP::REP_NWPRIORITY, &context) == 1)
{
diff --git a/TAO/tao/DiffServPolicy/DiffServ_Protocols_Hooks.h b/TAO/tao/DiffServPolicy/DiffServ_Protocols_Hooks.h
index 9e935fac90e..6645bc01ce5 100644
--- a/TAO/tao/DiffServPolicy/DiffServ_Protocols_Hooks.h
+++ b/TAO/tao/DiffServPolicy/DiffServ_Protocols_Hooks.h
@@ -49,7 +49,7 @@ public:
CORBA::Long get_dscp_codepoint (TAO_Stub *stub, CORBA::Object *object);
/// This function is used by the server side to figure out the
- /// DiffServ codepoint that is attached and sent as part of the
+ /// DiffServ codepoint that is attached and sent as part of the
/// service context of the request from the client side.
/// Specifically, when CLIENT_PROPAGATED networ priority model
/// is followed, the clients sent the DiffServ codepoint, they
@@ -58,23 +58,6 @@ public:
///
CORBA::Long get_dscp_codepoint (TAO_Service_Context &sc);
- /// This function is called from the ORB_Core to add
- /// network priority policy specific information on the request
- /// service context. Specifically, when CLIENT_PROPAGATED network
- /// priority model is used, the DiffServ codepoint that needs to be used
- /// by the server side in the reply, is specified as a service context
- /// entry, just like how RT-CORBA's CLIENT_PROPAGATED priority model works.
- ///
- void np_service_context (TAO_Stub *stub,
- TAO_Service_Context &service_context,
- CORBA::Boolean restart);
-
- /// Helper function that is used by the np_service_context () method.
- ///
- void add_rep_np_service_context_hook (
- TAO_Service_Context &service_context,
- CORBA::Long &dscp_codepoint);
-
protected:
TAO_ORB_Core *orb_core_;
diff --git a/TAO/tao/DiffServPolicy/DiffServ_Service_Context_Handler.cpp b/TAO/tao/DiffServPolicy/DiffServ_Service_Context_Handler.cpp
new file mode 100644
index 00000000000..45471cedc42
--- /dev/null
+++ b/TAO/tao/DiffServPolicy/DiffServ_Service_Context_Handler.cpp
@@ -0,0 +1,66 @@
+// $Id$
+
+#include "tao/DiffServPolicy/DiffServ_Service_Context_Handler.h"
+
+ACE_RCSID (DiffServPolicy,
+ DiffServ_Service_Context_Handler,
+ "$Id$")
+
+#include "tao/DiffServPolicy/Client_Network_Priority_Policy.h"
+#include "tao/CDR.h"
+#include "tao/TAO_Server_Request.h"
+#include "tao/Transport.h"
+#include "tao/ORB_Core.h"
+#include "tao/GIOP_Message_Base.h"
+#include "tao/Operation_Details.h"
+#include "tao/Transport_Mux_Strategy.h"
+#include "tao/Stub.h"
+
+TAO_BEGIN_VERSIONED_NAMESPACE_DECL
+
+int
+TAO_DiffServ_Service_Context_Handler::process_service_context (
+ TAO_Transport&,
+ const IOP::ServiceContext&)
+{
+ return 0;
+}
+
+int
+TAO_DiffServ_Service_Context_Handler::generate_service_context (
+ TAO_Stub *stub,
+ TAO_Transport& transport,
+ TAO_Operation_Details &opdetails,
+ TAO_Target_Specification &spec,
+ TAO_OutputCDR &msg)
+{
+ if (stub)
+ {
+ CORBA::Policy_var cnpp =
+ stub->get_cached_policy (TAO_CACHED_POLICY_CLIENT_NETWORK_PRIORITY);
+
+ TAO::NetworkPriorityPolicy_var cnp =
+ TAO::NetworkPriorityPolicy::_narrow (cnpp.in ());
+
+ if (!CORBA::is_nil (cnp.in ()))
+ {
+ TAO::DiffservCodepoint const reply_diffserv_codepoint =
+ cnp->reply_diffserv_codepoint ();
+
+ CORBA::Long const rep_dscp_codepoint = reply_diffserv_codepoint;
+
+ TAO_OutputCDR cdr;
+ if (!(cdr << ACE_OutputCDR::from_boolean (TAO_ENCAP_BYTE_ORDER))
+ || !(cdr << rep_dscp_codepoint))
+ {
+ throw CORBA::MARSHAL ();
+ }
+
+ opdetails.request_service_context ().set_context (IOP::REP_NWPRIORITY, cdr);
+ }
+ }
+
+ return 0;
+}
+
+TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/DiffServPolicy/DiffServ_Service_Context_Handler.h b/TAO/tao/DiffServPolicy/DiffServ_Service_Context_Handler.h
new file mode 100644
index 00000000000..8df73fa9dca
--- /dev/null
+++ b/TAO/tao/DiffServPolicy/DiffServ_Service_Context_Handler.h
@@ -0,0 +1,43 @@
+// -*- C++ -*-
+
+// ===================================================================
+/**
+ * @file DiffServ_Service_Context_Handler.h
+ *
+ * $Id$
+ *
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ */
+// ===================================================================
+
+#ifndef TAO_DIFFSERV_SERVICE_CONTEXT_HANDLER_H
+#define TAO_DIFFSERV_SERVICE_CONTEXT_HANDLER_H
+#include /**/ "ace/pre.h"
+#include "tao/DiffServPolicy/DiffServPolicy_Export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "tao/Service_Context_Handler.h"
+
+TAO_BEGIN_VERSIONED_NAMESPACE_DECL
+
+class TAO_DiffServ_Service_Context_Handler :
+ public TAO_Service_Context_Handler
+{
+public:
+ virtual int process_service_context (TAO_Transport& transport,
+ const IOP::ServiceContext& context);
+ virtual int generate_service_context (
+ TAO_Stub *stub,
+ TAO_Transport &transport,
+ TAO_Operation_Details &opdetails,
+ TAO_Target_Specification &spec,
+ TAO_OutputCDR &msg);
+};
+
+TAO_END_VERSIONED_NAMESPACE_DECL
+
+#include /**/ "ace/post.h"
+#endif /* TAO_DIFFSERV_SERVICE_CONTEXT_HANDLER_H */
diff --git a/TAO/tao/GIOP_Message_Base.cpp b/TAO/tao/GIOP_Message_Base.cpp
index c6d88318c31..6e3d3fbf3bc 100644
--- a/TAO/tao/GIOP_Message_Base.cpp
+++ b/TAO/tao/GIOP_Message_Base.cpp
@@ -1880,7 +1880,7 @@ TAO_GIOP_Message_Base::consolidate_fragmented_message (
return -1;
}
- const CORBA::ULong request_id = tmp_request_id;
+ CORBA::ULong const request_id = tmp_request_id;
while (this->fragment_stack_.pop (head) != -1)
{
diff --git a/TAO/tao/IIOP_Transport.cpp b/TAO/tao/IIOP_Transport.cpp
index cf746946bdc..79f184cf52b 100644
--- a/TAO/tao/IIOP_Transport.cpp
+++ b/TAO/tao/IIOP_Transport.cpp
@@ -258,39 +258,10 @@ TAO_IIOP_Transport::send_message (TAO_OutputCDR &stream,
}
int
-TAO_IIOP_Transport::generate_request_header (TAO_Operation_Details &opdetails,
- TAO_Target_Specification &spec,
- TAO_OutputCDR &msg)
-{
- // Check whether we have a Bi Dir IIOP policy set, whether the
- // messaging objects are ready to handle bidirectional connections
- // and also make sure that we have not recd. or sent any information
- // regarding this before...
- if (this->orb_core ()->bidir_giop_policy () &&
- this->messaging_object ()->is_ready_for_bidirectional (msg) &&
- this->bidirectional_flag () < 0)
- {
- this->set_bidir_context_info (opdetails);
-
- // Set the flag to 1 (i.e., originating side)
- this->bidirectional_flag (1);
-
- // At the moment we enable BiDIR giop we have to get a new
- // request id to make sure that we follow the even/odd rule
- // for request id's. We only need to do this when enabled
- // it, after that the Transport Mux Strategy will make sure
- // that the rule is followed
- opdetails.request_id (this->tms ()->request_id ());
- }
-
- return TAO_Transport::generate_request_header (opdetails, spec, msg);
-}
-
-int
TAO_IIOP_Transport::tear_listen_point_list (TAO_InputCDR &cdr)
{
CORBA::Boolean byte_order;
- if ((cdr >> ACE_InputCDR::to_boolean (byte_order)) == 0)
+ if (!(cdr >> ACE_InputCDR::to_boolean (byte_order)))
return -1;
cdr.reset_byte_order (static_cast<int> (byte_order));
@@ -322,7 +293,7 @@ TAO_IIOP_Transport::set_bidir_context_info (TAO_Operation_Details &opdetails)
++acceptor)
{
// Check whether it is an IIOP acceptor
- if ((*acceptor)->tag () == IOP::TAG_INTERNET_IOP)
+ if ((*acceptor)->tag () == this->tag ())
{
if (this->get_listen_point (listen_point_list, *acceptor) == -1)
{
@@ -433,7 +404,7 @@ TAO_IIOP_Transport::get_listen_point (
#endif /* ACE_HAS_IPV6 */
// Get the count of the number of elements
- const CORBA::ULong len = listen_point_list.length ();
+ CORBA::ULong const len = listen_point_list.length ();
// Increase the length by 1
listen_point_list.length (len + 1);
@@ -447,7 +418,7 @@ TAO_IIOP_Transport::get_listen_point (
if (TAO_debug_level >= 5)
{
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT("TAO (%P|%t) - Listen_Point_List[%d] = <%s:%d>\n"),
+ ACE_TEXT("TAO (%P|%t) - Listen_Point_List[%d] = <%C:%d>\n"),
len,
point.host.in (),
point.port));
diff --git a/TAO/tao/IIOP_Transport.h b/TAO/tao/IIOP_Transport.h
index 7669ee38584..65147cc9557 100644
--- a/TAO/tao/IIOP_Transport.h
+++ b/TAO/tao/IIOP_Transport.h
@@ -112,10 +112,6 @@ public:
TAO_Message_Semantics message_semantics = TAO_TWOWAY_REQUEST,
ACE_Time_Value *max_time_wait = 0);
- virtual int generate_request_header (TAO_Operation_Details &opdetails,
- TAO_Target_Specification &spec,
- TAO_OutputCDR &msg);
-
virtual int tear_listen_point_list (TAO_InputCDR &cdr);
virtual TAO_Connection_Handler * connection_handler_i (void);
diff --git a/TAO/tao/IORManipulation/IORManip_IIOP_Filter.cpp b/TAO/tao/IORManipulation/IORManip_IIOP_Filter.cpp
index e75ceca9d99..211e85c6a6e 100644
--- a/TAO/tao/IORManipulation/IORManip_IIOP_Filter.cpp
+++ b/TAO/tao/IORManipulation/IORManip_IIOP_Filter.cpp
@@ -208,12 +208,13 @@ TAO_IORManip_IIOP_Filter::get_endpoints (TAO_Profile* profile,
// Extract the Byte Order.
CORBA::Boolean byte_order;
- if ((in_cdr >> ACE_InputCDR::to_boolean (byte_order)) == 0)
+ if (!(in_cdr >> ACE_InputCDR::to_boolean (byte_order)))
return 0;
+
in_cdr.reset_byte_order (static_cast<int> (byte_order));
// Extract endpoints sequence.
- if ((in_cdr >> endpoints) == 0)
+ if (!(in_cdr >> endpoints))
return 0;
return 1;
diff --git a/TAO/tao/LocateRequest_Invocation.cpp b/TAO/tao/LocateRequest_Invocation.cpp
index 14e2bc9cbff..d49efd9d707 100644
--- a/TAO/tao/LocateRequest_Invocation.cpp
+++ b/TAO/tao/LocateRequest_Invocation.cpp
@@ -54,9 +54,6 @@ namespace TAO
throw ::CORBA::INTERNAL (TAO::VMCID, CORBA::COMPLETED_NO);
}
- TAO_Target_Specification tspec;
- this->init_target_spec (tspec);
-
TAO_Transport *transport = this->resolver_.transport ();
Invocation_Status s = TAO_INVOKE_FAILURE;
@@ -65,6 +62,9 @@ namespace TAO
transport->output_cdr_lock (), TAO_INVOKE_FAILURE);
TAO_OutputCDR &cdr = transport->out_stream ();
+ TAO_Target_Specification tspec;
+ this->init_target_spec (tspec, cdr);
+
if (transport->generate_locate_request (tspec, this->details_, cdr) == -1)
return TAO_INVOKE_FAILURE;
diff --git a/TAO/tao/Makefile.am b/TAO/tao/Makefile.am
index 52a7430d85a..09e5a3f1074 100644
--- a/TAO/tao/Makefile.am
+++ b/TAO/tao/Makefile.am
@@ -1581,6 +1581,7 @@ libTAO_Codeset_la_SOURCES = \
Codeset/Codeset_Descriptor.cpp \
Codeset/Codeset_Manager_Factory.cpp \
Codeset/Codeset_Manager_i.cpp \
+ Codeset/Codeset_Service_Context_Handler.cpp \
Codeset/Codeset_Translator_Factory.cpp \
Codeset/UTF16_BOM_Factory.cpp \
Codeset/UTF16_BOM_Translator.cpp \
@@ -1599,6 +1600,7 @@ nobase_include_HEADERS += \
Codeset/CodeSetContextC.h \
Codeset/CodeSetContextS.h \
Codeset/Codeset.h \
+ Codeset/Codeset_Service_Context_Handler.h \
Codeset/Codeset_Descriptor.h \
Codeset/Codeset_Manager_Factory.h \
Codeset/Codeset_Manager_i.h \
@@ -3742,6 +3744,7 @@ libTAO_DiffServPolicy_la_SOURCES = \
DiffServPolicy/DiffServPolicy.cpp \
DiffServPolicy/DiffServPolicyA.cpp \
DiffServPolicy/DiffServPolicyC.cpp \
+ DiffServPolicy/DiffServ_Service_Context_Handler.cpp \
DiffServPolicy/DiffServPolicy_Factory.cpp \
DiffServPolicy/DiffServPolicy_ORBInitializer.cpp \
DiffServPolicy/DiffServ_Network_Priority_Hook.cpp \
@@ -3761,6 +3764,7 @@ libTAO_DiffServPolicy_la_LIBADD = \
nobase_include_HEADERS += \
DiffServPolicy/Client_Network_Priority_Policy.h \
+ DiffServPolicy/DiffServ_Service_Context_Handler.h \
DiffServPolicy/DiffServPolicy.h \
DiffServPolicy/DiffServPolicy.pidl \
DiffServPolicy/DiffServPolicyA.h \
@@ -5335,6 +5339,7 @@ libTAO_RTCORBA_la_SOURCES = \
RTCORBA/RTCORBAC.cpp \
RTCORBA/RTCORBA_includeC.cpp \
RTCORBA/RT_Current.cpp \
+ RTCORBA/RT_Service_Context_Handler.cpp \
RTCORBA/RT_Endpoint_Selector_Factory.cpp \
RTCORBA/RT_Endpoint_Utils.cpp \
RTCORBA/RT_Invocation_Endpoint_Selectors.cpp \
@@ -5368,6 +5373,7 @@ nobase_include_HEADERS += \
RTCORBA/Continuous_Priority_Mapping.h \
RTCORBA/Direct_Priority_Mapping.h \
RTCORBA/Linear_Network_Priority_Mapping.h \
+ RTCORBA/RT_Service_Context_Handler.h \
RTCORBA/Linear_Priority_Mapping.h \
RTCORBA/Multi_Priority_Mapping.h \
RTCORBA/Network_Priority_Mapping.h \
diff --git a/TAO/tao/Network_Priority_Protocols_Hooks.h b/TAO/tao/Network_Priority_Protocols_Hooks.h
index f76db69ebe8..9a8c0f38fb9 100644
--- a/TAO/tao/Network_Priority_Protocols_Hooks.h
+++ b/TAO/tao/Network_Priority_Protocols_Hooks.h
@@ -51,14 +51,6 @@ public:
CORBA::Object *object) = 0;
virtual CORBA::Long get_dscp_codepoint (TAO_Service_Context &req) = 0;
-
- virtual void np_service_context (TAO_Stub *stub,
- TAO_Service_Context &service_context,
- CORBA::Boolean restart) = 0;
-
- virtual void add_rep_np_service_context_hook (
- TAO_Service_Context &service_context,
- CORBA::Long &dscp_codepoint) = 0;
};
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp
index a31dae3795c..3b7089d28aa 100644
--- a/TAO/tao/ORB_Core.cpp
+++ b/TAO/tao/ORB_Core.cpp
@@ -1295,7 +1295,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] )
this->orb_params ()->negotiate_codesets (negotiate_codesets);
if (this->codeset_manager())
- this->codeset_manager_->open();
+ this->codeset_manager_->open(*this);
else
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG,
@@ -1754,26 +1754,6 @@ TAO_ORB_Core::service_raise_transient_failure (
return TAO::TAO_INVOKE_FAILURE;
}
-void
-TAO_ORB_Core::service_context_list (
- TAO_Stub *stub,
- TAO_Service_Context &service_context,
- CORBA::Boolean restart)
-{
- if (this->protocols_hooks_ != 0)
- {
- this->protocols_hooks_->rt_service_context (stub, service_context, restart);
- }
-
- // call the network priority protocols hooks that has been
- // registered.
- if (network_priority_protocols_hooks_ != 0)
- {
- this->network_priority_protocols_hooks_->np_service_context (stub,
- service_context, restart);
- }
-}
-
TAO_Client_Strategy_Factory *
TAO_ORB_Core::client_factory (void)
{
diff --git a/TAO/tao/ORB_Core.h b/TAO/tao/ORB_Core.h
index d1324f2ffdf..13d561541b6 100644
--- a/TAO/tao/ORB_Core.h
+++ b/TAO/tao/ORB_Core.h
@@ -739,12 +739,6 @@ public:
*/
CORBA::ULong hash_service (TAO_Profile *this_p, CORBA::ULong max);
- /// Call the service layers with the Service Context to check
- /// whether they would like to add something to the list.
- void service_context_list (TAO_Stub *stub,
- TAO_Service_Context &service_context,
- CORBA::Boolean retstart);
-
/// Return a reference to the Fault Tolerant service object.
TAO_Fault_Tolerance_Service &fault_tolerance_service (void);
diff --git a/TAO/tao/Protocols_Hooks.h b/TAO/tao/Protocols_Hooks.h
index 50599b87809..0dd3aca17f7 100644
--- a/TAO/tao/Protocols_Hooks.h
+++ b/TAO/tao/Protocols_Hooks.h
@@ -156,10 +156,6 @@ public:
virtual CORBA::Long get_dscp_codepoint (void) = 0;
- virtual void rt_service_context (TAO_Stub *stub,
- TAO_Service_Context &service_context,
- CORBA::Boolean restart) = 0;
-
virtual void get_selector_hook (CORBA::Policy *model_policy,
CORBA::Boolean &is_client_propagated,
CORBA::Short &server_priority) = 0;
diff --git a/TAO/tao/RTCORBA/RT_Endpoint_Selector_Factory.h b/TAO/tao/RTCORBA/RT_Endpoint_Selector_Factory.h
index dc3888f6da7..e546ae6808f 100644
--- a/TAO/tao/RTCORBA/RT_Endpoint_Selector_Factory.h
+++ b/TAO/tao/RTCORBA/RT_Endpoint_Selector_Factory.h
@@ -62,6 +62,10 @@ public:
virtual TAO_Invocation_Endpoint_Selector *get_selector (void);
private:
+ void operator= (const RT_Endpoint_Selector_Factory &);
+ RT_Endpoint_Selector_Factory (const RT_Endpoint_Selector_Factory &);
+
+private:
TAO_RT_Invocation_Endpoint_Selector *rt_invocation_endpoint_selector_;
};
diff --git a/TAO/tao/RTCORBA/RT_ORBInitializer.cpp b/TAO/tao/RTCORBA/RT_ORBInitializer.cpp
index f43b7660213..6d70c55f9b2 100644
--- a/TAO/tao/RTCORBA/RT_ORBInitializer.cpp
+++ b/TAO/tao/RTCORBA/RT_ORBInitializer.cpp
@@ -26,6 +26,7 @@ ACE_RCSID (RTCORBA,
#include "tao/RTCORBA/RT_ORB.h"
#include "tao/RTCORBA/RT_Current.h"
#include "tao/RTCORBA/RT_Thread_Lane_Resources_Manager.h"
+#include "tao/RTCORBA/RT_Service_Context_Handler.h"
#include "tao/Exception.h"
#include "tao/ORB_Core.h"
@@ -86,6 +87,12 @@ TAO_RT_ORBInitializer::pre_init (PortableInterceptor::ORBInitInfo_ptr info)
throw ::CORBA::INTERNAL ();
}
+ // Bind the service context handler for RTCORBA
+ TAO_RT_Service_Context_Handler* h = 0;
+ ACE_NEW (h,
+ TAO_RT_Service_Context_Handler());
+ tao_info->orb_core ()->service_context_registry ().bind (IOP::RTCorbaPriority, h);
+
// Set the name of the Protocol_Hooks to be RT_Protocols_Hooks.
tao_info->orb_core ()->orb_params ()->protocols_hooks_name ("RT_Protocols_Hooks");
ACE_Service_Config::process_directive (ace_svc_desc_TAO_RT_Protocols_Hooks);
diff --git a/TAO/tao/RTCORBA/RT_Protocols_Hooks.cpp b/TAO/tao/RTCORBA/RT_Protocols_Hooks.cpp
index cf2123c5759..886b839e784 100644
--- a/TAO/tao/RTCORBA/RT_Protocols_Hooks.cpp
+++ b/TAO/tao/RTCORBA/RT_Protocols_Hooks.cpp
@@ -460,74 +460,6 @@ TAO_RT_Protocols_Hooks::get_dscp_codepoint (void)
}
void
-TAO_RT_Protocols_Hooks::rt_service_context (
- TAO_Stub *stub,
- TAO_Service_Context &service_context,
- CORBA::Boolean restart)
-{
- // If the restart flag is true, then this call for a
- // reinvocation. We need not prepare the Service Context List once
- // again. We can use the already existing one.
- if (!restart)
- {
- TAO_RT_Stub *rt_stub =
- dynamic_cast<TAO_RT_Stub *> (stub);
-
- if (!rt_stub)
- throw CORBA::INTERNAL ();
-
- CORBA::Policy_var priority_model_policy =
- rt_stub->get_cached_policy (TAO_CACHED_POLICY_PRIORITY_MODEL);
-
- if (!CORBA::is_nil (priority_model_policy.in ()))
- {
- RTCORBA::PriorityModelPolicy_var model_policy_ptr =
- RTCORBA::PriorityModelPolicy::_narrow (priority_model_policy.in ());
-
- TAO_PriorityModelPolicy *priority_model =
- static_cast<TAO_PriorityModelPolicy *> (model_policy_ptr.in ());
-
- if (priority_model->get_priority_model () == RTCORBA::CLIENT_PROPAGATED)
- {
- CORBA::Short client_priority = -1;
- // Get client thread priority from 'Current' or if not set by implying one
- // from the native thread priority via the mapping.
- if (this->get_thread_CORBA_priority (client_priority) != -1 ||
- this->get_thread_implicit_CORBA_priority (client_priority) != -1)
- {
- // OK
- }
- else
- {
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG, "ERROR: TAO_RT_Protocols_Hooks::rt_service_context. "
- "Unable to access RT CORBA Priority in client thread "
- "accessing object with CLIENT_PROPAGATED priority model.\n"));
- throw CORBA::DATA_CONVERSION (CORBA::OMGVMCID | 2, CORBA::COMPLETED_NO);
-
- }
-
- // Encapsulate the priority of the current thread into
- // a service context.
- TAO_OutputCDR cdr;
- if ((cdr << ACE_OutputCDR::from_boolean (TAO_ENCAP_BYTE_ORDER) == 0)
- || (cdr << client_priority) == 0)
- {
- throw CORBA::MARSHAL ();
- }
-
- service_context.set_context (IOP::RTCorbaPriority, cdr);
- }
- }
- else
- {
- // The Object does not contain PriorityModel policy in its IOR.
- // We must be talking to a non-RT ORB. Do nothing.
- }
- }
-}
-
-void
TAO_RT_Protocols_Hooks::get_selector_hook (
CORBA::Policy *model_policy,
CORBA::Boolean &is_client_propagated,
diff --git a/TAO/tao/RTCORBA/RT_Protocols_Hooks.h b/TAO/tao/RTCORBA/RT_Protocols_Hooks.h
index 3566e7e2c36..4cae8d8aab1 100644
--- a/TAO/tao/RTCORBA/RT_Protocols_Hooks.h
+++ b/TAO/tao/RTCORBA/RT_Protocols_Hooks.h
@@ -19,6 +19,7 @@
#if defined (TAO_HAS_CORBA_MESSAGING) && TAO_HAS_CORBA_MESSAGING != 0
+#include "tao/RTCORBA/rtcorba_export.h"
#include "tao/RTCORBA/Priority_Mapping_Manager.h"
#include "tao/RTCORBA/Network_Priority_Mapping_Manager.h"
@@ -80,10 +81,6 @@ public:
CORBA::Long get_dscp_codepoint (void);
- void rt_service_context (TAO_Stub *stub,
- TAO_Service_Context &service_context,
- CORBA::Boolean restart);
-
void get_selector_hook (CORBA::Policy *model_policy,
CORBA::Boolean
&is_client_propagated,
@@ -101,7 +98,7 @@ public:
* some critical components.
*/
//@{
- int get_thread_CORBA_priority (CORBA::Short &);
+ int get_thread_CORBA_priority (CORBA::Short &priority);
int get_thread_native_priority (CORBA::Short &);
diff --git a/TAO/tao/RTCORBA/RT_Service_Context_Handler.cpp b/TAO/tao/RTCORBA/RT_Service_Context_Handler.cpp
new file mode 100644
index 00000000000..c38cf6cb791
--- /dev/null
+++ b/TAO/tao/RTCORBA/RT_Service_Context_Handler.cpp
@@ -0,0 +1,101 @@
+// $Id$
+
+#include "tao/RTCORBA/RT_Service_Context_Handler.h"
+
+ACE_RCSID (RTCORBA,
+ RT_Service_Context_Handler,
+ "$Id$")
+
+#if defined (TAO_HAS_CORBA_MESSAGING) && TAO_HAS_CORBA_MESSAGING != 0
+
+#include "tao/RTCORBA/RT_Policy_i.h"
+#include "tao/RTCORBA/RT_Protocols_Hooks.h"
+#include "tao/RTCORBA/RT_Stub.h"
+#include "tao/CDR.h"
+#include "tao/TAO_Server_Request.h"
+#include "tao/Transport.h"
+#include "tao/ORB_Core.h"
+#include "tao/GIOP_Message_Base.h"
+#include "tao/Operation_Details.h"
+#include "tao/Transport_Mux_Strategy.h"
+
+TAO_BEGIN_VERSIONED_NAMESPACE_DECL
+
+int
+TAO_RT_Service_Context_Handler::process_service_context (
+ TAO_Transport&,
+ const IOP::ServiceContext&)
+{
+ return 0;
+}
+
+int
+TAO_RT_Service_Context_Handler::generate_service_context (
+ TAO_Stub *stub,
+ TAO_Transport& transport,
+ TAO_Operation_Details &opdetails,
+ TAO_Target_Specification &spec,
+ TAO_OutputCDR &msg)
+{
+ TAO_RT_Stub *rt_stub =
+ dynamic_cast<TAO_RT_Stub *> (stub);
+
+ if (rt_stub)
+ {
+ CORBA::Policy_var priority_model_policy =
+ rt_stub->get_cached_policy (TAO_CACHED_POLICY_PRIORITY_MODEL);
+
+ RTCORBA::PriorityModelPolicy_var model_policy_ptr =
+ RTCORBA::PriorityModelPolicy::_narrow (priority_model_policy.in ());
+
+ if (!CORBA::is_nil (model_policy_ptr.in ()))
+ {
+ TAO_PriorityModelPolicy *priority_model =
+ static_cast<TAO_PriorityModelPolicy *> (model_policy_ptr.in ());
+
+ if (priority_model->get_priority_model () == RTCORBA::CLIENT_PROPAGATED)
+ {
+ CORBA::Short client_priority = -1;
+ TAO_Protocols_Hooks *protocol_hooks = stub->orb_core ()->get_protocols_hooks ();
+ // Get client thread priority from 'Current' or if not set by implying one
+ // from the native thread priority via the mapping.
+ if (protocol_hooks &&
+ (protocol_hooks->get_thread_CORBA_priority (client_priority) != -1 ||
+ protocol_hooks->get_thread_implicit_CORBA_priority (client_priority) != -1))
+ {
+ // OK
+ }
+ else
+ {
+ if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_DEBUG, "ERROR: TAO_RT_Protocols_Hooks::rt_service_context. "
+ "Unable to access RT CORBA Priority in client thread "
+ "accessing object with CLIENT_PROPAGATED priority model.\n"));
+ throw CORBA::DATA_CONVERSION (CORBA::OMGVMCID | 2, CORBA::COMPLETED_NO);
+ }
+
+ // Encapsulate the priority of the current thread into
+ // a service context.
+ TAO_OutputCDR cdr;
+ if (!(cdr << ACE_OutputCDR::from_boolean (TAO_ENCAP_BYTE_ORDER))
+ || !(cdr << client_priority))
+ {
+ throw CORBA::MARSHAL ();
+ }
+
+ opdetails.request_service_context ().set_context (IOP::RTCorbaPriority, cdr);
+ }
+ }
+ else
+ {
+ // The Object does not contain PriorityModel policy in its IOR.
+ // We must be talking to a non-RT ORB. Do nothing.
+ }
+ }
+ return 0;
+}
+
+
+TAO_END_VERSIONED_NAMESPACE_DECL
+
+#endif
diff --git a/TAO/tao/RTCORBA/RT_Service_Context_Handler.h b/TAO/tao/RTCORBA/RT_Service_Context_Handler.h
new file mode 100644
index 00000000000..eac15e175c5
--- /dev/null
+++ b/TAO/tao/RTCORBA/RT_Service_Context_Handler.h
@@ -0,0 +1,47 @@
+// -*- C++ -*-
+
+// ===================================================================
+/**
+ * @file RT_Service_Context_Handler.h
+ *
+ * $Id$
+ *
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ */
+// ===================================================================
+
+#ifndef TAO_RT_SERVICE_CONTEXT_HANDLER_H
+#define TAO_RT_SERVICE_CONTEXT_HANDLER_H
+#include /**/ "ace/pre.h"
+#include "tao/RTCORBA/rtcorba_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "tao/Service_Context_Handler.h"
+
+#if defined (TAO_HAS_CORBA_MESSAGING) && TAO_HAS_CORBA_MESSAGING != 0
+
+TAO_BEGIN_VERSIONED_NAMESPACE_DECL
+
+class TAO_RT_Service_Context_Handler :
+ public TAO_Service_Context_Handler
+{
+public:
+ virtual int process_service_context (TAO_Transport& transport,
+ const IOP::ServiceContext& context);
+ virtual int generate_service_context (
+ TAO_Stub *stub,
+ TAO_Transport &transport,
+ TAO_Operation_Details &opdetails,
+ TAO_Target_Specification &spec,
+ TAO_OutputCDR &msg);
+};
+
+TAO_END_VERSIONED_NAMESPACE_DECL
+
+#endif
+
+#include /**/ "ace/post.h"
+#endif /* TAO_RT_SERVICE_CONTEXT_HANDLER_H */
diff --git a/TAO/tao/RTCORBA/RT_Thread_Lane_Resources_Manager.h b/TAO/tao/RTCORBA/RT_Thread_Lane_Resources_Manager.h
index cfc5dbc30fa..9b96964b822 100644
--- a/TAO/tao/RTCORBA/RT_Thread_Lane_Resources_Manager.h
+++ b/TAO/tao/RTCORBA/RT_Thread_Lane_Resources_Manager.h
@@ -77,6 +77,10 @@ public:
// @}
+private:
+ void operator= (const TAO_RT_Thread_Lane_Resources_Manager &);
+ TAO_RT_Thread_Lane_Resources_Manager (const TAO_RT_Thread_Lane_Resources_Manager &);
+
protected:
/// Default lane resources.
diff --git a/TAO/tao/Remote_Invocation.cpp b/TAO/tao/Remote_Invocation.cpp
index e937eb30d7d..0e3ffa24553 100644
--- a/TAO/tao/Remote_Invocation.cpp
+++ b/TAO/tao/Remote_Invocation.cpp
@@ -36,20 +36,17 @@ namespace TAO
}
void
- Remote_Invocation::init_target_spec (TAO_Target_Specification &target_spec)
+ Remote_Invocation::init_target_spec (TAO_Target_Specification &target_spec,
+ TAO_OutputCDR &output)
{
- /**
- * Mega hack for RTCORBA start. I don't think that
- * PortableInterceptor would work here esp. for RTCORBA. PI needs
- * to be improved to help our cause.
- */
- this->resolver_.stub ()->orb_core ()->service_context_list (
- this->resolver_.stub (),
- this->details_.request_service_context (),
- 0);
- /**
- * Mega hack for RTCORBA END
- */
+ // Generate all service contexts
+ this->resolver_.stub ()->orb_core ()->service_context_registry ().
+ generate_service_context (
+ this->resolver_.stub (),
+ *this->resolver_.transport (),
+ this->details_,
+ target_spec,
+ output);
TAO_Profile *pfile = this->resolver_.profile ();
@@ -61,8 +58,7 @@ namespace TAO
break;
case TAO_Target_Specification::Profile_Addr:
{
- IOP::TaggedProfile *tp =
- pfile->create_tagged_profile ();
+ IOP::TaggedProfile *tp = pfile->create_tagged_profile ();
if (tp)
{
@@ -100,11 +96,11 @@ namespace TAO
void
Remote_Invocation::write_header (TAO_OutputCDR &out_stream)
{
- TAO_Target_Specification spec;
- this->init_target_spec (spec);
-
this->resolver_.transport ()->clear_translators (0, &out_stream);
+ TAO_Target_Specification spec;
+ this->init_target_spec (spec, out_stream);
+
// Send the request for the header
if (this->resolver_.transport ()->generate_request_header (this->details_,
spec,
diff --git a/TAO/tao/Remote_Invocation.h b/TAO/tao/Remote_Invocation.h
index 78b2a02ce31..9af15d3ac29 100644
--- a/TAO/tao/Remote_Invocation.h
+++ b/TAO/tao/Remote_Invocation.h
@@ -66,7 +66,7 @@ namespace TAO
protected:
/// Initialize the @a spec.
- void init_target_spec (TAO_Target_Specification &spec);
+ void init_target_spec (TAO_Target_Specification &spec, TAO_OutputCDR& output);
/// Write the GIOP header into the stream.
void write_header (TAO_OutputCDR &out_stream);
diff --git a/TAO/tao/Service_Context_Handler.h b/TAO/tao/Service_Context_Handler.h
index 390fbd43d57..6c6430ef7d5 100644
--- a/TAO/tao/Service_Context_Handler.h
+++ b/TAO/tao/Service_Context_Handler.h
@@ -24,6 +24,9 @@
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
class TAO_Transport;
+class TAO_Operation_Details;
+class TAO_Target_Specification;
+class TAO_Stub;
/**
* This is the base of handler classes that each can process a certain
@@ -35,8 +38,17 @@ class TAO_Export TAO_Service_Context_Handler
{
public:
TAO_Service_Context_Handler (void);
- virtual int process_service_context (TAO_Transport& transport,
- const IOP::ServiceContext& context) = 0;
+ virtual int process_service_context (
+ TAO_Transport& transport,
+ const IOP::ServiceContext& context) = 0;
+
+ virtual int generate_service_context (
+ TAO_Stub *stub,
+ TAO_Transport& transport,
+ TAO_Operation_Details &opdetails,
+ TAO_Target_Specification &spec,
+ TAO_OutputCDR &msg) = 0;
+
virtual ~TAO_Service_Context_Handler (void);
};
diff --git a/TAO/tao/Service_Context_Handler_Registry.cpp b/TAO/tao/Service_Context_Handler_Registry.cpp
index 5fd8a69cf67..8323b56f41d 100644
--- a/TAO/tao/Service_Context_Handler_Registry.cpp
+++ b/TAO/tao/Service_Context_Handler_Registry.cpp
@@ -32,6 +32,29 @@ TAO_Service_Context_Registry::process_service_contexts (
return 0;
}
+int
+TAO_Service_Context_Registry::generate_service_context (
+ TAO_Stub *stub,
+ TAO_Transport& transport,
+ TAO_Operation_Details &opdetails,
+ TAO_Target_Specification &spec,
+ TAO_OutputCDR &msg)
+{
+ int result = 0;
+ for (Table::iterator x = this->registry_.begin ();
+ x != this->registry_.end ();
+ ++x)
+ {
+ if ((*x).second->generate_service_context (
+ stub, transport, opdetails, spec, msg) == -1)
+ {
+ result = -1;
+ }
+ }
+
+ return result;
+}
+
TAO_Service_Context_Registry::~TAO_Service_Context_Registry (void)
{
for (Table::iterator x = this->registry_.begin ();
diff --git a/TAO/tao/Service_Context_Handler_Registry.h b/TAO/tao/Service_Context_Handler_Registry.h
index 071d5a62c31..ec900f09c19 100644
--- a/TAO/tao/Service_Context_Handler_Registry.h
+++ b/TAO/tao/Service_Context_Handler_Registry.h
@@ -27,6 +27,9 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL
class TAO_Transport;
class TAO_Service_Context_Handler;
+class TAO_Operation_Details;
+class TAO_Target_Specification;
+class TAO_Stub;
class TAO_Export TAO_Service_Context_Registry
{
@@ -47,6 +50,13 @@ class TAO_Export TAO_Service_Context_Registry
int process_service_contexts (IOP::ServiceContextList &sc, TAO_Transport& transport);
+ int generate_service_context (
+ TAO_Stub *stub,
+ TAO_Transport& transport,
+ TAO_Operation_Details &opdetails,
+ TAO_Target_Specification &spec,
+ TAO_OutputCDR &msg);
+
private:
typedef ACE_Array_Map<IOP::ServiceId,
TAO_Service_Context_Handler*> Table;
diff --git a/TAO/tao/Strategies/SCIOP_Transport.cpp b/TAO/tao/Strategies/SCIOP_Transport.cpp
index cc952bce2bb..777c8e08b3c 100644
--- a/TAO/tao/Strategies/SCIOP_Transport.cpp
+++ b/TAO/tao/Strategies/SCIOP_Transport.cpp
@@ -160,37 +160,6 @@ TAO_SCIOP_Transport::send_message (TAO_OutputCDR &stream,
}
int
-TAO_SCIOP_Transport::generate_request_header (TAO_Operation_Details &opdetails,
- TAO_Target_Specification &spec,
- TAO_OutputCDR &msg)
-{
- // Check whether we have a Bi Dir SCIOP policy set, whether the
- // messaging objects are ready to handle bidirectional connections
- // and also make sure that we have not recd. or sent any information
- // regarding this before...
- if (this->orb_core ()->bidir_giop_policy () &&
- this->messaging_object ()->is_ready_for_bidirectional (msg) &&
- this->bidirectional_flag () < 0)
- {
- this->set_bidir_context_info (opdetails);
-
- // Set the flag to 1 (i.e., originating side)
- this->bidirectional_flag (1);
-
- // At the moment we enable BiDIR giop we have to get a new
- // request id to make sure that we follow the even/odd rule
- // for request id's. We only need to do this when enabled
- // it, after that the Transport Mux Strategy will make sure
- // that the rule is followed
- opdetails.request_id (this->tms ()->request_id ());
- }
-
- return TAO_Transport::generate_request_header (opdetails,
- spec,
- msg);
-}
-
-int
TAO_SCIOP_Transport::tear_listen_point_list (TAO_InputCDR &cdr)
{
CORBA::Boolean byte_order;
@@ -227,7 +196,7 @@ TAO_SCIOP_Transport::set_bidir_context_info (TAO_Operation_Details &opdetails)
acceptor++)
{
// Check whether it is a SCIOP acceptor
- if ((*acceptor)->tag () == TAO_TAG_SCIOP_PROFILE)
+ if ((*acceptor)->tag () == this->tag ())
{
if (this->get_listen_point (listen_point_list,
*acceptor) == -1)
diff --git a/TAO/tao/Strategies/SCIOP_Transport.h b/TAO/tao/Strategies/SCIOP_Transport.h
index 4f3c92f9ffb..7f1787c40b2 100644
--- a/TAO/tao/Strategies/SCIOP_Transport.h
+++ b/TAO/tao/Strategies/SCIOP_Transport.h
@@ -96,10 +96,6 @@ public:
/*virtual int send_reply (TAO_OutputCDR &stream,
TAO_Adapter *poa = 0);*/
- virtual int generate_request_header (TAO_Operation_Details &opdetails,
- TAO_Target_Specification &spec,
- TAO_OutputCDR &msg);
-
virtual int tear_listen_point_list (TAO_InputCDR &cdr);
virtual TAO_Connection_Handler * connection_handler_i (void);
diff --git a/TAO/tao/Transport.cpp b/TAO/tao/Transport.cpp
index f4011d541e0..fce3f82b2bc 100644
--- a/TAO/tao/Transport.cpp
+++ b/TAO/tao/Transport.cpp
@@ -444,15 +444,6 @@ TAO_Transport::generate_request_header (
TAO_Target_Specification &spec,
TAO_OutputCDR &output)
{
- // Codeset service context is only supposed to be sent in the first request
- // on a particular connection.
- if (this->first_request_)
- {
- TAO_Codeset_Manager * const csm = this->orb_core ()->codeset_manager ();
- if (csm)
- csm->generate_service_context (opdetails, *this);
- }
-
if (this->messaging_object ()->generate_request_header (opdetails,
spec,
output) == -1)
@@ -2759,6 +2750,11 @@ TAO_Transport::allocate_partial_message_block (void)
}
}
+void
+TAO_Transport::set_bidir_context_info (TAO_Operation_Details &)
+{
+}
+
/*
* Hook to add concrete implementations from the derived class onto
* TAO's transport.
diff --git a/TAO/tao/Transport.h b/TAO/tao/Transport.h
index 8742a63f3e0..fb348274d7f 100644
--- a/TAO/tao/Transport.h
+++ b/TAO/tao/Transport.h
@@ -563,6 +563,8 @@ public:
/// Can the transport be purged?
bool can_be_purged (void);
+ virtual void set_bidir_context_info (TAO_Operation_Details &opdetails);
+
/*
* Specialization hook to add public methods from
* concrete transport implementations to TAO's transport
diff --git a/TAO/tao/TypeCodeFactory/TypeCodeFactory_i.cpp b/TAO/tao/TypeCodeFactory/TypeCodeFactory_i.cpp
index 78b8e665596..f8204186c0b 100644
--- a/TAO/tao/TypeCodeFactory/TypeCodeFactory_i.cpp
+++ b/TAO/tao/TypeCodeFactory/TypeCodeFactory_i.cpp
@@ -896,13 +896,13 @@ TAO_TypeCodeFactory_i::compute_default_label (
dv.enum_val = 0;
CORBA::ULong const len = members.length ();
- int success = 0;
+ bool success = false;
// A collision forces us to start over, because the label
// values need not be in sorted order.
- while (success == 0)
+ while (!success)
{
- success = 1;
+ success = true;
for (CORBA::ULong i = 0; i < len; ++i)
{
@@ -921,7 +921,7 @@ TAO_TypeCodeFactory_i::compute_default_label (
if (u.char_val == dv.char_val)
{
dv.char_val++;
- success = 0;
+ success = false;
}
break;
case CORBA::tk_boolean:
@@ -930,7 +930,7 @@ TAO_TypeCodeFactory_i::compute_default_label (
if (u.bool_val == dv.bool_val)
{
dv.bool_val = !dv.bool_val;
- success = 0;
+ success = false;
}
break;
case CORBA::tk_short:
@@ -939,7 +939,7 @@ TAO_TypeCodeFactory_i::compute_default_label (
if (u.short_val == dv.short_val)
{
dv.short_val++;
- success = 0;
+ success = false;
}
break;
case CORBA::tk_ushort:
@@ -948,7 +948,7 @@ TAO_TypeCodeFactory_i::compute_default_label (
if (u.ushort_val == dv.ushort_val)
{
dv.ushort_val++;
- success = 0;
+ success = false;
}
break;
case CORBA::tk_long:
@@ -957,7 +957,7 @@ TAO_TypeCodeFactory_i::compute_default_label (
if (u.long_val == dv.long_val)
{
dv.long_val++;
- success = 0;
+ success = false;
}
break;
case CORBA::tk_ulong:
@@ -966,7 +966,7 @@ TAO_TypeCodeFactory_i::compute_default_label (
if (u.ulong_val == dv.ulong_val)
{
dv.ulong_val++;
- success = 0;
+ success = false;
}
break;
#if !defined (ACE_LACKS_LONGLONG_T)
@@ -976,7 +976,7 @@ TAO_TypeCodeFactory_i::compute_default_label (
if (u.ulonglong_val == dv.ulonglong_val)
{
dv.ulonglong_val++;
- success = 0;
+ success = false;
}
break;
#endif /* ACE_LACKS_LONGLONG_T */
@@ -1011,7 +1011,7 @@ TAO_TypeCodeFactory_i::compute_default_label (
if (u.enum_val == dv.enum_val)
{
dv.enum_val++;
- success = 0;
+ success = false;
}
break;
}
@@ -1020,7 +1020,7 @@ TAO_TypeCodeFactory_i::compute_default_label (
}
// If there's been a collision, we should start over right away.
- if (success == 0)
+ if (!success)
{
break;
}
@@ -1814,7 +1814,7 @@ TAO_TypeCodeFactory_i::check_recursion (CORBA::TCKind kind,
|| member_tc_kind == CORBA::tk_event)
{
char const * member_tc_id = member_tc->id ();
-
+
if (working_id != 0
&& ACE_OS::strcmp (working_id, member_tc_id) == 0)
{
@@ -1823,12 +1823,12 @@ TAO_TypeCodeFactory_i::check_recursion (CORBA::TCKind kind,
// the recursion, which would otherwise never return.
break;
}
-
+
// Update working_id to catch non-top-level recursion
// of valuetype or eventtype. Other case caught below.
working_id = member_tc_id;
}
-
+
bool const recursion_detected =
this->check_recursion (kind,
id,
@@ -1856,7 +1856,7 @@ TAO_TypeCodeFactory_i::check_recursion (CORBA::TCKind kind,
CORBA::TCKind const content_tc_kind =
content_tc->kind ();
-
+
char const * content_tc_id = 0;
if (content_tc_kind == CORBA::tk_struct
@@ -1875,7 +1875,7 @@ TAO_TypeCodeFactory_i::check_recursion (CORBA::TCKind kind,
// end the recursion, which would otherwise never return.
break;
}
-
+
if (content_tc_kind == CORBA::TAO_TC_KIND_COUNT)
{
if (ACE_OS::strcmp (id, content_tc_id) == 0)