diff options
-rw-r--r-- | TAO/ChangeLogs/ChangeLog-02a | 19 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/LoadBalancer_i.i | 8 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/LoadBalancing.idl | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/LoadBalancing/LoadBalancer_i.i | 8 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/LoadBalancing/Minimum_Dispersion.cpp | 1 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/LoadBalancing/ReplicaProxy.cpp | 6 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/LoadBalancing/ReplicaProxy.h | 6 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/LoadBalancing/Round_Robin_Strategy.cpp | 1 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Minimum_Dispersion.cpp | 1 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/ReplicaProxy.cpp | 6 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/ReplicaProxy.h | 6 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Round_Robin_Strategy.cpp | 1 | ||||
-rw-r--r-- | TAO/tests/Param_Test/bd_long_seq.cpp | 16 | ||||
-rw-r--r-- | TAO/tests/Param_Test/bd_short_seq.cpp | 12 | ||||
-rw-r--r-- | TAO/tests/Param_Test/ub_long_seq.cpp | 16 | ||||
-rw-r--r-- | TAO/tests/Param_Test/ub_short_seq.cpp | 16 |
16 files changed, 79 insertions, 46 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index e18d729b826..a6ae6b638c6 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,3 +1,22 @@ +Fri Jun 9 09:17:46 2000 Carlos O'Ryan <coryan@uci.edu> + + * orbsvcs/orbsvcs/LoadBalancing/LoadBalancer_i.i: + * orbsvcs/orbsvcs/LoadBalancing/Minimum_Dispersion.cpp: + * orbsvcs/orbsvcs/LoadBalancing/ReplicaProxy.cpp: + * orbsvcs/orbsvcs/LoadBalancing/ReplicaProxy.h: + * orbsvcs/orbsvcs/LoadBalancing/Round_Robin_Strategy.cpp: + Fixed throw specs. + + * orbsvcs/orbsvcs/LoadBalancing.idl: + Add comment about unused exception. + + * tests/Param_Test/bd_long_seq.cpp: + * tests/Param_Test/bd_short_seq.cpp: + * tests/Param_Test/ub_long_seq.cpp: + * tests/Param_Test/ub_short_seq.cpp: + Fixed code that was casting shorts (and longs) to char* and then + trying to print those! + Fri Jun 9 09:03:59 2000 Darrell Brunsch <brunsch@uci.edu> * orbsvcs/orbsvcs/orbsvcs.dsw: diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancer_i.i b/TAO/orbsvcs/orbsvcs/LoadBalancer_i.i index 88ab6a81532..b801158aae4 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancer_i.i +++ b/TAO/orbsvcs/orbsvcs/LoadBalancer_i.i @@ -6,14 +6,22 @@ ACE_INLINE void TAO_LB_LoadBalancer::disconnect (TAO_LB_ReplicaProxy *proxy, CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) { + // @@ Ossama, what is the we cannot raise that exception here! + + (void) this->strategy_->remove (proxy); + +#if 0 if (this->strategy_->remove (proxy) != 0) ACE_THROW (LoadBalancing::LoadBalancer::InvalidReplicaProxy ()); +#endif /* 0 */ } ACE_INLINE CORBA::Object_ptr TAO_LB_LoadBalancer::replica (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) { return this->strategy_->replica (ACE_TRY_ENV); } diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing.idl b/TAO/orbsvcs/orbsvcs/LoadBalancing.idl index 817726535f8..690b8bbe43b 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing.idl +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing.idl @@ -129,6 +129,8 @@ module LoadBalancing // This exception indicates that an attempt was made to // use a ReplicaProxy that is not registered with the // LoadBalancer. + // @@ Ossama: where exactly is this exception used? Who + // can raise it!? }; ReplicaProxy connect (in ReplicaControl control, diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LoadBalancer_i.i b/TAO/orbsvcs/orbsvcs/LoadBalancing/LoadBalancer_i.i index 88ab6a81532..b801158aae4 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LoadBalancer_i.i +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LoadBalancer_i.i @@ -6,14 +6,22 @@ ACE_INLINE void TAO_LB_LoadBalancer::disconnect (TAO_LB_ReplicaProxy *proxy, CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) { + // @@ Ossama, what is the we cannot raise that exception here! + + (void) this->strategy_->remove (proxy); + +#if 0 if (this->strategy_->remove (proxy) != 0) ACE_THROW (LoadBalancing::LoadBalancer::InvalidReplicaProxy ()); +#endif /* 0 */ } ACE_INLINE CORBA::Object_ptr TAO_LB_LoadBalancer::replica (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) { return this->strategy_->replica (ACE_TRY_ENV); } diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/Minimum_Dispersion.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/Minimum_Dispersion.cpp index c7f87a6d00f..13a24bbe92b 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/Minimum_Dispersion.cpp +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/Minimum_Dispersion.cpp @@ -31,6 +31,7 @@ TAO_LB_Minimum_Dispersion_Strategy::~TAO_LB_Minimum_Dispersion_Strategy (void) CORBA::Object_ptr TAO_LB_Minimum_Dispersion_Strategy::replica (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) { // @@ Ossama: more code that is not thread safe while (!this->proxies_.is_empty ()) diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/ReplicaProxy.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/ReplicaProxy.cpp index f4d6e33e3d1..5f3ba7f9c39 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/ReplicaProxy.cpp +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/ReplicaProxy.cpp @@ -23,15 +23,11 @@ TAO_LB_ReplicaProxy::TAO_LB_ReplicaProxy (void) void TAO_LB_ReplicaProxy::current_load (CORBA::Float load, CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((LoadBalancing::ReplicaProxy::InvalidLoad, - CORBA::SystemException)) + ACE_THROW_SPEC ((CORBA::SystemException)) { // @@ Ossama: this is the point were the load dampening should // happen. Probably strategized.... - if (load < 0) - ACE_THROW (LoadBalancing::ReplicaProxy::InvalidLoad ()); - this->current_load_ = load; // ACE_DEBUG ((LM_DEBUG, "Load[%x] = %f\n", long(this), load)); diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/ReplicaProxy.h b/TAO/orbsvcs/orbsvcs/LoadBalancing/ReplicaProxy.h index e07fa39198c..78fba332209 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/ReplicaProxy.h +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/ReplicaProxy.h @@ -55,8 +55,7 @@ public: virtual void current_load (CORBA::Float load, CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((LoadBalancing::ReplicaProxy::InvalidLoad, - CORBA::SystemException)); + ACE_THROW_SPEC ((CORBA::SystemException)); // Send the value of the current load on the Object being load // balanced, where the definition of "load" is load balancing // algorithm specific. @@ -70,7 +69,8 @@ public: // react proactively to those... virtual void disconnect (CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException)); + ACE_THROW_SPEC ((LoadBalancing::ReplicaProxy::NotConnected, + CORBA::SystemException)); // Send a request to disconnect from the LoadBalancer. // @@ Ossama: could you please fix the mess i left here? it is my diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/Round_Robin_Strategy.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/Round_Robin_Strategy.cpp index 8f5ded977d3..55cb5fef9d6 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/Round_Robin_Strategy.cpp +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/Round_Robin_Strategy.cpp @@ -35,6 +35,7 @@ TAO_LB_Round_Robin_Strategy::~TAO_LB_Round_Robin_Strategy (void) CORBA::Object_ptr TAO_LB_Round_Robin_Strategy::replica (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) { // @@ Ossama: more code that is not thread safe if (this->proxies_.is_empty ()) diff --git a/TAO/orbsvcs/orbsvcs/Minimum_Dispersion.cpp b/TAO/orbsvcs/orbsvcs/Minimum_Dispersion.cpp index c7f87a6d00f..13a24bbe92b 100644 --- a/TAO/orbsvcs/orbsvcs/Minimum_Dispersion.cpp +++ b/TAO/orbsvcs/orbsvcs/Minimum_Dispersion.cpp @@ -31,6 +31,7 @@ TAO_LB_Minimum_Dispersion_Strategy::~TAO_LB_Minimum_Dispersion_Strategy (void) CORBA::Object_ptr TAO_LB_Minimum_Dispersion_Strategy::replica (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) { // @@ Ossama: more code that is not thread safe while (!this->proxies_.is_empty ()) diff --git a/TAO/orbsvcs/orbsvcs/ReplicaProxy.cpp b/TAO/orbsvcs/orbsvcs/ReplicaProxy.cpp index f4d6e33e3d1..5f3ba7f9c39 100644 --- a/TAO/orbsvcs/orbsvcs/ReplicaProxy.cpp +++ b/TAO/orbsvcs/orbsvcs/ReplicaProxy.cpp @@ -23,15 +23,11 @@ TAO_LB_ReplicaProxy::TAO_LB_ReplicaProxy (void) void TAO_LB_ReplicaProxy::current_load (CORBA::Float load, CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((LoadBalancing::ReplicaProxy::InvalidLoad, - CORBA::SystemException)) + ACE_THROW_SPEC ((CORBA::SystemException)) { // @@ Ossama: this is the point were the load dampening should // happen. Probably strategized.... - if (load < 0) - ACE_THROW (LoadBalancing::ReplicaProxy::InvalidLoad ()); - this->current_load_ = load; // ACE_DEBUG ((LM_DEBUG, "Load[%x] = %f\n", long(this), load)); diff --git a/TAO/orbsvcs/orbsvcs/ReplicaProxy.h b/TAO/orbsvcs/orbsvcs/ReplicaProxy.h index e07fa39198c..78fba332209 100644 --- a/TAO/orbsvcs/orbsvcs/ReplicaProxy.h +++ b/TAO/orbsvcs/orbsvcs/ReplicaProxy.h @@ -55,8 +55,7 @@ public: virtual void current_load (CORBA::Float load, CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((LoadBalancing::ReplicaProxy::InvalidLoad, - CORBA::SystemException)); + ACE_THROW_SPEC ((CORBA::SystemException)); // Send the value of the current load on the Object being load // balanced, where the definition of "load" is load balancing // algorithm specific. @@ -70,7 +69,8 @@ public: // react proactively to those... virtual void disconnect (CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException)); + ACE_THROW_SPEC ((LoadBalancing::ReplicaProxy::NotConnected, + CORBA::SystemException)); // Send a request to disconnect from the LoadBalancer. // @@ Ossama: could you please fix the mess i left here? it is my diff --git a/TAO/orbsvcs/orbsvcs/Round_Robin_Strategy.cpp b/TAO/orbsvcs/orbsvcs/Round_Robin_Strategy.cpp index 8f5ded977d3..55cb5fef9d6 100644 --- a/TAO/orbsvcs/orbsvcs/Round_Robin_Strategy.cpp +++ b/TAO/orbsvcs/orbsvcs/Round_Robin_Strategy.cpp @@ -35,6 +35,7 @@ TAO_LB_Round_Robin_Strategy::~TAO_LB_Round_Robin_Strategy (void) CORBA::Object_ptr TAO_LB_Round_Robin_Strategy::replica (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) { // @@ Ossama: more code that is not thread safe if (this->proxies_.is_empty ()) diff --git a/TAO/tests/Param_Test/bd_long_seq.cpp b/TAO/tests/Param_Test/bd_long_seq.cpp index b589a4799f0..5c2d43b4cf5 100644 --- a/TAO/tests/Param_Test/bd_long_seq.cpp +++ b/TAO/tests/Param_Test/bd_long_seq.cpp @@ -179,9 +179,9 @@ Test_Bounded_Long_Sequence::print_values (void) { ACE_DEBUG ((LM_DEBUG, "Element #%d\n" - "in : %s\n", + "in : %d\n", i, - this->in_[i]? (const char *)this->in_[i]:"<nul>")); + this->in_[i])); } if (!this->in_.ptr ()) ACE_DEBUG ((LM_DEBUG, "\nin sequence is NUL\n")); @@ -190,9 +190,9 @@ Test_Bounded_Long_Sequence::print_values (void) { ACE_DEBUG ((LM_DEBUG, "Element #%d\n" - "in : %s\n", + "in : %d\n", i, - (this->inout_[i]? (const char *)this->inout_[i]:"<nul>"))); + this->inout_[i])); } if (!this->inout_.ptr ()) ACE_DEBUG ((LM_DEBUG, "\ninout sequence is NUL\n")); @@ -201,9 +201,9 @@ Test_Bounded_Long_Sequence::print_values (void) { ACE_DEBUG ((LM_DEBUG, "Element #%d\n" - "in : %s\n", + "in : %d\n", i, - (this->out_[i]? (const char *)this->out_[i]:"<nul>"))); + this->out_[i])); } if (!this->out_.ptr ()) ACE_DEBUG ((LM_DEBUG, "\nout sequence is NUL\n")); @@ -212,9 +212,9 @@ Test_Bounded_Long_Sequence::print_values (void) { ACE_DEBUG ((LM_DEBUG, "Element #%d\n" - "in : %s\n", + "in : %d\n", i, - (this->ret_[i]? (const char *)this->ret_[i]:"<nul>"))); + this->ret_[i])); } if (!this->ret_.ptr ()) ACE_DEBUG ((LM_DEBUG, "\nin sequence is NUL\n")); diff --git a/TAO/tests/Param_Test/bd_short_seq.cpp b/TAO/tests/Param_Test/bd_short_seq.cpp index bde53b72a2b..8d585809a4a 100644 --- a/TAO/tests/Param_Test/bd_short_seq.cpp +++ b/TAO/tests/Param_Test/bd_short_seq.cpp @@ -181,9 +181,9 @@ Test_Bounded_Short_Sequence::print_values (void) { ACE_DEBUG ((LM_DEBUG, "Element #%d\n" - "in : %s\n", + "in : %d\n", i, - this->in_[i]? (const char *)this->in_[i]:"<nul>")); + this->in_[i])); } if (!this->in_.ptr ()) ACE_DEBUG ((LM_DEBUG, "\nin sequence is NUL\n")); @@ -192,9 +192,9 @@ Test_Bounded_Short_Sequence::print_values (void) { ACE_DEBUG ((LM_DEBUG, "Element #%d\n" - "in : %s\n", + "in : %d\n", i, - (this->inout_[i]? (const char *)this->inout_[i]:"<nul>"))); + this->inout_[i])); } if (!this->inout_.ptr ()) ACE_DEBUG ((LM_DEBUG, "\ninout sequence is NUL\n")); @@ -205,7 +205,7 @@ Test_Bounded_Short_Sequence::print_values (void) "Element #%d\n" "in : %s\n", i, - (this->out_[i]? (const char *)this->out_[i]:"<nul>"))); + this->out_[i])); } if (!this->out_.ptr ()) ACE_DEBUG ((LM_DEBUG, "\nout sequence is NUL\n")); @@ -216,7 +216,7 @@ Test_Bounded_Short_Sequence::print_values (void) "Element #%d\n" "in : %s\n", i, - (this->ret_[i]? (const char *)this->ret_[i]:"<nul>"))); + this->ret_[i])); } if (!this->ret_.ptr ()) ACE_DEBUG ((LM_DEBUG, "\nin sequence is NUL\n")); diff --git a/TAO/tests/Param_Test/ub_long_seq.cpp b/TAO/tests/Param_Test/ub_long_seq.cpp index 01ac31fc98b..87b7211e33c 100644 --- a/TAO/tests/Param_Test/ub_long_seq.cpp +++ b/TAO/tests/Param_Test/ub_long_seq.cpp @@ -169,9 +169,9 @@ Test_Long_Sequence::print_values (void) { ACE_DEBUG ((LM_DEBUG, "Element #%d\n" - "in : %s\n", + "in : %d\n", i, - this->in_[i]? (const char *)this->in_[i]:"<nul>")); + this->in_[i])); } if (!this->in_.ptr ()) ACE_DEBUG ((LM_DEBUG, "\nin sequence is NUL\n")); @@ -180,9 +180,9 @@ Test_Long_Sequence::print_values (void) { ACE_DEBUG ((LM_DEBUG, "Element #%d\n" - "in : %s\n", + "in : %d\n", i, - (this->inout_[i]? (const char *)this->inout_[i]:"<nul>"))); + this->inout_[i])); } if (!this->inout_.ptr ()) ACE_DEBUG ((LM_DEBUG, "\ninout sequence is NUL\n")); @@ -191,9 +191,9 @@ Test_Long_Sequence::print_values (void) { ACE_DEBUG ((LM_DEBUG, "Element #%d\n" - "in : %s\n", + "in : %d\n", i, - (this->out_[i]? (const char *)this->out_[i]:"<nul>"))); + this->out_[i])); } if (!this->out_.ptr ()) ACE_DEBUG ((LM_DEBUG, "\nout sequence is NUL\n")); @@ -202,9 +202,9 @@ Test_Long_Sequence::print_values (void) { ACE_DEBUG ((LM_DEBUG, "Element #%d\n" - "in : %s\n", + "in : %d\n", i, - (this->ret_[i]? (const char *)this->ret_[i]:"<nul>"))); + this->ret_[i])); } if (!this->ret_.ptr ()) ACE_DEBUG ((LM_DEBUG, "\nin sequence is NUL\n")); diff --git a/TAO/tests/Param_Test/ub_short_seq.cpp b/TAO/tests/Param_Test/ub_short_seq.cpp index 515336bbd94..bc7d7632a8c 100644 --- a/TAO/tests/Param_Test/ub_short_seq.cpp +++ b/TAO/tests/Param_Test/ub_short_seq.cpp @@ -171,9 +171,9 @@ Test_Short_Sequence::print_values (void) { ACE_DEBUG ((LM_DEBUG, "Element #%d\n" - "in : %s\n", + "in : %d\n", i, - this->in_[i]? (const char *)this->in_[i]:"<nul>")); + this->in_[i])); } if (!this->in_.ptr ()) ACE_DEBUG ((LM_DEBUG, "\nin sequence is NUL\n")); @@ -182,9 +182,9 @@ Test_Short_Sequence::print_values (void) { ACE_DEBUG ((LM_DEBUG, "Element #%d\n" - "in : %s\n", + "in : %d\n", i, - (this->inout_[i]? (const char *)this->inout_[i]:"<nul>"))); + this->inout_[i])); } if (!this->inout_.ptr ()) ACE_DEBUG ((LM_DEBUG, "\ninout sequence is NUL\n")); @@ -193,9 +193,9 @@ Test_Short_Sequence::print_values (void) { ACE_DEBUG ((LM_DEBUG, "Element #%d\n" - "in : %s\n", + "in : %d\n", i, - (this->out_[i]? (const char *)this->out_[i]:"<nul>"))); + this->out_[i])); } if (!this->out_.ptr ()) ACE_DEBUG ((LM_DEBUG, "\nout sequence is NUL\n")); @@ -204,9 +204,9 @@ Test_Short_Sequence::print_values (void) { ACE_DEBUG ((LM_DEBUG, "Element #%d\n" - "in : %s\n", + "in : %d\n", i, - (this->ret_[i]? (const char *)this->ret_[i]:"<nul>"))); + this->ret_[i])); } if (!this->ret_.ptr ()) ACE_DEBUG ((LM_DEBUG, "\nin sequence is NUL\n")); |