summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>2000-07-17 23:32:21 +0000
committerbala <balanatarajan@users.noreply.github.com>2000-07-17 23:32:21 +0000
commit6805097034f379de466f88ca4dd816a04047297a (patch)
tree2430f55ca3334cb8a8f17888c797651a64b9ab50
parent40c989b167b174557f9c39f8005c6b559b44a944 (diff)
downloadATCD-6805097034f379de466f88ca4dd816a04047297a.tar.gz
*** empty log message ***
-rw-r--r--TAO/tao/Profile.h6
-rw-r--r--TAO/tao/Profile.i10
-rw-r--r--TAO/tao/Stub.cpp44
-rw-r--r--TAO/tao/orbconf.h9
4 files changed, 69 insertions, 0 deletions
diff --git a/TAO/tao/Profile.h b/TAO/tao/Profile.h
index 143573f8878..59e0a13718e 100644
--- a/TAO/tao/Profile.h
+++ b/TAO/tao/Profile.h
@@ -68,6 +68,12 @@ public:
// Access the tagged components, notice that they they could be
// empty (or ignored) for non-GIOP protocols (and even for GIOP-1.0)
+#if (TAO_HAS_FT_CORBA == 1)
+
+ CORBA::Boolean is_primary (void);
+ // Is this profile a primary?
+#endif /*TAO_HAS_FT_CORBA */
+
virtual char object_key_delimiter (void) const = 0;
// The object key delimiter.
diff --git a/TAO/tao/Profile.i b/TAO/tao/Profile.i
index c5b1fdfc011..42d9937fa70 100644
--- a/TAO/tao/Profile.i
+++ b/TAO/tao/Profile.i
@@ -74,3 +74,13 @@ TAO_Profile::tagged_components (void)
{
return this->tagged_components_;
}
+
+#if (TAO_HAS_FT_CORBA == 1)
+
+ACE_INLINE CORBA::Boolean
+TAO_Profile::is_primary (void) const
+{
+ return this->tagged_components_.is_primary ();
+}
+
+#endif /*TAO_HAS_FT_CORBA */
diff --git a/TAO/tao/Stub.cpp b/TAO/tao/Stub.cpp
index 090ac9f509b..647fb1b2c7b 100644
--- a/TAO/tao/Stub.cpp
+++ b/TAO/tao/Stub.cpp
@@ -533,6 +533,50 @@ void
TAO_Stub::set_profile_from_primary (void)
{
// For FT_CORBA we need to find the profile with FT_TAG_PRIMARY
+ for (;;)
+ {
+ TAO_Profile *profile = this->base_profile_.get_next ();
+
+ if (profile)
+ {
+ if (profile->is_primary ())
+ {
+ // @@ We are going to set the current pointer to
+ // When a primary fails to respond, in which case the
+ // pointer will move to the next available profile. The
+ // problem starts kicking in if the primary happens to be
+ // the last profile in a combined IOGR, we may run out of
+ // luck. So, we need a btter way to do this. But for the
+ // present let us start with this
+ this->set_profile_in_use_i (profile);
+ break;
+ }
+ }
+ else
+ {
+ // @@ Here is where another issue kicks in. Do we flag this
+ // condition as an error. May be not. Probably the client
+ // ORB that is FT compliant, in our case TAO compiled
+ // with TAO_HAS_FT_CORBA = 1, has received an IOR from a
+ // non-compliant ORB. We cannot think this of an
+ // error. Rather we need to fall back on the normal
+ // methodolody that we use.
+
+ // So let us rewind our MProfile list and set the first one
+ // as the starting point.
+ this->base_profile_.rewind ();
+ this->set_profile_in_use_i (base_profiles_.get_next ());
+
+ // @@ All said and done, what if we receive an IOGR from a
+ // FT-compliant ORB with no primaries?
+ // Ans: The above usage of the first profile in the list
+ // as the start point would NOT be a mistake. We should
+ // get a LOCATION_FORWARD or some such thing to get to
+ // the primary.
+ }
+ }
+
+ return;
}
#endif /*TAO_HAS_FT_CORBA*/
diff --git a/TAO/tao/orbconf.h b/TAO/tao/orbconf.h
index b62e6f43077..2cd703d728a 100644
--- a/TAO/tao/orbconf.h
+++ b/TAO/tao/orbconf.h
@@ -891,5 +891,14 @@ enum MCAST_SERVICEID
// To explicitly enable SMART_PROXIES support uncomment the following
// #define TAO_HAS_SMART_PROXIES 1
+// By default FT_CORBA is disabled.
+# if !defined (TAO_HAS_FT_CORBA)
+# define TAO_HAS_FT_CORBA 1
+#endif /*TAO_HAS_FT_CORBA*/
+
+// FT_CORBA support is disabled by default.
+// To explicitly enable FT_CORBA support uncomment the following
+ //#define TAO_HAS_FT_CORBA 1
+
#include "ace/post.h"
#endif /* TAO_ORB_CONFIG_H */