summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>2000-12-12 13:35:36 +0000
committerbala <balanatarajan@users.noreply.github.com>2000-12-12 13:35:36 +0000
commitb8d0ca01d17656968ab28f2c98d96a5121f7dfeb (patch)
tree5b2a528a04e23210196c66b7be68569fb92f0c98
parent13a45ca3ae25d2ef070d30630dd7ebdbb58e2d25 (diff)
downloadATCD-b8d0ca01d17656968ab28f2c98d96a5121f7dfeb.tar.gz
*** empty log message ***
-rw-r--r--TAO/tao/BiDirPolicyC.h25
-rw-r--r--TAO/tao/GIOP_Message_Base.cpp9
-rw-r--r--TAO/tao/GIOP_Message_Base.h4
-rw-r--r--TAO/tao/GIOP_Message_Generator_Parser.cpp6
-rw-r--r--TAO/tao/GIOP_Message_Generator_Parser.h3
-rw-r--r--TAO/tao/GIOP_Message_Generator_Parser_12.cpp7
-rw-r--r--TAO/tao/GIOP_Message_Generator_Parser_12.h4
-rw-r--r--TAO/tao/GIOP_Message_Lite.cpp16
-rw-r--r--TAO/tao/GIOP_Message_Lite.h6
-rw-r--r--TAO/tao/IIOP_Transport.cpp3
-rw-r--r--TAO/tao/ORB.cpp31
-rw-r--r--TAO/tao/ORB_Core.cpp2
-rw-r--r--TAO/tao/Pluggable_Messaging.h6
-rw-r--r--TAO/tao/PortableServer/POA.cpp18
-rw-r--r--TAO/tao/TAO.dsp100
-rw-r--r--TAO/tao/TAO_Static.dsp40
-rw-r--r--TAO/tao/operation_details.h9
17 files changed, 269 insertions, 20 deletions
diff --git a/TAO/tao/BiDirPolicyC.h b/TAO/tao/BiDirPolicyC.h
index b715f94de1d..3951800f0d0 100644
--- a/TAO/tao/BiDirPolicyC.h
+++ b/TAO/tao/BiDirPolicyC.h
@@ -23,13 +23,12 @@
#define _TAO_IDL_BIDIRPOLICYC_H_
#include "ace/pre.h"
-#include "tao/corba.h"
+#include "tao/TAO_Export.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#include "tao/TAO_Export.h"
#include "tao/PolicyC.h"
#if defined (TAO_EXPORT_MACRO)
@@ -69,7 +68,7 @@ TAO_NAMESPACE BiDirPolicy
class BidirectionalPolicy;
typedef BidirectionalPolicy *BidirectionalPolicy_ptr;
-
+
#endif /* end #if !defined */
@@ -80,17 +79,17 @@ TAO_NAMESPACE BiDirPolicy
{
public:
BidirectionalPolicy_var (void); // default constructor
- BidirectionalPolicy_var (BidirectionalPolicy_ptr p) : ptr_ (p) {}
+ BidirectionalPolicy_var (BidirectionalPolicy_ptr p) : ptr_ (p) {}
BidirectionalPolicy_var (const BidirectionalPolicy_var &); // copy constructor
~BidirectionalPolicy_var (void); // destructor
-
+
BidirectionalPolicy_var &operator= (BidirectionalPolicy_ptr);
BidirectionalPolicy_var &operator= (const BidirectionalPolicy_var &);
BidirectionalPolicy_ptr operator-> (void) const;
-
+
operator const BidirectionalPolicy_ptr &() const;
operator BidirectionalPolicy_ptr &();
- // in, inout, out, _retn
+ // in, inout, out, _retn
BidirectionalPolicy_ptr in (void) const;
BidirectionalPolicy_ptr &inout (void);
BidirectionalPolicy_ptr &out (void);
@@ -123,7 +122,7 @@ TAO_NAMESPACE BiDirPolicy
operator BidirectionalPolicy_ptr &();
BidirectionalPolicy_ptr &ptr (void);
BidirectionalPolicy_ptr operator-> (void);
-
+
private:
BidirectionalPolicy_ptr &ptr_;
};
@@ -147,12 +146,12 @@ class TAO_Export BidirectionalPolicy: public virtual CORBA::Policy
static BidirectionalPolicy_ptr _duplicate (BidirectionalPolicy_ptr obj);
static BidirectionalPolicy_ptr _narrow (
CORBA::Object_ptr obj,
- CORBA::Environment &ACE_TRY_ENV =
+ CORBA::Environment &ACE_TRY_ENV =
TAO_default_environment ()
);
static BidirectionalPolicy_ptr _unchecked_narrow (
CORBA::Object_ptr obj,
- CORBA::Environment &ACE_TRY_ENV =
+ CORBA::Environment &ACE_TRY_ENV =
TAO_default_environment ()
);
static BidirectionalPolicy_ptr _nil (void)
@@ -161,7 +160,7 @@ class TAO_Export BidirectionalPolicy: public virtual CORBA::Policy
}
virtual BiDirPolicy::BidirectionalPolicyValue value (
- CORBA::Environment &ACE_TRY_ENV =
+ CORBA::Environment &ACE_TRY_ENV =
TAO_default_environment ()
)
ACE_THROW_SPEC ((
@@ -169,12 +168,12 @@ class TAO_Export BidirectionalPolicy: public virtual CORBA::Policy
)) = 0;
virtual void *_tao_QueryInterface (ptr_arith_t type);
-
+
virtual const char* _interface_repository_id (void) const;
protected:
BidirectionalPolicy ();
-
+
virtual ~BidirectionalPolicy (void);
private:
BidirectionalPolicy (const BidirectionalPolicy &);
diff --git a/TAO/tao/GIOP_Message_Base.cpp b/TAO/tao/GIOP_Message_Base.cpp
index 44b45076d9e..3bce1bc300e 100644
--- a/TAO/tao/GIOP_Message_Base.cpp
+++ b/TAO/tao/GIOP_Message_Base.cpp
@@ -1335,3 +1335,12 @@ TAO_GIOP_Message_Base::generate_locate_reply_header (
{
return 0;
}
+
+
+int
+TAO_GIOP_Message_Base::is_ready_for_bidirectional (void)
+{
+ // We dont really know.. So ask the enerator and parser objects that
+ // we know.
+ return this->generator_parser_->is_ready_for_bidirectional ();
+}
diff --git a/TAO/tao/GIOP_Message_Base.h b/TAO/tao/GIOP_Message_Base.h
index 6e76ebc810c..53a6ca5180c 100644
--- a/TAO/tao/GIOP_Message_Base.h
+++ b/TAO/tao/GIOP_Message_Base.h
@@ -184,6 +184,10 @@ private:
TAO_OutputCDR & /*cdr*/,
TAO_Pluggable_Reply_Params & /*params*/);
+ /// Is the messaging object ready for processing BiDirectional
+ /// request/response?
+ virtual int is_ready_for_bidirectional (void);
+
private:
/// The message state. It represents the status of the messages that
diff --git a/TAO/tao/GIOP_Message_Generator_Parser.cpp b/TAO/tao/GIOP_Message_Generator_Parser.cpp
index a898e52f206..9d53560d613 100644
--- a/TAO/tao/GIOP_Message_Generator_Parser.cpp
+++ b/TAO/tao/GIOP_Message_Generator_Parser.cpp
@@ -131,6 +131,12 @@ TAO_GIOP_Message_Generator_Parser::parse_locate_reply (
}
+int
+TAO_GIOP_Message_Generator_Parser::is_ready_for_bidirectional (void)
+{
+ return 0;
+}
+
void
TAO_GIOP_Message_Generator_Parser::marshal_reply_status (
TAO_OutputCDR &output,
diff --git a/TAO/tao/GIOP_Message_Generator_Parser.h b/TAO/tao/GIOP_Message_Generator_Parser.h
index 73228199d17..748841fd3d7 100644
--- a/TAO/tao/GIOP_Message_Generator_Parser.h
+++ b/TAO/tao/GIOP_Message_Generator_Parser.h
@@ -97,6 +97,9 @@ public:
virtual CORBA::Octet major_version (void) = 0;
virtual CORBA::Octet minor_version (void) = 0;
+ /// Is the messaging object ready for processing BiDirectional
+ /// request/response?
+ virtual int is_ready_for_bidirectional (void);
protected:
diff --git a/TAO/tao/GIOP_Message_Generator_Parser_12.cpp b/TAO/tao/GIOP_Message_Generator_Parser_12.cpp
index d79348eb0d8..f3f4f0d86a5 100644
--- a/TAO/tao/GIOP_Message_Generator_Parser_12.cpp
+++ b/TAO/tao/GIOP_Message_Generator_Parser_12.cpp
@@ -477,6 +477,13 @@ TAO_GIOP_Message_Generator_Parser_12::minor_version (void)
return (CORBA::Octet) 2;
}
+int
+TAO_GIOP_Message_Generator_Parser_12::is_ready_for_bidirectional (void)
+{
+ // We do support bidirectional
+ return 1;
+}
+
int
diff --git a/TAO/tao/GIOP_Message_Generator_Parser_12.h b/TAO/tao/GIOP_Message_Generator_Parser_12.h
index 5fa5dfa9a62..61ece2b2935 100644
--- a/TAO/tao/GIOP_Message_Generator_Parser_12.h
+++ b/TAO/tao/GIOP_Message_Generator_Parser_12.h
@@ -88,6 +88,10 @@ public:
virtual CORBA::Octet major_version (void);
virtual CORBA::Octet minor_version (void);
+ /// Is the messaging object ready for processing BiDirectional
+ /// request/response?
+ virtual int is_ready_for_bidirectional (void);
+
private:
/// Marshall the TargetSpecification
diff --git a/TAO/tao/GIOP_Message_Lite.cpp b/TAO/tao/GIOP_Message_Lite.cpp
index a6ab743e9a2..f6064bd4c0b 100644
--- a/TAO/tao/GIOP_Message_Lite.cpp
+++ b/TAO/tao/GIOP_Message_Lite.cpp
@@ -1402,3 +1402,19 @@ TAO_GIOP_Message_Lite::dump_msg (const char *label,
*id));
}
}
+
+int
+TAO_GIOP_Message_Lite::generate_locate_reply_header (
+ TAO_OutputCDR & /*cdr*/,
+ TAO_Pluggable_Reply_Params & /*params*/)
+{
+ return 0;
+}
+
+
+int
+TAO_GIOP_Message_Lite::is_ready_for_bidirectional (void)
+{
+ // No we dont support..
+ return 0;
+}
diff --git a/TAO/tao/GIOP_Message_Lite.h b/TAO/tao/GIOP_Message_Lite.h
index 921b4ad4278..cdb7dd9559b 100644
--- a/TAO/tao/GIOP_Message_Lite.h
+++ b/TAO/tao/GIOP_Message_Lite.h
@@ -181,7 +181,11 @@ private:
/// Write the locate reply header
virtual int generate_locate_reply_header (
TAO_OutputCDR & /*cdr*/,
- TAO_Pluggable_Reply_Params & /*params*/) { return 0;};
+ TAO_Pluggable_Reply_Params & /*params*/);
+
+ /// Is the messaging object ready for processing BiDirectional
+ /// request/response?
+ virtual int is_ready_for_bidirectional (void);
private:
diff --git a/TAO/tao/IIOP_Transport.cpp b/TAO/tao/IIOP_Transport.cpp
index 5f0878d1798..4de4a34309f 100644
--- a/TAO/tao/IIOP_Transport.cpp
+++ b/TAO/tao/IIOP_Transport.cpp
@@ -300,7 +300,8 @@ TAO_IIOP_Transport::send_request_header (TAO_Operation_Details &opdetails,
TAO_OutputCDR &msg)
{
// Check whether we have a Bi Dir IIOP policy set
- if (this->orb_core ()->bidir_giop_policy ())
+ if (this->orb_core ()->bidir_giop_policy () &&
+ this->messaging_object_->is_ready_for_bidirectional ())
{
}
diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp
index a40f6da647b..9a1517b4a00 100644
--- a/TAO/tao/ORB.cpp
+++ b/TAO/tao/ORB.cpp
@@ -42,6 +42,7 @@
# include "Messaging_ORBInitializer.h" // @@ This should go away!
#endif /* TAO_HAS_CORBA_MESSAGING == 1 */
+#include "tao/BiDir_ORBInitializer.h"
#if defined (TAO_HAS_VALUETYPE)
# include "ValueFactory_Map.h"
#endif /* TAO_HAS_VALUETYPE */
@@ -1101,6 +1102,36 @@ CORBA_ORB::init_orb_globals (CORBA::Environment &ACE_TRY_ENV)
ACE_TRY_ENV);
ACE_CHECK;
#endif /* TAO_HAS_CORBA_MESSAGING == 1 */
+
+ // @@ At presnt we are trying to register the BiDirORB Initializer
+ // only if the GIOP minor version is greater than or equal to
+ // 2. The question is -- Do we need this check? This check would
+ // be good if somebody decides to compile TAO with 1.0 or
+ // 1.1. But will it save them any foot print? Not really....
+
+ if (TAO_DEF_GIOP_MINOR >= 2)
+ {
+
+ PortableInterceptor::ORBInitializer_ptr tmp_orb_initializer =
+ PortableInterceptor::ORBInitializer::_nil ();
+ PortableInterceptor::ORBInitializer_var bidir_orb_initializer;
+
+ /// Register the BiDir ORBInitializer.
+ ACE_NEW_THROW_EX (tmp_orb_initializer,
+ TAO_BiDir_ORBInitializer,
+ CORBA::NO_MEMORY (
+ CORBA_SystemException::_tao_minor_code (
+ TAO_DEFAULT_MINOR_CODE,
+ ENOMEM),
+ CORBA::COMPLETED_NO));
+ ACE_CHECK;
+
+ bidir_orb_initializer = tmp_orb_initializer;
+
+ PortableInterceptor::register_orb_initializer (bidir_orb_initializer.in (),
+ ACE_TRY_ENV);
+ ACE_CHECK;
+ }
// -------------------------------------------------------------
}
diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp
index 2745a4a3a07..b53c8d55687 100644
--- a/TAO/tao/ORB_Core.cpp
+++ b/TAO/tao/ORB_Core.cpp
@@ -153,7 +153,7 @@ TAO_ORB_Core::TAO_ORB_Core (const char *orbid)
ior_interceptors_ (),
parser_registry_ (),
connection_cache_ (),
- bidir_giop_policy (0)
+ bidir_giop_policy_ (0)
{
#if defined(ACE_MVS)
ACE_NEW (this->from_iso8859_, ACE_IBM1047_ISO8859);
diff --git a/TAO/tao/Pluggable_Messaging.h b/TAO/tao/Pluggable_Messaging.h
index ee3a71f876e..55b7cf6cc37 100644
--- a/TAO/tao/Pluggable_Messaging.h
+++ b/TAO/tao/Pluggable_Messaging.h
@@ -112,7 +112,7 @@ public:
// Do any initialisations that may be needed.
virtual void reset (int reset_flag = 1) = 0;
- // Reset teh messaging object
+ // Reset the messaging object
virtual int process_request_message (TAO_Transport *transport,
TAO_ORB_Core *orb_core) = 0;
@@ -129,6 +129,10 @@ public:
TAO_Pluggable_Reply_Params &params,
CORBA::Exception &x) = 0;
// Generate a reply message with the exception <ex>.
+
+ virtual int is_ready_for_bidirectional (void) = 0;
+ // Is the messaging object ready for processing BiDirectional
+ // request/response?
};
#if defined (__ACE_INLINE__)
diff --git a/TAO/tao/PortableServer/POA.cpp b/TAO/tao/PortableServer/POA.cpp
index e482a86e6fc..55af645bd9c 100644
--- a/TAO/tao/PortableServer/POA.cpp
+++ b/TAO/tao/PortableServer/POA.cpp
@@ -20,6 +20,8 @@
#include "tao/Acceptor_Registry.h"
#include "tao/RT_Policy_i.h"
+#include "tao/BiDir_Policy_i.h"
+
#include "Default_Acceptor_Filter.h"
#include "RT_Acceptor_Filters.h"
@@ -3884,7 +3886,21 @@ TAO_POA_Policies::parse_policy (const CORBA::Policy_ptr policy,
}
#endif /* TAO_HAS_RT_CORBA == 1 */
- ///@@@ FOr BiDIr GIOP....
+
+ // Bidirectional policy. If we have a BiDirectional policy, we set a
+ // flag in the ORB_Core for use by the ORB
+
+ BiDirPolicy::BidirectionalPolicy_var bidir_policy
+ = BiDirPolicy::BidirectionalPolicy::_narrow (policy,
+ ACE_TRY_ENV);
+ ACE_CHECK;
+
+ if (!CORBA::is_nil (bidir_policy.in ()))
+ {
+ // Set the flag in the ORB_Core
+ this->orb_core_.bidir_giop_policy (1);
+ return;
+ }
ACE_THROW (PortableServer::POA::InvalidPolicy ());
}
diff --git a/TAO/tao/TAO.dsp b/TAO/tao/TAO.dsp
index 2d8dfc87bfd..130557cca58 100644
--- a/TAO/tao/TAO.dsp
+++ b/TAO/tao/TAO.dsp
@@ -404,6 +404,82 @@ SOURCE=.\Base_Connection_Property.cpp
# End Source File
# Begin Source File
+SOURCE=.\BiDir_ORBInitializer.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=.\BiDir_Policy_i.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=.\BiDir_PolicyFactory.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=.\BiDirPolicyC.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=.\Bind_Dispatcher_Guard.cpp
!IF "$(CFG)" == "TAO DLL - Win32 Alpha Release"
@@ -3389,6 +3465,22 @@ SOURCE=.\Base_Connection_Property.h
# End Source File
# Begin Source File
+SOURCE=.\BiDir_ORBInitializer.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\BiDir_Policy_i.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\BiDir_PolicyFactory.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\BiDirPolicyC.h
+# End Source File
+# Begin Source File
+
SOURCE=.\Bind_Dispatcher_Guard.h
# End Source File
# Begin Source File
@@ -4121,6 +4213,14 @@ SOURCE=.\Base_Connection_Property.i
# End Source File
# Begin Source File
+SOURCE=.\BiDir_Policy_i.inl
+# End Source File
+# Begin Source File
+
+SOURCE=.\BiDirPolicyC.i
+# End Source File
+# Begin Source File
+
SOURCE=.\Bind_Dispatcher_Guard.i
# End Source File
# Begin Source File
diff --git a/TAO/tao/TAO_Static.dsp b/TAO/tao/TAO_Static.dsp
index 92dd1605342..22dc2c52cb1 100644
--- a/TAO/tao/TAO_Static.dsp
+++ b/TAO/tao/TAO_Static.dsp
@@ -123,6 +123,22 @@ SOURCE=.\Base_Connection_Property.h
# End Source File
# Begin Source File
+SOURCE=.\BiDir_ORBInitializer.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\BiDir_Policy_i.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\BiDir_PolicyFactory.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\BiDirPolicyC.h
+# End Source File
+# Begin Source File
+
SOURCE=.\Bind_Dispatcher_Guard.h
# End Source File
# Begin Source File
@@ -839,6 +855,14 @@ SOURCE=.\Base_Connection_Property.i
# End Source File
# Begin Source File
+SOURCE=.\BiDir_Policy_i.inl
+# End Source File
+# Begin Source File
+
+SOURCE=.\BiDirPolicyC.i
+# End Source File
+# Begin Source File
+
SOURCE=.\Bind_Dispatcher_Guard.i
# End Source File
# Begin Source File
@@ -1419,6 +1443,22 @@ SOURCE=.\Base_Connection_Property.cpp
# End Source File
# Begin Source File
+SOURCE=.\BiDir_ORBInitializer.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\BiDir_Policy_i.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\BiDir_PolicyFactory.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\BiDirPolicyC.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\Bind_Dispatcher_Guard.cpp
# End Source File
# Begin Source File
diff --git a/TAO/tao/operation_details.h b/TAO/tao/operation_details.h
index b21e3facd54..4245d4e2cc0 100644
--- a/TAO/tao/operation_details.h
+++ b/TAO/tao/operation_details.h
@@ -15,12 +15,17 @@
#ifndef TAO_OPERATION_DETAILS_H
#define TAO_OPERATION_DETAILS_H
#include "ace/pre.h"
-
#include "tao/corbafwd.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+
#include "tao/IOPC.h"
#include "tao/target_specification.h"
-// @@ Bala: Why is this not part of the RequestHeader?!
+
class TAO_Export TAO_Operation_Details
{
// = TITLE