diff options
author | bala <balanatarajan@users.noreply.github.com> | 1999-07-09 21:35:07 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 1999-07-09 21:35:07 +0000 |
commit | b9a3d940606e2229abf5076b80aeca3ca9a52d0c (patch) | |
tree | 3150c78994edde3b26eb7313957de32aef4d8654 | |
parent | d6d158615dfbce57116fa98e7093e839d514e981 (diff) | |
download | ATCD-b9a3d940606e2229abf5076b80aeca3ca9a52d0c.tar.gz |
Changed according to Dr.Schmidt's suggestions
-rw-r--r-- | TAO/examples/Persistent_Grid/Grid_i.cpp | 79 | ||||
-rw-r--r-- | TAO/examples/Persistent_Grid/Grid_i.h | 48 | ||||
-rw-r--r-- | TAO/examples/Persistent_Grid/Makefile | 267 | ||||
-rw-r--r-- | TAO/examples/Persistent_Grid/Simple_util.cpp | 12 | ||||
-rw-r--r-- | TAO/examples/Persistent_Grid/server.cpp | 11 |
5 files changed, 362 insertions, 55 deletions
diff --git a/TAO/examples/Persistent_Grid/Grid_i.cpp b/TAO/examples/Persistent_Grid/Grid_i.cpp index 9599a421a25..a192b8a4d8a 100644 --- a/TAO/examples/Persistent_Grid/Grid_i.cpp +++ b/TAO/examples/Persistent_Grid/Grid_i.cpp @@ -17,8 +17,7 @@ Grid_i::Grid_i (void) Grid_i::Grid_i (CORBA::Short x, CORBA::Short y, - Grid_Factory_i::pool_t *mem_pool, - CORBA::Environment &ACE_TRY_ENV) + pool_t *mem_pool) : width_ (x), height_ (y) { @@ -28,22 +27,26 @@ Grid_i::Grid_i (CORBA::Short x, if (mem_pool->find ("Array", (void *&) array_) == -1) { // Allocate memory for the matrix. - array_ = (CORBA::Long **) mem_pool->malloc (y * sizeof (CORBA::Long *)); + ACE_ALLOCATOR (array_, + ACE_static_cast (CORBA::Long **, + mem_pool->malloc (y * sizeof (CORBA::Long *)))); + //array_ = (CORBA::Long **) mem_pool->malloc (y * sizeof (CORBA::Long *)); if (array_ != 0) { for (int ctr = 0; ctr < y; ctr++) { - array_[ctr] = (CORBA::Long *)mem_pool->malloc (x * - sizeof (CORBA::Long)); - if (array_[ctr] == 0) - ACE_THROW (CORBA::NO_MEMORY ()); + ACE_ALLOCATOR (array_[ctr], + ACE_static_cast (CORBA::Long *, + mem_pool->malloc (x * + sizeof (CORBA::Long )))); + + //array_[ctr] = (CORBA::Long *)mem_pool->malloc (x * + // sizeof (CORBA::Long)); } mem_pool->bind ("Array", array_); } - else - ACE_THROW (CORBA::NO_MEMORY ()); } } @@ -61,6 +64,8 @@ Grid_i::set (CORBA::Short x, CORBA::Short y, CORBA::Long value, CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException, + Grid::RANGE_ERROR)) { if (x < 0 || y < 0 @@ -77,6 +82,8 @@ CORBA::Long Grid_i::get (CORBA::Short x, CORBA::Short y, CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException, + Grid::RANGE_ERROR)) { if (x < 0 || y < 0 @@ -90,13 +97,15 @@ Grid_i::get (CORBA::Short x, // Access methods. CORBA::Short -Grid_i::width (CORBA::Environment &A) +Grid_i::width (CORBA::Environment &) + ACE_THROW_SPEC ((CORBA::SystemException)) { return this->width_; } CORBA::Short Grid_i::height (CORBA::Environment &) + ACE_THROW_SPEC ((CORBA::SystemException)) { return this->height_; } @@ -104,6 +113,7 @@ Grid_i::height (CORBA::Environment &) void Grid_i::width (CORBA::Short x, CORBA::Environment &) + ACE_THROW_SPEC ((CORBA::SystemException)) { this->width_ = x; } @@ -111,28 +121,33 @@ Grid_i::width (CORBA::Short x, void Grid_i::height (CORBA::Short y, CORBA::Environment &) + ACE_THROW_SPEC ((CORBA::SystemException)) { this->height_ = y; } // Destroy the grid - void -Grid_i::destroy (CORBA::Environment &) +Grid_i::destroy (CORBA::Environment & ) + ACE_THROW_SPEC ((CORBA::SystemException)) { // Delete the array. - for (int i = 0; i < height_; i++) - delete [] array_[i]; + this->pool_t_->free (array_[i]); - delete [] array_; + // delete [] array_; + this->pool_t_->free (array_); ACE_DEBUG ((LM_DEBUG, " (%P|%t) %s\n", "Grid has been destroyed")); } - +void +Grid_i::set_pool (pool_t *pool) +{ + this->pool_t_ = pool; +} // Constructor Grid_Factory_i::Grid_Factory_i (void) @@ -165,9 +180,8 @@ Grid_ptr Grid_Factory_i::make_grid (CORBA::Short width, CORBA::Short height, CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) { - Grid_i *grid_ptr = 0; - ACE_DEBUG ((LM_DEBUG, " (%P|%t) Making a new Grid\n")); @@ -180,18 +194,25 @@ Grid_Factory_i::make_grid (CORBA::Short width, height = Grid_Factory::DEFAULT_HEIGHT; // Get a memory pool - pool_t_ = new pool_t (pool_name_); - + ACE_NEW_THROW_EX (pool_t_, + pool_t (pool_name_), + CORBA::NO_MEMORY ()); + + // pool_t_ = new pool_t (pool_name_); + // This attempts to create a new Grid_i and throws an exception and // returns a null value if it fails - ACE_NEW_THROW_EX (grid_ptr, - Grid_i (width, - height, - pool_t_, - ACE_TRY_ENV), - CORBA::NO_MEMORY ()); - ACE_CHECK_RETURN (Grid::_nil ()); - + int prev_no = errno; + Grid_i *grid_ptr = new Grid_i (width, + height, + pool_t_); + if (errno == ENOMEM) + ACE_THROW_RETURN (CORBA::NO_MEMORY (), 0); + + errno = prev_no; + + grid_ptr->set_pool (pool_t_); + // Register the Grid pointer. return grid_ptr->_this (ACE_TRY_ENV); } @@ -207,6 +228,7 @@ Grid_Factory_i::orb (CORBA::ORB_ptr o) // Shutdown. void Grid_Factory_i::shutdown (CORBA::Environment &) + ACE_THROW_SPEC ((CORBA::SystemException)) { ACE_DEBUG ((LM_DEBUG, " (%P|%t) %s\n", @@ -218,6 +240,7 @@ Grid_Factory_i::shutdown (CORBA::Environment &) void Grid_Factory_i::cleanup (CORBA::Environment &) + ACE_THROW_SPEC ((CORBA::SystemException)) { const char *name = "Array"; diff --git a/TAO/examples/Persistent_Grid/Grid_i.h b/TAO/examples/Persistent_Grid/Grid_i.h index 78d4ded2e4b..a3e2dbb135d 100644 --- a/TAO/examples/Persistent_Grid/Grid_i.h +++ b/TAO/examples/Persistent_Grid/Grid_i.h @@ -21,6 +21,9 @@ #include "GridS.h" +typedef ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex> pool_t; +// Memory pool for the persistent stuff + //class Grid_Factory_i; class Grid_Factory_i : public POA_Grid_Factory { @@ -37,18 +40,19 @@ public: ~Grid_Factory_i (void); // Destructor. - typedef ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex> pool_t; - // Memory pool for the persistent stuff virtual Grid_ptr make_grid (CORBA::Short, CORBA::Short, - CORBA::Environment &_env); + CORBA::Environment &_env) + ACE_THROW_SPEC ((CORBA::SystemException)); // This function creates and returns a <Grid>. - virtual void shutdown (CORBA::Environment &env); + virtual void shutdown (CORBA::Environment &env) + ACE_THROW_SPEC ((CORBA::SystemException)); // Shutdown the server. - virtual void cleanup (CORBA::Environment & ); + virtual void cleanup (CORBA::Environment & ) + ACE_THROW_SPEC ((CORBA::SystemException)); // Do a clean up of the memory map void orb (CORBA::ORB_ptr o); @@ -84,42 +88,53 @@ public: Grid_i (CORBA::Short, CORBA::Short, - Grid_Factory_i::pool_t *, - CORBA_Environment &); + pool_t *); + // Constructor. ~Grid_i (void); // Destructor - virtual CORBA::Short width (CORBA_Environment &); + virtual CORBA::Short width (CORBA_Environment &) + ACE_THROW_SPEC ((CORBA::SystemException)); // Returns the width of the grid - virtual CORBA::Short height (CORBA_Environment &); + virtual CORBA::Short height (CORBA_Environment &) + ACE_THROW_SPEC ((CORBA::SystemException)); // Returns the height of the grid virtual void width (CORBA::Short, - CORBA_Environment &); + CORBA_Environment &) + ACE_THROW_SPEC ((CORBA::SystemException)); // Sets the width of the grid. virtual void height (CORBA::Short, - CORBA_Environment &); + CORBA_Environment &) + ACE_THROW_SPEC ((CORBA::SystemException)); // Sets the height of the grid. virtual void set (CORBA::Short, CORBA::Short, CORBA::Long, - CORBA::Environment &); + CORBA::Environment &) + ACE_THROW_SPEC ((CORBA::SystemException, + Grid::RANGE_ERROR)); // Sets the grid value. virtual CORBA::Long get (CORBA::Short, CORBA::Short, - CORBA::Environment &); + CORBA::Environment &) + ACE_THROW_SPEC ((CORBA::SystemException, + Grid::RANGE_ERROR)); // Gets the grid value. - virtual void destroy (CORBA::Environment &); + virtual void destroy (CORBA::Environment &) + ACE_THROW_SPEC ((CORBA::SystemException)); // Destroy the grid. - + void set_pool (pool_t *); + // Set a pointer to the pool + private: CORBA::Short width_; // Width of the grid. @@ -129,6 +144,9 @@ private: CORBA::Long **array_; // Pointer to the matrix. This is organized as an "array of arrays." + + pool_t *pool_t_; + //Pointer to the memory pool.. }; diff --git a/TAO/examples/Persistent_Grid/Makefile b/TAO/examples/Persistent_Grid/Makefile index 18c7fbd90b7..76f23c97fdd 100644 --- a/TAO/examples/Persistent_Grid/Makefile +++ b/TAO/examples/Persistent_Grid/Makefile @@ -23,7 +23,8 @@ PROG_SRCS = \ Grid_i.cpp \ Grid_Client_i.cpp \ Simple_util.cpp \ - Persistent_Client_i.cpp + Persistent_Client_i.cpp \ + persistent_client.cpp SRC = $(IDL_SRC) $(PROG_SRCS) @@ -2079,5 +2080,269 @@ realclean: clean $(TAO_ROOT)/tao/ObjectIDList.h \ $(TAO_ROOT)/tao/ObjectIDList.i \ $(TAO_ROOT)/tao/WrongTransactionC.h GridC.i +.obj/persistent_client.o .obj/persistent_client.so .shobj/persistent_client.o .shobj/persistent_client.so: persistent_client.cpp Persistent_Client.h \ + Simple_util.h $(TAO_ROOT)/tao/TAO.h \ + $(TAO_ROOT)/tao/corbafwd.h \ + $(ACE_ROOT)/ace/CDR_Stream.h \ + $(ACE_ROOT)/ace/Message_Block.h \ + $(ACE_ROOT)/ace/ACE.h \ + $(ACE_ROOT)/ace/OS.h \ + $(ACE_ROOT)/ace/inc_user_config.h \ + $(ACE_ROOT)/ace/config-sunos5.6.h \ + $(ACE_ROOT)/ace/config-sunos5.5.h \ + $(ACE_ROOT)/ace/streams.h \ + $(ACE_ROOT)/ace/Basic_Types.h \ + $(ACE_ROOT)/ace/Basic_Types.i \ + $(ACE_ROOT)/ace/Trace.h \ + $(ACE_ROOT)/ace/OS.i \ + $(ACE_ROOT)/ace/Log_Msg.h \ + $(ACE_ROOT)/ace/Log_Record.h \ + $(ACE_ROOT)/ace/ACE.i \ + $(ACE_ROOT)/ace/Log_Priority.h \ + $(ACE_ROOT)/ace/Log_Record.i \ + $(ACE_ROOT)/ace/Malloc.h \ + $(ACE_ROOT)/ace/Malloc_Base.h \ + $(ACE_ROOT)/ace/Malloc.i \ + $(ACE_ROOT)/ace/Malloc_T.h \ + $(ACE_ROOT)/ace/Synch.h \ + $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ + $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ + $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ + $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ + $(ACE_ROOT)/ace/Synch.i \ + $(ACE_ROOT)/ace/Synch_T.h \ + $(ACE_ROOT)/ace/Event_Handler.h \ + $(ACE_ROOT)/ace/Event_Handler.i \ + $(ACE_ROOT)/ace/Synch_T.i \ + $(ACE_ROOT)/ace/Thread.h \ + $(ACE_ROOT)/ace/Thread.i \ + $(ACE_ROOT)/ace/Atomic_Op.i \ + $(ACE_ROOT)/ace/Synch_T.cpp \ + $(ACE_ROOT)/ace/Free_List.h \ + $(ACE_ROOT)/ace/Free_List.i \ + $(ACE_ROOT)/ace/Free_List.cpp \ + $(ACE_ROOT)/ace/Malloc_T.i \ + $(ACE_ROOT)/ace/Malloc_T.cpp \ + $(ACE_ROOT)/ace/Memory_Pool.h \ + $(ACE_ROOT)/ace/Signal.h \ + $(ACE_ROOT)/ace/Containers.h \ + $(ACE_ROOT)/ace/Containers.i \ + $(ACE_ROOT)/ace/Containers_T.h \ + $(ACE_ROOT)/ace/Containers_T.i \ + $(ACE_ROOT)/ace/Containers_T.cpp \ + $(ACE_ROOT)/ace/Signal.i \ + $(ACE_ROOT)/ace/Object_Manager.h \ + $(ACE_ROOT)/ace/Object_Manager.i \ + $(ACE_ROOT)/ace/Managed_Object.h \ + $(ACE_ROOT)/ace/Managed_Object.i \ + $(ACE_ROOT)/ace/Managed_Object.cpp \ + $(ACE_ROOT)/ace/Mem_Map.h \ + $(ACE_ROOT)/ace/Mem_Map.i \ + $(ACE_ROOT)/ace/Memory_Pool.i \ + $(ACE_ROOT)/ace/Message_Block.i \ + $(ACE_ROOT)/ace/Message_Block_T.h \ + $(ACE_ROOT)/ace/Message_Block_T.i \ + $(ACE_ROOT)/ace/Message_Block_T.cpp \ + $(ACE_ROOT)/ace/SString.h \ + $(ACE_ROOT)/ace/SString.i \ + $(ACE_ROOT)/ace/CDR_Stream.i \ + $(TAO_ROOT)/tao/try_macros.h \ + $(TAO_ROOT)/tao/orbconf.h \ + $(ACE_ROOT)/ace/CORBA_macros.h \ + $(TAO_ROOT)/tao/corbafwd.i \ + $(TAO_ROOT)/tao/POAC.h \ + $(TAO_ROOT)/tao/PolicyC.h \ + $(TAO_ROOT)/tao/CurrentC.h \ + $(TAO_ROOT)/tao/Object.h \ + $(TAO_ROOT)/tao/Object.i \ + $(TAO_ROOT)/tao/CurrentC.i \ + $(TAO_ROOT)/tao/CDR.h \ + $(TAO_ROOT)/tao/Typecode.h \ + $(TAO_ROOT)/tao/Exception.h \ + $(TAO_ROOT)/tao/Exception.i \ + $(TAO_ROOT)/tao/Typecode.i \ + $(TAO_ROOT)/tao/CDR.i \ + $(TAO_ROOT)/tao/Sequence.h \ + $(TAO_ROOT)/tao/Managed_Types.h \ + $(TAO_ROOT)/tao/Managed_Types.i \ + $(TAO_ROOT)/tao/Sequence.i \ + $(TAO_ROOT)/tao/Sequence_T.h \ + $(TAO_ROOT)/tao/Sequence_T.i \ + $(TAO_ROOT)/tao/Sequence_T.cpp \ + $(TAO_ROOT)/tao/varout.h \ + $(TAO_ROOT)/tao/varout.i \ + $(TAO_ROOT)/tao/varout.cpp \ + $(TAO_ROOT)/tao/PolicyC.i \ + $(TAO_ROOT)/tao/Environment.h \ + $(TAO_ROOT)/tao/Environment.i \ + $(TAO_ROOT)/tao/POAC.i \ + $(TAO_ROOT)/tao/ORB.h \ + $(TAO_ROOT)/tao/IOR_LookupTable.h \ + $(ACE_ROOT)/ace/Hash_Map_Manager.h \ + $(ACE_ROOT)/ace/Functor.h \ + $(ACE_ROOT)/ace/Functor.i \ + $(ACE_ROOT)/ace/Functor_T.h \ + $(ACE_ROOT)/ace/Functor_T.i \ + $(ACE_ROOT)/ace/Functor_T.cpp \ + $(ACE_ROOT)/ace/Hash_Map_Manager.i \ + $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \ + $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \ + $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \ + $(ACE_ROOT)/ace/Service_Config.h \ + $(ACE_ROOT)/ace/Service_Object.h \ + $(ACE_ROOT)/ace/Shared_Object.h \ + $(ACE_ROOT)/ace/Shared_Object.i \ + $(ACE_ROOT)/ace/Service_Object.i \ + $(ACE_ROOT)/ace/Service_Config.i \ + $(ACE_ROOT)/ace/Reactor.h \ + $(ACE_ROOT)/ace/Handle_Set.h \ + $(ACE_ROOT)/ace/Handle_Set.i \ + $(ACE_ROOT)/ace/Timer_Queue.h \ + $(ACE_ROOT)/ace/Timer_Queue_T.h \ + $(ACE_ROOT)/ace/Timer_Queue_T.i \ + $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ + $(ACE_ROOT)/ace/Reactor.i \ + $(ACE_ROOT)/ace/Reactor_Impl.h \ + $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ + $(TAO_ROOT)/tao/Services.h \ + $(TAO_ROOT)/tao/Services.i \ + $(TAO_ROOT)/tao/IORManipulation.h \ + $(TAO_ROOT)/tao/IORS.h \ + $(TAO_ROOT)/tao/IORC.h \ + $(TAO_ROOT)/tao/IORC.i \ + $(TAO_ROOT)/tao/Servant_Base.h \ + $(TAO_ROOT)/tao/Servant_Base.i \ + $(TAO_ROOT)/tao/IORS.i \ + $(TAO_ROOT)/tao/ORB.i \ + $(ACE_ROOT)/ace/Get_Opt.h \ + $(ACE_ROOT)/ace/Get_Opt.i \ + $(ACE_ROOT)/ace/Read_Buffer.h \ + $(ACE_ROOT)/ace/Read_Buffer.i Simple_util.cpp \ + GridC.h $(TAO_ROOT)/tao/corba.h \ + $(TAO_ROOT)/tao/Any.h \ + $(TAO_ROOT)/tao/Any.i \ + $(TAO_ROOT)/tao/NVList.h \ + $(TAO_ROOT)/tao/NVList.i \ + $(TAO_ROOT)/tao/Principal.h \ + $(TAO_ROOT)/tao/Principal.i \ + $(TAO_ROOT)/tao/Request.h \ + $(TAO_ROOT)/tao/Context.h \ + $(TAO_ROOT)/tao/Context.i \ + $(TAO_ROOT)/tao/Request.i \ + $(TAO_ROOT)/tao/Server_Request.h \ + $(TAO_ROOT)/tao/Object_KeyC.h \ + $(TAO_ROOT)/tao/Object_KeyC.i \ + $(TAO_ROOT)/tao/GIOP.h \ + $(TAO_ROOT)/tao/GIOP.i \ + $(TAO_ROOT)/tao/Server_Request.i \ + $(TAO_ROOT)/tao/Marshal.h \ + $(TAO_ROOT)/tao/Marshal.i \ + $(TAO_ROOT)/tao/singletons.h \ + $(ACE_ROOT)/ace/Singleton.h \ + $(ACE_ROOT)/ace/Singleton.i \ + $(ACE_ROOT)/ace/Singleton.cpp \ + $(TAO_ROOT)/tao/POA.h \ + $(TAO_ROOT)/tao/Object_Adapter.h \ + $(TAO_ROOT)/tao/Key_Adapters.h \ + $(ACE_ROOT)/ace/Map.h \ + $(ACE_ROOT)/ace/Map.i \ + $(ACE_ROOT)/ace/Map_T.h \ + $(ACE_ROOT)/ace/Pair.h \ + $(ACE_ROOT)/ace/Pair.i \ + $(ACE_ROOT)/ace/Pair_T.h \ + $(ACE_ROOT)/ace/Pair_T.i \ + $(ACE_ROOT)/ace/Pair_T.cpp \ + $(ACE_ROOT)/ace/Map_Manager.h \ + $(ACE_ROOT)/ace/Map_Manager.i \ + $(ACE_ROOT)/ace/Map_Manager.cpp \ + $(ACE_ROOT)/ace/Active_Map_Manager.h \ + $(ACE_ROOT)/ace/Active_Map_Manager.i \ + $(ACE_ROOT)/ace/Active_Map_Manager_T.h \ + $(ACE_ROOT)/ace/Active_Map_Manager_T.i \ + $(ACE_ROOT)/ace/Active_Map_Manager_T.cpp \ + $(ACE_ROOT)/ace/Map_T.i \ + $(ACE_ROOT)/ace/Map_T.cpp \ + $(TAO_ROOT)/tao/Key_Adapters.i \ + $(TAO_ROOT)/tao/Server_Strategy_Factory.h \ + $(TAO_ROOT)/tao/poa_macros.h \ + $(TAO_ROOT)/tao/POAS.h \ + $(TAO_ROOT)/tao/POA_CORBA.h \ + $(TAO_ROOT)/tao/DynAnyC.h \ + $(TAO_ROOT)/tao/DynAnyC.i \ + $(TAO_ROOT)/tao/DomainC.h \ + $(TAO_ROOT)/tao/DomainC.i \ + $(TAO_ROOT)/tao/POAS.i \ + $(TAO_ROOT)/tao/Active_Object_Map.h \ + $(TAO_ROOT)/tao/Active_Object_Map.i \ + $(TAO_ROOT)/tao/Object_Adapter.i \ + $(TAO_ROOT)/tao/POAManager.h \ + $(TAO_ROOT)/tao/POAManager.i \ + $(TAO_ROOT)/tao/POA.i \ + $(TAO_ROOT)/tao/Stub.h \ + $(TAO_ROOT)/tao/Pluggable.h \ + $(TAO_ROOT)/tao/Pluggable.i \ + $(TAO_ROOT)/tao/MProfile.h \ + $(TAO_ROOT)/tao/MProfile.i \ + $(TAO_ROOT)/tao/MessagingS.h \ + $(TAO_ROOT)/tao/TimeBaseS.h \ + $(TAO_ROOT)/tao/TimeBaseC.h \ + $(TAO_ROOT)/tao/TimeBaseC.i \ + $(TAO_ROOT)/tao/TimeBaseS_T.h \ + $(TAO_ROOT)/tao/TimeBaseS_T.i \ + $(TAO_ROOT)/tao/TimeBaseS_T.cpp \ + $(TAO_ROOT)/tao/TimeBaseS.i \ + $(TAO_ROOT)/tao/MessagingC.h \ + $(TAO_ROOT)/tao/IOPC.h \ + $(TAO_ROOT)/tao/IOPC.i \ + $(TAO_ROOT)/tao/MessagingC.i \ + $(TAO_ROOT)/tao/MessagingS.i \ + $(TAO_ROOT)/tao/Stub.i \ + $(TAO_ROOT)/tao/params.h \ + $(TAO_ROOT)/tao/params.i \ + $(TAO_ROOT)/tao/ORB_Core.h \ + $(TAO_ROOT)/tao/Policy_Manager.h \ + $(TAO_ROOT)/tao/Policy_Manager.i \ + $(TAO_ROOT)/tao/Resource_Factory.h \ + $(TAO_ROOT)/tao/Protocol_Factory.h \ + $(ACE_ROOT)/ace/Strategies_T.h \ + $(ACE_ROOT)/ace/Strategies.h \ + $(ACE_ROOT)/ace/Strategies.i \ + $(ACE_ROOT)/ace/Synch_Options.h \ + $(ACE_ROOT)/ace/Synch_Options.i \ + $(ACE_ROOT)/ace/Thread_Manager.h \ + $(ACE_ROOT)/ace/Thread_Manager.i \ + $(ACE_ROOT)/ace/Strategies_T.i \ + $(ACE_ROOT)/ace/Strategies_T.cpp \ + $(ACE_ROOT)/ace/Service_Repository.h \ + $(ACE_ROOT)/ace/Service_Types.h \ + $(ACE_ROOT)/ace/Service_Types.i \ + $(ACE_ROOT)/ace/Service_Repository.i \ + $(ACE_ROOT)/ace/WFMO_Reactor.h \ + $(ACE_ROOT)/ace/Message_Queue.h \ + $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ + $(ACE_ROOT)/ace/Message_Queue_T.h \ + $(ACE_ROOT)/ace/Message_Queue_T.i \ + $(ACE_ROOT)/ace/Message_Queue_T.cpp \ + $(ACE_ROOT)/ace/Message_Queue.i \ + $(ACE_ROOT)/ace/WFMO_Reactor.i \ + $(TAO_ROOT)/tao/ORB_Core.i \ + $(ACE_ROOT)/ace/Dynamic_Service.h \ + $(ACE_ROOT)/ace/Dynamic_Service.cpp \ + $(TAO_ROOT)/tao/Operation_Table.h \ + $(TAO_ROOT)/tao/Client_Strategy_Factory.h \ + $(TAO_ROOT)/tao/Invocation.h \ + $(TAO_ROOT)/tao/Reply_Dispatcher.h \ + $(TAO_ROOT)/tao/Reply_Dispatcher.i \ + $(TAO_ROOT)/tao/Invocation.i \ + $(TAO_ROOT)/tao/InconsistentTypeCodeC.h \ + $(TAO_ROOT)/tao/DynAny_i.h \ + $(TAO_ROOT)/tao/Union.h \ + $(TAO_ROOT)/tao/ValueBase.h \ + $(TAO_ROOT)/tao/ValueBase.i \ + $(TAO_ROOT)/tao/ValueFactory.h \ + $(TAO_ROOT)/tao/ValueFactory.i \ + $(TAO_ROOT)/tao/ObjectIDList.h \ + $(TAO_ROOT)/tao/ObjectIDList.i \ + $(TAO_ROOT)/tao/WrongTransactionC.h GridC.i # IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/examples/Persistent_Grid/Simple_util.cpp b/TAO/examples/Persistent_Grid/Simple_util.cpp index c9f397727a2..543c4420d39 100644 --- a/TAO/examples/Persistent_Grid/Simple_util.cpp +++ b/TAO/examples/Persistent_Grid/Simple_util.cpp @@ -125,19 +125,21 @@ Server<Servant>::init (const char *servant_name, } ACE_CATCHANY { - ACE_TRY_ENV.print_exception ("\tException in activation of POA"); + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, + "\tException in activation of POA"); return -1; } ACE_ENDTRY; + ACE_CHECK_RETURN (-1); return 0; } template <class Servant>int -Server<Servant>::run (CORBA::Environment &env) +Server<Servant>::run (CORBA::Environment &ACE_TRY_ENV) { // Run the main event loop for the ORB. - if (this->orb_manager_.run (env) == -1) + if (this->orb_manager_.run (ACE_TRY_ENV) == -1) ACE_ERROR_RETURN ((LM_ERROR, "Server_i::run"), -1); @@ -278,7 +280,7 @@ Client<InterfaceObj, Var>::init (const char *name, } ACE_CATCHANY { - ACE_TRY_ENV.print_exception ("Client_i::init"); + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Client_i::init"); return -1; } ACE_ENDTRY; @@ -289,7 +291,7 @@ Client<InterfaceObj, Var>::init (const char *name, template <class InterfaceObj, class Var> int -Client<InterfaceObj, Var>::shutdown (void ) +Client<InterfaceObj, Var>::shutdown (void) { // Returns the shutdwon flag return shutdown_; diff --git a/TAO/examples/Persistent_Grid/server.cpp b/TAO/examples/Persistent_Grid/server.cpp index 0268f4d0e72..79b7e91b33b 100644 --- a/TAO/examples/Persistent_Grid/server.cpp +++ b/TAO/examples/Persistent_Grid/server.cpp @@ -27,19 +27,18 @@ main (int argc, char *argv[]) ACE_TRY_CHECK; } } - ACE_CATCH (CORBA::SystemException, sysex) + ACE_CATCH (CORBA::UserException, userex) { - ACE_UNUSED_ARG (sysex); - ACE_TRY_ENV.print_exception ("System Exception"); + ACE_PRINT_EXCEPTION (userex, "User Exception"); return -1; } - ACE_CATCH (CORBA::UserException, userex) + ACE_CATCH (CORBA::SystemException, sysex) { - ACE_UNUSED_ARG (userex); - ACE_TRY_ENV.print_exception ("User Exception"); + ACE_PRINT_EXCEPTION (sysex, "System Exception"); return -1; } ACE_ENDTRY; + ACE_CHECK_RETURN (-1); return 0; } |