diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-05-10 23:26:16 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-05-10 23:26:16 +0000 |
commit | 4d320f9ce1f6ad2fecd03b960c45f1759d1c338e (patch) | |
tree | 256eba831d4cebbf5086af2e7380c1d2942d0955 | |
parent | f2fa17f473d99a12a0a12b89b601080ec50e766b (diff) | |
download | ATCD-4d320f9ce1f6ad2fecd03b960c45f1759d1c338e.tar.gz |
ChangeLogTag: Fri May 10 18:16:50 2002 Irfan Pyarali <irfan@cs.wustl.edu>
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-02a | 5 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-03a | 5 | ||||
-rw-r--r-- | TAO/ChangeLogs/ChangeLog-02a | 7 | ||||
-rw-r--r-- | TAO/tao/RTCORBA/RT_Protocols_Hooks.cpp | 3 | ||||
-rw-r--r-- | TAO/tests/RTCORBA/Linear_Priority/client.cpp | 43 | ||||
-rw-r--r-- | ace/Connector.cpp | 4 |
7 files changed, 68 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog index 2766f0bd8f8..68980ee3956 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri May 10 18:15:10 2002 Irfan Pyarali <irfan@cs.wustl.edu> + + * ace/Connector.cpp (handle_output): Removed unnecessary debug + statement. + Thu May 9 20:02:10 2002 Douglas C. Schmidt <schmidt@tango.doc.wustl.edu> * docs/ACE-bug-process.html: Fixed a typo in the hostname of diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a index 2766f0bd8f8..68980ee3956 100644 --- a/ChangeLogs/ChangeLog-02a +++ b/ChangeLogs/ChangeLog-02a @@ -1,3 +1,8 @@ +Fri May 10 18:15:10 2002 Irfan Pyarali <irfan@cs.wustl.edu> + + * ace/Connector.cpp (handle_output): Removed unnecessary debug + statement. + Thu May 9 20:02:10 2002 Douglas C. Schmidt <schmidt@tango.doc.wustl.edu> * docs/ACE-bug-process.html: Fixed a typo in the hostname of diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index 2766f0bd8f8..68980ee3956 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,8 @@ +Fri May 10 18:15:10 2002 Irfan Pyarali <irfan@cs.wustl.edu> + + * ace/Connector.cpp (handle_output): Removed unnecessary debug + statement. + Thu May 9 20:02:10 2002 Douglas C. Schmidt <schmidt@tango.doc.wustl.edu> * docs/ACE-bug-process.html: Fixed a typo in the hostname of diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index a15b642acf0..f8c0c6b74e7 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,3 +1,10 @@ +Fri May 10 18:16:50 2002 Irfan Pyarali <irfan@cs.wustl.edu> + + * tests/RTCORBA/Linear_Priority/client.cpp (validate_connection): + Added calls to _validate_connection() to make sure that we give + enough time for connections to setup. This way we can avoid + transient exceptions and unnecessary test failures. + Fri May 10 01:46:16 UTC 2002 Craig Rodrigues <crodrigu@bbn.com> * orbsvcs/tests/AVStreams/Component_Switching/receiver.cpp: diff --git a/TAO/tao/RTCORBA/RT_Protocols_Hooks.cpp b/TAO/tao/RTCORBA/RT_Protocols_Hooks.cpp index 76192f96389..a9130638089 100644 --- a/TAO/tao/RTCORBA/RT_Protocols_Hooks.cpp +++ b/TAO/tao/RTCORBA/RT_Protocols_Hooks.cpp @@ -202,8 +202,7 @@ TAO_RT_Protocols_Hooks::get_selector_hook ( } void -TAO_RT_Protocols_Hooks::get_selector_bands_policy_hook ( - CORBA::Policy *bands_policy, +TAO_RT_Protocols_Hooks::get_selector_bands_policy_hook (CORBA::Policy *bands_policy, CORBA::Short &min_priority, CORBA::Short &max_priority, CORBA::Short &p, diff --git a/TAO/tests/RTCORBA/Linear_Priority/client.cpp b/TAO/tests/RTCORBA/Linear_Priority/client.cpp index 83ff5df4a3a..4dfb03126a3 100644 --- a/TAO/tests/RTCORBA/Linear_Priority/client.cpp +++ b/TAO/tests/RTCORBA/Linear_Priority/client.cpp @@ -71,6 +71,8 @@ public: int svc (void); + void validate_connection (ACE_ENV_SINGLE_ARG_DECL); + private: test_var test_; RTCORBA::Current_var current_; @@ -86,6 +88,44 @@ Worker_Thread::Worker_Thread (test_ptr test, { } +void +Worker_Thread::validate_connection (ACE_ENV_SINGLE_ARG_DECL) +{ + // Try to validate the connection several times, ignoring transient + // exceptions. If the connection can still not be setup, return + // failure. + CORBA::PolicyList_var inconsistent_policies; + int max_attempts = 10; + int current_attempt = 0; + for (;;) + { + ACE_TRY + { + ++current_attempt; + this->test_->_validate_connection (inconsistent_policies.out () + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + // If successful, we are done. + return; + } + ACE_CATCH (CORBA::TRANSIENT, exception) + { + // If we have reach our maximum number of tries, throw exception. + if (current_attempt == max_attempts) + ACE_RE_THROW; + // Otherwise, ignore... + } + ACE_CATCHANY + { + // Rethrow any other exceptions. + ACE_RE_THROW; + } + ACE_ENDTRY; + ACE_CHECK; + } +} + int Worker_Thread::svc (void) { @@ -95,6 +135,9 @@ Worker_Thread::svc (void) ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; + this->validate_connection (ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + for (int i = 0; i < iterations; i++) { this->test_->method (ACE_ENV_SINGLE_ARG_PARAMETER); diff --git a/ace/Connector.cpp b/ace/Connector.cpp index b17db5c5229..c63ca5e53a4 100644 --- a/ace/Connector.cpp +++ b/ace/Connector.cpp @@ -344,7 +344,7 @@ ACE_Connector<SVH, PR_CO_2>::handle_output (ACE_HANDLE handle) else // Somethings gone wrong, so close down... { #if defined (ACE_WIN32) - ACE_DEBUG ((LM_DEBUG, "errno %d; Sleeping to retry get_remote_addr\n", errno)); + // ACE_DEBUG ((LM_DEBUG, "errno %d; Sleeping to retry get_remote_addr\n", errno)); // Win32 (at least prior to Windows 2000) has a timing problem. // If you check to see if the connection has completed too fast, // it will fail - so wait 35 milliseconds to let it catch up. @@ -463,7 +463,7 @@ ACE_Connector<SVH, PR_CO_2>::connect_i (SVH *&sh, // non-blocking semantics then register ourselves with the // ACE_Reactor so that it will call us back when the // connection is complete or we timeout, whichever comes - // first... + // first... int result; if (sh_copy == 0) |