summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>2000-12-13 12:35:39 +0000
committerbala <balanatarajan@users.noreply.github.com>2000-12-13 12:35:39 +0000
commitd01643551b6096a2071129200bec32ae27404924 (patch)
tree81be87bb95019116263b36a831076d70c9db394e
parentb8d0ca01d17656968ab28f2c98d96a5121f7dfeb (diff)
downloadATCD-d01643551b6096a2071129200bec32ae27404924.tar.gz
*** empty log message ***
-rw-r--r--TAO/tao/IIOP_Transport.cpp23
-rw-r--r--TAO/tao/IIOP_Transport.h19
-rw-r--r--TAO/tao/Invocation.cpp9
-rw-r--r--TAO/tao/Pluggable.cpp7
-rw-r--r--TAO/tao/Pluggable.h3
-rw-r--r--TAO/tao/TAO.dsp27
-rw-r--r--TAO/tao/TAO_Server_Request.h4
-rw-r--r--TAO/tao/TAO_Server_Request.i3
-rw-r--r--TAO/tao/TAO_Static.dsp12
-rw-r--r--TAO/tao/operation_details.h9
-rw-r--r--TAO/tao/operation_details.i17
11 files changed, 124 insertions, 9 deletions
diff --git a/TAO/tao/IIOP_Transport.cpp b/TAO/tao/IIOP_Transport.cpp
index 4de4a34309f..24b09cf8b06 100644
--- a/TAO/tao/IIOP_Transport.cpp
+++ b/TAO/tao/IIOP_Transport.cpp
@@ -30,7 +30,8 @@ TAO_IIOP_Transport::TAO_IIOP_Transport (TAO_IIOP_Connection_Handler *handler,
: TAO_Transport (TAO_TAG_IIOP_PROFILE,
orb_core),
connection_handler_ (handler),
- messaging_object_ (0)
+ messaging_object_ (0),
+ bidirectional_flag_ (0)
{
if (flag)
{
@@ -301,10 +302,12 @@ TAO_IIOP_Transport::send_request_header (TAO_Operation_Details &opdetails,
{
// Check whether we have a Bi Dir IIOP policy set
if (this->orb_core ()->bidir_giop_policy () &&
- this->messaging_object_->is_ready_for_bidirectional ())
+ this->messaging_object_->is_ready_for_bidirectional () &&
+ this->bidirectional_flag_ == 0)
{
-
+ this->set_bidirectional_context_info (opdetails);
}
+
// We are going to pass on this request to the underlying messaging
// layer. It should take care of this request
if (this->messaging_object_->generate_request_header (opdetails,
@@ -324,6 +327,13 @@ TAO_IIOP_Transport::messaging_init (CORBA::Octet major,
return 1;
}
+void
+TAO_IIOP_Transport::bidirectional_flag (int flag)
+{
+ this->bidirectional_flag_ = flag;
+}
+
+
int
TAO_IIOP_Transport::process_message (void)
{
@@ -428,3 +438,10 @@ TAO_IIOP_Transport::process_message (void)
this->messaging_object_->reset ();
return 1;
}
+
+
+void
+TAO_IIOP_Transport::set_bidirectional_context_info (TAO_Operation_Details &opdetails)
+{
+ //
+}
diff --git a/TAO/tao/IIOP_Transport.h b/TAO/tao/IIOP_Transport.h
index d32f6426c90..af9752d1dbe 100644
--- a/TAO/tao/IIOP_Transport.h
+++ b/TAO/tao/IIOP_Transport.h
@@ -138,11 +138,17 @@ public:
virtual int messaging_init (CORBA::Octet major,
CORBA::Octet minor);
+ /// Set the bidirectional flag
+ virtual void bidirectional_flag (int flag);
+
private:
/// Process the message that we have read
int process_message (void);
+ /// Set the Bidirectional context info in the service context list
+ void set_bidirectional_context_info (TAO_Operation_Details &opdetails);
+
private:
/// The connection service handler used for accessing lower layer
@@ -151,6 +157,19 @@ private:
/// Our messaging object.
TAO_Pluggable_Messaging *messaging_object_;
+
+ /// Have we sent any info on bidirectional information or have we
+ /// received any info regarding making the connection
+ /// served by this transport bidirectional. This is essentially for
+ /// this -- we dont want to send the bidirectional context info more
+ /// than once on the connection. Why? Waste of marshalling and
+ /// demarshalling time on the client. On the server side, we need
+ /// this flag for this -- once a client that has established the
+ /// connection asks the server to use the connection bith ways, we
+ /// *dont* want the server to go pack service info to the
+ /// client. That would be *bad*..
+ int bidirectional_flag_;
+
};
#if defined (__ACE_INLINE__)
diff --git a/TAO/tao/Invocation.cpp b/TAO/tao/Invocation.cpp
index 0abfc1ff94e..7facdf85453 100644
--- a/TAO/tao/Invocation.cpp
+++ b/TAO/tao/Invocation.cpp
@@ -589,6 +589,15 @@ TAO_GIOP_Invocation::add_rt_service_context (CORBA_Environment &ACE_TRY_ENV)
== 0)
ACE_THROW (CORBA::MARSHAL ());
+ // @@ The piece of code that comes here should go. It should
+ // be something like this.
+ // IOP::ServiceContext context;
+ // context.context_id = IOP::RTCorbaPriority;
+ // this->op_details_.service_context ().set_context
+ // (context, cdr);
+ // RT Folks can you please do these changes consistently
+ // wherever you guys are adding service context information
+ // - Bala
IOP::ServiceContextList &context_list = this->service_info ();
CORBA::ULong l = context_list.length ();
diff --git a/TAO/tao/Pluggable.cpp b/TAO/tao/Pluggable.cpp
index 4f5d50131f7..02646308ef3 100644
--- a/TAO/tao/Pluggable.cpp
+++ b/TAO/tao/Pluggable.cpp
@@ -192,6 +192,13 @@ TAO_Transport::messaging_init (CORBA::Octet /*major*/,
ACE_NOTSUP_RETURN (-1);
}
+void
+TAO_Transport::bidirectional_flag (int )
+{
+ return;
+}
+
+
// Read the message on the connection. Returns 0 when there is Short
// Read on the connection. Returns 1 when the full reply is read and
// handled. Returns -1 on errors. If <block> is 1, then reply is
diff --git a/TAO/tao/Pluggable.h b/TAO/tao/Pluggable.h
index a5f94b17f54..addaf9818c2 100644
--- a/TAO/tao/Pluggable.h
+++ b/TAO/tao/Pluggable.h
@@ -224,6 +224,9 @@ public:
// connector side. On the acceptor side the connection handler
// would take care of the messaging objects.
+ virtual void bidirectional_flag (int flag);
+ // Set the bidirectional flag
+
void dequeue_all (void);
/// Return the TAO_ORB_Core
diff --git a/TAO/tao/TAO.dsp b/TAO/tao/TAO.dsp
index 130557cca58..8f22472a5bf 100644
--- a/TAO/tao/TAO.dsp
+++ b/TAO/tao/TAO.dsp
@@ -2874,6 +2874,25 @@ SOURCE=.\Service_Callbacks.cpp
# End Source File
# Begin Source File
+SOURCE=.\Service_Context.cpp
+
+!IF "$(CFG)" == "TAO DLL - Win32 Alpha Release"
+
+!ELSEIF "$(CFG)" == "TAO DLL - Win32 Alpha Debug"
+
+!ELSEIF "$(CFG)" == "TAO DLL - Win32 MFC Release"
+
+!ELSEIF "$(CFG)" == "TAO DLL - Win32 MFC Debug"
+
+!ELSEIF "$(CFG)" == "TAO DLL - Win32 Release"
+
+!ELSEIF "$(CFG)" == "TAO DLL - Win32 Debug"
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
SOURCE=.\Services.cpp
!IF "$(CFG)" == "TAO DLL - Win32 Alpha Release"
@@ -4041,6 +4060,10 @@ SOURCE=.\Service_Callbacks.h
# End Source File
# Begin Source File
+SOURCE=.\Service_Context.h
+# End Source File
+# Begin Source File
+
SOURCE=.\Services.h
# End Source File
# Begin Source File
@@ -4649,6 +4672,10 @@ SOURCE=.\Service_Callbacks.i
# End Source File
# Begin Source File
+SOURCE=.\Service_Context.inl
+# End Source File
+# Begin Source File
+
SOURCE=.\Services.i
# End Source File
# Begin Source File
diff --git a/TAO/tao/TAO_Server_Request.h b/TAO/tao/TAO_Server_Request.h
index 80703f5b050..55844b34aae 100644
--- a/TAO/tao/TAO_Server_Request.h
+++ b/TAO/tao/TAO_Server_Request.h
@@ -30,11 +30,10 @@
#include "ace/SString.h"
#include "tao/ORB.h"
-//#include "tao/Principal.h"
-//#include "tao/GIOP_Message_Base.h"
#include "tao/Tagged_Profile.h"
#include "tao/OctetSeqC.h"
+
class TAO_Pluggable_Messaging;
class TAO_Transport;
@@ -125,6 +124,7 @@ public:
IOP::ServiceContextList &service_info (void);
void service_info (IOP::ServiceContextList &service_info);
+ // @@ The above two should go away...
// To handle System Exceptions at the lowest level,
// a method returning the request_id_ is needed.
diff --git a/TAO/tao/TAO_Server_Request.i b/TAO/tao/TAO_Server_Request.i
index dd0418f1bfd..ff8a0cfd0b0 100644
--- a/TAO/tao/TAO_Server_Request.i
+++ b/TAO/tao/TAO_Server_Request.i
@@ -89,9 +89,10 @@ TAO_ServerRequest::service_info (void)
ACE_INLINE void
TAO_ServerRequest::service_info (IOP::ServiceContextList &service_info)
{
- this->service_info_ = service_info;
+ this->service_info_= service_info;
}
+
ACE_INLINE CORBA::ULong
TAO_ServerRequest::request_id (void)
{
diff --git a/TAO/tao/TAO_Static.dsp b/TAO/tao/TAO_Static.dsp
index 22dc2c52cb1..83b3d8eff27 100644
--- a/TAO/tao/TAO_Static.dsp
+++ b/TAO/tao/TAO_Static.dsp
@@ -687,6 +687,10 @@ SOURCE=.\Service_Callbacks.h
# End Source File
# Begin Source File
+SOURCE=.\Service_Context.h
+# End Source File
+# Begin Source File
+
SOURCE=.\Services.h
# End Source File
# Begin Source File
@@ -1299,6 +1303,10 @@ SOURCE=.\Service_Callbacks.i
# End Source File
# Begin Source File
+SOURCE=.\Service_Context.inl
+# End Source File
+# Begin Source File
+
SOURCE=.\Services.i
# End Source File
# Begin Source File
@@ -1963,6 +1971,10 @@ SOURCE=.\Service_Callbacks.cpp
# End Source File
# Begin Source File
+SOURCE=.\Service_Context.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\Services.cpp
# End Source File
# Begin Source File
diff --git a/TAO/tao/operation_details.h b/TAO/tao/operation_details.h
index 4245d4e2cc0..bd76756698f 100644
--- a/TAO/tao/operation_details.h
+++ b/TAO/tao/operation_details.h
@@ -22,7 +22,7 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#include "tao/IOPC.h"
+#include "tao/Service_Context.h"
#include "tao/target_specification.h"
@@ -62,6 +62,11 @@ public:
IOP::ServiceContextList &service_info (void);
const IOP::ServiceContextList &service_info (void) const;
// Get the service context list
+ // @@ The above methods should go......
+
+ TAO_Service_Context &service_context (void);
+ const TAO_Service_Context &service_context (void) const;
+ // Access the TAO_Service_Context
void request_id (CORBA::ULong id);
@@ -96,7 +101,7 @@ private:
CORBA::Octet response_flags_;
// Response flags
- IOP::ServiceContextList service_info_;
+ TAO_Service_Context service_info_;
// The ServiceContextList sent to the server side. Only valid
// when sending a request.
diff --git a/TAO/tao/operation_details.i b/TAO/tao/operation_details.i
index 4934a77ceed..cd293deb628 100644
--- a/TAO/tao/operation_details.i
+++ b/TAO/tao/operation_details.i
@@ -35,15 +35,30 @@ TAO_Operation_Details::argument_flag (void) const
ACE_INLINE IOP::ServiceContextList &
TAO_Operation_Details::service_info (void)
{
- return this->service_info_;
+ // @@ This should go ...
+ return this->service_info_.service_info ();
}
ACE_INLINE const IOP::ServiceContextList &
TAO_Operation_Details::service_info (void) const
{
+ // @@ This should go ...
+ return this->service_info_.service_info ();
+}
+
+ACE_INLINE TAO_Service_Context &
+TAO_Operation_Details::service_context (void)
+{
return this->service_info_;
}
+ACE_INLINE const TAO_Service_Context &
+TAO_Operation_Details::service_context (void) const
+{
+ return this->service_info_;
+}
+
+
ACE_INLINE void
TAO_Operation_Details::request_id (CORBA::ULong id)
{