diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-06-17 20:32:03 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-06-17 20:32:03 +0000 |
commit | 037d03127e6ec621e2299b5d5ead74bcf9a732a6 (patch) | |
tree | e5a4eba682aec1b51496f8714531d50e43bf9a6e | |
parent | 349d71b4c2a5b0e327177613bc1ba152cbfca6c9 (diff) | |
download | ATCD-037d03127e6ec621e2299b5d5ead74bcf9a732a6.tar.gz |
ChangeLogTag:Thu Jun 17 15:31:17 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
29 files changed, 258 insertions, 81 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c index c052e46866a..b9d9db3db7c 100644 --- a/TAO/ChangeLog-99c +++ b/TAO/ChangeLog-99c @@ -1,3 +1,37 @@ +Thu Jun 17 15:31:17 1999 Carlos O'Ryan <coryan@cs.wustl.edu> + + * examples/Callback_Quoter/Consumer_i.cpp: + * examples/Callback_Quoter/Consumer_i.h: + * examples/Callback_Quoter/Notifier_i.cpp: + * examples/Callback_Quoter/Notifier_i.h: + * examples/OBV/Typed_Events/Server_i.cpp: + * examples/OBV/Typed_Events/Server_i.h: + * examples/Quoter/Factory_Finder_i.cpp: + * examples/Quoter/Factory_Finder_i.h: + * examples/Quoter/Generic_Factory_i.cpp: + * examples/Quoter/Generic_Factory_i.h: + * examples/Quoter/Quoter_i.cpp: + * examples/Quoter/Quoter_i.h: + * orbsvcs/ImplRepo_Service/ImplRepo_i.cpp: + * orbsvcs/ImplRepo_Service/ImplRepo_i.h: + * orbsvcs/LifeCycle_Service/LifeCycle_Service_i.cpp: + * orbsvcs/LifeCycle_Service/LifeCycle_Service_i.h: + * orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp: + * orbsvcs/tests/ImplRepo/IR_Helper.cpp: + * orbsvcs/tests/ImplRepo/airplane_i.cpp: + * orbsvcs/tests/ImplRepo/airplane_i.h: + * orbsvcs/tests/ImplRepo/nestea_i.cpp: + * orbsvcs/tests/ImplRepo/nestea_i.h: + * performance-tests/Cubit/TAO/MT_Cubit/Globals.cpp: + * performance-tests/Cubit/TAO/MT_Cubit/Globals.h: + * performance-tests/Cubit/TAO/MT_Cubit/Task_Client.cpp: + * performance-tests/Cubit/TAO/MT_Cubit/Task_Client.h: + * performance-tests/Thruput/TAO/ttcp_i.cpp: + * performance-tests/Thruput/TAO/ttcp_i.h: + More throw spec stuff. + Also added several fixes to compile on single threaded + environments. + Thu Jun 17 14:21:21 1999 Nanbor Wang <nanbor@cs.wustl.edu> * TAO_IDL/be/be_visitor_interface/interface_ss.cpp diff --git a/TAO/examples/Callback_Quoter/Consumer_i.cpp b/TAO/examples/Callback_Quoter/Consumer_i.cpp index 42993f5aa41..8464a357f11 100644 --- a/TAO/examples/Callback_Quoter/Consumer_i.cpp +++ b/TAO/examples/Callback_Quoter/Consumer_i.cpp @@ -30,6 +30,7 @@ Consumer_i::~Consumer_i (void) void Consumer_i::push (const Callback_Quoter::Info &data, CORBA::Environment &) + ACE_THROW_SPEC ((CORBA::SystemException)) { // On getting the needed information you now proceed to the next // step, which could be obtaining the shares. @@ -42,6 +43,7 @@ Consumer_i::push (const Callback_Quoter::Info &data, void Consumer_i::shutdown (CORBA::Environment &) + ACE_THROW_SPEC ((CORBA::SystemException)) { // Instruct the ORB to shutdown. diff --git a/TAO/examples/Callback_Quoter/Consumer_i.h b/TAO/examples/Callback_Quoter/Consumer_i.h index 63eef5a0380..319214fb627 100644 --- a/TAO/examples/Callback_Quoter/Consumer_i.h +++ b/TAO/examples/Callback_Quoter/Consumer_i.h @@ -40,10 +40,12 @@ public: // Destructor. void push (const Callback_Quoter::Info & data, - CORBA_Environment& TAO_TRY_ENV); + CORBA_Environment& TAO_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)); // Gets the stock information from the Notifier. - virtual void shutdown (CORBA::Environment &TAO_TRY_ENV); + virtual void shutdown (CORBA::Environment &TAO_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)); // Used to get the consumer to shut down. void orb (CORBA::ORB_ptr o); diff --git a/TAO/examples/Callback_Quoter/Notifier_i.cpp b/TAO/examples/Callback_Quoter/Notifier_i.cpp index f3981350662..75e386f9037 100644 --- a/TAO/examples/Callback_Quoter/Notifier_i.cpp +++ b/TAO/examples/Callback_Quoter/Notifier_i.cpp @@ -42,6 +42,8 @@ Notifier_i::register_callback (const char *stock_name, CORBA::Long threshold_value, Callback_Quoter::Consumer_ptr consumer_handler, CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException, + Callback_Quoter::Invalid_Stock)) { // Store the client information. Consumer_Data consumer_data; @@ -115,6 +117,8 @@ Notifier_i::orb (CORBA::ORB_ptr orb) void Notifier_i::unregister_callback (Callback_Quoter::Consumer_ptr consumer, CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException, + Callback_Quoter::Invalid_Handle)) { // The consumer_map consists of a map of stocknames with consumers // and their threshold values attached to it. To unregister a @@ -163,6 +167,7 @@ void Notifier_i::market_status (const char *stock_name, CORBA::Long stock_value, CORBA::Environment &) + ACE_THROW_SPEC ((CORBA::SystemException)) { ACE_DEBUG ((LM_DEBUG, "Notifier_i:: The stockname is %s with price %d\n", @@ -217,6 +222,7 @@ Notifier_i::market_status (const char *stock_name, void Notifier_i::shutdown (CORBA::Environment &) + ACE_THROW_SPEC ((CORBA::SystemException)) { if ( this->consumer_map_.close () > 0) ACE_ERROR ((LM_ERROR, diff --git a/TAO/examples/Callback_Quoter/Notifier_i.h b/TAO/examples/Callback_Quoter/Notifier_i.h index 70f84dc9d21..13648c6fb6e 100644 --- a/TAO/examples/Callback_Quoter/Notifier_i.h +++ b/TAO/examples/Callback_Quoter/Notifier_i.h @@ -51,23 +51,29 @@ public: virtual void register_callback (const char *stock_name, CORBA::Long threshold_value, Callback_Quoter::Consumer_ptr consumer_handler, - CORBA::Environment &TAO_TRY_ENV); + CORBA::Environment &TAO_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException, + Callback_Quoter::Invalid_Stock)); // Register a distributed callback handler that is invoked when the // given stock reaches the desired threshold value. virtual void unregister_callback (Callback_Quoter::Consumer_ptr consumer_handler, - CORBA::Environment &TAO_TRY_ENV); + CORBA::Environment &TAO_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException, + Callback_Quoter::Invalid_Handle)); // Remove the consumer object. virtual void market_status (const char *stock_name, CORBA::Long stock_value, - CORBA::Environment &TAO_TRY_ENV); + CORBA::Environment &TAO_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)); // Get the market status. void orb (CORBA::ORB_ptr orb); // Get the orb pointer. - virtual void shutdown (CORBA::Environment &env); + virtual void shutdown (CORBA::Environment &env) + ACE_THROW_SPEC ((CORBA::SystemException)); // Shutdown the Notifier. // CONSUMER_MAP* get_consumer_map_ptr (); diff --git a/TAO/examples/OBV/Typed_Events/Server_i.cpp b/TAO/examples/OBV/Typed_Events/Server_i.cpp index 9d61d0c4e28..492e95bc893 100644 --- a/TAO/examples/OBV/Typed_Events/Server_i.cpp +++ b/TAO/examples/OBV/Typed_Events/Server_i.cpp @@ -105,6 +105,7 @@ Checkpoint_i::orb (CORBA::ORB_ptr o) void Checkpoint_i::put_event (Event *event, CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) { // In general this function would be a dispatcher which looks at the // origin id and finds an event handler object for the event. The @@ -134,6 +135,7 @@ Checkpoint_i::put_event (Event *event, Event_List * Checkpoint_i::get_critical_events (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) { // The skeleton should not steal our list by decrementing // the reference counter. @@ -150,6 +152,7 @@ Checkpoint_i::get_critical_events (CORBA::Environment &ACE_TRY_ENV) void Checkpoint_i::shutdown (CORBA::Environment &) + ACE_THROW_SPEC ((CORBA::SystemException)) { ACE_DEBUG ((LM_DEBUG, "\n%s\n", diff --git a/TAO/examples/OBV/Typed_Events/Server_i.h b/TAO/examples/OBV/Typed_Events/Server_i.h index 76bfacc68c2..00e14a571b2 100644 --- a/TAO/examples/OBV/Typed_Events/Server_i.h +++ b/TAO/examples/OBV/Typed_Events/Server_i.h @@ -38,13 +38,16 @@ public: virtual void put_event ( Event * e, CORBA::Environment &ACE_TRY_ENV - ); + ) + ACE_THROW_SPEC ((CORBA::SystemException)); virtual Event_List * get_critical_events ( CORBA::Environment &ACE_TRY_ENV - ); + ) + ACE_THROW_SPEC ((CORBA::SystemException)); - virtual void shutdown (CORBA::Environment &env); + virtual void shutdown (CORBA::Environment &env) + ACE_THROW_SPEC ((CORBA::SystemException)); // Shutdown the server. void orb (CORBA::ORB_ptr o); diff --git a/TAO/examples/Quoter/Factory_Finder_i.cpp b/TAO/examples/Quoter/Factory_Finder_i.cpp index 384d9d68809..bc122b3bb28 100644 --- a/TAO/examples/Quoter/Factory_Finder_i.cpp +++ b/TAO/examples/Quoter/Factory_Finder_i.cpp @@ -37,6 +37,8 @@ Quoter_Factory_Finder_i::~Quoter_Factory_Finder_i (void) CosLifeCycle::Factories * Quoter_Factory_Finder_i::find_factories (const CosLifeCycle::Key &factory_key, CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException, + CosLifeCycle::NoFactory)) { const char *exception_message = "Null Message"; diff --git a/TAO/examples/Quoter/Factory_Finder_i.h b/TAO/examples/Quoter/Factory_Finder_i.h index c85c7d226b1..3852336c793 100644 --- a/TAO/examples/Quoter/Factory_Finder_i.h +++ b/TAO/examples/Quoter/Factory_Finder_i.h @@ -29,7 +29,9 @@ public: ~Quoter_Factory_Finder_i (void); virtual CosLifeCycle::Factories * find_factories (const CosLifeCycle::Key &factory_key, - CORBA::Environment &_tao_environment); + CORBA::Environment &_tao_environment) + ACE_THROW_SPEC ((CORBA::SystemException, + CosLifeCycle::NoFactory)); // Returns a squence of Factories if factories matching the // factory_key were found. If no factory was found, then the // NoFactory exception, defined in CosLifeCycle, is raised. diff --git a/TAO/examples/Quoter/Generic_Factory_i.cpp b/TAO/examples/Quoter/Generic_Factory_i.cpp index e050fbdf97c..4a61e7a23cc 100644 --- a/TAO/examples/Quoter/Generic_Factory_i.cpp +++ b/TAO/examples/Quoter/Generic_Factory_i.cpp @@ -31,12 +31,10 @@ Quoter_Generic_Factory_i::~Quoter_Generic_Factory_i (void) } CORBA::Boolean -Quoter_Generic_Factory_i::supports (const CosLifeCycle::Key &factory_key, - CORBA::Environment &ACE_TRY_ENV) +Quoter_Generic_Factory_i::supports (const CosLifeCycle::Key &, + CORBA::Environment &) + ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_UNUSED_ARG (factory_key); - ACE_UNUSED_ARG (ACE_TRY_ENV); - return 0; } @@ -107,11 +105,13 @@ Quoter_Generic_Factory_i::get_naming_context (const CosLifeCycle::Key &factory_k CORBA::Object_ptr Quoter_Generic_Factory_i::create_object (const CosLifeCycle::Key &factory_key, - const CosLifeCycle::Criteria &the_criteria, - CORBA::Environment &TAO_IN_ENV_there) + const CosLifeCycle::Criteria &, + CORBA::Environment &TAO_IN_ENV_there) + ACE_THROW_SPEC ((CORBA::SystemException, + CosLifeCycle::NoFactory, + CosLifeCycle::InvalidCriteria, + CosLifeCycle::CannotMeetCriteria)) { - ACE_UNUSED_ARG (the_criteria); - CORBA::Environment env_here; CosNaming::NamingContext_var quoterNamingContext_var = diff --git a/TAO/examples/Quoter/Generic_Factory_i.h b/TAO/examples/Quoter/Generic_Factory_i.h index 21265bda13c..f66c5fedb70 100644 --- a/TAO/examples/Quoter/Generic_Factory_i.h +++ b/TAO/examples/Quoter/Generic_Factory_i.h @@ -30,13 +30,18 @@ public: ~Quoter_Generic_Factory_i (void); CORBA::Boolean supports (const CosLifeCycle::Key &factory_key, - CORBA::Environment &_env_there); + CORBA::Environment &_env_there) + ACE_THROW_SPEC ((CORBA::SystemException)); // Returns true if the Generic Factory is able to forward a request // for creating an object described by the <factory_key>. CORBA::Object_ptr create_object (const CosLifeCycle::Key &factory_key, const CosLifeCycle::Criteria &the_criteria, - CORBA::Environment &_env_there); + CORBA::Environment &_env_there) + ACE_THROW_SPEC ((CORBA::SystemException, + CosLifeCycle::NoFactory, + CosLifeCycle::InvalidCriteria, + CosLifeCycle::CannotMeetCriteria)); // Returns an object reference to a newly created object, though the // Generic Factory itself cannot create objects, it will forward the // request to a more concrete Factory. diff --git a/TAO/examples/Quoter/Quoter_i.cpp b/TAO/examples/Quoter/Quoter_i.cpp index d5e6ababad8..52ebab99cfd 100644 --- a/TAO/examples/Quoter/Quoter_i.cpp +++ b/TAO/examples/Quoter/Quoter_i.cpp @@ -89,11 +89,11 @@ int Quoter_Factory_i::init (CORBA::Environment &ACE_TRY_ENV) // Return the quoter by the id <name>. Stock::Quoter_ptr -Quoter_Factory_i::create_quoter (const char *name, +Quoter_Factory_i::create_quoter (const char *, CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException, + Stock::Invalid_Quoter)) { - ACE_UNUSED_ARG (name); - this->next_quoter_ = (this->next_quoter_ + 1) % this->quoter_num_; if (TAO_debug_level > 0) @@ -127,12 +127,12 @@ Quoter_i::~Quoter_i (void) // For now, just return 42. It was a good day on Wall Street. CORBA::Long -Quoter_i::get_quote (char const *stock_name, - class CORBA_Environment &ACE_TRY_ENV) +Quoter_i::get_quote (char const *, + class CORBA_Environment &) + ACE_THROW_SPEC ((CORBA::SystemException, + Stock::Invalid_Stock, + Stock::Invalid_Quoter)) { - ACE_UNUSED_ARG (stock_name); - ACE_UNUSED_ARG (ACE_TRY_ENV); - return 42; } @@ -143,6 +143,11 @@ CosLifeCycle::LifeCycleObject_ptr Quoter_i::copy (CosLifeCycle::FactoryFinder_ptr there, const CosLifeCycle::Criteria &the_criteria, CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException, + CosLifeCycle::NoFactory, + CosLifeCycle::NotCopyable, + CosLifeCycle::InvalidCriteria, + CosLifeCycle::CannotMeetCriteria)) { const char *exception_message = "Null message"; ACE_TRY @@ -266,6 +271,11 @@ void Quoter_i::move (CosLifeCycle::FactoryFinder_ptr there, const CosLifeCycle::Criteria &the_criteria, CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException, + CosLifeCycle::NoFactory, + CosLifeCycle::NotMovable, + CosLifeCycle::InvalidCriteria, + CosLifeCycle::CannotMeetCriteria)) { const char *exception_message = "Null message"; @@ -353,10 +363,10 @@ Quoter_i::move (CosLifeCycle::FactoryFinder_ptr there, // Removes the object. Once we shut down the ORB we can call it a day. void -Quoter_i::remove (CORBA::Environment &ACE_TRY_ENV) +Quoter_i::remove (CORBA::Environment &) + ACE_THROW_SPEC ((CORBA::SystemException, + CosLifeCycle::NotRemovable)) { - ACE_UNUSED_ARG (ACE_TRY_ENV); - if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, "I have been asked to shut down.\n")); diff --git a/TAO/examples/Quoter/Quoter_i.h b/TAO/examples/Quoter/Quoter_i.h index 0be4e4c6f3d..aea5b5ccd64 100644 --- a/TAO/examples/Quoter/Quoter_i.h +++ b/TAO/examples/Quoter/Quoter_i.h @@ -44,22 +44,37 @@ public: // Destructor virtual CORBA::Long get_quote (const char *stock_name, - CORBA::Environment &ACE_TRY_ENV); + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException, + Stock::Invalid_Stock, + Stock::Invalid_Quoter)); // Returns the current quote for the stock <stock_name> // = Lifecycle methods virtual CosLifeCycle::LifeCycleObject_ptr copy (CosLifeCycle::FactoryFinder_ptr there, const CosLifeCycle::Criteria &the_criteria, - CORBA::Environment &_tao_environment); + CORBA::Environment &_tao_environment) + ACE_THROW_SPEC ((CORBA::SystemException, + CosLifeCycle::NoFactory, + CosLifeCycle::NotCopyable, + CosLifeCycle::InvalidCriteria, + CosLifeCycle::CannotMeetCriteria)); // Make a copy of this object virtual void move (CosLifeCycle::FactoryFinder_ptr there, const CosLifeCycle::Criteria &the_criteria, - CORBA::Environment &ACE_TRY_ENV); + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException, + CosLifeCycle::NoFactory, + CosLifeCycle::NotMovable, + CosLifeCycle::InvalidCriteria, + CosLifeCycle::CannotMeetCriteria)); // Move this object using <there> - virtual void remove (CORBA::Environment &ACE_TRY_ENV); + virtual void remove (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException, + CosLifeCycle::NotRemovable)); // Removes the object. private: @@ -94,7 +109,9 @@ public: // Initialize everything in the factory virtual Stock::Quoter_ptr create_quoter (const char *name, - CORBA::Environment &ACE_TRY_ENV); + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException, + Stock::Invalid_Quoter)); // Return the quoter by the id <name>. private: diff --git a/TAO/orbsvcs/ImplRepo_Service/ImplRepo_i.cpp b/TAO/orbsvcs/ImplRepo_Service/ImplRepo_i.cpp index f1528103f16..b0256b0f023 100644 --- a/TAO/orbsvcs/ImplRepo_Service/ImplRepo_i.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/ImplRepo_i.cpp @@ -25,6 +25,9 @@ ImplRepo_i::ImplRepo_i (void) CORBA::Object_ptr ImplRepo_i::activate_object (CORBA::Object_ptr obj, CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException, + Implementation_Repository::Not_Found, + Implementation_Repository::Cannot_Activate)) { /* Implementation_Repository::INET_Addr *new_addr; */ TAO_Stub *new_stub_obj = 0; @@ -88,6 +91,9 @@ ImplRepo_i::activate_object (CORBA::Object_ptr obj, Implementation_Repository::INET_Addr * ImplRepo_i::activate_server (const char *server, CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException, + Implementation_Repository::Not_Found, + Implementation_Repository::Cannot_Activate)) { int start = 0; ASYS_TCHAR *ping_ior; @@ -221,6 +227,8 @@ void ImplRepo_i::register_server (const char *server, const Implementation_Repository::Process_Options &options, CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException, + Implementation_Repository::Already_Registered)) { if (OPTIONS::instance()->debug () >= 2) ACE_DEBUG ((LM_DEBUG, "Server: %s\n" @@ -273,6 +281,7 @@ void ImplRepo_i::reregister_server (const char *server, const Implementation_Repository::Process_Options &options, CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) { ACE_UNUSED_ARG (ACE_TRY_ENV); Repository_Record rec (options.command_line_, @@ -304,6 +313,8 @@ ImplRepo_i::reregister_server (const char *server, void ImplRepo_i::remove_server (const char *server, CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException, + Implementation_Repository::Not_Found)) { if (this->repository_.remove (server) == 0) { @@ -327,6 +338,8 @@ ImplRepo_i::server_is_running (const char *server, const Implementation_Repository::INET_Addr &addr, CORBA::Object_ptr ping, CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException, + Implementation_Repository::Not_Found)) { Implementation_Repository::INET_Addr *new_addr = new Implementation_Repository::INET_Addr; @@ -426,6 +439,8 @@ ImplRepo_i::server_is_running (const char *server, void ImplRepo_i::server_is_shutting_down (const char *server, CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException, + Implementation_Repository::Not_Found)) { ACE_UNUSED_ARG (ACE_TRY_ENV); Repository_Record rec; diff --git a/TAO/orbsvcs/ImplRepo_Service/ImplRepo_i.h b/TAO/orbsvcs/ImplRepo_Service/ImplRepo_i.h index b5d9cfb0dfc..f3470b5e0de 100644 --- a/TAO/orbsvcs/ImplRepo_Service/ImplRepo_i.h +++ b/TAO/orbsvcs/ImplRepo_Service/ImplRepo_i.h @@ -78,29 +78,40 @@ public: virtual CORBA::Object_ptr activate_object (CORBA::Object_ptr obj, CORBA_Environment &ACE_TRY_ENV - = TAO_default_environment ()); + = TAO_default_environment ()) + ACE_THROW_SPEC ((CORBA::SystemException, + Implementation_Repository::Not_Found, + Implementation_Repository::Cannot_Activate)); // Starts up the server containing the object <obj> if not already running. virtual Implementation_Repository::INET_Addr *activate_server (const char *server, - CORBA::Environment &env = TAO_default_environment ()); + CORBA::Environment &env = TAO_default_environment ()) + ACE_THROW_SPEC ((CORBA::SystemException, + Implementation_Repository::Not_Found, + Implementation_Repository::Cannot_Activate)); // Starts up the server <server> if not already running. virtual void register_server (const char *server, const Implementation_Repository::Process_Options &options, CORBA_Environment &ACE_TRY_ENV - = TAO_default_environment ()); - // Adds the server to the repository and registers the startup information about - // the server <server>. + = TAO_default_environment ()) + ACE_THROW_SPEC ((CORBA::SystemException, + Implementation_Repository::Already_Registered)); + // Adds the server to the repository and registers the startup + // information about the server <server>. virtual void reregister_server (const char *server, const Implementation_Repository::Process_Options &options, CORBA_Environment &ACE_TRY_ENV - = TAO_default_environment ()); + = TAO_default_environment ()) + ACE_THROW_SPEC ((CORBA::SystemException)); // Updates the startup information about the server <server>. virtual void remove_server (const char *server, CORBA_Environment &ACE_TRY_ENV - = TAO_default_environment ()); + = TAO_default_environment ()) + ACE_THROW_SPEC ((CORBA::SystemException, + Implementation_Repository::Not_Found)); // Removes the server <server> from the repository. virtual Implementation_Repository::INET_Addr @@ -108,13 +119,17 @@ public: const Implementation_Repository::INET_Addr &addr, CORBA::Object_ptr ping, CORBA_Environment &ACE_TRY_ENV - = TAO_default_environment ()); - // Called by the server to update transient information such as current location of - // the <server> and its ping object. + = TAO_default_environment ()) + ACE_THROW_SPEC ((CORBA::SystemException, + Implementation_Repository::Not_Found)); + // Called by the server to update transient information such as + // current location of the <server> and its ping object. virtual void server_is_shutting_down (const char * server, CORBA_Environment &ACE_TRY_ENV - = TAO_default_environment ()); + = TAO_default_environment ()) + ACE_THROW_SPEC ((CORBA::SystemException, + Implementation_Repository::Not_Found)); // What the server should call before it shutsdown. // = Other methods diff --git a/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service_i.cpp b/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service_i.cpp index ed8bfac5754..e5923faebd6 100644 --- a/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service_i.cpp +++ b/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service_i.cpp @@ -35,6 +35,7 @@ Life_Cycle_Service_i::~Life_Cycle_Service_i (void) CORBA::Boolean Life_Cycle_Service_i::supports (const CosLifeCycle::Key &factory_key, CORBA::Environment &TAO_IN_ENV_there) + ACE_THROW_SPEC ((CORBA::SystemException)) { ACE_UNUSED_ARG (factory_key); ACE_UNUSED_ARG (TAO_IN_ENV_there); @@ -45,6 +46,10 @@ CORBA::Object_ptr Life_Cycle_Service_i::create_object (const CosLifeCycle::Key &factory_key, const CosLifeCycle::Criteria &the_criteria, CORBA::Environment &TAO_IN_ENV_there) + ACE_THROW_SPEC ((CORBA::SystemException, + CosLifeCycle::NoFactory, + CosLifeCycle::InvalidCriteria, + CosLifeCycle::CannotMeetCriteria)) { ACE_DEBUG ((LM_DEBUG, "Life_Cycle_Service_i:create_object: called.\n")); // Exceptions are forwarded, not handled !! @@ -139,6 +144,7 @@ Life_Cycle_Service_i::register_factory (const char * name, const char * description, CORBA::Object_ptr object, CORBA::Environment &TAO_IN_ENV_there) + ACE_THROW_SPEC (( CORBA::SystemException)) { if (factory_trader_ptr_ == 0) { diff --git a/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service_i.h b/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service_i.h index c44b432ff33..4ad461ee3c0 100644 --- a/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service_i.h +++ b/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service_i.h @@ -30,13 +30,18 @@ public: ~Life_Cycle_Service_i (void); CORBA::Boolean supports (const CosLifeCycle::Key &factory_key, - CORBA::Environment &_env_there); + CORBA::Environment &_env_there) + ACE_THROW_SPEC ((CORBA::SystemException)); // Returns true if the Generic Factory is able to forward a request // for creating an object described by the <factory_key>. CORBA::Object_ptr create_object (const CosLifeCycle::Key &factory_key, const CosLifeCycle::Criteria &the_criteria, - CORBA::Environment &_env_there); + CORBA::Environment &_env_there) + ACE_THROW_SPEC ((CORBA::SystemException, + CosLifeCycle::NoFactory, + CosLifeCycle::InvalidCriteria, + CosLifeCycle::CannotMeetCriteria)); // Returns an object reference to a newly created object, though the // Generic Factory itself cannot create objects, it will forward the // request to a more concrete Factory. @@ -45,7 +50,9 @@ public: const char * location, const char * description, CORBA::Object_ptr object, - CORBA::Environment &_env_there); + CORBA::Environment &_env_there) + ACE_THROW_SPEC (( CORBA::SystemException)); + // Registers a factory with specified properties private: diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp index fcd1798745f..65e2d57e452 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp @@ -670,12 +670,18 @@ ACE_FACTORY_DEFINE (TAO_ORBSVCS, TAO_EC_Default_Factory) #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) +#if defined (ACE_HAS_THREADS) template class TAO_EC_ProxyPushSupplier_Set_Immediate<ACE_SYNCH_MUTEX>; +#endif /* ACE_HAS_THREADS */ + template class TAO_EC_ProxyPushSupplier_Set_Immediate<ACE_Null_Mutex>; #elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) +#if defined (ACE_HAS_THREADS) #pragma instantiate TAO_EC_ProxyPushSupplier_Set_Immediate<ACE_SYNCH_MUTEX> +#endif /* ACE_HAS_THREADS */ + #pragma instantiate TAO_EC_ProxyPushSupplier_Set_Immediate<ACE_Null_Mutex> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/orbsvcs/tests/ImplRepo/IR_Helper.cpp b/TAO/orbsvcs/tests/ImplRepo/IR_Helper.cpp index 9112add6861..63d18e6443c 100644 --- a/TAO/orbsvcs/tests/ImplRepo/IR_Helper.cpp +++ b/TAO/orbsvcs/tests/ImplRepo/IR_Helper.cpp @@ -20,6 +20,7 @@ public: Ping_i (int debug = 0) : debug_ (debug) {} virtual void ping (CORBA::Environment &) + ACE_THROW_SPEC (()) { if (this->debug_) ACE_DEBUG ((LM_DEBUG, "Pong!\n")); diff --git a/TAO/orbsvcs/tests/ImplRepo/airplane_i.cpp b/TAO/orbsvcs/tests/ImplRepo/airplane_i.cpp index e41db375bb6..c10222a91a0 100644 --- a/TAO/orbsvcs/tests/ImplRepo/airplane_i.cpp +++ b/TAO/orbsvcs/tests/ImplRepo/airplane_i.cpp @@ -29,6 +29,7 @@ Airplane_i::~Airplane_i (void) char * Airplane_i::get_plane (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) { ACE_UNUSED_ARG (ACE_TRY_ENV); diff --git a/TAO/orbsvcs/tests/ImplRepo/airplane_i.h b/TAO/orbsvcs/tests/ImplRepo/airplane_i.h index 70a08709f33..c740b5039ea 100644 --- a/TAO/orbsvcs/tests/ImplRepo/airplane_i.h +++ b/TAO/orbsvcs/tests/ImplRepo/airplane_i.h @@ -43,13 +43,15 @@ class Airplane_i: public POA_Paper_Airplane_Server // at this moment (in other words, a random airplane). public: Airplane_i (int shutdown = 0); - // Constructor that takes in an optional shutdown parameter which, if nonzero, - // will shutdown the server after each call to get_plane. + // Constructor that takes in an optional shutdown parameter which, + // if nonzero, will shutdown the server after each call to + // get_plane. ~Airplane_i (void); // Destructor - virtual char *get_plane (CORBA::Environment &ACE_TRY_ENV); + virtual char *get_plane (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)); // Returns a random plane. private: diff --git a/TAO/orbsvcs/tests/ImplRepo/nestea_i.cpp b/TAO/orbsvcs/tests/ImplRepo/nestea_i.cpp index 2ed96b25d38..527111ef28b 100644 --- a/TAO/orbsvcs/tests/ImplRepo/nestea_i.cpp +++ b/TAO/orbsvcs/tests/ImplRepo/nestea_i.cpp @@ -34,6 +34,7 @@ Nestea_i::~Nestea_i (void) void Nestea_i::drink (CORBA::Long cans, CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) { ACE_UNUSED_ARG (ACE_TRY_ENV); @@ -54,6 +55,7 @@ Nestea_i::drink (CORBA::Long cans, void Nestea_i::crush (CORBA::Long cans, CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) { ACE_UNUSED_ARG (ACE_TRY_ENV); @@ -76,6 +78,7 @@ Nestea_i::crush (CORBA::Long cans, CORBA::Long Nestea_i::bookshelf_size (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) { ACE_UNUSED_ARG (ACE_TRY_ENV); @@ -92,6 +95,7 @@ Nestea_i::bookshelf_size (CORBA::Environment &ACE_TRY_ENV) char * Nestea_i::get_praise (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) { ACE_UNUSED_ARG (ACE_TRY_ENV); diff --git a/TAO/orbsvcs/tests/ImplRepo/nestea_i.h b/TAO/orbsvcs/tests/ImplRepo/nestea_i.h index 78361d1e19b..51aa465f0ac 100644 --- a/TAO/orbsvcs/tests/ImplRepo/nestea_i.h +++ b/TAO/orbsvcs/tests/ImplRepo/nestea_i.h @@ -47,18 +47,25 @@ public: // Destructor virtual void drink (CORBA::Long cans, - CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment ()); + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment ()) + ACE_THROW_SPEC ((CORBA::SystemException)); // Add <cans> number of cans to the bookshelf. virtual void crush (CORBA::Long cans, - CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment ()); + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment ()) + ACE_THROW_SPEC ((CORBA::SystemException)); // Removes <cans> number of cans from the bookshelf. - virtual CORBA::Long bookshelf_size (CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment ()); + virtual CORBA::Long bookshelf_size (CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment ()) + ACE_THROW_SPEC ((CORBA::SystemException)); // Returns the number of cans in the bookshelf. virtual char *get_praise (CORBA::Environment &ACE_TRY_ENV = - CORBA::Environment::default_environment ()); + TAO_default_environment ()) + ACE_THROW_SPEC ((CORBA::SystemException)); // Returns comments about your collection. private: diff --git a/TAO/performance-tests/Cubit/TAO/MT_Cubit/Globals.cpp b/TAO/performance-tests/Cubit/TAO/MT_Cubit/Globals.cpp index 714f7ac2bc9..f157064935b 100644 --- a/TAO/performance-tests/Cubit/TAO/MT_Cubit/Globals.cpp +++ b/TAO/performance-tests/Cubit/TAO/MT_Cubit/Globals.cpp @@ -98,17 +98,18 @@ Globals::sched_fifo_init (void) "%n: ACE_OS::sched_params failed\n%a"), -1); } -#else - ACE_ERROR_RETURN ((LM_ERROR, - "Test will not run. This platform doesn't seem to have threads.\n"), - -1); -#endif /* ACE_HAS_THREADS */ ACE_SET_BITS (GLOBALS::instance ()->thr_create_flags, THR_BOUND); ACE_SET_BITS (GLOBALS::instance ()->thr_create_flags, THR_SCHED_FIFO); GLOBALS::instance ()->default_priority = ACE_THR_PRI_FIFO_DEF; return 0; +#else + + ACE_ERROR_RETURN ((LM_ERROR, + "Test will not run. This platform doesn't seem to have threads.\n"), + -1); +#endif /* ACE_HAS_THREADS */ } MT_Priority::MT_Priority (void) @@ -139,6 +140,9 @@ MT_Priority::get_low_priority (u_int num_low_priority, ACE_Sched_Priority prev_priority, u_int use_multiple_priority) { +#if !defined (ACE_HAS_THREADS) + return -1; +#else ACE_Sched_Priority low_priority = ACE_THR_PRI_FIFO_DEF; // Drop the priority. @@ -182,6 +186,7 @@ MT_Priority::get_low_priority (u_int num_low_priority, prev_priority, ACE_SCOPE_THREAD); return low_priority; +#endif /* ACE_HAS_THREADS */ } u_int @@ -198,7 +203,5 @@ MT_Priority::grain (void) #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -template class ACE_Condition<ACE_SYNCH_MUTEX>; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -# pragma instantiate ACE_Condition<ACE_SYNCH_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/performance-tests/Cubit/TAO/MT_Cubit/Globals.h b/TAO/performance-tests/Cubit/TAO/MT_Cubit/Globals.h index 304920edeb7..3ced9d16a53 100644 --- a/TAO/performance-tests/Cubit/TAO/MT_Cubit/Globals.h +++ b/TAO/performance-tests/Cubit/TAO/MT_Cubit/Globals.h @@ -156,7 +156,7 @@ public: ACE_SYNCH_MUTEX ready_mtx_; // mutex for the condition variable. - ACE_Condition <ACE_SYNCH_MUTEX> ready_cnd_; + ACE_SYNCH_CONDITION ready_cnd_; // condition variable for the low priority threads to wait //until the high priority thread is done with the arguments parsing. diff --git a/TAO/performance-tests/Cubit/TAO/MT_Cubit/Task_Client.cpp b/TAO/performance-tests/Cubit/TAO/MT_Cubit/Task_Client.cpp index 35343a6c0d1..dd7230901ea 100644 --- a/TAO/performance-tests/Cubit/TAO/MT_Cubit/Task_Client.cpp +++ b/TAO/performance-tests/Cubit/TAO/MT_Cubit/Task_Client.cpp @@ -221,7 +221,7 @@ Task_State::parse_args (int argc,char *argv[]) ACE_Barrier (thread_count_), -1); ACE_NEW_RETURN (this->semaphore_, - ACE_Thread_Semaphore (0), + ACE_SYNCH_SEMAPHORE (0), -1); ACE_NEW_RETURN (this->latency_, ACE_timer_t [thread_count_], @@ -599,7 +599,7 @@ Client::init_orb (void) ACE_DEBUG ((LM_DEBUG, "(%t)Arguments parsed successfully\n")); - ACE_MT (ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ready_mon, this->ts_->ready_mtx_, 1)); + ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ready_mon, this->ts_->ready_mtx_, 1); this->ts_->ready_ = 1; this->ts_->ready_cnd_.broadcast (); ready_mon.release (); diff --git a/TAO/performance-tests/Cubit/TAO/MT_Cubit/Task_Client.h b/TAO/performance-tests/Cubit/TAO/MT_Cubit/Task_Client.h index 0d8a073a6a9..4f61dc79365 100644 --- a/TAO/performance-tests/Cubit/TAO/MT_Cubit/Task_Client.h +++ b/TAO/performance-tests/Cubit/TAO/MT_Cubit/Task_Client.h @@ -208,7 +208,7 @@ public: ACE_SYNCH_MUTEX ready_mtx_; // mutex for the condition variable. - ACE_Condition<ACE_SYNCH_MUTEX> ready_cnd_; + ACE_SYNCH_CONDITION ready_cnd_; // condition variable for the low priority threads to wait //until the high priority thread is done with the arguments parsing. diff --git a/TAO/performance-tests/Thruput/TAO/ttcp_i.cpp b/TAO/performance-tests/Thruput/TAO/ttcp_i.cpp index 53cb4bd5bd0..033cee3ba75 100644 --- a/TAO/performance-tests/Thruput/TAO/ttcp_i.cpp +++ b/TAO/performance-tests/Thruput/TAO/ttcp_i.cpp @@ -44,7 +44,9 @@ ttcp_sequence_i::stop_timer (CORBA::Environment &IT_env) } void -ttcp_sequence_i::sendShortSeq(const ttcp_sequence::ShortSeq& ttcp_seq, CORBA::Environment &IT_env) +ttcp_sequence_i::sendShortSeq(const ttcp_sequence::ShortSeq& ttcp_seq, + CORBA::Environment &IT_env) + ACE_THROW_SPEC ((CORBA::SystemException)) { ACE_UNUSED_ARG (IT_env); numCalls++; @@ -52,7 +54,9 @@ ttcp_sequence_i::sendShortSeq(const ttcp_sequence::ShortSeq& ttcp_seq, CORBA::En } void -ttcp_sequence_i::sendLongSeq(const ttcp_sequence::LongSeq& ttcp_seq, CORBA::Environment &IT_env) +ttcp_sequence_i::sendLongSeq(const ttcp_sequence::LongSeq& ttcp_seq, + CORBA::Environment &IT_env) + ACE_THROW_SPEC ((CORBA::SystemException)) { ACE_UNUSED_ARG (IT_env); numCalls++; @@ -60,7 +64,9 @@ ttcp_sequence_i::sendLongSeq(const ttcp_sequence::LongSeq& ttcp_seq, CORBA::Envi } void -ttcp_sequence_i::sendOctetSeq(const ttcp_sequence::OctetSeq& ttcp_seq, CORBA::Environment &IT_env) +ttcp_sequence_i::sendOctetSeq(const ttcp_sequence::OctetSeq& ttcp_seq, + CORBA::Environment &IT_env) + ACE_THROW_SPEC ((CORBA::SystemException)) { ACE_UNUSED_ARG (IT_env); numCalls++; @@ -68,7 +74,9 @@ ttcp_sequence_i::sendOctetSeq(const ttcp_sequence::OctetSeq& ttcp_seq, CORBA::En } void -ttcp_sequence_i::sendDoubleSeq(const ttcp_sequence::DoubleSeq& ttcp_seq, CORBA::Environment &IT_env) +ttcp_sequence_i::sendDoubleSeq(const ttcp_sequence::DoubleSeq& + ttcp_seq, CORBA::Environment &IT_env) + ACE_THROW_SPEC ((CORBA::SystemException)) { ACE_UNUSED_ARG (IT_env); numCalls++; @@ -76,7 +84,9 @@ ttcp_sequence_i::sendDoubleSeq(const ttcp_sequence::DoubleSeq& ttcp_seq, CORBA:: } void -ttcp_sequence_i::sendCharSeq(const ttcp_sequence::CharSeq& ttcp_seq, CORBA::Environment &IT_env) +ttcp_sequence_i::sendCharSeq(const ttcp_sequence::CharSeq& ttcp_seq, + CORBA::Environment &IT_env) + ACE_THROW_SPEC ((CORBA::SystemException)) { ACE_UNUSED_ARG (IT_env); numCalls++; @@ -84,7 +94,9 @@ ttcp_sequence_i::sendCharSeq(const ttcp_sequence::CharSeq& ttcp_seq, CORBA::Envi } void -ttcp_sequence_i::sendStructSeq(const ttcp_sequence::StructSeq& ttcp_seq, CORBA::Environment &IT_env) +ttcp_sequence_i::sendStructSeq(const ttcp_sequence::StructSeq& ttcp_seq, + CORBA::Environment &IT_env) + ACE_THROW_SPEC ((CORBA::SystemException)) { ACE_UNUSED_ARG (IT_env); numCalls++; diff --git a/TAO/performance-tests/Thruput/TAO/ttcp_i.h b/TAO/performance-tests/Thruput/TAO/ttcp_i.h index 72a3a3b2275..48c7d54ba7e 100644 --- a/TAO/performance-tests/Thruput/TAO/ttcp_i.h +++ b/TAO/performance-tests/Thruput/TAO/ttcp_i.h @@ -24,17 +24,23 @@ public: ttcp_sequence_i(); virtual void sendShortSeq (const ttcp_sequence::ShortSeq& ttcp_seq, - CORBA::Environment &IT_env); + CORBA::Environment &IT_env) + ACE_THROW_SPEC ((CORBA::SystemException)); virtual void sendLongSeq (const ttcp_sequence::LongSeq& ttcp_seq, - CORBA::Environment &IT_env); + CORBA::Environment &IT_env) + ACE_THROW_SPEC ((CORBA::SystemException)); virtual void sendDoubleSeq (const ttcp_sequence::DoubleSeq& ttcp_seq, - CORBA::Environment &IT_env); + CORBA::Environment &IT_env) + ACE_THROW_SPEC ((CORBA::SystemException)); virtual void sendCharSeq (const ttcp_sequence::CharSeq& ttcp_seq, - CORBA::Environment &IT_env); + CORBA::Environment &IT_env) + ACE_THROW_SPEC ((CORBA::SystemException)); virtual void sendStructSeq (const ttcp_sequence::StructSeq& ttcp_seq, - CORBA::Environment &IT_env); + CORBA::Environment &IT_env) + ACE_THROW_SPEC ((CORBA::SystemException)); virtual void sendOctetSeq (const ttcp_sequence::OctetSeq& ttcp_seq, - CORBA::Environment &IT_env); + CORBA::Environment &IT_env) + ACE_THROW_SPEC ((CORBA::SystemException)); /* Routines to calculate the time required to transfer */ virtual void start_timer (CORBA::Environment &IT_env); |