summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorharrisb <harrisb@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2013-01-30 19:09:24 +0000
committerharrisb <harrisb@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2013-01-30 19:09:24 +0000
commit4b6ee17726f4a5233cd73a7995be34fcccd47cf8 (patch)
tree21d86d5a84224add7d4b58df3fe904c4fb1a77c9
parentc11dff74c891390eb7b499dcf96ff8a259c4315b (diff)
downloadATCD-4b6ee17726f4a5233cd73a7995be34fcccd47cf8.tar.gz
Wed Jan 30 19:03:33 UTC 2013 Byron Harris <harrisb@ociweb.com>
-rw-r--r--TAO/OCI_RE_ChangeLog25
-rw-r--r--TAO/docs/Options.html52
-rw-r--r--TAO/tao/DynamicInterface/DII_Invocation_Adapter.cpp13
-rw-r--r--TAO/tao/DynamicInterface/DII_Invocation_Adapter.h9
-rw-r--r--TAO/tao/Invocation_Adapter.cpp20
-rw-r--r--TAO/tao/Invocation_Adapter.h9
-rw-r--r--TAO/tao/Invocation_Retry_State.cpp13
-rw-r--r--TAO/tao/Invocation_Retry_State.h5
-rw-r--r--TAO/tao/Messaging/Asynch_Invocation_Adapter.cpp5
-rw-r--r--TAO/tao/Messaging/Asynch_Invocation_Adapter.h3
-rw-r--r--TAO/tao/Stub.cpp14
-rw-r--r--TAO/tao/Stub.h5
-rw-r--r--TAO/tao/Synch_Invocation.cpp47
-rw-r--r--TAO/tao/Synch_Invocation.h10
14 files changed, 135 insertions, 95 deletions
diff --git a/TAO/OCI_RE_ChangeLog b/TAO/OCI_RE_ChangeLog
index 0976692fa20..cf812af80b4 100644
--- a/TAO/OCI_RE_ChangeLog
+++ b/TAO/OCI_RE_ChangeLog
@@ -1,3 +1,26 @@
+Wed Jan 30 19:03:33 UTC 2013 Byron Harris <harrisb@ociweb.com>
+
+ * docs/Options.html:
+
+ Fix typos for for a few invocation retry parameters.
+
+ * tao/DynamicInterface/DII_Invocation_Adapter.h:
+ * tao/DynamicInterface/DII_Invocation_Adapter.cpp:
+ * tao/Invocation_Adapter.h:
+ * tao/Invocation_Adapter.cpp:
+ * tao/Invocation_Retry_State.h:
+ * tao/Invocation_Retry_State.cpp:
+ * tao/Messaging/Asynch_Invocation_Adapter.h:
+ * tao/Messaging/Asynch_Invocation_Adapter.cpp:
+ * tao/Stub.h:
+ * tao/Stub.cpp:
+ * tao/Synch_Invocation.h:
+ * tao/Synch_Invocation.cpp:
+
+ Fixed bad assumption I made for invocation retries
+ that Invocation_Adapter::invoke () would not be
+ done asynchronously with the same TAO_Stub.
+
Tue Jan 29 15:13:13 UTC 2013 "Kevin Stanley" <stanleyk@ociweb.com>
* ChangeLog:
@@ -16,7 +39,7 @@ Tue Jan 29 15:13:13 UTC 2013 "Kevin Stanley" <stanleyk@ociweb.com>
* orbsvcs/tests/Miop/McastFragmentation/uipmc_server_n.conf:
Merged Doc group trunk into branch to resolve issues with building examples.
-
+
Mon Jan 28 22:54:36 UTC 2013 Phillip LaBanca <labancap@ociweb.com>
* orbsvcs/ImplRepo_Service/README:
diff --git a/TAO/docs/Options.html b/TAO/docs/Options.html
index d29f11c3ef2..ecdae650c43 100644
--- a/TAO/docs/Options.html
+++ b/TAO/docs/Options.html
@@ -959,7 +959,7 @@ having them use the same configurator file.
<th>Description</th>
</tr>
<tr>
- <td><code>-ORBForwardTransientLimit</code> <em>limit</em></td>
+ <td><code>-ORBForwardOnTransientLimit</code> <em>limit</em></td>
<td>Use this option to cycle through profiles when
establishing a connection with a server or when a
server replies to a request with a TRANSIENT
@@ -967,7 +967,7 @@ having them use the same configurator file.
The number of retries will not exceed <em>limit</em>.</td>
</tr>
<tr>
- <td><code>-ORBForwardCommFailureLimit</code> <em>limit</em></td>
+ <td><code>-ORBForwardOnCommFailureLimit</code> <em>limit</em></td>
<td>Use this option to cycle through profiles when a
server replies to a request with a COMM_FAILURE
exception.
@@ -992,7 +992,7 @@ having them use the same configurator file.
<td>Use this option to cycle through profiles when it has
been detected that a connection is closed when reading a server reply.
The number of retries will not exceed <em>limit</em>.
- If this option is used then -ORBForwardTransientLimit should
+ If this option is used then -ORBForwardOnTransientLimit should
also be used to avoid a TRANSIENT exception being thrown.
</td>
</tr>
@@ -1908,7 +1908,7 @@ strategy.
<tr>
<td ALIGN="left"><code>&#8209;ORBMaxFragmentRate</code> <em>microseconds</em></td>
<td ALIGN="left">
- <P>This client-side option (if enabled, see <code>&#8209;ORBSendThrottling</code> below)
+ <P>This client-side option (if enabled, see <code>&#8209;ORBSendThrottling</code> below)
specifies a non-zero, positive amount of time (in
uSec, i.e. microseconds) that it takes to transmit and process an individual
message fragment of the maximum size; see the <code>&#8209;ORBMaxFragmentSize</code>
@@ -1947,15 +1947,15 @@ strategy.
</tr>
<tr>
<td ALIGN="left"><code>&#8209;ORBSendThrottling</code> <em>0 | 1</em></td>
- <td ALIGN="left">This is a client-side option that is enabled by default;
+ <td ALIGN="left">This is a client-side option that is enabled by default;
although this default can be overriden when the TAO libraries are built in the <CODE>
ace/config.h</CODE>, by specifying the new default such as <CODE>#define&nbsp;TAO_DEFAULT_MIOP_SEND_THROTTLING&nbsp;false</CODE>
- which in this case would turn off throttling by default, unless specified in
- the service file. If disabled (0) the client will always attempt to transmit
- all MIOP message fragments without any delay. If enabled (1) the client will
- attempt to automatically restrict the speed of sending individual MIOP messages
+ which in this case would turn off throttling by default, unless specified in
+ the service file. If disabled (0) the client will always attempt to transmit
+ all MIOP message fragments without any delay. If enabled (1) the client will
+ attempt to automatically restrict the speed of sending individual MIOP messages
to maintain an average of <code>&#8209;ORBMaxFragmentSize</code> bytes per <code>&#8209;ORBMaxFragmentRate</code>
- microseconds once the threshold of <code>&#8209;ORBSendHighWaterMark</code> bytes
+ microseconds once the threshold of <code>&#8209;ORBSendHighWaterMark</code> bytes
of data are currently being transmitted or are in progress via each individual transport
(i.e. each individual client-side connection to the server).
</td>
@@ -1996,28 +1996,28 @@ strategy.
</tr>
<tr>
<td ALIGN="left"><code>&#8209;ORBEagerDequeueing</code> <em>0 | 1</em></td>
- <td ALIGN="left">This is a server-side option that is enabled by default;
+ <td ALIGN="left">This is a server-side option that is enabled by default;
although this default can be overriden when the TAO libraries are built in the <CODE>
ace/config.h</CODE>, by specifying the new default such as <CODE>#define&nbsp;TAO_DEFAULT_MIOP_EAGER_DEQUEUEING&nbsp;false</CODE>
- which in this case would turn this off by default, unless specified in the
- service file. If disabled (0) each thread servicing the MIOP listener will only
- dequeue enough MIOP message fragments from the socket receive buffer to
- complete a single full MIOP message which it will then process. This action
- reduces the amount of user memory consumed by the server process, but it also
- increases the likelyhood of the OS sockets receive buffer overflowing (as
- whilst processing each message, the thread cannot dequeue other incomming
- message fragments). If enabled (1) it specifies that each server thread will
- attempt to dequeue all available MIOP messages from the receiver's socket and
- queue these up in a user memory FIFO queue, before attempting to process a
- single MIOP message from the head of this FIFO queue. This action attempts to
- speed up the dequeueing of MIOP messages from the OS socket receive buffer
- (with a corresponding increase in the amount of user memory consumed by the
- server process) so as to limit the number of MIOP messages that the server may
+ which in this case would turn this off by default, unless specified in the
+ service file. If disabled (0) each thread servicing the MIOP listener will only
+ dequeue enough MIOP message fragments from the socket receive buffer to
+ complete a single full MIOP message which it will then process. This action
+ reduces the amount of user memory consumed by the server process, but it also
+ increases the likelyhood of the OS sockets receive buffer overflowing (as
+ whilst processing each message, the thread cannot dequeue other incomming
+ message fragments). If enabled (1) it specifies that each server thread will
+ attempt to dequeue all available MIOP messages from the receiver's socket and
+ queue these up in a user memory FIFO queue, before attempting to process a
+ single MIOP message from the head of this FIFO queue. This action attempts to
+ speed up the dequeueing of MIOP messages from the OS socket receive buffer
+ (with a corresponding increase in the amount of user memory consumed by the
+ server process) so as to limit the number of MIOP messages that the server may
miss due to the OS sockets receive buffer becoming full.
</td>
</tr>
<tr>
- <td ALIGN="left"><code>&#8209;ORBFragmentsCleanupStrategy</code> <em>DELAY | NUMBER
+ <td ALIGN="left"><code>&#8209;ORBFragmentsCleanupStrategy</code> <em>DELAY | NUMBER
| MEMORY</em></td>
<td ALIGN="left">This option is used on the server to specify the incomplete
fragments cleanup strategy. The default is <em>DELAY</em>, indicating that the
diff --git a/TAO/tao/DynamicInterface/DII_Invocation_Adapter.cpp b/TAO/tao/DynamicInterface/DII_Invocation_Adapter.cpp
index e302ccaff0f..1385d2fb5e5 100644
--- a/TAO/tao/DynamicInterface/DII_Invocation_Adapter.cpp
+++ b/TAO/tao/DynamicInterface/DII_Invocation_Adapter.cpp
@@ -96,8 +96,11 @@ namespace TAO
TAO_Operation_Details &op,
CORBA::Object_var &effective_target,
Profile_Transport_Resolver &r,
- ACE_Time_Value *&max_wait_time)
+ ACE_Time_Value *&max_wait_time,
+ Invocation_Retry_State *retry_state)
{
+ ACE_UNUSED_ARG (retry_state);
+
// Simple sanity check
if (this->mode_ != TAO_DII_INVOCATION ||
this->type_ != TAO_TWOWAY_INVOCATION)
@@ -216,8 +219,11 @@ namespace TAO
TAO_Operation_Details &op,
CORBA::Object_var &effective_target,
Profile_Transport_Resolver &r,
- ACE_Time_Value *&max_wait_time)
+ ACE_Time_Value *&max_wait_time,
+ Invocation_Retry_State *retry_state)
{
+ ACE_UNUSED_ARG (retry_state);
+
// Simple sanity check
if (this->mode_ != TAO_DII_DEFERRED_INVOCATION ||
this->type_ != TAO_TWOWAY_INVOCATION)
@@ -288,7 +294,8 @@ namespace TAO
TAO_Operation_Details &,
CORBA::Object_var &,
Profile_Transport_Resolver &,
- ACE_Time_Value *&)
+ ACE_Time_Value *&,
+ Invocation_Retry_State *)
{
return TAO_INVOKE_FAILURE;
}
diff --git a/TAO/tao/DynamicInterface/DII_Invocation_Adapter.h b/TAO/tao/DynamicInterface/DII_Invocation_Adapter.h
index 80b2c6f9274..a7586d5a71b 100644
--- a/TAO/tao/DynamicInterface/DII_Invocation_Adapter.h
+++ b/TAO/tao/DynamicInterface/DII_Invocation_Adapter.h
@@ -102,7 +102,8 @@ namespace TAO
TAO_Operation_Details &op,
CORBA::Object_var &effective_target,
Profile_Transport_Resolver &r,
- ACE_Time_Value *&max_wait_time);
+ ACE_Time_Value *&max_wait_time,
+ Invocation_Retry_State *retry_state = 0);
virtual Invocation_Status invoke_collocated_i (
TAO_Stub *stub,
@@ -154,7 +155,8 @@ namespace TAO
TAO_Operation_Details &op,
CORBA::Object_var &effective_target,
Profile_Transport_Resolver &r,
- ACE_Time_Value *&max_wait_time);
+ ACE_Time_Value *&max_wait_time,
+ Invocation_Retry_State *retry_state = 0);
virtual Invocation_Status invoke_collocated_i (
TAO_Stub *stub,
@@ -199,7 +201,8 @@ namespace TAO
TAO_Operation_Details &op,
CORBA::Object_var &effective_target,
Profile_Transport_Resolver &r,
- ACE_Time_Value *&max_wait_time);
+ ACE_Time_Value *&max_wait_time,
+ Invocation_Retry_State *retry_state = 0);
};
#endif /* TAO_HAS_AMI */
diff --git a/TAO/tao/Invocation_Adapter.cpp b/TAO/tao/Invocation_Adapter.cpp
index 81e62a87e35..310cec2dad1 100644
--- a/TAO/tao/Invocation_Adapter.cpp
+++ b/TAO/tao/Invocation_Adapter.cpp
@@ -70,9 +70,6 @@ namespace TAO
max_wait_time= &tmp_wait_time;
}
- // Although not used explicitly here, constructs
- // the retry state that will stub that be used
- // when restarting invocation.
TAO::Invocation_Retry_State retry_state (*stub);
while (status == TAO_INVOKE_START || status == TAO_INVOKE_RESTART)
@@ -101,7 +98,8 @@ namespace TAO
this->invoke_remote_i (stub,
details,
effective_target,
- max_wait_time);
+ max_wait_time,
+ &retry_state);
}
else
{
@@ -234,7 +232,8 @@ namespace TAO
Invocation_Adapter::invoke_remote_i (TAO_Stub *stub,
TAO_Operation_Details &details,
CORBA::Object_var &effective_target,
- ACE_Time_Value *&max_wait_time)
+ ACE_Time_Value *&max_wait_time,
+ Invocation_Retry_State *retry_state)
{
(void) this->set_response_flags (stub, details);
@@ -276,7 +275,8 @@ namespace TAO
return this->invoke_twoway (details,
effective_target,
resolver,
- max_wait_time);
+ max_wait_time,
+ retry_state);
}
}
@@ -287,7 +287,8 @@ namespace TAO
Invocation_Adapter::invoke_twoway (TAO_Operation_Details &details,
CORBA::Object_var &effective_target,
Profile_Transport_Resolver &r,
- ACE_Time_Value *&max_wait_time)
+ ACE_Time_Value *&max_wait_time,
+ Invocation_Retry_State *retry_state)
{
// Simple sanity check
if (this->mode_ != TAO_SYNCHRONOUS_INVOCATION ||
@@ -300,7 +301,10 @@ namespace TAO
CORBA::COMPLETED_NO);
}
- TAO::Synch_Twoway_Invocation synch (this->target_, r, details);
+ TAO::Synch_Twoway_Invocation synch (this->target_, r, details,
+ true);
+
+ synch.set_retry_state (retry_state);
Invocation_Status const status = synch.remote_twoway (max_wait_time);
diff --git a/TAO/tao/Invocation_Adapter.h b/TAO/tao/Invocation_Adapter.h
index f539c28de45..b1ec5f7db19 100644
--- a/TAO/tao/Invocation_Adapter.h
+++ b/TAO/tao/Invocation_Adapter.h
@@ -47,6 +47,7 @@ namespace TAO
class Argument;
struct Exception_Data;
class Profile_Transport_Resolver;
+ class Invocation_Retry_State;
/**
* @class Invocation_Adapter
@@ -124,7 +125,9 @@ namespace TAO
* @param ex_count Number of elements in the array.
*/
virtual void invoke (TAO::Exception_Data *ex, unsigned long ex_count);
+
protected:
+
/**
* The stub pointer passed to this call has all the details about
* the object to which the invocation needs to be routed to. The
@@ -163,7 +166,8 @@ namespace TAO
TAO_Stub *stub,
TAO_Operation_Details &details,
CORBA::Object_var &effective_target,
- ACE_Time_Value *&max_wait_time);
+ ACE_Time_Value *&max_wait_time,
+ Invocation_Retry_State *retry_state = 0);
/// Make a collocated call.
/**
@@ -193,7 +197,8 @@ namespace TAO
TAO_Operation_Details &details,
CORBA::Object_var &effective_target,
Profile_Transport_Resolver &r,
- ACE_Time_Value *&max_wait_time);
+ ACE_Time_Value *&max_wait_time,
+ Invocation_Retry_State *retry_state = 0);
/// Helper method to make a one way invocation.
/**
diff --git a/TAO/tao/Invocation_Retry_State.cpp b/TAO/tao/Invocation_Retry_State.cpp
index 3df2302b748..7204250846a 100644
--- a/TAO/tao/Invocation_Retry_State.cpp
+++ b/TAO/tao/Invocation_Retry_State.cpp
@@ -79,10 +79,8 @@ namespace
TAO::Invocation_Retry_State::Invocation_Retry_State (TAO_Stub &stub)
: forward_on_reply_closed_count_ (0)
- , stub_ (stub)
, forward_on_exception_limit_used_ (false)
{
- this->stub_.invocation_retry_state (this);
this->ex_count_map_[FOE_OBJECT_NOT_EXIST] = 0;
this->ex_count_map_[FOE_COMM_FAILURE] = 0;
this->ex_count_map_[FOE_TRANSIENT] = 0;
@@ -114,7 +112,6 @@ TAO::Invocation_Retry_State::Invocation_Retry_State (TAO_Stub &stub)
TAO::Invocation_Retry_State::~Invocation_Retry_State ()
{
- this->stub_.invocation_retry_state (0);
}
bool
@@ -156,16 +153,16 @@ TAO::Invocation_Retry_State::forward_on_reply_closed_increment ()
}
void
-TAO::Invocation_Retry_State::next_profile_retry (void) const
+TAO::Invocation_Retry_State::next_profile_retry (TAO_Stub &stub) const
{
- this->stub_.next_profile_retry ();
- this->sleep_at_starting_profile ();
+ stub.next_profile_retry ();
+ this->sleep_at_starting_profile (stub);
}
void
-TAO::Invocation_Retry_State::sleep_at_starting_profile () const
+TAO::Invocation_Retry_State::sleep_at_starting_profile (TAO_Stub &stub) const
{
- if (stub_.at_starting_profile ())
+ if (stub.at_starting_profile ())
this->sleep ();
}
diff --git a/TAO/tao/Invocation_Retry_State.h b/TAO/tao/Invocation_Retry_State.h
index df8c7d04eec..096f32fadf8 100644
--- a/TAO/tao/Invocation_Retry_State.h
+++ b/TAO/tao/Invocation_Retry_State.h
@@ -68,13 +68,13 @@ namespace TAO
* sleep ().
* @see TAO_Stub::next_profile_retry()
*/
- void next_profile_retry (void) const;
+ void next_profile_retry (TAO_Stub &stub) const;
/**
* Sleep if profile is the starting
* base profile.
*/
- void sleep_at_starting_profile () const;
+ void sleep_at_starting_profile (TAO_Stub &stub) const;
/**
* Sleep according to the delay value
@@ -87,7 +87,6 @@ namespace TAO
typedef ACE_Array_Map<int, int> Ex_Count_Map;
Ex_Count_Map ex_count_map_;
int forward_on_reply_closed_count_;
- TAO_Stub &stub_;
Invocation_Retry_Params retry_params_;
bool forward_on_exception_limit_used_;
};
diff --git a/TAO/tao/Messaging/Asynch_Invocation_Adapter.cpp b/TAO/tao/Messaging/Asynch_Invocation_Adapter.cpp
index e0b8a583be7..3e189293220 100644
--- a/TAO/tao/Messaging/Asynch_Invocation_Adapter.cpp
+++ b/TAO/tao/Messaging/Asynch_Invocation_Adapter.cpp
@@ -152,8 +152,11 @@ namespace TAO
TAO_Operation_Details &op,
CORBA::Object_var &effective_target,
Profile_Transport_Resolver &r,
- ACE_Time_Value *&max_wait_time)
+ ACE_Time_Value *&max_wait_time,
+ Invocation_Retry_State *retry_state)
{
+ ACE_UNUSED_ARG (retry_state);
+
// Simple sanity check
if (this->mode_ != TAO_ASYNCHRONOUS_CALLBACK_INVOCATION
|| this->type_ != TAO_TWOWAY_INVOCATION)
diff --git a/TAO/tao/Messaging/Asynch_Invocation_Adapter.h b/TAO/tao/Messaging/Asynch_Invocation_Adapter.h
index 4c78afaedae..c562f2fcba8 100644
--- a/TAO/tao/Messaging/Asynch_Invocation_Adapter.h
+++ b/TAO/tao/Messaging/Asynch_Invocation_Adapter.h
@@ -80,7 +80,8 @@ namespace TAO
TAO_Operation_Details &op,
CORBA::Object_var &effective_target,
Profile_Transport_Resolver &r,
- ACE_Time_Value *&max_wait_time);
+ ACE_Time_Value *&max_wait_time,
+ Invocation_Retry_State *retry_state = 0);
virtual Invocation_Status invoke_collocated_i (
TAO_Stub *stub,
diff --git a/TAO/tao/Stub.cpp b/TAO/tao/Stub.cpp
index c9ee90406cf..b6bdbeaea36 100644
--- a/TAO/tao/Stub.cpp
+++ b/TAO/tao/Stub.cpp
@@ -19,7 +19,6 @@
#include "tao/Policy_Set.h"
#include "tao/SystemException.h"
#include "tao/CDR.h"
-#include "tao/Invocation_Retry_State.h"
#if !defined (__ACE_INLINE__)
# include "tao/Stub.inl"
@@ -53,7 +52,6 @@ TAO_Stub::TAO_Stub (const char *repository_id,
, forwarded_ior_info_ (0)
, collocation_opt_ (orb_core->optimize_collocation_objects ())
, forwarded_on_exception_ (false)
- , invocation_retry_state_ (0)
{
if (this->orb_core_.get() == 0)
{
@@ -577,16 +575,4 @@ TAO_Stub::marshal (TAO_OutputCDR &cdr)
return (CORBA::Boolean) cdr.good_bit ();
}
-void
-TAO_Stub::invocation_retry_state (TAO::Invocation_Retry_State *state)
-{
- this->invocation_retry_state_ = state;
-}
-
-TAO::Invocation_Retry_State *
-TAO_Stub::invocation_retry_state () const
-{
- return this->invocation_retry_state_;
-}
-
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/Stub.h b/TAO/tao/Stub.h
index 5c09af7985a..a654e3931de 100644
--- a/TAO/tao/Stub.h
+++ b/TAO/tao/Stub.h
@@ -45,7 +45,6 @@ namespace TAO
class ObjectKey;
class Object_Proxy_Broker;
class Transport_Queueing_Strategy;
- class Invocation_Retry_State;
}
namespace IOP
@@ -271,9 +270,6 @@ public:
void forwarded_on_exception (bool forwarded);
bool forwarded_on_exception () const;
- void invocation_retry_state (TAO::Invocation_Retry_State *state);
- TAO::Invocation_Retry_State *invocation_retry_state () const;
-
protected:
/// Destructor is to be called only through _decr_refcnt() to
@@ -416,7 +412,6 @@ protected:
/// (e.g. OBJECT_NOT_EXIST) already happened.
ACE_Atomic_Op<TAO_SYNCH_MUTEX, bool> forwarded_on_exception_;
- TAO::Invocation_Retry_State *invocation_retry_state_;
};
// Define a TAO_Stub auto_ptr class.
diff --git a/TAO/tao/Synch_Invocation.cpp b/TAO/tao/Synch_Invocation.cpp
index 60021df9eb6..71ef977e300 100644
--- a/TAO/tao/Synch_Invocation.cpp
+++ b/TAO/tao/Synch_Invocation.cpp
@@ -43,9 +43,16 @@ namespace TAO
resolver,
detail,
response_expected)
+ , retry_state_ (0)
{
}
+ void
+ Synch_Twoway_Invocation::set_retry_state (Invocation_Retry_State *retry_state)
+ {
+ this->retry_state_ = retry_state;
+ }
+
Invocation_Status
Synch_Twoway_Invocation::remote_twoway (ACE_Time_Value *max_wait_time)
{
@@ -80,15 +87,15 @@ namespace TAO
if (!transport)
{
- TAO::Invocation_Retry_State *retry_state = this->stub ()->invocation_retry_state ();
- if (retry_state->forward_on_exception_increment(FOE_TRANSIENT))
+ if (this->retry_state_ &&
+ this->retry_state_->forward_on_exception_increment(FOE_TRANSIENT))
{
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_INFO,
ACE_TEXT ("TAO (%P|%t) - Synch_Twoway_Invocation::")
ACE_TEXT ("remote_twoway retrying on TRANSIENT ")
ACE_TEXT ("exception\n")));
- retry_state->next_profile_retry ();
+ this->retry_state_->next_profile_retry (*this->stub ());
return TAO_INVOKE_RESTART;
}
else
@@ -329,17 +336,16 @@ namespace TAO
(void) bd.unbind_dispatcher ();
this->resolver_.transport ()->close_connection ();
- TAO::Invocation_Retry_State *retry_state =
- this->stub ()->invocation_retry_state ();
- if (this->resolver_.transport ()->connection_closed_on_read() &&
- retry_state->forward_on_reply_closed_increment ())
+ if (this->retry_state_ &&
+ this->resolver_.transport ()->connection_closed_on_read() &&
+ this->retry_state_->forward_on_reply_closed_increment ())
{
if (TAO_debug_level > 4)
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("TAO (%P|%t) - Synch_Twoway_Invocation::")
ACE_TEXT ("wait_for_reply, forward profile on ")
ACE_TEXT ("connection closed\n")));
- retry_state->next_profile_retry ();
+ this->retry_state_->next_profile_retry (*this->stub ());
return TAO_INVOKE_RESTART;
}
@@ -353,7 +359,8 @@ namespace TAO
}
catch (const ::CORBA::Exception&)
{
- if (!this->stub ()->invocation_retry_state ()->forward_on_exception_limit_used ())
+ if (this->retry_state_ == 0 ||
+ !this->retry_state_->forward_on_exception_limit_used ())
{
this->resolver_.stub ()->reset_profiles ();
}
@@ -572,27 +579,27 @@ namespace TAO
bool do_forward = false;
const TAO_ORB_Parameters *orb_params = this->stub ()->orb_core ()->orb_params ();
- TAO::Invocation_Retry_State *retry_state = this->stub ()->invocation_retry_state ();
- if (retry_state->forward_on_exception_limit_used () &&
+ if (this->retry_state_ &&
+ this->retry_state_->forward_on_exception_limit_used () &&
(CORBA::CompletionStatus) completion == CORBA::COMPLETED_NO)
{
if ((ACE_OS_String::strcmp (type_id.in (),
"IDL:omg.org/CORBA/TRANSIENT:1.0") == 0 &&
- retry_state->forward_on_exception_increment (TAO::FOE_TRANSIENT)) ||
+ this->retry_state_->forward_on_exception_increment (TAO::FOE_TRANSIENT)) ||
(ACE_OS_String::strcmp (type_id.in (),
"IDL:omg.org/CORBA/COMM_FAILURE:1.0") == 0 &&
- retry_state->forward_on_exception_increment (TAO::FOE_COMM_FAILURE)) ||
+ this->retry_state_->forward_on_exception_increment (TAO::FOE_COMM_FAILURE)) ||
(ACE_OS_String::strcmp (type_id.in (),
"IDL:omg.org/CORBA/OBJECT_NOT_EXIST:1.0") == 0 &&
- retry_state->forward_on_exception_increment (TAO::FOE_OBJECT_NOT_EXIST)) ||
+ this->retry_state_->forward_on_exception_increment (TAO::FOE_OBJECT_NOT_EXIST)) ||
(ACE_OS_String::strcmp (type_id.in (),
"IDL:omg.org/CORBA/INV_OBJREF:1.0") == 0 &&
- retry_state->forward_on_exception_increment (TAO::FOE_INV_OBJREF))
+ this->retry_state_->forward_on_exception_increment (TAO::FOE_INV_OBJREF))
)
{
retry_on_exception = true;
- retry_state->sleep_at_starting_profile ();
+ this->retry_state_->sleep_at_starting_profile (*this->stub ());
}
}
else
@@ -751,17 +758,17 @@ namespace TAO
if (!transport)
{
- TAO::Invocation_Retry_State *retry_state = this->stub ()->invocation_retry_state ();
- if (retry_state->forward_on_exception_limit_used ())
+ if (this->retry_state_ &&
+ this->retry_state_->forward_on_exception_limit_used ())
{
- if (retry_state->forward_on_exception_increment(FOE_TRANSIENT))
+ if (this->retry_state_->forward_on_exception_increment(FOE_TRANSIENT))
{
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_INFO,
ACE_TEXT ("TAO (%P|%t) - Synch_Oneway_Invocation::")
ACE_TEXT ("remote_oneway retrying on TRANSIENT ")
ACE_TEXT ("exception\n")));
- retry_state->next_profile_retry ();
+ this->retry_state_->next_profile_retry (*this->stub ());
return TAO_INVOKE_RESTART;
}
}
diff --git a/TAO/tao/Synch_Invocation.h b/TAO/tao/Synch_Invocation.h
index ca01bafcbf4..bec82241379 100644
--- a/TAO/tao/Synch_Invocation.h
+++ b/TAO/tao/Synch_Invocation.h
@@ -36,6 +36,7 @@ class TAO_Bind_Dispatcher_Guard;
namespace TAO
{
class Profile_Transport_Resolver;
+ class Invocation_Retry_State;
/**
* @class Synch_Twoway_Invocation
@@ -82,6 +83,12 @@ namespace TAO
*/
Invocation_Status remote_twoway (ACE_Time_Value *max_wait_time);
+ /**
+ * Indicate that retry state should be tracked and controlled
+ * in the presense of exceptions.
+ */
+ void set_retry_state (Invocation_Retry_State *retry_state);
+
protected:
/**
@@ -107,6 +114,8 @@ namespace TAO
TAO_Synch_Reply_Dispatcher &rd,
TAO_Bind_Dispatcher_Guard &bd);
+ Invocation_Retry_State *retry_state_;
+
private:
/// Helper method that checks the reply status of the
@@ -115,6 +124,7 @@ namespace TAO
* This method returns an exception when there is an error.
*/
Invocation_Status check_reply_status (TAO_Synch_Reply_Dispatcher &rd);
+
};
/**