From 88556d568eb0a06bf8af2ddefacbc1ad5f00401e Mon Sep 17 00:00:00 2001
From: john_c
Date: Fri, 28 Apr 2006 03:50:28 +0000
Subject: 4_27_06 branch merge in and compile error fixed
---
ACE-INSTALL.html | 16 +-
ChangeLog | 547 ++++++
TAO/CIAO/ChangeLog | 93 +
.../DAnCE/NodeApplication/NodeApplication_Impl.cpp | 8 +-
.../DAnCE/NodeApplication/NodeApplication_Impl.h | 2 +-
.../NodeApplicationManager/Containers_Info_Map.cpp | 11 +-
.../NodeApplicationManager/Containers_Info_Map.h | 5 +-
TAO/CIAO/DAnCE/TargetManager/DomainDataManager.h | 7 +-
TAO/CIAO/DAnCE/TargetManager/TargetManager.mpc | 4 +-
TAO/CIAO/ciao/Deployment_Core.idl | 2 +-
TAO/CIAO/tools/Config_Handlers/ADD_Handler.cpp | 4 +-
TAO/CIAO/tools/Config_Handlers/CCD_Handler.cpp | 12 +-
TAO/CIAO/tools/Config_Handlers/CEPE_Handler.cpp | 4 +-
TAO/CIAO/tools/Config_Handlers/CEPE_Handler.h | 76 +-
TAO/CIAO/tools/Config_Handlers/CPD_Handler.cpp | 2 +-
TAO/CIAO/tools/Config_Handlers/CPD_Handler.h | 76 +-
TAO/CIAO/tools/Config_Handlers/Config_Handlers.mpc | 14 +-
TAO/CIAO/tools/Config_Handlers/DP_Handler.cpp | 8 +-
TAO/CIAO/tools/Config_Handlers/Deployment.hpp | 190 +-
TAO/CIAO/tools/Config_Handlers/ERE_Handler.cpp | 4 +-
TAO/CIAO/tools/Config_Handlers/ERE_Handler.h | 75 +-
TAO/CIAO/tools/Config_Handlers/MDD_Handler.cpp | 2 +-
TAO/CIAO/tools/Config_Handlers/PCD_Handler.cpp | 2 +-
TAO/CIAO/tools/Config_Handlers/PCD_Handler.h | 4 +-
.../Package_Handlers/CAD_Handler.cpp | 28 +-
.../Package_Handlers/CID_Handler.cpp | 413 ++--
.../Package_Handlers/CPD_Handler.cpp | 11 +-
.../Config_Handlers/Package_Handlers/CPD_Handler.h | 8 +-
.../Package_Handlers/Comp_Intf_Descr_Handler.cpp | 11 +-
.../Package_Handlers/IAD_Handler.cpp | 3 +
.../Config_Handlers/Package_Handlers/NIA_Handler.h | 5 +-
.../Package_Handlers/PCD_Handler.cpp | 31 +-
.../Config_Handlers/Package_Handlers/PC_Intf.cpp | 6 -
.../Config_Handlers/Package_Handlers/PC_Intf.h | 2 +-
.../Package_Handlers/Package_Handlers.mpc | 7 +
.../Package_Handlers/SID_Handler.cpp | 4 +-
.../Config_Handlers/Package_Handlers/SID_Handler.h | 4 +-
.../tools/Config_Handlers/Property_Handler.cpp | 2 +-
TAO/CIAO/tools/Config_Handlers/Property_Handler.h | 79 +-
TAO/CIAO/tools/Config_Handlers/Req_Handler.cpp | 4 +-
TAO/CIAO/tools/Config_Handlers/Req_Handler.h | 76 +-
.../Config_Handlers/SatisfierProperty_Handler.cpp | 2 +-
.../Config_Handlers/SatisfierProperty_Handler.h | 78 +-
TAO/CIAO/tools/Config_Handlers/Utils/Functors.h | 88 +-
TAO/CIAO/tools/Config_Handlers/XMLSchema/Types.hpp | 10 -
TAO/CIAO/tools/Config_Handlers/XML_File_Intf.cpp | 6 -
TAO/CIAO/tools/Config_Handlers/XSCRT/Elements.hpp | 81 -
TAO/CIAO/tools/Config_Handlers/XSCRT/XML.hpp | 10 -
TAO/CIAO/tools/Config_Handlers/XSCRT/XMLSchema.hpp | 10 -
TAO/CIAO/tools/Config_Handlers/cdp.hpp | 976 +++++-----
TAO/CIAO/tools/Config_Handlers/toplevel.hpp | 193 +-
TAO/ChangeLog | 1613 +++++++++++++++-
TAO/NEWS | 4 +
TAO/TAO_IDL/be/be_visitor_valuebox/cdr_op_ch.cpp | 5 +-
TAO/TAO_IDL/be/be_visitor_valuebox/cdr_op_cs.cpp | 4 +-
TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ch.cpp | 5 +
TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ci.cpp | 10 +
TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_cs.cpp | 6 +
TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_ch.cpp | 14 +-
TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_cs.cpp | 4 +-
TAO/TAO_IDL/be/be_visitor_valuetype/marshal_cs.cpp | 85 +-
.../be/be_visitor_valuetype/valuetype_ch.cpp | 18 +-
.../be/be_visitor_valuetype/valuetype_ci.cpp | 23 +-
.../be/be_visitor_valuetype/valuetype_cs.cpp | 83 +-
.../be/be_visitor_valuetype/valuetype_obv_ch.cpp | 33 +-
.../be/be_visitor_valuetype/valuetype_obv_cs.cpp | 28 +-
.../be/be_visitor_valuetype_fwd/cdr_op_ch.cpp | 11 +-
TAO/TAO_IDL/fe/fe_lookup.cpp | 117 +-
TAO/TAO_IDL/fe/idl.yy | 22 -
TAO/TAO_IDL/fe/y.tab.cpp | 22 -
TAO/docs/Options.html | 35 +-
TAO/orbsvcs/examples/ORT/Server_IORInterceptor.cpp | 2 +-
TAO/orbsvcs/examples/ORT/Server_IORInterceptor.h | 2 +-
.../orbsvcs/LoadBalancing/LB_IORInterceptor.cpp | 2 +-
.../orbsvcs/LoadBalancing/LB_IORInterceptor.h | 2 +-
TAO/orbsvcs/orbsvcs/PortableGroup/GOA.cpp | 68 +-
TAO/orbsvcs/orbsvcs/PortableGroup/GOA.h | 4 +-
.../PortableGroup/PG_Servant_Dispatcher.cpp | 2 +-
.../orbsvcs/PortableGroup/PG_Servant_Dispatcher.h | 2 +-
TAO/orbsvcs/orbsvcs/Trader/Constraint_Visitors.cpp | 4 +-
TAO/orbsvcs/orbsvcs/Trader/Interpreter_Utils.cpp | 44 -
TAO/orbsvcs/orbsvcs/Trader/Interpreter_Utils.h | 73 +-
TAO/orbsvcs/orbsvcs/Trader/Offer_Database.cpp | 8 +-
TAO/orbsvcs/orbsvcs/Trader/Offer_Database.h | 6 +-
.../orbsvcs/Trader/Service_Type_Repository.cpp | 26 +-
.../orbsvcs/Trader/Service_Type_Repository.h | 18 +-
TAO/orbsvcs/orbsvcs/Trader/Trader.h | 2 +-
.../orbsvcs/Trader/Trader_Constraint_Visitors.cpp | 6 +-
TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.cpp | 8 +-
TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.h | 6 +-
TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.cpp | 61 +-
TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.h | 9 +-
TAO/orbsvcs/tests/AVStreams/Multicast/ftp.cpp | 2 +-
TAO/orbsvcs/tests/AVStreams/Pluggable/ftp.cpp | 2 +-
TAO/orbsvcs/tests/Trading/TTest.idl | 19 +-
TAO/performance-tests/AMI_Latency/Roundtrip.cpp | 26 -
TAO/performance-tests/AMI_Latency/Roundtrip.h | 46 -
.../AMI_Latency/Roundtrip_Handler.cpp | 75 -
.../AMI_Latency/Roundtrip_Handler.h | 61 -
TAO/performance-tests/AMI_Latency/Server_Task.cpp | 24 -
TAO/performance-tests/AMI_Latency/client.cpp | 185 --
TAO/performance-tests/AMI_Latency/server.cpp | 155 --
TAO/performance-tests/DII_Latency/Roundtrip.cpp | 26 -
TAO/performance-tests/DII_Latency/Roundtrip.h | 46 -
TAO/performance-tests/DII_Latency/client.cpp | 178 --
TAO/performance-tests/DII_Latency/server.cpp | 136 --
TAO/performance-tests/DSI_Latency/Roundtrip.cpp | 97 -
TAO/performance-tests/DSI_Latency/Roundtrip.h | 48 -
TAO/performance-tests/DSI_Latency/client.cpp | 163 --
TAO/performance-tests/DSI_Latency/server.cpp | 142 --
.../Deferred_Latency/Roundtrip.cpp | 26 -
TAO/performance-tests/Deferred_Latency/Roundtrip.h | 46 -
TAO/performance-tests/Deferred_Latency/client.cpp | 203 --
TAO/performance-tests/Deferred_Latency/server.cpp | 136 --
.../Endpoint_Per_Priority/Makefile | 616 ------
.../Single_Threaded_Latency/Roundtrip.cpp | 26 -
.../Single_Threaded_Latency/Roundtrip.h | 46 -
.../Single_Threaded_Latency/client.cpp | 164 --
.../Single_Threaded_Latency/server.cpp | 136 --
.../Thread_Per_Connection_Latency/Client_Task.cpp | 65 -
.../Thread_Per_Connection_Latency/Client_Task.h | 46 -
.../Thread_Per_Connection_Latency/Roundtrip.cpp | 26 -
.../Thread_Per_Connection_Latency/Roundtrip.h | 46 -
.../Thread_Per_Connection_Latency/client.cpp | 149 --
.../Thread_Per_Connection_Latency/server.cpp | 136 --
.../Thread_Pool_Latency/Client_Task.cpp | 65 -
.../Thread_Pool_Latency/Client_Task.h | 46 -
.../Thread_Pool_Latency/Roundtrip.cpp | 26 -
.../Thread_Pool_Latency/Roundtrip.h | 46 -
.../Thread_Pool_Latency/Worker_Thread.cpp | 24 -
.../Thread_Pool_Latency/client.cpp | 149 --
.../Thread_Pool_Latency/server.cpp | 139 --
TAO/tao/AnyTypeCode/PI_ForwardA.h | 5 +-
TAO/tao/AnyTypeCode/skip.cpp | 6 +-
TAO/tao/Blocked_Connect_Strategy.cpp | 12 +-
TAO/tao/Blocked_Connect_Strategy.h | 6 +-
TAO/tao/Bounded_Sequence_CDR_T.h | 35 +-
TAO/tao/CORBALOC_Parser.cpp | 3 +-
.../CSD_Default_Servant_Dispatcher.cpp | 4 +-
.../CSD_Framework/CSD_Default_Servant_Dispatcher.h | 2 +-
TAO/tao/CSD_Framework/CSD_POA.cpp | 4 +-
TAO/tao/CSD_Framework/CSD_POA.h | 4 +-
TAO/tao/CSD_ThreadPool/CSD_TP_Strategy_Factory.cpp | 2 +-
TAO/tao/Client_Strategy_Factory.cpp | 6 +
TAO/tao/Client_Strategy_Factory.h | 9 +
TAO/tao/Codeset/Codeset_Manager_i.cpp | 5 +-
TAO/tao/Codeset/Codeset_Manager_i.h | 10 +-
TAO/tao/Connect_Strategy.cpp | 40 +
TAO/tao/Connect_Strategy.h | 20 +-
TAO/tao/DLL_Parser.cpp | 6 +-
TAO/tao/Endpoint.cpp | 9 +
TAO/tao/Endpoint.h | 21 +-
TAO/tao/IIOP_Connection_Handler.cpp | 47 +-
TAO/tao/IIOP_Connection_Handler.h | 5 +
TAO/tao/IIOP_Connector.cpp | 307 ++-
TAO/tao/IIOP_Connector.h | 33 +-
TAO/tao/IIOP_Endpoint.cpp | 85 +
TAO/tao/IIOP_Endpoint.h | 27 +
TAO/tao/IIOP_Profile.cpp | 75 +-
TAO/tao/IIOP_Profile.h | 12 +
TAO/tao/IORInterceptor/IORInfo.cpp | 6 +-
TAO/tao/IORInterceptor/IORInfo.h | 2 +-
TAO/tao/IORInterceptor/IORInfoC.h | 2 +-
TAO/tao/IORInterceptor/IORInterceptorC.h | 2 +-
.../IORInterceptor/IORInterceptor_Adapter_Impl.cpp | 2 +-
.../IORInterceptor/IORInterceptor_Adapter_Impl.h | 2 +-
TAO/tao/IORInterceptor_Adapter.h | 2 +-
TAO/tao/Invocation_Endpoint_Selectors.cpp | 138 +-
TAO/tao/Invocation_Endpoint_Selectors.h | 1 +
TAO/tao/LF_CH_Event.h | 11 +
TAO/tao/LF_Connect_Strategy.cpp | 26 +-
TAO/tao/LF_Connect_Strategy.h | 10 +-
TAO/tao/LF_Event.h | 7 +-
TAO/tao/MProfile.cpp | 15 +
TAO/tao/MProfile.h | 8 +-
TAO/tao/MProfile.i | 4 +-
TAO/tao/Makefile.am | 110 ++
TAO/tao/Messaging/ExceptionHolderC.cpp | 44 +-
TAO/tao/Messaging/ExceptionHolderC.h | 7 +-
TAO/tao/ORB.cpp | 98 +-
TAO/tao/ORB_Core.cpp | 420 ++++-
TAO/tao/ORB_Core.h | 34 +-
TAO/tao/ORB_Core.i | 40 +-
TAO/tao/ObjRefTemplate/Default_ORTC.cpp | 47 +-
TAO/tao/ObjRefTemplate/Default_ORTC.h | 69 +-
.../ObjRefTemplate/ObjectReferenceTemplateC.cpp | 70 +-
TAO/tao/ObjRefTemplate/ObjectReferenceTemplateC.h | 9 +-
TAO/tao/Object.cpp | 2 +-
TAO/tao/Object.h | 4 +-
TAO/tao/PI/ORBInitializer_Registry_Impl.cpp | 65 +
TAO/tao/PI/ORBInitializer_Registry_Impl.h | 11 +
TAO/tao/PI/PI.cpp | 58 -
TAO/tao/PI/PI.h | 16 -
TAO/tao/PI/PolicyFactory_Loader.cpp | 9 -
TAO/tao/PI/PolicyFactory_Loader.h | 6 -
TAO/tao/PI_Forward.pidl | 2 +-
TAO/tao/PI_ForwardC.h | 5 +-
TAO/tao/Parser_Registry.cpp | 3 +-
TAO/tao/PortableServer/Default_Acceptor_Filter.h | 2 +-
.../PortableServer/Default_Servant_Dispatcher.cpp | 2 +-
.../PortableServer/Default_Servant_Dispatcher.h | 2 +-
TAO/tao/PortableServer/Object_Adapter.cpp | 28 +-
TAO/tao/PortableServer/Object_Adapter.h | 4 +
TAO/tao/PortableServer/POAManager.cpp | 28 +-
TAO/tao/PortableServer/POAManager.h | 40 +-
TAO/tao/PortableServer/POAManager.i | 23 +-
TAO/tao/PortableServer/POAManager.pidl | 2 +
TAO/tao/PortableServer/POAManagerC.h | 7 +
TAO/tao/PortableServer/POAManagerFactory.cpp | 2 +-
TAO/tao/PortableServer/PortableServer.h | 1 +
TAO/tao/PortableServer/PortableServer.pidl | 6 +-
TAO/tao/PortableServer/PortableServerC.h | 26 +
TAO/tao/PortableServer/Regular_POA.cpp | 2 +-
TAO/tao/PortableServer/Regular_POA.h | 2 +-
TAO/tao/PortableServer/Root_POA.cpp | 87 +-
TAO/tao/PortableServer/Root_POA.h | 21 +-
TAO/tao/PortableServer/Servant_Dispatcher.h | 8 +-
TAO/tao/Profile.cpp | 43 +-
TAO/tao/Profile.h | 35 +-
TAO/tao/Profile_Transport_Resolver.cpp | 62 +-
TAO/tao/Profile_Transport_Resolver.h | 22 +-
TAO/tao/RTPortableServer/RT_POA.cpp | 4 +-
TAO/tao/RTPortableServer/RT_POA.h | 4 +-
TAO/tao/RTPortableServer/RT_Servant_Dispatcher.cpp | 2 +-
TAO/tao/RTPortableServer/RT_Servant_Dispatcher.h | 2 +-
TAO/tao/Reactive_Connect_Strategy.cpp | 27 +-
TAO/tao/Reactive_Connect_Strategy.h | 10 +-
TAO/tao/Strategies/OC_Endpoint_Selector_Loader.cpp | 17 +-
TAO/tao/Strategies/OC_Endpoint_Selector_Loader.h | 7 +-
.../Optimized_Connection_Endpoint_Selector.cpp | 2 +-
TAO/tao/TAO_Internal.cpp | 632 ++++---
TAO/tao/TAO_Internal.h | 21 +-
TAO/tao/Transport.cpp | 2 +-
TAO/tao/Transport_Connector.cpp | 183 +-
TAO/tao/Transport_Connector.h | 31 +
TAO/tao/Transport_Descriptor_Interface.cpp | 2 +-
TAO/tao/Transport_Descriptor_Interface.h | 4 +-
TAO/tao/Transport_Descriptor_Interface.inl | 6 +-
TAO/tao/Unbounded_Sequence_CDR_T.h | 33 +
TAO/tao/Valuetype/AbstractBase.cpp | 6 +
TAO/tao/Valuetype/AbstractBase.h | 1 +
TAO/tao/Valuetype/StringValueC.cpp | 16 +-
TAO/tao/Valuetype/StringValueC.h | 114 +-
TAO/tao/Valuetype/StringValueC.inl | 15 +-
TAO/tao/Valuetype/ValueBase.cpp | 619 ++++--
TAO/tao/Valuetype/ValueBase.h | 157 +-
TAO/tao/Valuetype/ValueBase.inl | 34 +-
TAO/tao/Valuetype/Value_CORBA_methods.h | 1 +
TAO/tao/default_client.cpp | 6 +
TAO/tao/default_client.h | 8 +-
TAO/tao/default_resource.cpp | 17 +-
TAO/tao/default_resource.h | 7 +
TAO/tao/orbconf.h | 4 +-
TAO/tao/params.cpp | 4 +-
TAO/tao/params.h | 29 +-
TAO/tao/params.i | 36 +
TAO/tao/tao.mpc | 35 +
TAO/tests/AMI/ami_test.idl | 10 +-
TAO/tests/Bug_1676_Regression/client.cpp | 48 +-
TAO/tests/DLL_ORB/Test_Client_Module.cpp | 56 +-
TAO/tests/DLL_ORB/Test_Server_Module.cpp | 40 +-
TAO/tests/ORT/ORT_test_IORInterceptor.cpp | 2 +-
TAO/tests/ORT/ORT_test_IORInterceptor.h | 2 +-
TAO/tests/POA/README | 14 +
TAO/tests/Param_Test/svc.conf | 2 +-
.../IORInterceptor/FOO_IORInterceptor.cpp | 2 +-
.../IORInterceptor/FOO_IORInterceptor.h | 2 +-
.../Sequence_Unit_Tests/Sequence_Unit_Tests.mpc | 8 +
TAO/tests/Smart_Proxies/Benchmark/client.cpp | 2 -
TAO/tests/Smart_Proxies/Policy/client.cpp | 2 -
TAO/tests/Smart_Proxies/client.cpp | 2 -
TAO/tests/Smart_Proxies/dtor/client.cpp | 2 -
THANKS | 1 +
ace/ACE.cpp | 3 +-
ace/ATM_Addr.h | 12 +-
ace/Array_Map.h | 2 +-
ace/Atomic_Op_T.h | 6 +-
ace/Base_Thread_Adapter.h | 4 +-
ace/CDR_Base.h | 5 +-
ace/CDR_Stream.cpp | 41 +
ace/CDR_Stream.h | 11 +
ace/Cached_Connect_Strategy_T.h | 4 +-
ace/Capabilities.h | 6 +-
ace/Cleanup.h | 3 +-
ace/DLL.cpp | 27 +
ace/DLL.h | 10 +-
ace/DLL_Manager.cpp | 106 +-
ace/Default_Constants.h | 2 +-
ace/Dynamic_Service.cpp | 12 +
ace/Dynamic_Service.h | 22 +-
ace/Dynamic_Service.inl | 12 +
ace/Dynamic_Service_Base.cpp | 69 +-
ace/Dynamic_Service_Base.h | 25 +-
ace/Global_Macros.h | 4 +-
ace/Hash_Map_Manager_T.h | 4 +-
ace/Log_Msg.h | 2 +
ace/Log_Msg_Callback.h | 2 +-
ace/Log_Msg_IPC.h | 2 +-
ace/Map_Manager.h | 4 +-
ace/OS_NS_sys_sendfile.cpp | 4 +-
ace/OS_NS_sys_sendfile.h | 8 +-
ace/OS_NS_sys_sendfile.inl | 8 +-
ace/POSIX_Asynch_IO.h | 17 +-
ace/POSIX_Proactor.h | 6 +-
ace/Parse_Node.cpp | 152 +-
ace/Parse_Node.h | 169 +-
ace/Process_Manager.cpp | 30 +-
ace/RB_Tree.h | 4 +-
ace/Service_Config.cpp | 961 +++-------
ace/Service_Config.h | 237 ++-
ace/Service_Config.inl | 82 +-
ace/Service_Gestalt.cpp | 8 +-
ace/Service_Object.cpp | 21 +-
ace/Service_Object.h | 19 +-
ace/Service_Object.inl | 5 +
ace/Service_Repository.cpp | 140 +-
ace/Service_Repository.h | 13 +-
ace/Service_Types.cpp | 20 +
ace/Sock_Connect.cpp | 6 +-
ace/Strategies_T.h | 32 +-
ace/Svc_Conf.h | 104 +-
ace/Svc_Conf.y | 93 +-
ace/Svc_Conf_Tokens.h | 94 +-
ace/Svc_Conf_y.cpp | 1979 +++++++++++---------
ace/Timer_Heap_T.h | 2 +-
ace/Timer_List_T.h | 8 +-
ace/Timer_Queue_Adapters.h | 10 +-
ace/Timer_Queue_T.h | 4 +-
ace/Timer_Wheel_T.h | 2 +-
ace/config-openvms.h | 483 ++---
ace/svcconf.mpb | 24 +-
bin/tao_orb_tests.lst | 15 +
include/makeinclude/platform_hpux_kcc.GNU | 123 --
include/makeinclude/platform_irix6.x_kcc.GNU | 41 -
include/makeinclude/platform_linux_kcc.GNU | 72 -
include/makeinclude/platform_osf1_4.x_kcc.GNU | 65 -
include/makeinclude/platform_sunos5_kcc.GNU | 111 --
include/makeinclude/platform_tru64_kcc.GNU | 35 -
include/makeinclude/platform_vxworks5.5.x.GNU | 2 +-
339 files changed, 10261 insertions(+), 9869 deletions(-)
delete mode 100644 TAO/performance-tests/AMI_Latency/Roundtrip.cpp
delete mode 100644 TAO/performance-tests/AMI_Latency/Roundtrip.h
delete mode 100644 TAO/performance-tests/AMI_Latency/Roundtrip_Handler.cpp
delete mode 100644 TAO/performance-tests/AMI_Latency/Roundtrip_Handler.h
delete mode 100644 TAO/performance-tests/AMI_Latency/Server_Task.cpp
delete mode 100644 TAO/performance-tests/AMI_Latency/client.cpp
delete mode 100644 TAO/performance-tests/AMI_Latency/server.cpp
delete mode 100644 TAO/performance-tests/DII_Latency/Roundtrip.cpp
delete mode 100644 TAO/performance-tests/DII_Latency/Roundtrip.h
delete mode 100644 TAO/performance-tests/DII_Latency/client.cpp
delete mode 100644 TAO/performance-tests/DII_Latency/server.cpp
delete mode 100644 TAO/performance-tests/DSI_Latency/Roundtrip.cpp
delete mode 100644 TAO/performance-tests/DSI_Latency/Roundtrip.h
delete mode 100644 TAO/performance-tests/DSI_Latency/client.cpp
delete mode 100644 TAO/performance-tests/DSI_Latency/server.cpp
delete mode 100644 TAO/performance-tests/Deferred_Latency/Roundtrip.cpp
delete mode 100644 TAO/performance-tests/Deferred_Latency/Roundtrip.h
delete mode 100644 TAO/performance-tests/Deferred_Latency/client.cpp
delete mode 100644 TAO/performance-tests/Deferred_Latency/server.cpp
delete mode 100644 TAO/performance-tests/RTCorba/Multiple_Endpoints/Endpoint_Per_Priority/Makefile
delete mode 100644 TAO/performance-tests/Single_Threaded_Latency/Roundtrip.cpp
delete mode 100644 TAO/performance-tests/Single_Threaded_Latency/Roundtrip.h
delete mode 100644 TAO/performance-tests/Single_Threaded_Latency/client.cpp
delete mode 100644 TAO/performance-tests/Single_Threaded_Latency/server.cpp
delete mode 100644 TAO/performance-tests/Thread_Per_Connection_Latency/Client_Task.cpp
delete mode 100644 TAO/performance-tests/Thread_Per_Connection_Latency/Client_Task.h
delete mode 100644 TAO/performance-tests/Thread_Per_Connection_Latency/Roundtrip.cpp
delete mode 100644 TAO/performance-tests/Thread_Per_Connection_Latency/Roundtrip.h
delete mode 100644 TAO/performance-tests/Thread_Per_Connection_Latency/client.cpp
delete mode 100644 TAO/performance-tests/Thread_Per_Connection_Latency/server.cpp
delete mode 100644 TAO/performance-tests/Thread_Pool_Latency/Client_Task.cpp
delete mode 100644 TAO/performance-tests/Thread_Pool_Latency/Client_Task.h
delete mode 100644 TAO/performance-tests/Thread_Pool_Latency/Roundtrip.cpp
delete mode 100644 TAO/performance-tests/Thread_Pool_Latency/Roundtrip.h
delete mode 100644 TAO/performance-tests/Thread_Pool_Latency/Worker_Thread.cpp
delete mode 100644 TAO/performance-tests/Thread_Pool_Latency/client.cpp
delete mode 100644 TAO/performance-tests/Thread_Pool_Latency/server.cpp
delete mode 100644 include/makeinclude/platform_hpux_kcc.GNU
delete mode 100644 include/makeinclude/platform_irix6.x_kcc.GNU
delete mode 100644 include/makeinclude/platform_linux_kcc.GNU
delete mode 100644 include/makeinclude/platform_osf1_4.x_kcc.GNU
delete mode 100644 include/makeinclude/platform_sunos5_kcc.GNU
delete mode 100644 include/makeinclude/platform_tru64_kcc.GNU
diff --git a/ACE-INSTALL.html b/ACE-INSTALL.html
index c4f26ba777c..af32d3517b3 100644
--- a/ACE-INSTALL.html
+++ b/ACE-INSTALL.html
@@ -116,7 +116,7 @@ document.
-ORBPreferIPV6Interfaces boolean (0|1) |
diff --git a/TAO/orbsvcs/examples/ORT/Server_IORInterceptor.cpp b/TAO/orbsvcs/examples/ORT/Server_IORInterceptor.cpp
index 4fc119dfc39..2cd8117b443 100644
--- a/TAO/orbsvcs/examples/ORT/Server_IORInterceptor.cpp
+++ b/TAO/orbsvcs/examples/ORT/Server_IORInterceptor.cpp
@@ -68,7 +68,7 @@ Server_IORInterceptor::components_established (
void
Server_IORInterceptor::adapter_manager_state_changed (
- PortableInterceptor::AdapterManagerId,
+ const char *,
PortableInterceptor::AdapterState
ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException))
diff --git a/TAO/orbsvcs/examples/ORT/Server_IORInterceptor.h b/TAO/orbsvcs/examples/ORT/Server_IORInterceptor.h
index a77551ad136..da243325d05 100644
--- a/TAO/orbsvcs/examples/ORT/Server_IORInterceptor.h
+++ b/TAO/orbsvcs/examples/ORT/Server_IORInterceptor.h
@@ -55,7 +55,7 @@ public:
ACE_THROW_SPEC ((CORBA::SystemException));
virtual void adapter_manager_state_changed (
- PortableInterceptor::AdapterManagerId id,
+ const char * id,
PortableInterceptor::AdapterState state
ACE_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_IORInterceptor.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_IORInterceptor.cpp
index 6af1cad1b42..3f555d17a5c 100644
--- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_IORInterceptor.cpp
+++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_IORInterceptor.cpp
@@ -95,7 +95,7 @@ TAO_LB_IORInterceptor::components_established (
void
TAO_LB_IORInterceptor::adapter_manager_state_changed (
- PortableInterceptor::AdapterManagerId,
+ const char *,
PortableInterceptor::AdapterState state
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_IORInterceptor.h b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_IORInterceptor.h
index ca4b6f7ea01..6b93c951912 100644
--- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_IORInterceptor.h
+++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_IORInterceptor.h
@@ -92,7 +92,7 @@ public:
ACE_THROW_SPEC ((CORBA::SystemException));
virtual void adapter_manager_state_changed (
- PortableInterceptor::AdapterManagerId id,
+ const char * id,
PortableInterceptor::AdapterState state
ACE_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((
diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/GOA.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/GOA.cpp
index 829ca0cdef9..804e235f797 100644
--- a/TAO/orbsvcs/orbsvcs/PortableGroup/GOA.cpp
+++ b/TAO/orbsvcs/orbsvcs/PortableGroup/GOA.cpp
@@ -38,8 +38,8 @@ TAO_GOA::create_id_for_reference (CORBA::Object_ptr the_ref
ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
- PortableServer::ObjectId_var obj_id = this->reference_to_id (obj_ref.in ()
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::ObjectId_var obj_id =
+ this->reference_to_id (obj_ref.in () ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
// Associate the object reference with the group reference.
@@ -102,23 +102,23 @@ TAO_GOA::disassociate_reference_with_id (CORBA::Object_ptr ref,
TAO_GOA::TAO_GOA (const TAO_Root_POA::String &name,
- TAO_POA_Manager &poa_manager,
- const TAO_POA_Policy_Set &policies,
- TAO_Root_POA *parent,
- ACE_Lock &lock,
- TAO_SYNCH_MUTEX &thread_lock,
- TAO_ORB_Core &orb_core,
- TAO_Object_Adapter *object_adapter
- ACE_ENV_ARG_DECL)
+ PortableServer::POAManager_ptr poa_manager,
+ const TAO_POA_Policy_Set &policies,
+ TAO_Root_POA *parent,
+ ACE_Lock &lock,
+ TAO_SYNCH_MUTEX &thread_lock,
+ TAO_ORB_Core &orb_core,
+ TAO_Object_Adapter *object_adapter
+ ACE_ENV_ARG_DECL)
: TAO_Regular_POA (name,
- poa_manager,
- policies,
- parent,
- lock,
- thread_lock,
- orb_core,
- object_adapter
- ACE_ENV_ARG_PARAMETER)
+ poa_manager,
+ policies,
+ parent,
+ lock,
+ thread_lock,
+ orb_core,
+ object_adapter
+ ACE_ENV_ARG_PARAMETER)
{
}
@@ -128,27 +128,27 @@ TAO_GOA::~TAO_GOA (void)
TAO_Root_POA *
TAO_GOA::new_POA (const String &name,
- TAO_POA_Manager &poa_manager,
- const TAO_POA_Policy_Set &policies,
- TAO_Root_POA *parent,
- ACE_Lock &lock,
- TAO_SYNCH_MUTEX &thread_lock,
- TAO_ORB_Core &orb_core,
- TAO_Object_Adapter *object_adapter
- ACE_ENV_ARG_DECL)
+ PortableServer::POAManager_ptr poa_manager,
+ const TAO_POA_Policy_Set &policies,
+ TAO_Root_POA *parent,
+ ACE_Lock &lock,
+ TAO_SYNCH_MUTEX &thread_lock,
+ TAO_ORB_Core &orb_core,
+ TAO_Object_Adapter *object_adapter
+ ACE_ENV_ARG_DECL)
{
TAO_GOA *poa = 0;
ACE_NEW_THROW_EX (poa,
TAO_GOA (name,
- poa_manager,
- policies,
- parent,
- lock,
- thread_lock,
- orb_core,
- object_adapter
- ACE_ENV_ARG_PARAMETER),
+ poa_manager,
+ policies,
+ parent,
+ lock,
+ thread_lock,
+ orb_core,
+ object_adapter
+ ACE_ENV_ARG_PARAMETER),
CORBA::NO_MEMORY ());
ACE_CHECK_RETURN (0);
diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/GOA.h b/TAO/orbsvcs/orbsvcs/PortableGroup/GOA.h
index 12af8d574a5..d5bbdeb04dd 100644
--- a/TAO/orbsvcs/orbsvcs/PortableGroup/GOA.h
+++ b/TAO/orbsvcs/orbsvcs/PortableGroup/GOA.h
@@ -264,7 +264,7 @@ public:
// End standard POA interface methods.
TAO_GOA (const String &name,
- TAO_POA_Manager &poa_manager,
+ PortableServer::POAManager_ptr poa_manager,
const TAO_POA_Policy_Set &policies,
TAO_Root_POA *parent,
ACE_Lock &lock,
@@ -282,7 +282,7 @@ protected:
/// Template method for creating new POA's of this type.
virtual TAO_Root_POA *new_POA (const String &name,
- TAO_POA_Manager &poa_manager,
+ PortableServer::POAManager_ptr poa_manager,
const TAO_POA_Policy_Set &policies,
TAO_Root_POA *parent,
ACE_Lock &lock,
diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Servant_Dispatcher.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Servant_Dispatcher.cpp
index 1c2b3a94b21..4b3504795e2 100644
--- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Servant_Dispatcher.cpp
+++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Servant_Dispatcher.cpp
@@ -15,7 +15,7 @@ TAO_PG_Servant_Dispatcher::~TAO_PG_Servant_Dispatcher (void)
TAO_Root_POA *
TAO_PG_Servant_Dispatcher::create_Root_POA (const ACE_CString &name,
- TAO_POA_Manager &poa_manager,
+ PortableServer::POAManager_ptr poa_manager,
const TAO_POA_Policy_Set &policies,
ACE_Lock &lock,
TAO_SYNCH_MUTEX &thread_lock,
diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Servant_Dispatcher.h b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Servant_Dispatcher.h
index c8c80d87a7f..a5718c240cc 100644
--- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Servant_Dispatcher.h
+++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Servant_Dispatcher.h
@@ -57,7 +57,7 @@ public:
/// Factory method for creating new POA's.
TAO_Root_POA *create_Root_POA (const ACE_CString &name,
- TAO_POA_Manager &poa_manager,
+ PortableServer::POAManager_ptr poa_manager,
const TAO_POA_Policy_Set &policies,
ACE_Lock &lock,
TAO_SYNCH_MUTEX &thread_lock,
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Constraint_Visitors.cpp b/TAO/orbsvcs/orbsvcs/Trader/Constraint_Visitors.cpp
index edb16fd97b9..74b6cb25967 100644
--- a/TAO/orbsvcs/orbsvcs/Trader/Constraint_Visitors.cpp
+++ b/TAO/orbsvcs/orbsvcs/Trader/Constraint_Visitors.cpp
@@ -243,7 +243,7 @@ visit_exist (TAO_Unary_Constraint* unary_exist)
{
TAO_Property_Constraint* operand =
(TAO_Property_Constraint*) unary_exist->operand ();
- TAO_String_Hash_Key property_name ((const char*) operand->name ());
+ CORBA::String_var property_name ((const char*) operand->name ());
// Determine if a property is defined on this offer.
@@ -1151,7 +1151,7 @@ TAO_Constraint_Validator::extract_type (TAO_Constraint* expr,
if (type == TAO_IDENT)
{
TAO_Property_Constraint* prop = (TAO_Property_Constraint*) expr;
- TAO_String_Hash_Key prop_name (prop->name ());
+ CORBA::String_var prop_name (prop->name ());
if (this->type_map_.find (prop_name, return_value) == 0)
type = TAO_Literal_Constraint::comparable_type (return_value);
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Interpreter_Utils.cpp b/TAO/orbsvcs/orbsvcs/Trader/Interpreter_Utils.cpp
index 8ee0351020a..993d47ad0e0 100644
--- a/TAO/orbsvcs/orbsvcs/Trader/Interpreter_Utils.cpp
+++ b/TAO/orbsvcs/orbsvcs/Trader/Interpreter_Utils.cpp
@@ -1,53 +1,9 @@
// $Id$
#include "orbsvcs/Trader/Interpreter_Utils.h"
-#include "ace/ACE.h"
-#include "ace/OS_NS_string.h"
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-// = Methods to deal with ACE_Hash_Map_Manager.
-
-TAO_String_Hash_Key::TAO_String_Hash_Key (void)
-{
-}
-
-TAO_String_Hash_Key::TAO_String_Hash_Key (char * name)
- : CORBA::String_var (name)
-{
-}
-
-TAO_String_Hash_Key::TAO_String_Hash_Key (const char * name)
- : CORBA::String_var (name)
-{
-}
-
-TAO_String_Hash_Key::TAO_String_Hash_Key (const CORBA::String_var &src)
- : CORBA::String_var (src)
-{
-}
-
-bool
-TAO_String_Hash_Key::operator == (const TAO_String_Hash_Key &hash_key) const
-{
- return ACE_OS::strcmp (this->in (), hash_key.in ()) == 0;
-}
-
-bool
-operator < (const TAO_String_Hash_Key &left,
- const TAO_String_Hash_Key &right)
-{
- return ACE_OS::strcmp (left.in (), right.in ()) < 0;
-}
-
-
-u_long
-TAO_String_Hash_Key::hash (void) const
-{
- u_long ret = ACE::hash_pjw (this->in ());
- return ret;
-}
-
// TAO_Sequence_Extracter_Base
CORBA::TCKind
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Interpreter_Utils.h b/TAO/orbsvcs/orbsvcs/Trader/Interpreter_Utils.h
index bd076791149..e59fa4a10ab 100644
--- a/TAO/orbsvcs/orbsvcs/Trader/Interpreter_Utils.h
+++ b/TAO/orbsvcs/orbsvcs/Trader/Interpreter_Utils.h
@@ -15,6 +15,9 @@
#include "ace/Hash_Map_Manager.h"
#include "ace/Null_Mutex.h"
+#include "ace/Functor.h"
+#include "ace/ACE.h"
+#include "ace/OS_NS_string.h"
#include "tao/AnyTypeCode/TypeCode.h"
#include "tao/CORBA_String.h"
@@ -24,53 +27,49 @@
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-// = Classes to deal with the ACE_Hash_Map_Manager.
-
-/**
- * Key for the Hash Table. The EXT_ID of the
- * ACE_Hash_Map_Manager.
- */
-class TAO_Trading_Serv_Export TAO_String_Hash_Key : public CORBA::String_var
+template<>
+class TAO_Trading_Serv_Export ACE_Hash
{
public:
- // = Initialization and termination methods.
- TAO_String_Hash_Key (void);
- // Default constructor.
-
- TAO_String_Hash_Key (char * name);
- // Constructor from a const string.
-
- TAO_String_Hash_Key (const char * name);
- // Constructor from a const string.
-
- TAO_String_Hash_Key (const CORBA::String_var &hash_key);
- // Copy constructor.
-
- bool operator == (const TAO_String_Hash_Key &hash_key) const;
- // The operator for hash binding and "find"ing.
-
- friend bool operator < (const TAO_String_Hash_Key &left,
- const TAO_String_Hash_Key &right);
- // The operator for hash binding and "find"ing.
+ unsigned long operator () (const CORBA::String_var& string) const
+ {
+ unsigned long ret = ACE::hash_pjw (string.in ());
+ return ret;
+ }
+};
- u_long hash (void) const;
- // The function that computes a hash value.
+template<>
+class TAO_Trading_Serv_Export ACE_Less_Than
+{
+public:
+ int operator () (const CORBA::String_var &lhs,
+ const CORBA::String_var &rhs) const
+ {
+ return ACE_OS::strcmp (lhs.in (), rhs.in ()) < 0;
+ }
};
-#if defined ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION_EXPORT
- template class TAO_Trading_Serv_Export TAO::String_var ;
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION_EXPORT */
+template<>
+class TAO_Trading_Serv_Export ACE_Equal_To
+{
+public:
+ int operator () (const CORBA::String_var &lhs,
+ const CORBA::String_var &rhs) const
+ {
+ return ACE_OS::strcmp (lhs.in (), rhs.in ()) == 0;
+ }
+};
-typedef ACE_Hash_Map_Manager_Ex,
- ACE_Equal_To,
+ ACE_Hash,
+ ACE_Equal_To,
ACE_Null_Mutex>
TAO_Lookup_Table;
-typedef ACE_Hash_Map_Manager_Ex,
- ACE_Equal_To,
+ ACE_Hash,
+ ACE_Equal_To,
ACE_Null_Mutex>
TAO_Typecode_Table;
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Offer_Database.cpp b/TAO/orbsvcs/orbsvcs/Trader/Offer_Database.cpp
index 367f7b9a9c5..9401c5366c0 100644
--- a/TAO/orbsvcs/orbsvcs/Trader/Offer_Database.cpp
+++ b/TAO/orbsvcs/orbsvcs/Trader/Offer_Database.cpp
@@ -52,7 +52,7 @@ insert_offer (const char* type, CosTrading::Offer* offer)
{
CosTrading::OfferId return_value = 0;
ACE_TYPENAME Offer_Database::ENTRY* database_entry = 0;
- TAO_String_Hash_Key service_type (type);
+ CORBA::String_var service_type (type);
ACE_READ_GUARD_RETURN (LOCK_TYPE, ace_mon, this->db_lock_, 0);
@@ -102,7 +102,7 @@ remove_offer (const char* type, CORBA::ULong id)
int return_value = -1;
ACE_TYPENAME Offer_Database::ENTRY* db_entry = 0;
- TAO_String_Hash_Key service_type (type);
+ CORBA::String_var service_type (type);
if (this->offer_db_.find (service_type, db_entry) == 0)
{
@@ -220,7 +220,7 @@ lookup_offer (const char* type, CORBA::ULong id)
CosTrading::Offer* return_value = 0;
ACE_TYPENAME Offer_Database::ENTRY* db_entry = 0;
- TAO_String_Hash_Key service_type (type);
+ CORBA::String_var service_type (type);
if (this->offer_db_.find (service_type, db_entry) == 0)
{
@@ -325,7 +325,7 @@ TAO_Service_Offer_Iterator (const char* type,
offer_iter_ (0),
type_ (type)
{
- TAO_String_Hash_Key service_type (type);
+ CORBA::String_var service_type (type);
if (this->stm_.db_lock_.acquire_read () == -1)
return;
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Offer_Database.h b/TAO/orbsvcs/orbsvcs/Trader/Offer_Database.h
index b7ad154a2ef..3087ea49d94 100644
--- a/TAO/orbsvcs/orbsvcs/Trader/Offer_Database.h
+++ b/TAO/orbsvcs/orbsvcs/Trader/Offer_Database.h
@@ -102,10 +102,10 @@ public:
typedef ACE_Hash_Map_Manager_Ex
<
- TAO_String_Hash_Key,
+ CORBA::String_var,
Offer_Map_Entry*,
- ACE_Hash,
- ACE_Equal_To,
+ ACE_Hash,
+ ACE_Equal_To,
ACE_Null_Mutex
>
Offer_Database;
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Service_Type_Repository.cpp b/TAO/orbsvcs/orbsvcs/Trader/Service_Type_Repository.cpp
index f596627fda1..106cc5e3045 100644
--- a/TAO/orbsvcs/orbsvcs/Trader/Service_Type_Repository.cpp
+++ b/TAO/orbsvcs/orbsvcs/Trader/Service_Type_Repository.cpp
@@ -101,7 +101,7 @@ add_type (const char *name,
this->incarnation_);
// Check if the service type already exists.
- TAO_String_Hash_Key type_name (name);
+ CORBA::String_var type_name (name);
if (this->type_map_.find (type_name) == 0)
ACE_THROW_RETURN (CosTradingRepos::ServiceTypeRepository::ServiceTypeExists (),
this->incarnation_);
@@ -259,7 +259,7 @@ describe_type (const char * name
ACE_CHECK_RETURN (0);
// Make sure the type exists.
- TAO_String_Hash_Key type_name (name);
+ CORBA::String_var type_name (name);
Service_Type_Map::ENTRY *type_entry = 0;
if (this->type_map_.find (type_name,
type_entry) == -1)
@@ -304,7 +304,7 @@ fully_describe_type (const char *name
ACE_CHECK_RETURN (0);
// Make sure the type exists.
- TAO_String_Hash_Key type_name (name);
+ CORBA::String_var type_name (name);
Service_Type_Map::ENTRY *type_entry = 0;
if (this->type_map_.find (type_name,
type_entry) == -1)
@@ -349,7 +349,7 @@ mask_type (const char *name
ACE_WRITE_GUARD_THROW_EX (ACE_Lock, ace_mon, *this->lock_, CORBA::INTERNAL ());
// Make sure the type exists.
- TAO_String_Hash_Key type_name (name);
+ CORBA::String_var type_name (name);
Service_Type_Map::ENTRY *type_entry = 0;
if (this->type_map_.find (type_name,
type_entry) != -1)
@@ -380,7 +380,7 @@ unmask_type (const char *name
ACE_WRITE_GUARD_THROW_EX (ACE_Lock, ace_mon, *this->lock_, CORBA::INTERNAL ());
// Make sure the type exists.
- TAO_String_Hash_Key type_name (name);
+ CORBA::String_var type_name (name);
Service_Type_Map::ENTRY *type_entry = 0;
if (this->type_map_.find (type_name,
type_entry) != -1)
@@ -419,7 +419,7 @@ fully_describe_type_i (const CosTradingRepos::ServiceTypeRepository::TypeStruct
Service_Type_Map::ENTRY *type_entry = 0;
iterator.next (next_type_name);
- TAO_String_Hash_Key hash_key (const_cast (*next_type_name));
+ CORBA::String_var hash_key (const_cast (*next_type_name));
this->type_map_.find (hash_key,
type_entry);
@@ -450,7 +450,7 @@ fully_describe_type_i (const CosTradingRepos::ServiceTypeRepository::TypeStruct
Service_Type_Map::ENTRY *type_entry = 0;
iterator.next (next_type_name);
- TAO_String_Hash_Key hash_key (const_cast (*next_type_name));
+ CORBA::String_var hash_key (const_cast (*next_type_name));
this->type_map_.find (hash_key,
type_entry);
@@ -481,7 +481,7 @@ collect_inheritance_hierarchy (const CosTradingRepos::ServiceTypeRepository::Typ
i--)
{
Service_Type_Map::ENTRY *next_type_entry = 0;
- TAO_String_Hash_Key next_type_name (type_struct.super_types[i]);
+ CORBA::String_var next_type_name (type_struct.super_types[i]);
if (this->type_map_.find (next_type_name, next_type_entry) != -1)
{
@@ -515,7 +515,7 @@ validate_properties (Prop_Map &prop_map,
ACE_THROW (CosTrading::IllegalPropertyName (n));
else
{
- TAO_String_Hash_Key prop_name (n);
+ CORBA::String_var prop_name (n);
CosTradingRepos::ServiceTypeRepository::PropStruct *prop_val =
const_cast (&props[i]);
@@ -546,7 +546,7 @@ validate_supertypes (Service_Type_Map &super_map,
ACE_THROW (CosTrading::IllegalServiceType (type));
else
{
- TAO_String_Hash_Key hash_type (type);
+ CORBA::String_var hash_type (type);
Service_Type_Map::ENTRY *type_entry = 0;
if (this->type_map_.find (hash_type,
@@ -576,7 +576,7 @@ validate_inheritance (Prop_Map &prop_map,
i++)
{
Service_Type_Map::ENTRY *super_type_entry = 0;
- TAO_String_Hash_Key super_type (super_types[i]);
+ CORBA::String_var super_type (super_types[i]);
CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq place_holder;
CosTradingRepos::ServiceTypeRepository::PropStructSeq super_props;
@@ -597,7 +597,7 @@ validate_inheritance (Prop_Map &prop_map,
j++)
{
Prop_Map::ENTRY *existing_prop = 0;
- TAO_String_Hash_Key prop_name (super_props[j].name);
+ CORBA::String_var prop_name (super_props[j].name);
if (prop_map.bind (prop_name,
&super_props[j],
@@ -688,7 +688,7 @@ update_type_map (const char *name,
psbuf,
1);
*/
- TAO_String_Hash_Key type_name (name);
+ CORBA::String_var type_name (name);
this->type_map_.bind (type_name, type);
}
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Service_Type_Repository.h b/TAO/orbsvcs/orbsvcs/Trader/Service_Type_Repository.h
index 013061face7..4f5b959b216 100644
--- a/TAO/orbsvcs/orbsvcs/Trader/Service_Type_Repository.h
+++ b/TAO/orbsvcs/orbsvcs/Trader/Service_Type_Repository.h
@@ -232,24 +232,24 @@ private:
CORBA::Boolean has_subtypes_;
};
- typedef ACE_Hash_Map_Manager_Ex ,
- ACE_Equal_To,
+ ACE_Hash,
+ ACE_Equal_To,
ACE_Null_Mutex>
Prop_Map;
- typedef ACE_Hash_Map_Manager_Ex ,
- ACE_Equal_To,
+ ACE_Hash,
+ ACE_Equal_To,
ACE_Null_Mutex>
Service_Type_Map;
- typedef ACE_Hash_Map_Iterator_Ex,
- ACE_Equal_To,
+ ACE_Hash,
+ ACE_Equal_To,
ACE_Null_Mutex>
Service_Type_Map_Iterator;
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Trader.h b/TAO/orbsvcs/orbsvcs/Trader/Trader.h
index 33206bd58fb..61b18d38c72 100644
--- a/TAO/orbsvcs/orbsvcs/Trader/Trader.h
+++ b/TAO/orbsvcs/orbsvcs/Trader/Trader.h
@@ -498,7 +498,7 @@ protected:
// hard time with it like that when compiling TAO_Service_Offer_Iterator.
typedef ACE_Hash_Map_Manager_Ex, ACE_Equal_To, ACE_Null_Mutex> TAO_Offer_Map;
-typedef ACE_Unbounded_Set TAO_String_Set;
+typedef ACE_Unbounded_Set TAO_String_Set;
typedef ACE_Unbounded_Queue TAO_String_Queue;
// = Helpful operators.
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Trader_Constraint_Visitors.cpp b/TAO/orbsvcs/orbsvcs/Trader/Trader_Constraint_Visitors.cpp
index 89c0ec8e1e5..818934b10bb 100644
--- a/TAO/orbsvcs/orbsvcs/Trader/Trader_Constraint_Visitors.cpp
+++ b/TAO/orbsvcs/orbsvcs/Trader/Trader_Constraint_Visitors.cpp
@@ -16,7 +16,7 @@ TAO_Trader_Constraint_Evaluator (CosTrading::Offer* offer,
// Create a map of property names to their values.
for (int i = 0; i < length; i++)
{
- TAO_String_Hash_Key name = (const char*) offer->properties[i].name;
+ CORBA::String_var name = (const char*) offer->properties[i].name;
this->props_.bind (name, i);
}
}
@@ -27,7 +27,7 @@ visit_property (TAO_Property_Constraint* literal)
{
int return_value = -1, prop_index = 0;
// Handle case where property is not, in fact, mapped to a value
- TAO_String_Hash_Key prop_name ((const char*) literal->name ());
+ CORBA::String_var prop_name ((const char*) literal->name ());
if (this->props_.find (prop_name, prop_index) == 0)
{
@@ -71,7 +71,7 @@ TAO_Trader_Constraint_Validator
CORBA::TypeCode_ptr corba_type =
CORBA::TypeCode::_duplicate (prop_seq[i].value_type.in ());
- TAO_String_Hash_Key prop_name_str = (const char*) prop_seq[i].name;
+ CORBA::String_var prop_name_str = (const char*) prop_seq[i].name;
this->type_map_.bind (prop_name_str, corba_type);
}
}
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.cpp b/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.cpp
index fbc7e07777b..6ddef432010 100644
--- a/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.cpp
+++ b/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.cpp
@@ -1686,7 +1686,7 @@ add_link (const char *name,
ACE_THROW (CosTrading::Link::IllegalLinkName (name));
// Ensure this isn't a duplicate link name.
- TAO_String_Hash_Key link_name (name);
+ CORBA::String_var link_name (name);
if (this->links_.find (link_name) == 0)
ACE_THROW (CosTrading::Link::DuplicateLinkName (name));
@@ -1736,7 +1736,7 @@ remove_link (const char *name
ACE_THROW (CosTrading::Link::IllegalLinkName (name));
// Ensure this isn't a duplicate link name.
- TAO_String_Hash_Key link_name (name);
+ CORBA::String_var link_name (name);
if (this->links_.find (link_name) == -1)
ACE_THROW (CosTrading::Link::UnknownLinkName (name));
@@ -1758,7 +1758,7 @@ TAO_Link::describe_link (const char *name
// Ensure this isn't a duplicate link name.
ACE_TYPENAME Links::ENTRY* link_entry = 0;
- TAO_String_Hash_Key link_name (name);
+ CORBA::String_var link_name (name);
if (this->links_.find (link_name, link_entry) == -1)
ACE_THROW_RETURN (CosTrading::Link::UnknownLinkName (name),
0);
@@ -1827,7 +1827,7 @@ modify_link (const char *name,
// Ensure this isn't a duplicate link name.
ACE_TYPENAME Links::ENTRY* link_entry = 0;
- TAO_String_Hash_Key link_name (name);
+ CORBA::String_var link_name (name);
if (this->links_.find (link_name, link_entry) == -1)
ACE_THROW (CosTrading::Link::UnknownLinkName (name));
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.h b/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.h
index 6c86c7a4840..2b1db71d3bc 100644
--- a/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.h
+++ b/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.h
@@ -921,10 +921,10 @@ private:
typedef ACE_Hash_Map_Manager_Ex
<
- TAO_String_Hash_Key,
+ CORBA::String_var,
CosTrading::Link::LinkInfo,
- ACE_Hash,
- ACE_Equal_To,
+ ACE_Hash,
+ ACE_Equal_To,
MAP_LOCK_TYPE
>
Links;
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.cpp b/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.cpp
index afd9e8a8b7b..585519e1ec8 100644
--- a/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.cpp
+++ b/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.cpp
@@ -7,6 +7,13 @@ ACE_RCSID(Trader, Trader_Utils, "$Id$")
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
+bool
+operator== (CORBA::String_var const & lhs,
+ CORBA::String_var const & rhs)
+{
+ return (ACE_OS::strcmp (lhs.in (), rhs.in ()) == 0);
+}
+
TAO_Policy_Creator::TAO_Policy_Creator (int num_policies)
: policies_ (num_policies),
num_policies_ (0)
@@ -348,7 +355,7 @@ TAO_Property_Evaluator_By_Name (const CosTrading::PropertySeq& properties
if (! TAO_Trader_Base::is_valid_property_name (prop.name))
ACE_THROW (CosTrading::IllegalPropertyName (prop.name));
- TAO_String_Hash_Key prop_name = prop.name.in ();
+ CORBA::String_var prop_name = prop.name.in ();
if (this->table_.bind (prop_name, i))
ACE_THROW (CosTrading::DuplicatePropertyName (prop.name));
}
@@ -363,7 +370,7 @@ TAO_Property_Evaluator_By_Name(CosTrading::Offer& offer,
for (int i = 0; i < length; i++)
{
- TAO_String_Hash_Key prop_name = (const char*) this->props_[i].name;
+ CORBA::String_var prop_name = (const char*) this->props_[i].name;
this->table_.bind (prop_name, i);
}
}
@@ -374,7 +381,7 @@ is_dynamic_property(const char* property_name)
{
int predicate = 0;
int index = 0;
- TAO_String_Hash_Key prop_name (property_name);
+ CORBA::String_var prop_name (property_name);
// If the property name is in the map, delegate evaluation to our
// superclass. Otherwise, throw an exception.
@@ -391,7 +398,7 @@ TAO_Property_Evaluator_By_Name::property_value (const char* property_name
{
int index = 0;
CORBA::Any* prop_value = 0;
- TAO_String_Hash_Key prop_name (property_name);
+ CORBA::String_var prop_name (property_name);
// If the property name is in the map, delegate evaluation to our
// superclass. Otherwise, throw an exception.
@@ -410,7 +417,7 @@ CORBA::TypeCode_ptr
TAO_Property_Evaluator_By_Name::property_type (const char* property_name)
{
int index = 0;
- TAO_String_Hash_Key prop_name (property_name);
+ CORBA::String_var prop_name (property_name);
CORBA::TypeCode_ptr prop_type = CORBA::TypeCode::_nil();
// If the property name is in the map, delegate evaluation to our
@@ -426,7 +433,7 @@ TAO_Property_Evaluator_By_Name::get_property (const char* property_name)
{
int index = 0;
CosTrading::Property* property = 0;
- TAO_String_Hash_Key prop_name (property_name);
+ CORBA::String_var prop_name (property_name);
if (this->table_.find (prop_name, index) == 0)
property = (CosTrading::Property *) &this->props_[index];
@@ -1050,7 +1057,7 @@ TAO_Offer_Modifier (const char* type_name,
// Create a mapping of property names to their types.
for (i = 0; i < pstructs_length; i++)
{
- TAO_String_Hash_Key prop_name = pstructs[i].name.in ();
+ CORBA::String_var prop_name = pstructs[i].name.in ();
CORBA::TypeCode_ptr type_code =
CORBA::TypeCode::_duplicate (pstructs[i].value_type.in ());
this->prop_types_.bind (prop_name, type_code);
@@ -1064,13 +1071,13 @@ TAO_Offer_Modifier (const char* type_name,
if (pstructs[i].mode ==
CosTradingRepos::ServiceTypeRepository::PROP_MANDATORY)
{
- TAO_String_Hash_Key prop_name (pname);
+ CORBA::String_var prop_name (pname);
this->mandatory_.insert (prop_name);
}
else if (pstructs[i].mode ==
CosTradingRepos::ServiceTypeRepository::PROP_READONLY)
{
- TAO_String_Hash_Key prop_name (pname);
+ CORBA::String_var prop_name (pname);
this->readonly_.insert (prop_name);
}
}
@@ -1078,7 +1085,7 @@ TAO_Offer_Modifier (const char* type_name,
// Insert the indices of the offer properties into a map.
for (i = 0; i < props_length; i++)
{
- TAO_String_Hash_Key prop_name =
+ CORBA::String_var prop_name =
static_cast (prop_seq[i].name);
this->props_.bind (prop_name, &prop_seq[i]);
}
@@ -1116,7 +1123,7 @@ delete_properties (const CosTrading::PropertyNameSeq& deletes
ACE_THROW (CosTrading::IllegalPropertyName (dname));
else
{
- TAO_String_Hash_Key prop_name (dname);
+ CORBA::String_var prop_name (dname);
if (this->mandatory_.find (prop_name) == 0)
ACE_THROW (CosTrading::Register::MandatoryProperty (this->type_, dname));
else if (delete_me.insert (prop_name) == 1)
@@ -1129,7 +1136,7 @@ delete_properties (const CosTrading::PropertyNameSeq& deletes
// Delete those properties from the offer.
for (i = 0; i < length; i++)
{
- TAO_String_Hash_Key prop_name =
+ CORBA::String_var prop_name =
static_cast (deletes[i]);
this->props_.unbind (prop_name);
}
@@ -1156,7 +1163,7 @@ merge_properties (const CosTrading::PropertySeq& modifies
const char* mname = modifies[i].name;
if (TAO_Trader_Base::is_valid_property_name (mname))
{
- TAO_String_Hash_Key prop_name (mname);
+ CORBA::String_var prop_name (mname);
if (this->readonly_.find (prop_name) == 0)
{
// Can't assign a dynamic property to a property with
@@ -1213,7 +1220,7 @@ TAO_Offer_Modifier::affect_change (const CosTrading::PropertySeq& modifies)
for (i = 0; i < merge_length; i++)
{
Property_Table::ENTRY* entry = 0;
- TAO_String_Hash_Key prop_name = modifies[i].name.in ();
+ CORBA::String_var prop_name = modifies[i].name.in ();
CosTrading::Property* prop =
const_cast (&modifies[i]);
@@ -1237,7 +1244,7 @@ TAO_Offer_Modifier::affect_change (const CosTrading::PropertySeq& modifies)
{
CosTrading::Property* prop_value = 0;
const char* name = this->offer_->properties[i].name;
- TAO_String_Hash_Key prop_name (name);
+ CORBA::String_var prop_name (name);
if (this->props_.unbind (prop_name, prop_value) == 0)
prop_seq[num_modified++] = *prop_value;
}
@@ -1246,7 +1253,7 @@ TAO_Offer_Modifier::affect_change (const CosTrading::PropertySeq& modifies)
{
CosTrading::Property* prop_value = 0;
const char* name = modifies[i].name;
- TAO_String_Hash_Key prop_name (name);
+ CORBA::String_var prop_name (name);
if (this->props_.unbind (prop_name, prop_value) == 0)
prop_seq[num_modified++] = *prop_value;
}
@@ -1282,7 +1289,7 @@ TAO_Offer_Filter::TAO_Offer_Filter (TAO_Policies& policies
if (exact_type_match == 1)
{
- TAO_String_Hash_Key exact_match
+ CORBA::String_var exact_match
(TAO_Policies::POLICY_NAMES[TAO_Policies::EXACT_TYPE_MATCH]);
this->limits_.insert (exact_match);
}
@@ -1303,7 +1310,7 @@ configure_type (CosTradingRepos::ServiceTypeRepository::TypeStruct* type_struct)
if (mode == CosTradingRepos::ServiceTypeRepository::PROP_MANDATORY_READONLY ||
mode == CosTradingRepos::ServiceTypeRepository::PROP_READONLY)
{
- TAO_String_Hash_Key prop_name ((const char*) prop_seq[i].name);
+ CORBA::String_var prop_name ((const char*) prop_seq[i].name);
this->not_mod_props_.insert (prop_name);
}
}
@@ -1312,9 +1319,9 @@ configure_type (CosTradingRepos::ServiceTypeRepository::TypeStruct* type_struct)
CORBA::Boolean
TAO_Offer_Filter::ok_to_consider (CosTrading::Offer* offer)
{
- TAO_String_Hash_Key use_mods =
+ CORBA::String_var use_mods =
TAO_Policies::POLICY_NAMES[TAO_Policies::USE_MODIFIABLE_PROPERTIES];
- TAO_String_Hash_Key use_dyns =
+ CORBA::String_var use_dyns =
TAO_Policies::POLICY_NAMES[TAO_Policies::USE_DYNAMIC_PROPERTIES];
CORBA::Boolean return_value = 1;
TAO_Property_Evaluator prop_eval (*offer);
@@ -1333,7 +1340,7 @@ TAO_Offer_Filter::ok_to_consider (CosTrading::Offer* offer)
{
// Determine if this property name is found in the set
// of modifiable properties for the type being considered.
- TAO_String_Hash_Key prop_name ((const char*) offer->properties[i].name);
+ CORBA::String_var prop_name ((const char*) offer->properties[i].name);
if (this->not_mod_props_.find (prop_name) == -1)
{
this->limits_.insert (use_mods);
@@ -1363,7 +1370,7 @@ TAO_Offer_Filter::ok_to_consider (CosTrading::Offer* offer)
this->search_card_--;
if (this->search_card_ == 0)
{
- TAO_String_Hash_Key search_card =
+ CORBA::String_var search_card =
TAO_Policies::POLICY_NAMES[TAO_Policies::SEARCH_CARD];
this->limits_.insert (search_card);
}
@@ -1386,14 +1393,14 @@ TAO_Offer_Filter::matched_offer (void)
if (this->match_card_ == 0)
{
- TAO_String_Hash_Key match_card =
+ CORBA::String_var match_card =
TAO_Policies::POLICY_NAMES[TAO_Policies::MATCH_CARD];
this->limits_.insert (match_card);
}
if (this->return_card_ == 0)
{
- TAO_String_Hash_Key return_card =
+ CORBA::String_var return_card =
TAO_Policies::POLICY_NAMES[TAO_Policies::MATCH_CARD];
this->limits_.insert (return_card);
}
@@ -1423,7 +1430,7 @@ TAO_Offer_Filter::limits_applied (void)
! p_iter.done ();
p_iter.advance ())
{
- TAO_String_Hash_Key* policy_name_ptr = 0;
+ CORBA::String_var* policy_name_ptr = 0;
p_iter.next (policy_name_ptr);
temp[i++] = CORBA::string_dup (policy_name_ptr->in ());
}
@@ -1451,7 +1458,7 @@ TAO_Property_Filter (const SPECIFIED_PROPS& desired_props
// Check for errors or duplicates
if (TAO_Trader_Base::is_valid_property_name (pname))
{
- TAO_String_Hash_Key prop_name (pname);
+ CORBA::String_var prop_name (pname);
if (this->props_.insert (prop_name) == 1)
ACE_THROW (CosTrading::DuplicatePropertyName (pname));
}
@@ -1497,7 +1504,7 @@ TAO_Property_Filter::filter_offer (CosTrading::Offer* source,
else
{
const char* p_name = s_props[i].name;
- TAO_String_Hash_Key prop_name (p_name);
+ CORBA::String_var prop_name (p_name);
// Save those property that match.
if (this->props_.find (prop_name) == 0)
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.h b/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.h
index a79c30f8136..70b5717dde7 100644
--- a/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.h
+++ b/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.h
@@ -621,10 +621,10 @@ private:
TAO_Offer_Modifier (const TAO_Offer_Modifier&);
TAO_Offer_Modifier& operator= (const TAO_Offer_Modifier&);
- typedef ACE_Hash_Map_Manager_Ex ,
- ACE_Equal_To,
+ ACE_Hash,
+ ACE_Equal_To,
ACE_Null_Mutex>
Property_Table;
@@ -639,7 +639,8 @@ private:
/// The set of readonly and mandatory property names in the offer's
/// type.
- TAO_String_Set readonly_, mandatory_;
+ TAO_String_Set readonly_;
+ TAO_String_Set mandatory_;
/// A reference to the offer undergoing change.
CosTrading::Offer* offer_;
diff --git a/TAO/orbsvcs/tests/AVStreams/Multicast/ftp.cpp b/TAO/orbsvcs/tests/AVStreams/Multicast/ftp.cpp
index 69b09769a0a..07d956ef648 100644
--- a/TAO/orbsvcs/tests/AVStreams/Multicast/ftp.cpp
+++ b/TAO/orbsvcs/tests/AVStreams/Multicast/ftp.cpp
@@ -281,8 +281,8 @@ Client::run (void)
flow_protocol_str,
this->protocol_,
&addr);
- flow_spec [0] = entry.entry_to_string ();
flow_spec.length (1);
+ flow_spec [0] = entry.entry_to_string ();
ACE_DEBUG ((LM_DEBUG, "(%N,%l) Flowspec: %s\n", entry.entry_to_string() ));
AVStreams::MMDevice_var client_mmdevice
diff --git a/TAO/orbsvcs/tests/AVStreams/Pluggable/ftp.cpp b/TAO/orbsvcs/tests/AVStreams/Pluggable/ftp.cpp
index 4639308b102..7aac2982793 100644
--- a/TAO/orbsvcs/tests/AVStreams/Pluggable/ftp.cpp
+++ b/TAO/orbsvcs/tests/AVStreams/Pluggable/ftp.cpp
@@ -265,8 +265,8 @@ Client::init (int argc,
entry.set_peer_addr (peer_addr);
AVStreams::flowSpec flow_spec (1);
- flow_spec [0] = CORBA::string_dup (entry.entry_to_string ());
flow_spec.length (1);
+ flow_spec [0] = CORBA::string_dup (entry.entry_to_string ());
AVStreams::MMDevice_var client_mmdevice =
this->client_mmdevice_._this (ACE_ENV_SINGLE_ARG_PARAMETER);
diff --git a/TAO/orbsvcs/tests/Trading/TTest.idl b/TAO/orbsvcs/tests/Trading/TTest.idl
index 756f057e266..d518aa1b58f 100644
--- a/TAO/orbsvcs/tests/Trading/TTest.idl
+++ b/TAO/orbsvcs/tests/Trading/TTest.idl
@@ -7,9 +7,9 @@ module TAO_Trader_Test
interface Remote_Output
{
- void confirm ();
// Ensure that the object reference returned from the query actually
// works.
+ void confirm ();
};
interface Plotter : Remote_Output
@@ -29,15 +29,14 @@ interface PostScript_Printer : Remote_Output
};
// Sequences used to test sequence type equivalence in the trader.
-typedef CORBA::ShortSeq ShortSeq;
-typedef CORBA::UShortSeq UShortSeq;
-typedef CORBA::LongSeq LongSeq;
-typedef CORBA::ULongSeq ULongSeq;
-typedef CORBA::BooleanSeq BooleanSeq;
-typedef CORBA::FloatSeq FloatSeq;
-typedef CORBA::DoubleSeq DoubleSeq;
-typedef CORBA::StringSeq StringSeq;
-
+typedef sequence ShortSeq;
+typedef sequence UShortSeq;
+typedef sequence LongSeq;
+typedef sequence ULongSeq;
+typedef sequence BooleanSeq;
+typedef sequence FloatSeq;
+typedef sequence DoubleSeq;
+typedef sequence StringSeq;
};
diff --git a/TAO/performance-tests/AMI_Latency/Roundtrip.cpp b/TAO/performance-tests/AMI_Latency/Roundtrip.cpp
deleted file mode 100644
index c9e68d98406..00000000000
--- a/TAO/performance-tests/AMI_Latency/Roundtrip.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-//
-// $Id$
-//
-#include "Roundtrip.h"
-
-ACE_RCSID(AMI_Latency, Roundtrip, "$Id$")
-
-Roundtrip::Roundtrip (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-Test::Timestamp
-Roundtrip::test_method (Test::Timestamp send_time
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return send_time;
-}
-
-void
-Roundtrip::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/performance-tests/AMI_Latency/Roundtrip.h b/TAO/performance-tests/AMI_Latency/Roundtrip.h
deleted file mode 100644
index 6474b130a24..00000000000
--- a/TAO/performance-tests/AMI_Latency/Roundtrip.h
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef ROUNDTRIP_H
-#define ROUNDTRIP_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-#if defined (_MSC_VER)
-# if (_MSC_VER >= 1200)
-# pragma warning(push)
-# endif /* _MSC_VER >= 1200 */
-# pragma warning (disable:4250)
-#endif /* _MSC_VER */
-
-/// Implement the Test::Roundtrip interface
-class Roundtrip
- : public virtual POA_Test::Roundtrip
- , public virtual PortableServer::RefCountServantBase
-{
-public:
- /// Constructor
- Roundtrip (CORBA::ORB_ptr orb);
-
- // = The skeleton methods
- virtual Test::Timestamp test_method (Test::Timestamp send_time
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* ROUNDTRIP_H */
diff --git a/TAO/performance-tests/AMI_Latency/Roundtrip_Handler.cpp b/TAO/performance-tests/AMI_Latency/Roundtrip_Handler.cpp
deleted file mode 100644
index 5f0061601e4..00000000000
--- a/TAO/performance-tests/AMI_Latency/Roundtrip_Handler.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-//
-// $Id$
-//
-#include "Roundtrip_Handler.h"
-
-ACE_RCSID(AMI_Latency, Roundtrip, "$Id$")
-
-Roundtrip_Handler::Roundtrip_Handler (int expected_callbacks)
- : pending_callbacks_ (expected_callbacks)
-{
-}
-
-int
-Roundtrip_Handler::pending_callbacks (void) const
-{
- return this->pending_callbacks_;
-}
-
-void
-Roundtrip_Handler::dump_results (ACE_UINT32 gsf)
-{
- this->latency_stats_.dump_results ("AMI Latency", gsf);
-}
-
-void
-Roundtrip_Handler::test_method (Test::Timestamp send_time
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->pending_callbacks_--;
-
- ACE_hrtime_t now = ACE_OS::gethrtime ();
- this->latency_stats_.sample (now - send_time);
-}
-
-void
-Roundtrip_Handler::test_method_excep (Test::AMI_RoundtripExceptionHolder *holder
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_TRY
- {
- this->pending_callbacks_--;
- holder->raise_test_method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "test_method:");
- }
- ACE_ENDTRY;
-}
-
-void
-Roundtrip_Handler::shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Roundtrip_Handler::shutdown_excep (Test::AMI_RoundtripExceptionHolder *holder
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_TRY
- {
- holder->raise_shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "shutdown:");
- }
- ACE_ENDTRY;
-}
diff --git a/TAO/performance-tests/AMI_Latency/Roundtrip_Handler.h b/TAO/performance-tests/AMI_Latency/Roundtrip_Handler.h
deleted file mode 100644
index fca18bf989f..00000000000
--- a/TAO/performance-tests/AMI_Latency/Roundtrip_Handler.h
+++ /dev/null
@@ -1,61 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef ROUNDTRIP_HANDLER_H
-#define ROUNDTRIP_HANDLER_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-#include "ace/Basic_Stats.h"
-
-#if defined (_MSC_VER)
-# if (_MSC_VER >= 1200)
-# pragma warning(push)
-# endif /* _MSC_VER >= 1200 */
-# pragma warning (disable:4250)
-#endif /* _MSC_VER */
-
-/// Implement the Test::Roundtrip interface
-class Roundtrip_Handler
- : public virtual POA_Test::AMI_RoundtripHandler
- , public virtual PortableServer::RefCountServantBase
-{
-public:
- /// Constructor
- Roundtrip_Handler (int expected_callbacks);
-
- /// Return the number of pending callbacks
- int pending_callbacks (void) const;
-
- /// Dump the results
- void dump_results (ACE_UINT32 gsf);
-
- // = The skeleton methods
- virtual void test_method (Test::Timestamp send_time
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual void test_method_excep (Test::AMI_RoundtripExceptionHolder *holder
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual void shutdown_excep (Test::AMI_RoundtripExceptionHolder *holder
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// The number of callbacks not received yet
- int pending_callbacks_;
-
- /// Collect the latency results
- ACE_Basic_Stats latency_stats_;
-};
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* ROUNDTRIP_H */
diff --git a/TAO/performance-tests/AMI_Latency/Server_Task.cpp b/TAO/performance-tests/AMI_Latency/Server_Task.cpp
deleted file mode 100644
index 6df92f32a3f..00000000000
--- a/TAO/performance-tests/AMI_Latency/Server_Task.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-//
-// $Id$
-//
-#include "Server_Task.h"
-
-ACE_RCSID(AMI_Latency, Server_Task, "$Id$")
-
-Server_Task::Server_Task (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Server_Task::svc (void)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- this->orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY {} ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/performance-tests/AMI_Latency/client.cpp b/TAO/performance-tests/AMI_Latency/client.cpp
deleted file mode 100644
index 0d396c4b67b..00000000000
--- a/TAO/performance-tests/AMI_Latency/client.cpp
+++ /dev/null
@@ -1,185 +0,0 @@
-// $Id$
-
-#include "Roundtrip_Handler.h"
-#include "tao/debug.h"
-#include "ace/Get_Opt.h"
-#include "ace/High_Res_Timer.h"
-#include "ace/Sched_Params.h"
-#include "ace/Stats.h"
-
-ACE_RCSID(AMI_Latency, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-ACE_hrtime_t throughput_base;
-
-int niterations = 1000;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:i:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'i':
- niterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k "
- "-i "
- "-p "
- "-b "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- int priority =
- (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO)
- + ACE_Sched_Params::priority_max (ACE_SCHED_FIFO)) / 2;
- // Enable FIFO scheduling, e.g., RT scheduling class on Solaris.
-
- if (ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO,
- priority,
- ACE_SCOPE_PROCESS)) != 0)
- {
- if (ACE_OS::last_error () == EPERM)
- {
- ACE_DEBUG ((LM_DEBUG,
- "server (%P|%t): user is not superuser, "
- "test runs in time-shared class\n"));
- }
- else
- ACE_ERROR ((LM_ERROR,
- "server (%P|%t): sched_params failed\n"));
- }
-
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Roundtrip_var roundtrip =
- Test::Roundtrip::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (roundtrip.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- "Nil Test::Roundtrip reference <%s>\n",
- ior),
- 1);
-
- for (int j = 0; j < 100; ++j)
- {
- ACE_hrtime_t start = 0;
- (void) roundtrip->test_method (start ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- Roundtrip_Handler *roundtrip_handler_impl;
- ACE_NEW_RETURN (roundtrip_handler_impl,
- Roundtrip_Handler (niterations),
- 1);
- PortableServer::ServantBase_var owner_transfer(roundtrip_handler_impl);
-
- Test::AMI_RoundtripHandler_var roundtrip_handler =
- roundtrip_handler_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_hrtime_t test_start = ACE_OS::gethrtime ();
-
- for (int i = 0; i != niterations; ++i)
- {
- // Invoke asynchronous operation....
- roundtrip->sendc_test_method (roundtrip_handler.in (),
- ACE_OS::gethrtime ()
- ACE_ENV_ARG_PARAMETER);
- if (orb->work_pending (ACE_ENV_SINGLE_ARG_PARAMETER))
- orb->perform_work (ACE_ENV_SINGLE_ARG_PARAMETER);
-
- ACE_TRY_CHECK;
- }
-
- ACE_Time_Value tv (0, 2000);
-
- while (roundtrip_handler_impl->pending_callbacks ())
- {
- orb->perform_work (tv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- ACE_hrtime_t test_end = ACE_OS::gethrtime ();
-
- ACE_DEBUG ((LM_DEBUG, "High resolution timer calibration...."));
- ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor ();
- ACE_DEBUG ((LM_DEBUG, "done\n"));
-
- roundtrip_handler_impl->dump_results (gsf);
-
- ACE_Throughput_Stats::dump_throughput ("Total", gsf,
- test_end - test_start,
- niterations);
-
- roundtrip->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught: ");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/performance-tests/AMI_Latency/server.cpp b/TAO/performance-tests/AMI_Latency/server.cpp
deleted file mode 100644
index 74498dc13e0..00000000000
--- a/TAO/performance-tests/AMI_Latency/server.cpp
+++ /dev/null
@@ -1,155 +0,0 @@
-// $Id$
-
-#include "Roundtrip.h"
-#include "Server_Task.h"
-#include "ace/Get_Opt.h"
-#include "ace/Sched_Params.h"
-
-#include "tao/Strategies/advanced_resource.h"
-
-ACE_RCSID(AMI_Latency, server, "$Id$")
-
-const char *ior_output_file = "test.ior";
-int nthreads = 4;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:n:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case 'n':
- nthreads = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o "
- "-n "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- int priority =
- (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO)
- + ACE_Sched_Params::priority_max (ACE_SCHED_FIFO)) / 2;
-
- priority = ACE_Sched_Params::next_priority (ACE_SCHED_FIFO,
- priority);
-
- priority = ACE_Sched_Params::next_priority (ACE_SCHED_FIFO,
- priority);
-
- // Enable FIFO scheduling, e.g., RT scheduling class on Solaris.
- if (ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO,
- priority,
- ACE_SCOPE_PROCESS)) != 0)
- {
- if (ACE_OS::last_error () == EPERM)
- {
- ACE_DEBUG ((LM_DEBUG,
- "server (%P|%t): user is not superuser, "
- "test runs in time-shared class\n"));
- }
- else
- ACE_ERROR ((LM_ERROR,
- "server (%P|%t): sched_params failed\n"));
- }
-
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Roundtrip *roundtrip_impl;
- ACE_NEW_RETURN (roundtrip_impl,
- Roundtrip (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(roundtrip_impl);
-
- Test::Roundtrip_var roundtrip =
- roundtrip_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (roundtrip.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Server_Task server_task (orb.in ());
- if (server_task.activate (THR_NEW_LWP | THR_JOINABLE,
- nthreads) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot activate server threads\n"),
- 1);
-
- server_task.thr_mgr ()->wait ();
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/performance-tests/DII_Latency/Roundtrip.cpp b/TAO/performance-tests/DII_Latency/Roundtrip.cpp
deleted file mode 100644
index df15cd65d8a..00000000000
--- a/TAO/performance-tests/DII_Latency/Roundtrip.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-//
-// $Id$
-//
-#include "Roundtrip.h"
-
-ACE_RCSID(DII_Latency, Roundtrip, "$Id$")
-
-Roundtrip::Roundtrip (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-Test::Timestamp
-Roundtrip::test_method (Test::Timestamp send_time
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return send_time;
-}
-
-void
-Roundtrip::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/performance-tests/DII_Latency/Roundtrip.h b/TAO/performance-tests/DII_Latency/Roundtrip.h
deleted file mode 100644
index 6474b130a24..00000000000
--- a/TAO/performance-tests/DII_Latency/Roundtrip.h
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef ROUNDTRIP_H
-#define ROUNDTRIP_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-#if defined (_MSC_VER)
-# if (_MSC_VER >= 1200)
-# pragma warning(push)
-# endif /* _MSC_VER >= 1200 */
-# pragma warning (disable:4250)
-#endif /* _MSC_VER */
-
-/// Implement the Test::Roundtrip interface
-class Roundtrip
- : public virtual POA_Test::Roundtrip
- , public virtual PortableServer::RefCountServantBase
-{
-public:
- /// Constructor
- Roundtrip (CORBA::ORB_ptr orb);
-
- // = The skeleton methods
- virtual Test::Timestamp test_method (Test::Timestamp send_time
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* ROUNDTRIP_H */
diff --git a/TAO/performance-tests/DII_Latency/client.cpp b/TAO/performance-tests/DII_Latency/client.cpp
deleted file mode 100644
index 57935526269..00000000000
--- a/TAO/performance-tests/DII_Latency/client.cpp
+++ /dev/null
@@ -1,178 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "ace/High_Res_Timer.h"
-#include "ace/Sched_Params.h"
-#include "ace/Stats.h"
-#include "ace/Sample_History.h"
-
-#include "tao/Strategies/advanced_resource.h"
-#include "tao/DynamicInterface/Request.h"
-
-ACE_RCSID(DII_Latency, client, "$Id$")
-
-const char *ior = "file://test.ior";
-int niterations = 100;
-int do_dump_history = 0;
-int do_shutdown = 1;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "hxk:i:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'h':
- do_dump_history = 1;
- break;
-
- case 'x':
- do_shutdown = 0;
- break;
-
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'i':
- niterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k "
- "-i "
- "-x (disable shutdown) "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- int priority =
- (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO)
- + ACE_Sched_Params::priority_max (ACE_SCHED_FIFO)) / 2;
- // Enable FIFO scheduling, e.g., RT scheduling class on Solaris.
-
- if (ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO,
- priority,
- ACE_SCOPE_PROCESS)) != 0)
- {
- if (ACE_OS::last_error () == EPERM)
- {
- ACE_DEBUG ((LM_DEBUG,
- "client (%P|%t): user is not superuser, "
- "test runs in time-shared class\n"));
- }
- else
- ACE_ERROR ((LM_ERROR,
- "client (%P|%t): sched_params failed\n"));
- }
-
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (object.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Nil CORBA::Object reference <%s>\n",
- ior),
- 1);
- }
-
- for (int j = 0; j < 100; ++j)
- {
- CORBA::Request_var request =
- object->_request ("test_method" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::ULongLong dummy = 0;
- request->add_in_arg("send_time") <<= dummy;
-
- request->set_return_type (CORBA::_tc_ulonglong);
- request->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- ACE_Sample_History history (niterations);
-
- ACE_hrtime_t test_start = ACE_OS::gethrtime ();
- for (int i = 0; i < niterations; ++i)
- {
- CORBA::ULongLong start = ACE_OS::gethrtime ();
-
- CORBA::Request_var request =
- object->_request ("test_method" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- request->add_in_arg("send_time") <<= start;
-
- request->set_return_type (CORBA::_tc_ulonglong);
- request->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_hrtime_t now = ACE_OS::gethrtime ();
- history.sample (now - start);
- }
-
- ACE_hrtime_t test_end = ACE_OS::gethrtime ();
-
- ACE_DEBUG ((LM_DEBUG, "test finished\n"));
-
- ACE_DEBUG ((LM_DEBUG, "High resolution timer calibration...."));
- ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor ();
- ACE_DEBUG ((LM_DEBUG, "done\n"));
-
- if (do_dump_history)
- {
- history.dump_samples ("HISTORY", gsf);
- }
-
- ACE_Basic_Stats stats;
- history.collect_basic_stats (stats);
- stats.dump_results ("Total", gsf);
-
- ACE_Throughput_Stats::dump_throughput ("Total", gsf,
- test_end - test_start,
- stats.samples_count ());
-
- if (do_shutdown)
- {
- CORBA::Request_var request =
- object->_request ("shutdown" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- request->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/performance-tests/DII_Latency/server.cpp b/TAO/performance-tests/DII_Latency/server.cpp
deleted file mode 100644
index e96f0ff595a..00000000000
--- a/TAO/performance-tests/DII_Latency/server.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-// $Id$
-
-#include "Roundtrip.h"
-#include "ace/Get_Opt.h"
-#include "ace/Sched_Params.h"
-
-#include "tao/Strategies/advanced_resource.h"
-
-ACE_RCSID(Single_Threaded_Latency, server, "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- int priority =
- (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO)
- + ACE_Sched_Params::priority_max (ACE_SCHED_FIFO)) / 2;
- priority = ACE_Sched_Params::next_priority (ACE_SCHED_FIFO,
- priority);
- // Enable FIFO scheduling, e.g., RT scheduling class on Solaris.
-
- if (ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO,
- priority,
- ACE_SCOPE_PROCESS)) != 0)
- {
- if (ACE_OS::last_error () == EPERM)
- {
- ACE_DEBUG ((LM_DEBUG,
- "server (%P|%t): user is not superuser, "
- "test runs in time-shared class\n"));
- }
- else
- ACE_ERROR ((LM_ERROR,
- "server (%P|%t): sched_params failed\n"));
- }
-
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Roundtrip *roundtrip_impl;
- ACE_NEW_RETURN (roundtrip_impl,
- Roundtrip (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(roundtrip_impl);
-
- Test::Roundtrip_var roundtrip =
- roundtrip_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (roundtrip.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/performance-tests/DSI_Latency/Roundtrip.cpp b/TAO/performance-tests/DSI_Latency/Roundtrip.cpp
deleted file mode 100644
index 6de5cfe047a..00000000000
--- a/TAO/performance-tests/DSI_Latency/Roundtrip.cpp
+++ /dev/null
@@ -1,97 +0,0 @@
-//
-// $Id$
-//
-#include "Roundtrip.h"
-#include "tao/DynamicInterface/Server_Request.h"
-
-ACE_RCSID(Single_Threaded_Latency, Roundtrip, "$Id$")
-
-Roundtrip::Roundtrip (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-Roundtrip::invoke (CORBA::ServerRequest_ptr request
- ACE_ENV_ARG_DECL)
-{
- if (ACE_OS::strcmp ("shutdown", request->operation ()) == 0)
- {
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- return;
- }
-
- else if (ACE_OS::strcmp ("_is_a", request->operation ()) == 0)
- {
- CORBA::NVList_ptr list;
- this->orb_->create_list (0, list ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Any type_id (CORBA::_tc_string);
- list->add_value ("type_id", type_id, CORBA::ARG_IN
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- request->arguments (list ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::NamedValue_ptr nv = list->item (0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *arg;
- *(nv->value ()) >>= arg;
-
- CORBA::Boolean type_matches = 0;
- if (ACE_OS::strcmp (arg, "IDL:Test/Roundtrip:1.0") == 0
- || ACE_OS::strcmp (arg, "IDL:omg.org/CORBA/Object:1.0") == 0
- || ACE_OS::strcmp (arg, "") == 0)
- type_matches = 1;
-
- CORBA::Any result;
- result <<= CORBA::Any::from_boolean (type_matches);
-
- request->set_result (result ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- return;
- }
-
- else if (ACE_OS::strcmp ("test_method", request->operation ()) == 0)
- {
- CORBA::NVList_ptr list;
- this->orb_->create_list (0, list ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Any send_time (CORBA::_tc_ulonglong);
- list->add_value ("send_time", send_time, CORBA::ARG_IN
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- request->arguments (list ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::NamedValue_ptr nv = list->item (0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- request->set_result (*(nv->value ()) ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- return;
- }
-
- CORBA::Any bad_operation;
- CORBA::BAD_OPERATION exception;
- bad_operation <<= exception;
- request->set_exception (bad_operation ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-CORBA::RepositoryId
-Roundtrip::_primary_interface (const PortableServer::ObjectId &,
- PortableServer::POA_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
-{
- return CORBA::string_dup ("IDL:Test/Roundtrip:1.0");
-}
diff --git a/TAO/performance-tests/DSI_Latency/Roundtrip.h b/TAO/performance-tests/DSI_Latency/Roundtrip.h
deleted file mode 100644
index b57cedc6f2d..00000000000
--- a/TAO/performance-tests/DSI_Latency/Roundtrip.h
+++ /dev/null
@@ -1,48 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef ROUNDTRIP_H
-#define ROUNDTRIP_H
-#include /**/ "ace/pre.h"
-
-#include "tao/DynamicInterface/Dynamic_Implementation.h"
-#include "tao/PortableServer/PortableServer.h"
-#include "tao/corba.h"
-
-#if defined (_MSC_VER)
-# if (_MSC_VER >= 1200)
-# pragma warning(push)
-# endif /* _MSC_VER >= 1200 */
-# pragma warning (disable:4250)
-#endif /* _MSC_VER */
-
-/// Implement the Test::Roundtrip interface
-class Roundtrip
- : public virtual PortableServer::DynamicImplementation
- , public virtual PortableServer::RefCountServantBase
-{
-public:
- /// Constructor
- Roundtrip (CORBA::ORB_ptr orb);
-
- // = The DSI methods
- virtual void invoke (CORBA::ServerRequest_ptr request
- ACE_ENV_ARG_DECL);
- virtual CORBA::RepositoryId _primary_interface (
- const PortableServer::ObjectId &oid,
- PortableServer::POA_ptr poa
- ACE_ENV_ARG_DECL);
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* ROUNDTRIP_H */
diff --git a/TAO/performance-tests/DSI_Latency/client.cpp b/TAO/performance-tests/DSI_Latency/client.cpp
deleted file mode 100644
index 2a264e91b43..00000000000
--- a/TAO/performance-tests/DSI_Latency/client.cpp
+++ /dev/null
@@ -1,163 +0,0 @@
-// $Id$
-
-#include "TestC.h"
-#include "ace/Get_Opt.h"
-#include "ace/High_Res_Timer.h"
-#include "ace/Sched_Params.h"
-#include "ace/Stats.h"
-#include "ace/Sample_History.h"
-
-#include "tao/Strategies/advanced_resource.h"
-
-ACE_RCSID(DSI_Latency, client, "$Id$")
-
-const char *ior = "file://test.ior";
-int niterations = 100;
-int do_dump_history = 0;
-int do_shutdown = 1;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "hxk:i:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'h':
- do_dump_history = 1;
- break;
-
- case 'x':
- do_shutdown = 0;
- break;
-
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'i':
- niterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k "
- "-i "
- "-x (disable shutdown) "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- int priority =
- (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO)
- + ACE_Sched_Params::priority_max (ACE_SCHED_FIFO)) / 2;
- // Enable FIFO scheduling, e.g., RT scheduling class on Solaris.
-
- if (ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO,
- priority,
- ACE_SCOPE_PROCESS)) != 0)
- {
- if (ACE_OS::last_error () == EPERM)
- {
- ACE_DEBUG ((LM_DEBUG,
- "client (%P|%t): user is not superuser, "
- "test runs in time-shared class\n"));
- }
- else
- ACE_ERROR ((LM_ERROR,
- "client (%P|%t): sched_params failed\n"));
- }
-
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Roundtrip_var roundtrip =
- Test::Roundtrip::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (roundtrip.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Nil Test::Roundtrip reference <%s>\n",
- ior),
- 1);
- }
-
- for (int j = 0; j < 100; ++j)
- {
- ACE_hrtime_t start = 0;
- (void) roundtrip->test_method (start ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- ACE_Sample_History history (niterations);
-
- ACE_hrtime_t test_start = ACE_OS::gethrtime ();
- for (int i = 0; i < niterations; ++i)
- {
- ACE_hrtime_t start = ACE_OS::gethrtime ();
-
- (void) roundtrip->test_method (start ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_hrtime_t now = ACE_OS::gethrtime ();
- history.sample (now - start);
- }
-
- ACE_hrtime_t test_end = ACE_OS::gethrtime ();
-
- ACE_DEBUG ((LM_DEBUG, "test finished\n"));
-
- ACE_DEBUG ((LM_DEBUG, "High resolution timer calibration...."));
- ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor ();
- ACE_DEBUG ((LM_DEBUG, "done\n"));
-
- if (do_dump_history)
- {
- history.dump_samples ("HISTORY", gsf);
- }
-
- ACE_Basic_Stats stats;
- history.collect_basic_stats (stats);
- stats.dump_results ("Total", gsf);
-
- ACE_Throughput_Stats::dump_throughput ("Total", gsf,
- test_end - test_start,
- stats.samples_count ());
-
- if (do_shutdown)
- {
- roundtrip->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/performance-tests/DSI_Latency/server.cpp b/TAO/performance-tests/DSI_Latency/server.cpp
deleted file mode 100644
index ebc70ade1d7..00000000000
--- a/TAO/performance-tests/DSI_Latency/server.cpp
+++ /dev/null
@@ -1,142 +0,0 @@
-// $Id$
-
-#include "Roundtrip.h"
-#include "ace/Get_Opt.h"
-#include "ace/Sched_Params.h"
-
-#include "tao/Strategies/advanced_resource.h"
-
-ACE_RCSID(DSI_Latency, server, "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- int priority =
- (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO)
- + ACE_Sched_Params::priority_max (ACE_SCHED_FIFO)) / 2;
- priority = ACE_Sched_Params::next_priority (ACE_SCHED_FIFO,
- priority);
- // Enable FIFO scheduling, e.g., RT scheduling class on Solaris.
-
- if (ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO,
- priority,
- ACE_SCOPE_PROCESS)) != 0)
- {
- if (ACE_OS::last_error () == EPERM)
- {
- ACE_DEBUG ((LM_DEBUG,
- "server (%P|%t): user is not superuser, "
- "test runs in time-shared class\n"));
- }
- else
- ACE_ERROR ((LM_ERROR,
- "server (%P|%t): sched_params failed\n"));
- }
-
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Roundtrip *roundtrip_impl;
- ACE_NEW_RETURN (roundtrip_impl,
- Roundtrip (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(roundtrip_impl);
-
- PortableServer::ObjectId_var oid =
- root_poa->activate_object (roundtrip_impl
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var roundtrip =
- root_poa->id_to_reference (oid.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (roundtrip.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/performance-tests/Deferred_Latency/Roundtrip.cpp b/TAO/performance-tests/Deferred_Latency/Roundtrip.cpp
deleted file mode 100644
index 72f83576b44..00000000000
--- a/TAO/performance-tests/Deferred_Latency/Roundtrip.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-//
-// $Id$
-//
-#include "Roundtrip.h"
-
-ACE_RCSID(Single_Threaded_Latency, Roundtrip, "$Id$")
-
-Roundtrip::Roundtrip (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-Test::Timestamp
-Roundtrip::test_method (Test::Timestamp send_time
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return send_time;
-}
-
-void
-Roundtrip::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/performance-tests/Deferred_Latency/Roundtrip.h b/TAO/performance-tests/Deferred_Latency/Roundtrip.h
deleted file mode 100644
index 6474b130a24..00000000000
--- a/TAO/performance-tests/Deferred_Latency/Roundtrip.h
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef ROUNDTRIP_H
-#define ROUNDTRIP_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-#if defined (_MSC_VER)
-# if (_MSC_VER >= 1200)
-# pragma warning(push)
-# endif /* _MSC_VER >= 1200 */
-# pragma warning (disable:4250)
-#endif /* _MSC_VER */
-
-/// Implement the Test::Roundtrip interface
-class Roundtrip
- : public virtual POA_Test::Roundtrip
- , public virtual PortableServer::RefCountServantBase
-{
-public:
- /// Constructor
- Roundtrip (CORBA::ORB_ptr orb);
-
- // = The skeleton methods
- virtual Test::Timestamp test_method (Test::Timestamp send_time
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* ROUNDTRIP_H */
diff --git a/TAO/performance-tests/Deferred_Latency/client.cpp b/TAO/performance-tests/Deferred_Latency/client.cpp
deleted file mode 100644
index 8aa94d94172..00000000000
--- a/TAO/performance-tests/Deferred_Latency/client.cpp
+++ /dev/null
@@ -1,203 +0,0 @@
-// $Id$
-
-#include "TestC.h"
-
-#include "tao/DynamicInterface/Request.h"
-
-#include "tao/Strategies/advanced_resource.h"
-
-#include "ace/Get_Opt.h"
-#include "ace/Sched_Params.h"
-#include "ace/High_Res_Timer.h"
-#include "ace/Sched_Params.h"
-#include "ace/Stats.h"
-#include "ace/Sample_History.h"
-
-ACE_RCSID(Deferred_Latency, client, "$Id$")
-
-const char *ior = "file://test.ior";
-int niterations = 1000;
-int burst = 10;
-int do_shutdown = 1;
-int do_dump_history = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "hxk:i:b:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'h':
- do_dump_history = 1;
- break;
-
- case 'x':
- do_shutdown = 0;
- break;
-
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'i':
- niterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 'b':
- burst = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k "
- "-i "
- "-b "
- "-x (disable shutdown) "
- "-h (dump history) "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- int priority =
- (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO)
- + ACE_Sched_Params::priority_max (ACE_SCHED_FIFO)) / 2;
- // Enable FIFO scheduling, e.g., RT scheduling class on Solaris.
-
- if (ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO,
- priority,
- ACE_SCOPE_PROCESS)) != 0)
- {
- if (ACE_OS::last_error () == EPERM)
- {
- ACE_DEBUG ((LM_DEBUG,
- "client (%P|%t): user is not superuser, "
- "test runs in time-shared class\n"));
- }
- else
- ACE_ERROR ((LM_ERROR,
- "client (%P|%t): sched_params failed\n"));
- }
-
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Roundtrip_var roundtrip =
- Test::Roundtrip::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (roundtrip.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Nil Test::Roundtrip reference <%s>\n",
- ior),
- 1);
- }
-
- for (int j = 0; j < 100; ++j)
- {
- ACE_hrtime_t start = 0;
- (void) roundtrip->test_method (start ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- ACE_Sample_History history (niterations);
-
- ACE_hrtime_t test_start = ACE_OS::gethrtime ();
-
- CORBA::Request_var *request;
- ACE_NEW_RETURN (request, CORBA::Request_var[burst], 1);
-
- for (int i = 0; i < niterations; ++i)
- {
- int j;
-
- for (j = 0; j != burst; ++j)
- {
- CORBA::ULongLong start = ACE_OS::gethrtime ();
-
- request[j] =
- roundtrip->_request ("test_method"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- request[j]->add_in_arg () <<= start;
- request[j]->set_return_type (CORBA::_tc_ulonglong);
-
- request[j]->send_deferred (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- for (j = 0; j != burst; ++j)
- {
- request[j]->get_response (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::ULongLong retval;
- if ((request[j]->return_value () >>= retval) == 1)
- {
- ACE_hrtime_t now = ACE_OS::gethrtime ();
- history.sample (now - retval);
- }
- }
- }
- delete[] request;
-
- ACE_hrtime_t test_end = ACE_OS::gethrtime ();
-
- ACE_DEBUG ((LM_DEBUG, "test finished\n"));
-
- ACE_DEBUG ((LM_DEBUG, "High resolution timer calibration...."));
- ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor ();
- ACE_DEBUG ((LM_DEBUG, "done\n"));
-
- if (do_dump_history)
- {
- history.dump_samples ("HISTORY", gsf);
- }
-
- ACE_Basic_Stats stats;
- history.collect_basic_stats (stats);
- stats.dump_results ("Total", gsf);
-
- ACE_Throughput_Stats::dump_throughput ("Total", gsf,
- test_end - test_start,
- stats.samples_count ());
-
- if (do_shutdown)
- {
- roundtrip->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/performance-tests/Deferred_Latency/server.cpp b/TAO/performance-tests/Deferred_Latency/server.cpp
deleted file mode 100644
index e96f0ff595a..00000000000
--- a/TAO/performance-tests/Deferred_Latency/server.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-// $Id$
-
-#include "Roundtrip.h"
-#include "ace/Get_Opt.h"
-#include "ace/Sched_Params.h"
-
-#include "tao/Strategies/advanced_resource.h"
-
-ACE_RCSID(Single_Threaded_Latency, server, "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- int priority =
- (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO)
- + ACE_Sched_Params::priority_max (ACE_SCHED_FIFO)) / 2;
- priority = ACE_Sched_Params::next_priority (ACE_SCHED_FIFO,
- priority);
- // Enable FIFO scheduling, e.g., RT scheduling class on Solaris.
-
- if (ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO,
- priority,
- ACE_SCOPE_PROCESS)) != 0)
- {
- if (ACE_OS::last_error () == EPERM)
- {
- ACE_DEBUG ((LM_DEBUG,
- "server (%P|%t): user is not superuser, "
- "test runs in time-shared class\n"));
- }
- else
- ACE_ERROR ((LM_ERROR,
- "server (%P|%t): sched_params failed\n"));
- }
-
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Roundtrip *roundtrip_impl;
- ACE_NEW_RETURN (roundtrip_impl,
- Roundtrip (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(roundtrip_impl);
-
- Test::Roundtrip_var roundtrip =
- roundtrip_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (roundtrip.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/performance-tests/RTCorba/Multiple_Endpoints/Endpoint_Per_Priority/Makefile b/TAO/performance-tests/RTCorba/Multiple_Endpoints/Endpoint_Per_Priority/Makefile
deleted file mode 100644
index 6abeb8554f4..00000000000
--- a/TAO/performance-tests/RTCorba/Multiple_Endpoints/Endpoint_Per_Priority/Makefile
+++ /dev/null
@@ -1,616 +0,0 @@
-#----------------------------------------------------------------------------
-#
-# $Id$
-#
-#----------------------------------------------------------------------------
-
-#----------------------------------------------------------------------------
-# Local macros
-#----------------------------------------------------------------------------
-
-ifndef TAO_ROOT
- TAO_ROOT = $(ACE_ROOT)/TAO
-endif # ! TAO_ROOT
-
-LDLIBS = -lRTCORBA_Common -lTAO_Strategies -lTAO_PortableServer -lTAO
-
-BIN_UNCHECKED = server client
-
-CLIENT_OBJS = client.o
-SERVER_OBJS = server.o
-
-BUILD = $(BIN)
-VLDLIBS = $(LDLIBS:%=%$(VAR))
-VBIN = $(BIN:%=%$(VAR))
-SRC=$(CLIENT_OBJS:.o=.cpp) $(SERVER_OBJS:.o=.cpp)
-CPPFLAGS += -I../Common
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(TAO_ROOT)/rules.tao.GNU
-
-ifeq ($(rt_corba),1)
- ifeq ($(minimum_corba),0)
- BIN=$(BIN_UNCHECKED)
- endif # minimum_corba
-endif # rt_corba
-
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-include $(TAO_ROOT)/taoconfig.mk
-
-#----------------------------------------------------------------------------
-# Local targets
-#----------------------------------------------------------------------------
-
-server: $(addprefix $(VDIR),$(SERVER_OBJS))
- $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK)
-
-client: $(addprefix $(VDIR),$(CLIENT_OBJS))
- $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK)
-
-realclean: clean
-
-# DO NOT DELETE THIS LINE -- g++dep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-
-.obj/client.o .obj/client.o .obj/client.o .obj/client.o: client.cpp ../Common/testC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ace_wchar.inl \
- $(ACE_ROOT)/ace/OS_Errno.h \
- $(ACE_ROOT)/ace/OS_Export.h \
- $(ACE_ROOT)/ace/OS_Errno.inl \
- $(TAO_ROOT)/tao/corbafwd.h \
- $(ACE_ROOT)/ace/CDR_Base.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/OS_Dirent.h \
- $(ACE_ROOT)/ace/OS_Dirent.inl \
- $(ACE_ROOT)/ace/OS_String.h \
- $(ACE_ROOT)/ace/OS_String.inl \
- $(ACE_ROOT)/ace/OS_Memory.h \
- $(ACE_ROOT)/ace/OS_Memory.inl \
- $(ACE_ROOT)/ace/OS_TLI.h \
- $(ACE_ROOT)/ace/OS_TLI.inl \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Flag_Manip.h \
- $(ACE_ROOT)/ace/Flag_Manip.i \
- $(ACE_ROOT)/ace/Handle_Ops.h \
- $(ACE_ROOT)/ace/Handle_Ops.i \
- $(ACE_ROOT)/ace/Lib_Find.h \
- $(ACE_ROOT)/ace/Lib_Find.i \
- $(ACE_ROOT)/ace/Init_ACE.h \
- $(ACE_ROOT)/ace/Init_ACE.i \
- $(ACE_ROOT)/ace/Sock_Connect.h \
- $(ACE_ROOT)/ace/Sock_Connect.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.h \
- $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.inl \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread_Adapter.h \
- $(ACE_ROOT)/ace/Base_Thread_Adapter.h \
- $(ACE_ROOT)/ace/Base_Thread_Adapter.inl \
- $(ACE_ROOT)/ace/Thread_Adapter.inl \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Malloc_Allocator.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Malloc_Allocator.i \
- $(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/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(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/Unbounded_Set.h \
- $(ACE_ROOT)/ace/Node.h \
- $(ACE_ROOT)/ace/Node.cpp \
- $(ACE_ROOT)/ace/Unbounded_Set.inl \
- $(ACE_ROOT)/ace/Unbounded_Set.cpp \
- $(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/CDR_Base.inl \
- $(TAO_ROOT)/tao/try_macros.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(ACE_ROOT)/ace/CORBA_macros.h \
- $(TAO_ROOT)/tao/varbase.h \
- $(TAO_ROOT)/tao/TAO_Export.h \
- $(TAO_ROOT)/tao/corbafwd.i \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Exception.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(ACE_ROOT)/ace/CDR_Stream.h \
- $(ACE_ROOT)/ace/CDR_Stream.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/Environment.h \
- $(TAO_ROOT)/tao/Environment.i \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Object_Proxy_Broker.h \
- $(TAO_ROOT)/tao/Object_Proxy_Impl.h \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/NVList.h \
- $(ACE_ROOT)/ace/Unbounded_Queue.h \
- $(ACE_ROOT)/ace/Unbounded_Queue.inl \
- $(ACE_ROOT)/ace/Unbounded_Queue.cpp \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/LocalObject.h \
- $(TAO_ROOT)/tao/LocalObject.i \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/OctetSeqC.h \
- $(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/OctetSeqC.i \
- $(TAO_ROOT)/tao/Principal.i \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Services.h \
- $(TAO_ROOT)/tao/Services.i \
- $(TAO_ROOT)/tao/CORBA_String.h \
- $(TAO_ROOT)/tao/CORBA_String.inl \
- $(TAO_ROOT)/tao/PolicyC.h \
- $(TAO_ROOT)/tao/Encodable.h \
- $(TAO_ROOT)/tao/Remote_Object_Proxy_Impl.h \
- $(TAO_ROOT)/tao/CurrentC.h \
- $(TAO_ROOT)/tao/CurrentC.i \
- $(TAO_ROOT)/tao/PolicyC.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/BoundsC.h \
- $(TAO_ROOT)/tao/BoundsC.i \
- $(TAO_ROOT)/tao/ValueBase.h \
- $(TAO_ROOT)/tao/ValueBase.i \
- $(TAO_ROOT)/tao/ValueFactory.h \
- $(TAO_ROOT)/tao/ValueFactory.i \
- $(TAO_ROOT)/tao/DomainC.h \
- $(TAO_ROOT)/tao/DomainC.i \
- $(TAO_ROOT)/tao/WrongTransactionC.h \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/ObjectIDList.h \
- $(TAO_ROOT)/tao/ObjectIDList.i \
- $(TAO_ROOT)/tao/StringSeqC.h \
- $(TAO_ROOT)/tao/StringSeqC.i \
- $(TAO_ROOT)/tao/PortableInterceptorC.h \
- $(TAO_ROOT)/tao/DynamicC.h \
- $(TAO_ROOT)/tao/DynamicC.i \
- $(TAO_ROOT)/tao/MessagingC.h \
- $(TAO_ROOT)/tao/TimeBaseC.h \
- $(TAO_ROOT)/tao/SmartProxies/Smart_Proxies.h \
- $(TAO_ROOT)/tao/SmartProxies/smartproxies_export.h \
- $(TAO_ROOT)/tao/TAO_Singleton.h \
- $(TAO_ROOT)/tao/TAO_Singleton.inl \
- $(TAO_ROOT)/tao/TAO_Singleton.cpp \
- $(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 \
- $(TAO_ROOT)/tao/TAO_Singleton_Manager.h \
- $(TAO_ROOT)/tao/TAO_Singleton_Manager.inl \
- $(TAO_ROOT)/tao/SmartProxies/Smart_Proxies.inl \
- $(TAO_ROOT)/tao/TimeBaseC.i \
- $(TAO_ROOT)/tao/IOPC.h \
- $(TAO_ROOT)/tao/IOPC.i \
- $(TAO_ROOT)/tao/PollableC.h \
- $(TAO_ROOT)/tao/PollableC.i \
- $(TAO_ROOT)/tao/MessagingC.i \
- $(TAO_ROOT)/tao/PortableInterceptorC.i \
- ../Common/rtcorba_common_export.h ../Common/testC.i \
- $(TAO_ROOT)/tao/TAOC.h \
- $(TAO_ROOT)/tao/TAOC.i \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/Task.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/Thread_Manager.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Array_Base.h \
- $(ACE_ROOT)/ace/Array_Base.inl \
- $(ACE_ROOT)/ace/Array_Base.cpp \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.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/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(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/Test_and_Set.h \
- $(ACE_ROOT)/ace/Test_and_Set.i \
- $(ACE_ROOT)/ace/Test_and_Set.cpp \
- $(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 \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Synch_Options.i \
- $(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_T.h \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \
- $(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/Process_Mutex.h \
- $(ACE_ROOT)/ace/Process_Mutex.inl \
- $(ACE_ROOT)/ace/WFMO_Reactor.i \
- $(ACE_ROOT)/ace/Strategies.i \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Task_T.cpp \
- $(ACE_ROOT)/ace/Module.h \
- $(ACE_ROOT)/ace/Module.i \
- $(ACE_ROOT)/ace/Module.cpp \
- $(ACE_ROOT)/ace/Stream_Modules.h \
- $(ACE_ROOT)/ace/Stream_Modules.cpp \
- $(ACE_ROOT)/ace/Stats.h \
- $(ACE_ROOT)/ace/Basic_Stats.h \
- $(ACE_ROOT)/ace/Basic_Stats.inl \
- $(ACE_ROOT)/ace/Stats.i \
- $(ACE_ROOT)/ace/High_Res_Timer.h \
- $(ACE_ROOT)/ace/High_Res_Timer.i \
- $(ACE_ROOT)/ace/Sched_Params.h \
- $(ACE_ROOT)/ace/Sched_Params.i
-
-.obj/server.o .obj/server.o .obj/server.o .obj/server.o: server.cpp ../Common/test_i.h ../Common/testS.h \
- ../Common/testC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ace_wchar.inl \
- $(ACE_ROOT)/ace/OS_Errno.h \
- $(ACE_ROOT)/ace/OS_Export.h \
- $(ACE_ROOT)/ace/OS_Errno.inl \
- $(TAO_ROOT)/tao/corbafwd.h \
- $(ACE_ROOT)/ace/CDR_Base.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/OS_Dirent.h \
- $(ACE_ROOT)/ace/OS_Dirent.inl \
- $(ACE_ROOT)/ace/OS_String.h \
- $(ACE_ROOT)/ace/OS_String.inl \
- $(ACE_ROOT)/ace/OS_Memory.h \
- $(ACE_ROOT)/ace/OS_Memory.inl \
- $(ACE_ROOT)/ace/OS_TLI.h \
- $(ACE_ROOT)/ace/OS_TLI.inl \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Flag_Manip.h \
- $(ACE_ROOT)/ace/Flag_Manip.i \
- $(ACE_ROOT)/ace/Handle_Ops.h \
- $(ACE_ROOT)/ace/Handle_Ops.i \
- $(ACE_ROOT)/ace/Lib_Find.h \
- $(ACE_ROOT)/ace/Lib_Find.i \
- $(ACE_ROOT)/ace/Init_ACE.h \
- $(ACE_ROOT)/ace/Init_ACE.i \
- $(ACE_ROOT)/ace/Sock_Connect.h \
- $(ACE_ROOT)/ace/Sock_Connect.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.h \
- $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.inl \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread_Adapter.h \
- $(ACE_ROOT)/ace/Base_Thread_Adapter.h \
- $(ACE_ROOT)/ace/Base_Thread_Adapter.inl \
- $(ACE_ROOT)/ace/Thread_Adapter.inl \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Malloc_Allocator.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Malloc_Allocator.i \
- $(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/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(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/Unbounded_Set.h \
- $(ACE_ROOT)/ace/Node.h \
- $(ACE_ROOT)/ace/Node.cpp \
- $(ACE_ROOT)/ace/Unbounded_Set.inl \
- $(ACE_ROOT)/ace/Unbounded_Set.cpp \
- $(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/CDR_Base.inl \
- $(TAO_ROOT)/tao/try_macros.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(ACE_ROOT)/ace/CORBA_macros.h \
- $(TAO_ROOT)/tao/varbase.h \
- $(TAO_ROOT)/tao/TAO_Export.h \
- $(TAO_ROOT)/tao/corbafwd.i \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Exception.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(ACE_ROOT)/ace/CDR_Stream.h \
- $(ACE_ROOT)/ace/CDR_Stream.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/Environment.h \
- $(TAO_ROOT)/tao/Environment.i \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Object_Proxy_Broker.h \
- $(TAO_ROOT)/tao/Object_Proxy_Impl.h \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/NVList.h \
- $(ACE_ROOT)/ace/Unbounded_Queue.h \
- $(ACE_ROOT)/ace/Unbounded_Queue.inl \
- $(ACE_ROOT)/ace/Unbounded_Queue.cpp \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/LocalObject.h \
- $(TAO_ROOT)/tao/LocalObject.i \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/OctetSeqC.h \
- $(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/OctetSeqC.i \
- $(TAO_ROOT)/tao/Principal.i \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Services.h \
- $(TAO_ROOT)/tao/Services.i \
- $(TAO_ROOT)/tao/CORBA_String.h \
- $(TAO_ROOT)/tao/CORBA_String.inl \
- $(TAO_ROOT)/tao/PolicyC.h \
- $(TAO_ROOT)/tao/Encodable.h \
- $(TAO_ROOT)/tao/Remote_Object_Proxy_Impl.h \
- $(TAO_ROOT)/tao/CurrentC.h \
- $(TAO_ROOT)/tao/CurrentC.i \
- $(TAO_ROOT)/tao/PolicyC.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/BoundsC.h \
- $(TAO_ROOT)/tao/BoundsC.i \
- $(TAO_ROOT)/tao/ValueBase.h \
- $(TAO_ROOT)/tao/ValueBase.i \
- $(TAO_ROOT)/tao/ValueFactory.h \
- $(TAO_ROOT)/tao/ValueFactory.i \
- $(TAO_ROOT)/tao/DomainC.h \
- $(TAO_ROOT)/tao/DomainC.i \
- $(TAO_ROOT)/tao/WrongTransactionC.h \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/ObjectIDList.h \
- $(TAO_ROOT)/tao/ObjectIDList.i \
- $(TAO_ROOT)/tao/StringSeqC.h \
- $(TAO_ROOT)/tao/StringSeqC.i \
- $(TAO_ROOT)/tao/PortableInterceptorC.h \
- $(TAO_ROOT)/tao/DynamicC.h \
- $(TAO_ROOT)/tao/DynamicC.i \
- $(TAO_ROOT)/tao/MessagingC.h \
- $(TAO_ROOT)/tao/TimeBaseC.h \
- $(TAO_ROOT)/tao/SmartProxies/Smart_Proxies.h \
- $(TAO_ROOT)/tao/SmartProxies/smartproxies_export.h \
- $(TAO_ROOT)/tao/TAO_Singleton.h \
- $(TAO_ROOT)/tao/TAO_Singleton.inl \
- $(TAO_ROOT)/tao/TAO_Singleton.cpp \
- $(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 \
- $(TAO_ROOT)/tao/TAO_Singleton_Manager.h \
- $(TAO_ROOT)/tao/TAO_Singleton_Manager.inl \
- $(TAO_ROOT)/tao/SmartProxies/Smart_Proxies.inl \
- $(TAO_ROOT)/tao/TimeBaseC.i \
- $(TAO_ROOT)/tao/IOPC.h \
- $(TAO_ROOT)/tao/IOPC.i \
- $(TAO_ROOT)/tao/PollableC.h \
- $(TAO_ROOT)/tao/PollableC.i \
- $(TAO_ROOT)/tao/MessagingC.i \
- $(TAO_ROOT)/tao/PortableInterceptorC.i \
- ../Common/rtcorba_common_export.h ../Common/testC.i \
- $(TAO_ROOT)/tao/PortableServer/PortableServer.h \
- $(TAO_ROOT)/tao/PortableServer/portableserver_export.h \
- $(TAO_ROOT)/tao/PortableServer/PortableServerC.h \
- $(TAO_ROOT)/tao/PortableServer/PortableServerC.i \
- $(TAO_ROOT)/tao/PortableServer/Servant_Base.h \
- $(TAO_ROOT)/tao/Abstract_Servant_Base.h \
- $(TAO_ROOT)/tao/PortableServer/Servant_Base.i \
- $(TAO_ROOT)/tao/PortableServer/Collocated_Object.h \
- $(TAO_ROOT)/tao/PortableServer/Collocated_Object.i \
- $(TAO_ROOT)/tao/PortableServer/ThruPOA_Object_Proxy_Impl.h \
- $(TAO_ROOT)/tao/PortableServer/Direct_Object_Proxy_Impl.h \
- ../Common/testS_T.h ../Common/testS_T.i ../Common/testS_T.cpp \
- ../Common/testS.i ../Common/test_i.i \
- $(TAO_ROOT)/tao/RTCORBA/Pool_Per_Endpoint.h \
- $(TAO_ROOT)/tao/RTCORBA/rtcorba_export.h \
- $(ACE_ROOT)/ace/Task.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/Thread_Manager.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Array_Base.h \
- $(ACE_ROOT)/ace/Array_Base.inl \
- $(ACE_ROOT)/ace/Array_Base.cpp \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.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/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(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/Test_and_Set.h \
- $(ACE_ROOT)/ace/Test_and_Set.i \
- $(ACE_ROOT)/ace/Test_and_Set.cpp \
- $(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 \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Synch_Options.i \
- $(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_T.h \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \
- $(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/Process_Mutex.h \
- $(ACE_ROOT)/ace/Process_Mutex.inl \
- $(ACE_ROOT)/ace/WFMO_Reactor.i \
- $(ACE_ROOT)/ace/Strategies.i \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Task_T.cpp \
- $(ACE_ROOT)/ace/Module.h \
- $(ACE_ROOT)/ace/Module.i \
- $(ACE_ROOT)/ace/Module.cpp \
- $(ACE_ROOT)/ace/Stream_Modules.h \
- $(ACE_ROOT)/ace/Stream_Modules.cpp \
- $(TAO_ROOT)/tao/RTCORBA/Pool_Per_Endpoint.i \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/Sched_Params.h \
- $(ACE_ROOT)/ace/Sched_Params.i
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/TAO/performance-tests/Single_Threaded_Latency/Roundtrip.cpp b/TAO/performance-tests/Single_Threaded_Latency/Roundtrip.cpp
deleted file mode 100644
index 72f83576b44..00000000000
--- a/TAO/performance-tests/Single_Threaded_Latency/Roundtrip.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-//
-// $Id$
-//
-#include "Roundtrip.h"
-
-ACE_RCSID(Single_Threaded_Latency, Roundtrip, "$Id$")
-
-Roundtrip::Roundtrip (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-Test::Timestamp
-Roundtrip::test_method (Test::Timestamp send_time
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return send_time;
-}
-
-void
-Roundtrip::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/performance-tests/Single_Threaded_Latency/Roundtrip.h b/TAO/performance-tests/Single_Threaded_Latency/Roundtrip.h
deleted file mode 100644
index 6474b130a24..00000000000
--- a/TAO/performance-tests/Single_Threaded_Latency/Roundtrip.h
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef ROUNDTRIP_H
-#define ROUNDTRIP_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-#if defined (_MSC_VER)
-# if (_MSC_VER >= 1200)
-# pragma warning(push)
-# endif /* _MSC_VER >= 1200 */
-# pragma warning (disable:4250)
-#endif /* _MSC_VER */
-
-/// Implement the Test::Roundtrip interface
-class Roundtrip
- : public virtual POA_Test::Roundtrip
- , public virtual PortableServer::RefCountServantBase
-{
-public:
- /// Constructor
- Roundtrip (CORBA::ORB_ptr orb);
-
- // = The skeleton methods
- virtual Test::Timestamp test_method (Test::Timestamp send_time
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* ROUNDTRIP_H */
diff --git a/TAO/performance-tests/Single_Threaded_Latency/client.cpp b/TAO/performance-tests/Single_Threaded_Latency/client.cpp
deleted file mode 100644
index 2d841b9909d..00000000000
--- a/TAO/performance-tests/Single_Threaded_Latency/client.cpp
+++ /dev/null
@@ -1,164 +0,0 @@
-// $Id$
-
-#include "TestC.h"
-#include "ace/Get_Opt.h"
-#include "ace/High_Res_Timer.h"
-#include "ace/Sched_Params.h"
-#include "ace/Stats.h"
-#include "ace/Sample_History.h"
-
-#include "tao/Strategies/advanced_resource.h"
-
-ACE_RCSID(Single_Threaded_Latency, client, "$Id$")
-
-const char *ior = "file://test.ior";
-int niterations = 100;
-int do_dump_history = 0;
-int do_shutdown = 1;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "hxk:i:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'h':
- do_dump_history = 1;
- break;
-
- case 'x':
- do_shutdown = 0;
- break;
-
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'i':
- niterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k "
- "-i "
- "-x (disable shutdown) "
- "-h (dump history) "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- int priority =
- (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO)
- + ACE_Sched_Params::priority_max (ACE_SCHED_FIFO)) / 2;
- // Enable FIFO scheduling, e.g., RT scheduling class on Solaris.
-
- if (ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO,
- priority,
- ACE_SCOPE_PROCESS)) != 0)
- {
- if (ACE_OS::last_error () == EPERM)
- {
- ACE_DEBUG ((LM_DEBUG,
- "client (%P|%t): user is not superuser, "
- "test runs in time-shared class\n"));
- }
- else
- ACE_ERROR ((LM_ERROR,
- "client (%P|%t): sched_params failed\n"));
- }
-
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Roundtrip_var roundtrip =
- Test::Roundtrip::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (roundtrip.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Nil Test::Roundtrip reference <%s>\n",
- ior),
- 1);
- }
-
- for (int j = 0; j < 100; ++j)
- {
- ACE_hrtime_t start = 0;
- (void) roundtrip->test_method (start ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- ACE_Sample_History history (niterations);
-
- ACE_hrtime_t test_start = ACE_OS::gethrtime ();
- for (int i = 0; i < niterations; ++i)
- {
- ACE_hrtime_t start = ACE_OS::gethrtime ();
-
- (void) roundtrip->test_method (start ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_hrtime_t now = ACE_OS::gethrtime ();
- history.sample (now - start);
- }
-
- ACE_hrtime_t test_end = ACE_OS::gethrtime ();
-
- ACE_DEBUG ((LM_DEBUG, "test finished\n"));
-
- ACE_DEBUG ((LM_DEBUG, "High resolution timer calibration...."));
- ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor ();
- ACE_DEBUG ((LM_DEBUG, "done\n"));
-
- if (do_dump_history)
- {
- history.dump_samples ("HISTORY", gsf);
- }
-
- ACE_Basic_Stats stats;
- history.collect_basic_stats (stats);
- stats.dump_results ("Total", gsf);
-
- ACE_Throughput_Stats::dump_throughput ("Total", gsf,
- test_end - test_start,
- stats.samples_count ());
-
- if (do_shutdown)
- {
- roundtrip->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/performance-tests/Single_Threaded_Latency/server.cpp b/TAO/performance-tests/Single_Threaded_Latency/server.cpp
deleted file mode 100644
index e96f0ff595a..00000000000
--- a/TAO/performance-tests/Single_Threaded_Latency/server.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-// $Id$
-
-#include "Roundtrip.h"
-#include "ace/Get_Opt.h"
-#include "ace/Sched_Params.h"
-
-#include "tao/Strategies/advanced_resource.h"
-
-ACE_RCSID(Single_Threaded_Latency, server, "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- int priority =
- (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO)
- + ACE_Sched_Params::priority_max (ACE_SCHED_FIFO)) / 2;
- priority = ACE_Sched_Params::next_priority (ACE_SCHED_FIFO,
- priority);
- // Enable FIFO scheduling, e.g., RT scheduling class on Solaris.
-
- if (ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO,
- priority,
- ACE_SCOPE_PROCESS)) != 0)
- {
- if (ACE_OS::last_error () == EPERM)
- {
- ACE_DEBUG ((LM_DEBUG,
- "server (%P|%t): user is not superuser, "
- "test runs in time-shared class\n"));
- }
- else
- ACE_ERROR ((LM_ERROR,
- "server (%P|%t): sched_params failed\n"));
- }
-
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Roundtrip *roundtrip_impl;
- ACE_NEW_RETURN (roundtrip_impl,
- Roundtrip (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(roundtrip_impl);
-
- Test::Roundtrip_var roundtrip =
- roundtrip_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (roundtrip.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/performance-tests/Thread_Per_Connection_Latency/Client_Task.cpp b/TAO/performance-tests/Thread_Per_Connection_Latency/Client_Task.cpp
deleted file mode 100644
index 09d15331436..00000000000
--- a/TAO/performance-tests/Thread_Per_Connection_Latency/Client_Task.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-//
-// $Id$
-//
-#include "Client_Task.h"
-
-ACE_RCSID(Thread_Per_Connection_Latency, Client_Task, "$Id$")
-
-Client_Task::Client_Task (Test::Roundtrip_ptr roundtrip,
- int niterations)
- : roundtrip_ (Test::Roundtrip::_duplicate (roundtrip))
- , niterations_ (niterations)
-{
-}
-
-int
-Client_Task::svc (void)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- this->validate_connection (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- for (int i = 0; i != this->niterations_; ++i)
- {
- CORBA::ULongLong start = ACE_OS::gethrtime ();
-
- (void) this->roundtrip_->test_method (start ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_hrtime_t now = ACE_OS::gethrtime ();
- this->latency_.sample (now - start);
- }
- }
- ACE_CATCHANY
- {
- return 0;
- }
- ACE_ENDTRY;
- return 0;
-}
-
-void
-Client_Task::accumulate_and_dump (ACE_Basic_Stats &totals,
- const char *msg,
- ACE_UINT32 gsf)
-{
- totals.accumulate (this->latency_);
- this->latency_.dump_results (msg, gsf);
-}
-
-void
-Client_Task::validate_connection (ACE_ENV_SINGLE_ARG_DECL)
-{
- CORBA::ULongLong dummy = 0;
- for (int i = 0; i != 100; ++i)
- {
- ACE_TRY
- {
- (void) this->roundtrip_->test_method (dummy ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY {} ACE_ENDTRY;
- }
-}
diff --git a/TAO/performance-tests/Thread_Per_Connection_Latency/Client_Task.h b/TAO/performance-tests/Thread_Per_Connection_Latency/Client_Task.h
deleted file mode 100644
index 476ee8bd23c..00000000000
--- a/TAO/performance-tests/Thread_Per_Connection_Latency/Client_Task.h
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef CLIENT_TASK_H
-#define CLIENT_TASK_H
-#include /**/ "ace/pre.h"
-
-#include "TestC.h"
-#include "ace/Task.h"
-#include "ace/Basic_Stats.h"
-
-/// Implement the Test::Client_Task interface
-class Client_Task : public ACE_Task_Base
-{
-public:
- /// Constructor
- Client_Task (Test::Roundtrip_ptr roundtrip,
- int niterations);
-
- /// Add this thread results to the global numbers and print the
- /// per-thread results.
- void accumulate_and_dump (ACE_Basic_Stats &totals,
- const char *msg,
- ACE_UINT32 gsf);
-
- /// The service method
- virtual int svc (void);
-
-private:
- /// Make sure that the current thread has a connection available.
- void validate_connection (ACE_ENV_SINGLE_ARG_DECL);
-
-private:
- /// The object reference used for this test
- Test::Roundtrip_var roundtrip_;
-
- /// The number of iterations
- int niterations_;
-
- /// Keep track of the latency (minimum, average, maximum and jitter)
- ACE_Basic_Stats latency_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* CLIENT_TASK_H */
diff --git a/TAO/performance-tests/Thread_Per_Connection_Latency/Roundtrip.cpp b/TAO/performance-tests/Thread_Per_Connection_Latency/Roundtrip.cpp
deleted file mode 100644
index 2bc67948fd0..00000000000
--- a/TAO/performance-tests/Thread_Per_Connection_Latency/Roundtrip.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-//
-// $Id$
-//
-#include "Roundtrip.h"
-
-ACE_RCSID(Single_Per_Connection_Latency, Roundtrip, "$Id$")
-
-Roundtrip::Roundtrip (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-Test::Timestamp
-Roundtrip::test_method (Test::Timestamp send_time
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return send_time;
-}
-
-void
-Roundtrip::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/performance-tests/Thread_Per_Connection_Latency/Roundtrip.h b/TAO/performance-tests/Thread_Per_Connection_Latency/Roundtrip.h
deleted file mode 100644
index 6474b130a24..00000000000
--- a/TAO/performance-tests/Thread_Per_Connection_Latency/Roundtrip.h
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef ROUNDTRIP_H
-#define ROUNDTRIP_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-#if defined (_MSC_VER)
-# if (_MSC_VER >= 1200)
-# pragma warning(push)
-# endif /* _MSC_VER >= 1200 */
-# pragma warning (disable:4250)
-#endif /* _MSC_VER */
-
-/// Implement the Test::Roundtrip interface
-class Roundtrip
- : public virtual POA_Test::Roundtrip
- , public virtual PortableServer::RefCountServantBase
-{
-public:
- /// Constructor
- Roundtrip (CORBA::ORB_ptr orb);
-
- // = The skeleton methods
- virtual Test::Timestamp test_method (Test::Timestamp send_time
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* ROUNDTRIP_H */
diff --git a/TAO/performance-tests/Thread_Per_Connection_Latency/client.cpp b/TAO/performance-tests/Thread_Per_Connection_Latency/client.cpp
deleted file mode 100644
index 69aac2b4ca5..00000000000
--- a/TAO/performance-tests/Thread_Per_Connection_Latency/client.cpp
+++ /dev/null
@@ -1,149 +0,0 @@
-// $Id$
-
-#include "Client_Task.h"
-#include "ace/Get_Opt.h"
-#include "ace/High_Res_Timer.h"
-#include "ace/Sched_Params.h"
-#include "ace/Stats.h"
-
-#include "tao/Strategies/advanced_resource.h"
-
-ACE_RCSID(Thread_Per_Connection_Latency, client, "$Id$")
-
-const char *ior = "file://test.ior";
-int niterations = 1000;
-int do_shutdown = 1;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "xk:i:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'x':
- do_shutdown = 0;
- break;
-
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'i':
- niterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k "
- "-i "
- "-x (disable shutdown) "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- int priority =
- (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO)
- + ACE_Sched_Params::priority_max (ACE_SCHED_FIFO)) / 2;
- // Enable FIFO scheduling, e.g., RT scheduling class on Solaris.
-
- if (ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO,
- priority,
- ACE_SCOPE_PROCESS)) != 0)
- {
- if (ACE_OS::last_error () == EPERM)
- {
- ACE_DEBUG ((LM_DEBUG,
- "client (%P|%t): user is not superuser, "
- "test runs in time-shared class\n"));
- }
- else
- ACE_ERROR ((LM_ERROR,
- "client (%P|%t): sched_params failed\n"));
- }
-
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Roundtrip_var roundtrip =
- Test::Roundtrip::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (roundtrip.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Nil Test::Roundtrip reference <%s>\n",
- ior),
- 1);
- }
-
- ACE_DEBUG ((LM_DEBUG, "Starting threads\n"));
-
- Client_Task task0(roundtrip.in (), niterations);
- Client_Task task1(roundtrip.in (), niterations);
- Client_Task task2(roundtrip.in (), niterations);
- Client_Task task3(roundtrip.in (), niterations);
-
- ACE_hrtime_t test_start = ACE_OS::gethrtime ();
- task0.activate(THR_NEW_LWP | THR_JOINABLE);
- task1.activate(THR_NEW_LWP | THR_JOINABLE);
- task2.activate(THR_NEW_LWP | THR_JOINABLE);
- task3.activate(THR_NEW_LWP | THR_JOINABLE);
-
- task0.thr_mgr()->wait ();
- ACE_hrtime_t test_end = ACE_OS::gethrtime ();
-
- ACE_DEBUG ((LM_DEBUG, "Threads finished\n"));
-
- ACE_DEBUG ((LM_DEBUG, "High resolution timer calibration...."));
- ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor ();
- ACE_DEBUG ((LM_DEBUG, "done\n"));
-
- ACE_Basic_Stats totals;
- task0.accumulate_and_dump (totals, "Task[0]", gsf);
- task1.accumulate_and_dump (totals, "Task[1]", gsf);
- task2.accumulate_and_dump (totals, "Task[2]", gsf);
- task3.accumulate_and_dump (totals, "Task[3]", gsf);
-
- totals.dump_results ("Total", gsf);
-
- ACE_Throughput_Stats::dump_throughput ("Total", gsf,
- test_end - test_start,
- totals.samples_count ());
-
- if (do_shutdown)
- {
- roundtrip->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/performance-tests/Thread_Per_Connection_Latency/server.cpp b/TAO/performance-tests/Thread_Per_Connection_Latency/server.cpp
deleted file mode 100644
index 004ce70cebf..00000000000
--- a/TAO/performance-tests/Thread_Per_Connection_Latency/server.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-// $Id$
-
-#include "Roundtrip.h"
-#include "ace/Get_Opt.h"
-#include "ace/Sched_Params.h"
-
-#include "tao/Strategies/advanced_resource.h"
-
-ACE_RCSID(Thread_Per_Connection_Latency, server, "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- int priority =
- (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO)
- + ACE_Sched_Params::priority_max (ACE_SCHED_FIFO)) / 2;
- priority = ACE_Sched_Params::next_priority (ACE_SCHED_FIFO,
- priority);
- // Enable FIFO scheduling, e.g., RT scheduling class on Solaris.
-
- if (ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO,
- priority,
- ACE_SCOPE_PROCESS)) != 0)
- {
- if (ACE_OS::last_error () == EPERM)
- {
- ACE_DEBUG ((LM_DEBUG,
- "server (%P|%t): user is not superuser, "
- "test runs in time-shared class\n"));
- }
- else
- ACE_ERROR ((LM_ERROR,
- "server (%P|%t): sched_params failed\n"));
- }
-
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Roundtrip *roundtrip_impl;
- ACE_NEW_RETURN (roundtrip_impl,
- Roundtrip (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(roundtrip_impl);
-
- Test::Roundtrip_var roundtrip =
- roundtrip_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (roundtrip.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/performance-tests/Thread_Pool_Latency/Client_Task.cpp b/TAO/performance-tests/Thread_Pool_Latency/Client_Task.cpp
deleted file mode 100644
index efb544633b2..00000000000
--- a/TAO/performance-tests/Thread_Pool_Latency/Client_Task.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-//
-// $Id$
-//
-#include "Client_Task.h"
-
-ACE_RCSID(Thread_Pool_Latency, Client_Task, "$Id$")
-
-Client_Task::Client_Task (Test::Roundtrip_ptr roundtrip,
- int niterations)
- : roundtrip_ (Test::Roundtrip::_duplicate (roundtrip))
- , niterations_ (niterations)
-{
-}
-
-int
-Client_Task::svc (void)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- this->validate_connection (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- for (int i = 0; i != this->niterations_; ++i)
- {
- CORBA::ULongLong start = ACE_OS::gethrtime ();
-
- (void) this->roundtrip_->test_method (start ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_hrtime_t now = ACE_OS::gethrtime ();
- this->latency_.sample (now - start);
- }
- }
- ACE_CATCHANY
- {
- return 0;
- }
- ACE_ENDTRY;
- return 0;
-}
-
-void
-Client_Task::accumulate_and_dump (ACE_Basic_Stats &totals,
- const char *msg,
- ACE_UINT32 gsf)
-{
- totals.accumulate (this->latency_);
- this->latency_.dump_results (msg, gsf);
-}
-
-void
-Client_Task::validate_connection (ACE_ENV_SINGLE_ARG_DECL)
-{
- CORBA::ULongLong dummy = 0;
- for (int i = 0; i != 100; ++i)
- {
- ACE_TRY
- {
- (void) this->roundtrip_->test_method (dummy ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY {} ACE_ENDTRY;
- }
-}
diff --git a/TAO/performance-tests/Thread_Pool_Latency/Client_Task.h b/TAO/performance-tests/Thread_Pool_Latency/Client_Task.h
deleted file mode 100644
index 476ee8bd23c..00000000000
--- a/TAO/performance-tests/Thread_Pool_Latency/Client_Task.h
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef CLIENT_TASK_H
-#define CLIENT_TASK_H
-#include /**/ "ace/pre.h"
-
-#include "TestC.h"
-#include "ace/Task.h"
-#include "ace/Basic_Stats.h"
-
-/// Implement the Test::Client_Task interface
-class Client_Task : public ACE_Task_Base
-{
-public:
- /// Constructor
- Client_Task (Test::Roundtrip_ptr roundtrip,
- int niterations);
-
- /// Add this thread results to the global numbers and print the
- /// per-thread results.
- void accumulate_and_dump (ACE_Basic_Stats &totals,
- const char *msg,
- ACE_UINT32 gsf);
-
- /// The service method
- virtual int svc (void);
-
-private:
- /// Make sure that the current thread has a connection available.
- void validate_connection (ACE_ENV_SINGLE_ARG_DECL);
-
-private:
- /// The object reference used for this test
- Test::Roundtrip_var roundtrip_;
-
- /// The number of iterations
- int niterations_;
-
- /// Keep track of the latency (minimum, average, maximum and jitter)
- ACE_Basic_Stats latency_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* CLIENT_TASK_H */
diff --git a/TAO/performance-tests/Thread_Pool_Latency/Roundtrip.cpp b/TAO/performance-tests/Thread_Pool_Latency/Roundtrip.cpp
deleted file mode 100644
index 6028512202c..00000000000
--- a/TAO/performance-tests/Thread_Pool_Latency/Roundtrip.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-//
-// $Id$
-//
-#include "Roundtrip.h"
-
-ACE_RCSID(Thread_Pool_Latency, Roundtrip, "$Id$")
-
-Roundtrip::Roundtrip (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-Test::Timestamp
-Roundtrip::test_method (Test::Timestamp send_time
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return send_time;
-}
-
-void
-Roundtrip::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/performance-tests/Thread_Pool_Latency/Roundtrip.h b/TAO/performance-tests/Thread_Pool_Latency/Roundtrip.h
deleted file mode 100644
index 6474b130a24..00000000000
--- a/TAO/performance-tests/Thread_Pool_Latency/Roundtrip.h
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef ROUNDTRIP_H
-#define ROUNDTRIP_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-#if defined (_MSC_VER)
-# if (_MSC_VER >= 1200)
-# pragma warning(push)
-# endif /* _MSC_VER >= 1200 */
-# pragma warning (disable:4250)
-#endif /* _MSC_VER */
-
-/// Implement the Test::Roundtrip interface
-class Roundtrip
- : public virtual POA_Test::Roundtrip
- , public virtual PortableServer::RefCountServantBase
-{
-public:
- /// Constructor
- Roundtrip (CORBA::ORB_ptr orb);
-
- // = The skeleton methods
- virtual Test::Timestamp test_method (Test::Timestamp send_time
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* ROUNDTRIP_H */
diff --git a/TAO/performance-tests/Thread_Pool_Latency/Worker_Thread.cpp b/TAO/performance-tests/Thread_Pool_Latency/Worker_Thread.cpp
deleted file mode 100644
index e485bb2b843..00000000000
--- a/TAO/performance-tests/Thread_Pool_Latency/Worker_Thread.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-//
-// $Id$
-//
-#include "Worker_Thread.h"
-
-ACE_RCSID(Thread_Pool_Latency, Worker_Thread, "$Id$")
-
-Worker_Thread::Worker_Thread (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Worker_Thread::svc (void)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- this->orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY {} ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/performance-tests/Thread_Pool_Latency/client.cpp b/TAO/performance-tests/Thread_Pool_Latency/client.cpp
deleted file mode 100644
index 643f541a53f..00000000000
--- a/TAO/performance-tests/Thread_Pool_Latency/client.cpp
+++ /dev/null
@@ -1,149 +0,0 @@
-// $Id$
-
-#include "Client_Task.h"
-#include "ace/Get_Opt.h"
-#include "ace/High_Res_Timer.h"
-#include "ace/Sched_Params.h"
-#include "ace/Stats.h"
-
-#include "tao/Strategies/advanced_resource.h"
-
-ACE_RCSID(Thread_Pool_Latency, client, "$Id$")
-
-const char *ior = "file://test.ior";
-int niterations = 1000;
-int do_shutdown = 1;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "xk:i:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'x':
- do_shutdown = 0;
- break;
-
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'i':
- niterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k "
- "-i "
- "-x (disable shutdown) "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- int priority =
- (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO)
- + ACE_Sched_Params::priority_max (ACE_SCHED_FIFO)) / 2;
- // Enable FIFO scheduling, e.g., RT scheduling class on Solaris.
-
- if (ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO,
- priority,
- ACE_SCOPE_PROCESS)) != 0)
- {
- if (ACE_OS::last_error () == EPERM)
- {
- ACE_DEBUG ((LM_DEBUG,
- "client (%P|%t): user is not superuser, "
- "test runs in time-shared class\n"));
- }
- else
- ACE_ERROR ((LM_ERROR,
- "client (%P|%t): sched_params failed\n"));
- }
-
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Roundtrip_var roundtrip =
- Test::Roundtrip::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (roundtrip.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Nil Test::Roundtrip reference <%s>\n",
- ior),
- 1);
- }
-
- ACE_DEBUG ((LM_DEBUG, "Starting threads\n"));
-
- Client_Task task0(roundtrip.in (), niterations);
- Client_Task task1(roundtrip.in (), niterations);
- Client_Task task2(roundtrip.in (), niterations);
- Client_Task task3(roundtrip.in (), niterations);
-
- ACE_hrtime_t test_start = ACE_OS::gethrtime ();
- task0.activate(THR_NEW_LWP | THR_JOINABLE);
- task1.activate(THR_NEW_LWP | THR_JOINABLE);
- task2.activate(THR_NEW_LWP | THR_JOINABLE);
- task3.activate(THR_NEW_LWP | THR_JOINABLE);
-
- task0.thr_mgr()->wait ();
- ACE_hrtime_t test_end = ACE_OS::gethrtime ();
-
- ACE_DEBUG ((LM_DEBUG, "Threads finished\n"));
-
- ACE_DEBUG ((LM_DEBUG, "High resolution timer calibration...."));
- ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor ();
- ACE_DEBUG ((LM_DEBUG, "done\n"));
-
- ACE_Basic_Stats totals;
- task0.accumulate_and_dump (totals, "Task[0]", gsf);
- task1.accumulate_and_dump (totals, "Task[1]", gsf);
- task2.accumulate_and_dump (totals, "Task[2]", gsf);
- task3.accumulate_and_dump (totals, "Task[3]", gsf);
-
- totals.dump_results ("Total", gsf);
-
- ACE_Throughput_Stats::dump_throughput ("Total", gsf,
- test_end - test_start,
- totals.samples_count ());
-
- if (do_shutdown)
- {
- roundtrip->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/performance-tests/Thread_Pool_Latency/server.cpp b/TAO/performance-tests/Thread_Pool_Latency/server.cpp
deleted file mode 100644
index bcacaf713c2..00000000000
--- a/TAO/performance-tests/Thread_Pool_Latency/server.cpp
+++ /dev/null
@@ -1,139 +0,0 @@
-// $Id$
-
-#include "Roundtrip.h"
-#include "Worker_Thread.h"
-#include "ace/Get_Opt.h"
-#include "ace/Sched_Params.h"
-
-#include "tao/Strategies/advanced_resource.h"
-
-ACE_RCSID(Thread_Pool_Latency, server, "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- int priority =
- (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO)
- + ACE_Sched_Params::priority_max (ACE_SCHED_FIFO)) / 2;
- priority = ACE_Sched_Params::next_priority (ACE_SCHED_FIFO,
- priority);
- // Enable FIFO scheduling, e.g., RT scheduling class on Solaris.
-
- if (ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO,
- priority,
- ACE_SCOPE_PROCESS)) != 0)
- {
- if (ACE_OS::last_error () == EPERM)
- {
- ACE_DEBUG ((LM_DEBUG,
- "server (%P|%t): user is not superuser, "
- "test runs in time-shared class\n"));
- }
- else
- ACE_ERROR ((LM_ERROR,
- "server (%P|%t): sched_params failed\n"));
- }
-
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Roundtrip *roundtrip_impl;
- ACE_NEW_RETURN (roundtrip_impl,
- Roundtrip (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(roundtrip_impl);
-
- Test::Roundtrip_var roundtrip =
- roundtrip_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (roundtrip.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Worker_Thread worker (orb.in ());
-
- worker.activate (THR_NEW_LWP | THR_JOINABLE, 4, 1);
- worker.thr_mgr ()->wait ();
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tao/AnyTypeCode/PI_ForwardA.h b/TAO/tao/AnyTypeCode/PI_ForwardA.h
index f99092e4ec1..7286439cc39 100644
--- a/TAO/tao/AnyTypeCode/PI_ForwardA.h
+++ b/TAO/tao/AnyTypeCode/PI_ForwardA.h
@@ -121,8 +121,9 @@ namespace PortableInterceptor
// TAO_IDL - Generated from
// be\be_visitor_typedef/typedef_ch.cpp:379
- typedef CORBA::Long AdapterManagerId;
- typedef CORBA::Long_out AdapterManagerId_out;
+ typedef char * AdapterManagerId;
+ typedef CORBA::String_var AdapterManagerId_var;
+ typedef CORBA::String_out AdapterManagerId_out;
// TAO_IDL - Generated from
// be\be_visitor_typecode/typecode_decl.cpp:44
diff --git a/TAO/tao/AnyTypeCode/skip.cpp b/TAO/tao/AnyTypeCode/skip.cpp
index a508b7c8f89..81433f202fb 100644
--- a/TAO/tao/AnyTypeCode/skip.cpp
+++ b/TAO/tao/AnyTypeCode/skip.cpp
@@ -374,7 +374,7 @@ TAO_Marshal_Union::skip (CORBA::TypeCode_ptr tc,
CORBA::Char char_v = CORBA::Char();
CORBA::WChar wchar_v = CORBA::WChar();
CORBA::Boolean boolean_v = false;
-
+
switch (kind)
{
case CORBA::tk_short:
@@ -957,9 +957,9 @@ TAO_Marshal_Value::skip (CORBA::TypeCode_ptr tc,
{
this->nested_processing_ = 1;
- CORBA::ULong value_tag;
+ CORBA::Long value_tag;
- if (!stream->read_ulong (value_tag))
+ if (!stream->read_long (value_tag))
{
return TAO::TRAVERSE_STOP;
}
diff --git a/TAO/tao/Blocked_Connect_Strategy.cpp b/TAO/tao/Blocked_Connect_Strategy.cpp
index 9317a128679..e5ee355a042 100644
--- a/TAO/tao/Blocked_Connect_Strategy.cpp
+++ b/TAO/tao/Blocked_Connect_Strategy.cpp
@@ -38,21 +38,13 @@ TAO_Blocked_Connect_Strategy::synch_options (ACE_Time_Value *timeout,
}
}
-
int
-TAO_Blocked_Connect_Strategy::wait (TAO_Connection_Handler *,
+TAO_Blocked_Connect_Strategy::wait_i (TAO_LF_Event *,
+ TAO_Transport *,
ACE_Time_Value * )
{
// We cannot wait for connection completion
return -1;
}
-int
-TAO_Blocked_Connect_Strategy::wait (TAO_Transport *,
- ACE_Time_Value *)
-{
- // We cannot wait for connection completion
- return -1;
-}
-
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/Blocked_Connect_Strategy.h b/TAO/tao/Blocked_Connect_Strategy.h
index 9c547ebfc23..9eea4edaebc 100644
--- a/TAO/tao/Blocked_Connect_Strategy.h
+++ b/TAO/tao/Blocked_Connect_Strategy.h
@@ -45,11 +45,11 @@ public:
virtual void synch_options (ACE_Time_Value *val,
ACE_Synch_Options &opt);
- virtual int wait (TAO_Connection_Handler *ch,
+protected:
+ virtual int wait_i (TAO_LF_Event *ev,
+ TAO_Transport *t,
ACE_Time_Value *val);
- virtual int wait (TAO_Transport *t,
- ACE_Time_Value *val);
};
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/Bounded_Sequence_CDR_T.h b/TAO/tao/Bounded_Sequence_CDR_T.h
index 7213b9547f6..c0cbbdb5a01 100644
--- a/TAO/tao/Bounded_Sequence_CDR_T.h
+++ b/TAO/tao/Bounded_Sequence_CDR_T.h
@@ -12,6 +12,7 @@
*/
#include "tao/orbconf.h"
+#include "tao/SystemException.h"
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -328,7 +329,9 @@ namespace TAO {
namespace TAO {
template
bool marshal_sequence(stream & strm, const TAO::bounded_value_sequence & source) {
- const ::CORBA::ULong length = source.length ();
+ if (0 == &source)
+ ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false);
+ ::CORBA::ULong const length = source.length ();
if (!(strm << length)) {
return false;
}
@@ -337,7 +340,9 @@ namespace TAO {
template
bool marshal_sequence(stream & strm, const TAO::bounded_value_sequence & source) {
- const ::CORBA::ULong length = source.length ();
+ if (0 == &source)
+ ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false);
+ ::CORBA::ULong const length = source.length ();
if (!(strm << length)) {
return false;
}
@@ -346,6 +351,8 @@ namespace TAO {
template
bool marshal_sequence(stream & strm, const TAO::bounded_value_sequence & source) {
+ if (0 == &source)
+ ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false);
::CORBA::ULong const length = source.length ();
if (!(strm << length)) {
return false;
@@ -355,6 +362,8 @@ namespace TAO {
template
bool marshal_sequence(stream & strm, const TAO::bounded_value_sequence & source) {
+ if (0 == &source)
+ ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false);
::CORBA::ULong const length = source.length ();
if (!(strm << length)) {
return false;
@@ -364,6 +373,8 @@ namespace TAO {
template
bool marshal_sequence(stream & strm, const TAO::bounded_value_sequence & source) {
+ if (0 == &source)
+ ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false);
::CORBA::ULong const length = source.length ();
if (!(strm << length)) {
return false;
@@ -373,6 +384,8 @@ namespace TAO {
template
bool marshal_sequence(stream & strm, const TAO::bounded_value_sequence & source) {
+ if (0 == &source)
+ ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false);
::CORBA::ULong const length = source.length ();
if (!(strm << length)) {
return false;
@@ -383,6 +396,8 @@ namespace TAO {
# if defined (ACE_HAS_WCHAR) || defined (ACE_HAS_XPG4_MULTIBYTE_CHAR)
template
bool marshal_sequence(stream & strm, const TAO::bounded_value_sequence & source) {
+ if (0 == &source)
+ ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false);
::CORBA::ULong const length = source.length ();
if (!(strm << length)) {
return false;
@@ -393,6 +408,8 @@ namespace TAO {
template
bool marshal_sequence(stream & strm, const TAO::bounded_value_sequence & source) {
+ if (0 == &source)
+ ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false);
::CORBA::ULong const length = source.length ();
if (!(strm << length)) {
return false;
@@ -402,6 +419,8 @@ namespace TAO {
template
bool marshal_sequence(stream & strm, const TAO::bounded_value_sequence & source) {
+ if (0 == &source)
+ ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false);
::CORBA::ULong const length = source.length ();
if (!(strm << length)) {
return false;
@@ -411,6 +430,8 @@ namespace TAO {
template
bool marshal_sequence(stream & strm, const TAO::bounded_value_sequence & source) {
+ if (0 == &source)
+ ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false);
::CORBA::ULong const length = source.length ();
if (!(strm << length)) {
return false;
@@ -420,6 +441,8 @@ namespace TAO {
template
bool marshal_sequence(stream & strm, const TAO::bounded_value_sequence & source) {
+ if (0 == &source)
+ ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false);
::CORBA::ULong const length = source.length ();
if (!(strm << length)) {
return false;
@@ -429,6 +452,8 @@ namespace TAO {
template
bool marshal_sequence(stream & strm, const TAO::bounded_value_sequence & source) {
+ if (0 == &source)
+ ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false);
::CORBA::ULong const length = source.length ();
if (!(strm << length)) {
return false;
@@ -438,6 +463,8 @@ namespace TAO {
template
bool marshal_sequence(stream & strm, const TAO::bounded_value_sequence & source) {
+ if (0 == &source)
+ ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false);
::CORBA::ULong const length = source.length ();
if (!(strm << length)) {
return false;
@@ -452,6 +479,8 @@ namespace TAO {
template
bool marshal_sequence(stream & strm, const TAO::details::bounded_basic_string_sequence & source) {
+ if (0 == &source)
+ ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false);
::CORBA::ULong const length = source.length ();
if (!(strm << length)) {
return false;
@@ -467,6 +496,8 @@ namespace TAO {
template
bool marshal_sequence(stream & strm, const TAO::bounded_object_reference_sequence & source) {
typedef typename TAO::bounded_object_reference_sequence::object_type object_type;
+ if (0 == &source)
+ ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false);
::CORBA::ULong const length = source.length ();
if (!(strm << length)) {
return false;
diff --git a/TAO/tao/CORBALOC_Parser.cpp b/TAO/tao/CORBALOC_Parser.cpp
index 2dda9784489..92369055416 100644
--- a/TAO/tao/CORBALOC_Parser.cpp
+++ b/TAO/tao/CORBALOC_Parser.cpp
@@ -233,7 +233,8 @@ TAO_CORBALOC_Parser::parse_string (const char * ior,
const char * str = full_ep.c_str();
endpoints[i].profile_->parse_string (str ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (CORBA::Object::_nil ());
- if (mprofile.give_profile(endpoints[i].profile_) != -1)
+ int share = orb->orb_core()->orb_params()->shared_profile();
+ if (mprofile.give_profile(endpoints[i].profile_, share) != -1)
endpoints[i].profile_ = 0;
else
{
diff --git a/TAO/tao/CSD_Framework/CSD_Default_Servant_Dispatcher.cpp b/TAO/tao/CSD_Framework/CSD_Default_Servant_Dispatcher.cpp
index 7fa1a03f257..72b8028cd94 100644
--- a/TAO/tao/CSD_Framework/CSD_Default_Servant_Dispatcher.cpp
+++ b/TAO/tao/CSD_Framework/CSD_Default_Servant_Dispatcher.cpp
@@ -19,14 +19,14 @@ TAO_CSD_Default_Servant_Dispatcher::~TAO_CSD_Default_Servant_Dispatcher (void)
TAO_Root_POA *
TAO_CSD_Default_Servant_Dispatcher::create_Root_POA (const ACE_CString &name,
- TAO_POA_Manager &poa_manager,
+ PortableServer::POAManager_ptr poa_manager,
const TAO_POA_Policy_Set &policies,
ACE_Lock &lock,
TAO_SYNCH_MUTEX &thread_lock,
TAO_ORB_Core &orb_core,
TAO_Object_Adapter *object_adapter
ACE_ENV_ARG_DECL)
-{
+ {
TAO_CSD_POA *poa = 0;
ACE_NEW_THROW_EX (poa,
diff --git a/TAO/tao/CSD_Framework/CSD_Default_Servant_Dispatcher.h b/TAO/tao/CSD_Framework/CSD_Default_Servant_Dispatcher.h
index ed78621d075..1d041331e99 100644
--- a/TAO/tao/CSD_Framework/CSD_Default_Servant_Dispatcher.h
+++ b/TAO/tao/CSD_Framework/CSD_Default_Servant_Dispatcher.h
@@ -38,7 +38,7 @@ public:
/// Factory method for creating new CSD Root POA.
virtual TAO_Root_POA *create_Root_POA (const ACE_CString &name,
- TAO_POA_Manager &poa_manager,
+ PortableServer::POAManager_ptr poa_manager,
const TAO_POA_Policy_Set &policies,
ACE_Lock &lock,
TAO_SYNCH_MUTEX &thread_lock,
diff --git a/TAO/tao/CSD_Framework/CSD_POA.cpp b/TAO/tao/CSD_Framework/CSD_POA.cpp
index cd63c5d7375..f3cc8e605f5 100644
--- a/TAO/tao/CSD_Framework/CSD_POA.cpp
+++ b/TAO/tao/CSD_Framework/CSD_POA.cpp
@@ -18,7 +18,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL
// Implementation skeleton constructor
TAO_CSD_POA::TAO_CSD_POA (const String &name,
- TAO_POA_Manager &poa_manager,
+ PortableServer::POAManager_ptr poa_manager,
const TAO_POA_Policy_Set &policies,
TAO_Root_POA *parent,
ACE_Lock &lock,
@@ -66,7 +66,7 @@ void TAO_CSD_POA::set_csd_strategy (
TAO_Root_POA *
TAO_CSD_POA::new_POA (const String &name,
- TAO_POA_Manager &poa_manager,
+ PortableServer::POAManager_ptr poa_manager,
const TAO_POA_Policy_Set &policies,
TAO_Root_POA *parent,
ACE_Lock &lock,
diff --git a/TAO/tao/CSD_Framework/CSD_POA.h b/TAO/tao/CSD_Framework/CSD_POA.h
index 7bf2c338e0d..bcbf2e0495f 100644
--- a/TAO/tao/CSD_Framework/CSD_POA.h
+++ b/TAO/tao/CSD_Framework/CSD_POA.h
@@ -40,7 +40,7 @@ class TAO_CSD_FW_Export TAO_CSD_POA
public:
//Constructor
TAO_CSD_POA (const String &name,
- TAO_POA_Manager &poa_manager,
+ PortableServer::POAManager_ptr poa_manager,
const TAO_POA_Policy_Set &policies,
TAO_Root_POA *parent,
ACE_Lock &lock,
@@ -80,7 +80,7 @@ public:
///Method for creating new CSD POA.
TAO_Root_POA * new_POA (const String &name,
- TAO_POA_Manager &poa_manager,
+ PortableServer::POAManager_ptr poa_manager,
const TAO_POA_Policy_Set &policies,
TAO_Root_POA *parent,
ACE_Lock &lock,
diff --git a/TAO/tao/CSD_ThreadPool/CSD_TP_Strategy_Factory.cpp b/TAO/tao/CSD_ThreadPool/CSD_TP_Strategy_Factory.cpp
index 71aa9aa9b8c..9e87aaf73e6 100644
--- a/TAO/tao/CSD_ThreadPool/CSD_TP_Strategy_Factory.cpp
+++ b/TAO/tao/CSD_ThreadPool/CSD_TP_Strategy_Factory.cpp
@@ -86,7 +86,7 @@ TAO::CSD::TP_Strategy_Factory::init (int argc,
arg_remainder.substr (pos + 1, arg.length () - pos);
// Case-insensitive string comparison.
- if (ACE_OS::strcasecmp (off_str.c_str(),
+ if (ACE_OS::strcasecmp (ACE_TEXT_CHAR_TO_TCHAR (off_str.c_str()),
ACE_TEXT("OFF")) == 0)
{
serialize_servants = false;
diff --git a/TAO/tao/Client_Strategy_Factory.cpp b/TAO/tao/Client_Strategy_Factory.cpp
index f459955e2bf..f8cfb870b74 100644
--- a/TAO/tao/Client_Strategy_Factory.cpp
+++ b/TAO/tao/Client_Strategy_Factory.cpp
@@ -40,6 +40,12 @@ TAO_Client_Strategy_Factory::create_wait_strategy (TAO_Transport *)
return 0;
}
+TAO_Client_Strategy_Factory::Connect_Strategy
+TAO_Client_Strategy_Factory::connect_strategy (void) const
+{
+ return TAO_BLOCKED_CONNECT;
+}
+
TAO_Connect_Strategy *
TAO_Client_Strategy_Factory::create_connect_strategy (TAO_ORB_Core *)
{
diff --git a/TAO/tao/Client_Strategy_Factory.h b/TAO/tao/Client_Strategy_Factory.h
index 3c63290ad4a..407e580b509 100644
--- a/TAO/tao/Client_Strategy_Factory.h
+++ b/TAO/tao/Client_Strategy_Factory.h
@@ -71,6 +71,15 @@ public:
/// Create the correct client strategy.
virtual TAO_Connect_Strategy *create_connect_strategy (TAO_ORB_Core *);
+ enum Connect_Strategy
+ {
+ TAO_BLOCKED_CONNECT,
+ TAO_REACTIVE_CONNECT,
+ TAO_LEADER_FOLLOWER_CONNECT
+ };
+ /// Return the selected connection strategy option.
+ virtual Connect_Strategy connect_strategy (void) const;
+
/// Does the client allow any form of callback?
virtual int allow_callback (void);
diff --git a/TAO/tao/Codeset/Codeset_Manager_i.cpp b/TAO/tao/Codeset/Codeset_Manager_i.cpp
index ecf3fc73955..3d26ac2e423 100644
--- a/TAO/tao/Codeset/Codeset_Manager_i.cpp
+++ b/TAO/tao/Codeset/Codeset_Manager_i.cpp
@@ -62,7 +62,7 @@ TAO_Codeset_Manager_i::default_char_codeset = TAO_DEFAULT_CHAR_CODESET_ID;
CONV_FRAME::CodeSetId
TAO_Codeset_Manager_i::default_wchar_codeset = TAO_DEFAULT_WCHAR_CODESET_ID;
-TAO_Codeset_Manager_i::TAO_Codeset_Manager_i ()
+TAO_Codeset_Manager_i::TAO_Codeset_Manager_i (void)
: codeset_info_ (),
char_descriptor_ (),
wchar_descriptor_ ()
@@ -72,9 +72,10 @@ TAO_Codeset_Manager_i::TAO_Codeset_Manager_i ()
wchar_descriptor_.ncs(TAO_Codeset_Manager_i::default_wchar_codeset);
wchar_descriptor_.add_translator (ACE_TEXT ("UTF16_BOM_Factory"));
+
}
-TAO_Codeset_Manager_i::~TAO_Codeset_Manager_i ()
+TAO_Codeset_Manager_i::~TAO_Codeset_Manager_i (void)
{
}
diff --git a/TAO/tao/Codeset/Codeset_Manager_i.h b/TAO/tao/Codeset/Codeset_Manager_i.h
index f5ca8491ca3..a9167804b1c 100644
--- a/TAO/tao/Codeset/Codeset_Manager_i.h
+++ b/TAO/tao/Codeset/Codeset_Manager_i.h
@@ -19,15 +19,15 @@
#include "tao/CONV_FRAMEC.h"
#include "tao/Codeset_Manager.h"
+#include "tao/Codeset/codeset_export.h"
+#include "tao/Codeset/Codeset_Descriptor.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "ace/Unbounded_Set.h"
-#include "tao/Codeset/codeset_export.h"
-#include "tao/Codeset/Codeset_Descriptor.h"
-
+#include "ace/Dynamic_Service_Dependency.h"
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -70,8 +70,8 @@ public:
/// to provide a non-compliant default wchar codeset may do so.
static CONV_FRAME::CodeSetId default_wchar_codeset;
- TAO_Codeset_Manager_i ();
- ~TAO_Codeset_Manager_i ();
+ TAO_Codeset_Manager_i (void);
+ ~TAO_Codeset_Manager_i (void);
/// Called by an object of TAO_Acceptor to set NCS and CCS values
/// for Char/Wchar in to the Object Reference.
diff --git a/TAO/tao/Connect_Strategy.cpp b/TAO/tao/Connect_Strategy.cpp
index 2299f775d46..9a79bece571 100644
--- a/TAO/tao/Connect_Strategy.cpp
+++ b/TAO/tao/Connect_Strategy.cpp
@@ -1,4 +1,7 @@
#include "tao/Connect_Strategy.h"
+#include "tao/Transport.h"
+#include "tao/Connection_Handler.h"
+#include "tao/LF_Multi_Event.h"
ACE_RCSID (tao,
Connect_Strategy,
@@ -16,4 +19,41 @@ TAO_Connect_Strategy::~TAO_Connect_Strategy (void)
{
}
+int
+TAO_Connect_Strategy::wait (TAO_Connection_Handler *ch,
+ ACE_Time_Value *max_wait_time)
+{
+ if (ch == 0)
+ return -1;
+
+ return this->wait_i (ch, ch->transport (),max_wait_time);
+}
+
+int
+TAO_Connect_Strategy::wait (TAO_Transport *t,
+ ACE_Time_Value *max_wait_time)
+{
+ // Basically the connection was EINPROGRESS, but before we could
+ // wait for it some other thread detected a failure and cleaned up
+ // the connection handler.
+ if (t == 0)
+ return -1;
+
+ return this->wait_i (t->connection_handler(),t,max_wait_time);
+}
+
+int
+TAO_Connect_Strategy::wait (TAO_LF_Multi_Event *mev,
+ ACE_Time_Value *max_wait_time)
+{
+ return this->wait_i (mev, mev->base_transport(), max_wait_time);
+}
+
+int
+TAO_Connect_Strategy::poll (TAO_LF_Multi_Event *mev)
+{
+ ACE_Time_Value zero(ACE_Time_Value::zero);
+ return this->wait_i (mev, mev->base_transport(), &zero);
+}
+
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/Connect_Strategy.h b/TAO/tao/Connect_Strategy.h
index 1189a6cd171..4783039326a 100644
--- a/TAO/tao/Connect_Strategy.h
+++ b/TAO/tao/Connect_Strategy.h
@@ -34,6 +34,8 @@ class TAO_ORB_Core;
class TAO_Connector;
class TAO_Connection_Handler;
class TAO_Transport;
+class TAO_LF_Multi_Event;
+class TAO_LF_Event;
/**
* @class TAO_Connect_Strategy
@@ -72,13 +74,23 @@ public:
/* If the connection establishment fails the state within the
* connection handler is set appropriately.
*/
- virtual int wait (TAO_Connection_Handler *ch,
- ACE_Time_Value *val) = 0;
+ int wait (TAO_Connection_Handler *ch, ACE_Time_Value *val);
- virtual int wait (TAO_Transport *t,
- ACE_Time_Value *val) = 0;
+ int wait (TAO_Transport *t, ACE_Time_Value *val);
+
+ /// Wait for one of many connections to complete. Returns when one
+ /// succeeds or all fail.
+ int wait (TAO_LF_Multi_Event *ev, ACE_Time_Value *val);
+
+ /// Do a quick check to see if any connections are complete. This
+ /// does the same as the wait with an explicit time value of 0.
+ int poll (TAO_LF_Multi_Event *ev);
protected:
+ /// This is the method that does all the real interesting stuff.
+ virtual int wait_i (TAO_LF_Event *ev,
+ TAO_Transport *t,
+ ACE_Time_Value *val) = 0;
/// Cached copy of the ORB core pointer
TAO_ORB_Core * const orb_core_;
diff --git a/TAO/tao/DLL_Parser.cpp b/TAO/tao/DLL_Parser.cpp
index 753ae4496d7..87fb45d897f 100644
--- a/TAO/tao/DLL_Parser.cpp
+++ b/TAO/tao/DLL_Parser.cpp
@@ -6,6 +6,7 @@
#include "tao/Environment.h"
#include "tao/ORB_Constants.h"
#include "tao/SystemException.h"
+#include "tao/ORB_Core.h"
#include "ace/Dynamic_Service.h"
#include "ace/Log_Msg.h"
@@ -44,8 +45,11 @@ TAO_DLL_Parser::parse_string (const char *ior,
const char *name =
ior + sizeof (::dll_prefix) - 1;
+ TAO_ORB_Core *oc = orb->orb_core ();
+
TAO_Object_Loader *loader =
- ACE_Dynamic_Service::instance (name);
+ ACE_Dynamic_Service::instance
+ (oc->configuration(), name);
if (loader == 0)
{
diff --git a/TAO/tao/Endpoint.cpp b/TAO/tao/Endpoint.cpp
index 75f61995341..6077a1b6b94 100644
--- a/TAO/tao/Endpoint.cpp
+++ b/TAO/tao/Endpoint.cpp
@@ -1,6 +1,7 @@
// $Id$
#include "tao/Endpoint.h"
+#include "tao/ORB_Core.h"
#if !defined (__ACE_INLINE__)
#include "tao/Endpoint.i"
@@ -16,6 +17,14 @@ TAO_Endpoint::~TAO_Endpoint (void)
{
}
+TAO_Endpoint *
+TAO_Endpoint::next_filtered (TAO_ORB_Core *, TAO_Endpoint *root)
+{
+ if (root == 0)
+ return this;
+ return this->next();
+}
+
TAO_END_VERSIONED_NAMESPACE_DECL
//@@ TAO_ENDPOINT_SPL_METHODS_ADD_HOOK
diff --git a/TAO/tao/Endpoint.h b/TAO/tao/Endpoint.h
index b762595ef58..d89582e973e 100644
--- a/TAO/tao/Endpoint.h
+++ b/TAO/tao/Endpoint.h
@@ -29,6 +29,8 @@
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
+class TAO_ORB_Core;
+
/*
* Includes and forward decls for specializing TAO's
* endpoint implementation.
@@ -79,12 +81,29 @@ public:
*/
virtual CORBA::Boolean is_equivalent (const TAO_Endpoint *other_endpoint) = 0;
- /// Endpoints can be stringed in a list.
+ /// Endpoints can be linked in a list.
/**
* @return The next endpoint in the list, if any.
*/
virtual TAO_Endpoint *next (void) = 0;
+ /**
+ * Return the next endpoint in the list, but use protocol-specific
+ * filtering to constrain the value. The orb core is needed to supply
+ * any sort of filter arguments, and the root endpoint is needed in case
+ * the algorithm needs to rewind. If the supplied root is 0, then this
+ * is assumed to be the candidate next endpoint.
+ *
+ * To use this, the caller starts off the change with root == 0. This
+ * is a bit of a violation in logic, a more correct implementation would
+ * accept this == 0 and a non-null root.
+ * To do iteration using next_filtered, do:
+ * for (TAO_Endpoint *ep = root_endpoint->next_filtered (orb_core, 0);
+ * ep != 0;
+ * ep = ep->next_filtered(orb_core, root_endpoint)) { }
+ */
+ virtual TAO_Endpoint *next_filtered (TAO_ORB_Core *, TAO_Endpoint *root);
+
/// Return a string representation for the address.
/**
* The purpose of this method is to provide a general interface to
diff --git a/TAO/tao/IIOP_Connection_Handler.cpp b/TAO/tao/IIOP_Connection_Handler.cpp
index 7073a6523fc..ddfda1fdb1b 100644
--- a/TAO/tao/IIOP_Connection_Handler.cpp
+++ b/TAO/tao/IIOP_Connection_Handler.cpp
@@ -89,6 +89,8 @@ TAO_IIOP_Connection_Handler::open (void*)
this->orb_core ()->orb_params ()->nodelay ();
protocol_properties.keep_alive_ =
this->orb_core ()->orb_params ()->sock_keepalive ();
+ protocol_properties.dont_route_ =
+ this->orb_core ()->orb_params ()->sock_dontroute ();
TAO_Protocols_Hooks *tph =
this->orb_core ()->get_protocols_hooks ();
@@ -148,6 +150,21 @@ TAO_IIOP_Connection_Handler::open (void*)
}
}
+#if !defined (ACE_LACKS_SO_DONTROUTE)
+ if (protocol_properties.dont_route_)
+ {
+ if (this->peer ().
+ set_option (SOL_SOCKET,
+ SO_DONTROUTE,
+ (void *) &protocol_properties.dont_route_,
+ sizeof (protocol_properties.dont_route_)) == -1
+ && errno != ENOTSUP)
+ {
+ return -1;
+ }
+ }
+#endif /* ! ACE_LACKS_SO_DONTROUTE */
+
if (this->transport ()->wait_strategy ()->non_blocking ()
|| this->transport ()->opened_as () == TAO::TAO_SERVER_ROLE)
{
@@ -169,8 +186,9 @@ TAO_IIOP_Connection_Handler::open (void*)
if (TAO_debug_level > 2)
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT("TAO (%P|%t) - IIOP_Connection_Handler::open, ")
- ACE_TEXT("The local addr is <%s> \n"),
- local_addr. get_host_addr ()));
+ ACE_TEXT("The local addr is <%s:%d> \n"),
+ local_addr.get_host_addr (),
+ local_addr.get_port_number()));
if (local_addr == remote_addr)
{
@@ -478,6 +496,31 @@ TAO_IIOP_Connection_Handler::set_dscp_codepoint (CORBA::Boolean set_network_prio
return 0;
}
+
+void
+TAO_IIOP_Connection_Handler::abort (void)
+{
+ struct linger lval;
+ lval.l_onoff = 1;
+ lval.l_linger = 0;
+
+ if (this->peer ().set_option(SOL_SOCKET,
+ SO_LINGER,
+ (void*) &lval,
+ sizeof (lval)) == -1)
+ {
+ if (TAO_debug_level)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("TAO (%P|%t) Unable to set ")
+ ACE_TEXT ("SO_LINGER on %d\n"),
+ this->peer ().get_handle ()));
+ }
+ }
+}
+
+
+
//@@ CONNECTION_HANDLER_SPL_COPY_HOOK_END
/*
* End copy hook
diff --git a/TAO/tao/IIOP_Connection_Handler.h b/TAO/tao/IIOP_Connection_Handler.h
index 08e2b7478af..16f647affa0 100644
--- a/TAO/tao/IIOP_Connection_Handler.h
+++ b/TAO/tao/IIOP_Connection_Handler.h
@@ -109,6 +109,11 @@ public:
virtual int open_handler (void *);
+ /// This is used during a canceled connection attempt. Force the
+ /// SO_LINGER timeout to 0 so that when the peer is closed, it won't
+ /// hang around.
+ void abort (void);
+
protected:
/// Constructor that could be used by the derived classes.
diff --git a/TAO/tao/IIOP_Connector.cpp b/TAO/tao/IIOP_Connector.cpp
index 91cd5db0599..dd7aa107fe7 100644
--- a/TAO/tao/IIOP_Connector.cpp
+++ b/TAO/tao/IIOP_Connector.cpp
@@ -10,11 +10,14 @@
#include "tao/Connect_Strategy.h"
#include "tao/Thread_Lane_Resources.h"
#include "tao/Profile_Transport_Resolver.h"
+#include "tao/Base_Transport_Property.h"
#include "tao/Transport.h"
#include "tao/Wait_Strategy.h"
#include "tao/SystemException.h"
+#include "tao/LF_Multi_Event.h"
#include "ace/OS_NS_strings.h"
#include "ace/OS_NS_string.h"
+#include "ace/OS_NS_time.h"
ACE_RCSID (tao,
IIOP_Connector,
@@ -22,6 +25,51 @@ ACE_RCSID (tao,
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
+
+
+//-----------------------------------------------------------------------------
+
+/**
+ * @class TAO_Event_Handler_Array_var
+ *
+ * @brief Auto pointer like class for an array of Event Handlers.
+ *
+ * Used to manage lifecycle of handlers. This class calls
+ * ACE_Event_Handler::remove_reference() on each handler in its destructor
+ * This class started out life as a replacement for the ACE_Event_Handle_var
+ * but is now pared down to be very specific in its role..
+ */
+class TAO_IIOP_Connection_Handler_Array_Guard
+{
+public:
+ TAO_IIOP_Connection_Handler_Array_Guard (TAO_IIOP_Connection_Handler **p, unsigned count);
+ ~TAO_IIOP_Connection_Handler_Array_Guard (void);
+
+private:
+ /// Handler.
+ TAO_IIOP_Connection_Handler **ptr_;
+ unsigned count_;
+};
+
+TAO_IIOP_Connection_Handler_Array_Guard::TAO_IIOP_Connection_Handler_Array_Guard (TAO_IIOP_Connection_Handler **p,
+ unsigned count)
+ : ptr_ (p),
+ count_ (count)
+{
+}
+
+TAO_IIOP_Connection_Handler_Array_Guard::~TAO_IIOP_Connection_Handler_Array_Guard (void)
+{
+ if (this->ptr_ != 0)
+ {
+ for (unsigned i = 0; i < this->count_; i++)
+ this->ptr_[i]->remove_reference ();
+ }
+}
+
+//---------------------------------------------------------------------------
+
+
TAO_IIOP_Connector::~TAO_IIOP_Connector (void)
{
}
@@ -80,6 +128,12 @@ TAO_IIOP_Connector::close (void)
return this->base_connector_.close ();
}
+int
+TAO_IIOP_Connector::supports_parallel_connects(void) const
+{
+ return 1;
+}
+
int
TAO_IIOP_Connector::set_validate_endpoint (TAO_Endpoint *endpoint)
{
@@ -105,8 +159,8 @@ TAO_IIOP_Connector::set_validate_endpoint (TAO_Endpoint *endpoint)
if (TAO_debug_level > 0)
{
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("TAO (%P|%t) IIOP connection failed.\n")
- ACE_TEXT ("TAO (%P|%t) This is most likely ")
+ ACE_TEXT ("(%P|%t) IIOP connection failed.\n")
+ ACE_TEXT (" This is most likely ")
ACE_TEXT ("due to a hostname lookup ")
ACE_TEXT ("failure.\n")));
}
@@ -122,12 +176,124 @@ TAO_IIOP_Connector::make_connection (TAO::Profile_Transport_Resolver *r,
TAO_Transport_Descriptor_Interface &desc,
ACE_Time_Value *timeout)
{
+ TAO_IIOP_Connection_Handler *svc_handler = 0;
TAO_IIOP_Endpoint *iiop_endpoint =
- this->remote_endpoint (desc.endpoint ());
-
+ this->remote_endpoint (desc.endpoint());
+ int result = -1;
if (iiop_endpoint == 0)
return 0;
+ result = this->begin_connection (svc_handler, r, iiop_endpoint, timeout);
+
+ if (result == -1 && errno != EWOULDBLOCK)
+ {
+ // connect completed unsuccessfully
+ svc_handler->remove_reference();
+ // Give users a clue to the problem.
+ if (TAO_debug_level > 3)
+ {
+ ACE_DEBUG ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) IIOP_Connector::make_connection, ")
+ ACE_TEXT("connection to <%s:%d> failed (%p)\n"),
+ ACE_TEXT_CHAR_TO_TCHAR (iiop_endpoint->host ()),
+ iiop_endpoint->port (),
+ ACE_TEXT("errno")));
+ }
+ return 0;
+ }
+ TAO_IIOP_Connection_Handler **sh_ptr = &svc_handler;
+ TAO_IIOP_Endpoint **ep_ptr = &iiop_endpoint;
+ TAO_LF_Multi_Event mev;
+ mev.add_event(svc_handler);
+ return this->complete_connection (result, sh_ptr, ep_ptr, 1U, r, &mev, timeout);
+}
+
+TAO_Transport *
+TAO_IIOP_Connector::make_parallel_connection (TAO::Profile_Transport_Resolver *r,
+ TAO_Transport_Descriptor_Interface &desc,
+ ACE_Time_Value *timeout)
+{
+ TAO_Endpoint *root_ep = desc.endpoint();
+ unsigned max_count = 1;
+ unsigned long ns_stagger =
+ this->orb_core()->orb_params()->parallel_connect_delay();
+ unsigned long sec_stagger = ns_stagger/1000;
+ ns_stagger = (ns_stagger % 1000) * 1000000;
+ for (TAO_Endpoint *ep = root_ep->next_filtered (this->orb_core(),0);
+ ep != 0;
+ ep = ep->next_filtered(this->orb_core(),root_ep))
+ max_count++;
+
+ if (TAO_debug_level > 2)
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("TAO (%P|%t) - IIOP_Connector::")
+ ACE_TEXT ("make_parallel_connection, ")
+ ACE_TEXT ("to %d endpoints\n"), max_count));
+ TAO_IIOP_Endpoint **eplist = 0;
+ TAO_IIOP_Connection_Handler **shlist = 0;
+ ACE_NEW_RETURN (shlist,TAO_IIOP_Connection_Handler *[max_count], 0);
+ ACE_NEW_RETURN (eplist, TAO_IIOP_Endpoint *[max_count], 0);
+
+ TAO_LF_Multi_Event mev;
+ int result = 0;
+ unsigned count = 0;
+ for (TAO_Endpoint *ep = root_ep->next_filtered (this->orb_core(),0);
+ ep != 0;
+ ep = ep->next_filtered(this->orb_core(),root_ep))
+ {
+ eplist[count] = this->remote_endpoint (ep);
+ shlist[count] = 0;
+ result = this->begin_connection (shlist[count],
+ r,
+ eplist[count],
+ timeout);
+
+ // The connection may fail because it is slow, or for other reasons.
+ // If it was an incomplete non-blocking connection, add it to the list
+ // to be waited on, otherwise remove the reference to the handler and
+ // move on to the next endpoint.
+ if (result == -1)
+ {
+ if (errno == EWOULDBLOCK)
+ {
+ mev.add_event(shlist[count++]);
+ if (ep->next() != 0)
+ {
+ struct timespec nsleep = {sec_stagger, ns_stagger};
+ ACE_OS::nanosleep (&nsleep);
+ result = this->active_connect_strategy_->poll (&mev);
+ if (result != -1)
+ break;
+ }
+ }
+ else
+ {
+ shlist[count]->remove_reference(); // done bump the list count
+ }
+ continue;
+ }
+
+ if (result != -1) // we have a winner!
+ {
+ count++;
+ break; // no waiting involved since a connection is completed
+ }
+ }
+
+ TAO_Transport *winner = 0;
+ if (count > 0) // only complete if at least one pending or success
+ winner = this->complete_connection (result,shlist,eplist,count,r,&mev,timeout);
+ delete [] shlist; // reference reductions should have been done already
+ delete [] eplist;
+ return winner;
+}
+
+int
+TAO_IIOP_Connector::begin_connection (TAO_IIOP_Connection_Handler *&svc_handler,
+ TAO::Profile_Transport_Resolver *r,
+ TAO_IIOP_Endpoint *iiop_endpoint,
+ ACE_Time_Value *timeout)
+{
const ACE_INET_Addr &remote_address =
iiop_endpoint->object_addr ();
@@ -146,8 +312,8 @@ TAO_IIOP_Connector::make_connection (TAO::Profile_Transport_Resolver *r,
if (TAO_debug_level > 2)
ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) - IIOP_Connector::make_connection, "
- "to <%s:%d> which should %s\n",
+ ACE_TEXT ("TAO (%P|%t) - IIOP_Connector::begin_connection, ")
+ ACE_TEXT ("to <%s:%d> which should %s\n"),
ACE_TEXT_TO_TCHAR_IN(iiop_endpoint->host()),
iiop_endpoint->port(),
r->blocked_connect () ? ACE_TEXT("block") : ACE_TEXT("nonblock")));
@@ -167,7 +333,7 @@ TAO_IIOP_Connector::make_connection (TAO::Profile_Transport_Resolver *r,
timeout = &tmp_zero;
}
- TAO_IIOP_Connection_Handler *svc_handler = 0;
+ svc_handler = 0;
int result =
this->base_connector_.connect (svc_handler,
@@ -193,62 +359,124 @@ TAO_IIOP_Connector::make_connection (TAO::Profile_Transport_Resolver *r,
// once the connect() returns since this might be too late if
// another thread pick up the completion and potentially deletes the
// handler before we get a chance to increment the reference count.
+ return result;
+}
- // Make sure that we always do a remove_reference
- ACE_Event_Handler_var svc_handler_auto_ptr (svc_handler);
-
- TAO_Transport *transport = svc_handler->transport ();
-
- if (result == -1)
+TAO_Transport *
+TAO_IIOP_Connector::complete_connection (int result,
+ TAO_IIOP_Connection_Handler **&sh_list,
+ TAO_IIOP_Endpoint **ep_list,
+ unsigned count,
+ TAO::Profile_Transport_Resolver *r,
+ TAO_LF_Multi_Event *mev,
+ ACE_Time_Value *timeout)
+{
+ // Make sure that we always do a remove_reference for every member
+ // of the list
+ TAO_IIOP_Connection_Handler_Array_Guard svc_handler_auto_ptr (sh_list,count);
+ TAO_Transport *transport = 0;
+ TAO_Transport **tlist = 0;
+ ACE_NEW_RETURN (tlist,TAO_Transport*[count],0);
+
+ // populate the transport list
+ for (unsigned i = 0; i < count; i++)
+ tlist[i] = sh_list[i]->transport();
+
+ if (result != -1)
+ {
+ // We received a compeleted connection and 0 or more pending.
+ // the winner is the last member of the list, because the
+ // iterator stopped on a successful connect.
+ transport = tlist[count-1];
+ }
+ else
{
- // No immediate result, wait for completion
- if (errno == EWOULDBLOCK)
+ if (count == 1)
{
- // Try to wait until connection completion. Incase we block, then we
- // get a connected transport or not. In case of non block we get
- // a connected or not connected transport
+ transport = tlist[0];
if (!this->wait_for_connection_completion (r,
transport,
timeout))
{
if (TAO_debug_level > 2)
- ACE_ERROR ((LM_ERROR, "TAO (%P|%t) - IIOP_Connector::"
- "make_connection, "
- "wait for completion failed\n"));
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("TAO (%P|%t) - IIOP_Connector::")
+ ACE_TEXT ("complete_connection, wait for completion ")
+ ACE_TEXT ("failed for 1 pending connect\n")));
}
}
else
{
- // Transport is not usable
- transport = 0;
+ if (!this->wait_for_connection_completion (r,
+ transport,
+ tlist,
+ count,
+ mev,
+ timeout))
+ {
+ if (TAO_debug_level > 2)
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("TAO (%P|%t) - IIOP_Connector::")
+ ACE_TEXT ("complete_connection, wait for completion ")
+ ACE_TEXT ("failed for %d pending connects\n"),
+ count));
+ }
+ }
+ }
+ // At this point, the connection has be successfully created
+ // connected or not connected, but we have a connection.
+ TAO_IIOP_Connection_Handler *svc_handler = 0;
+ TAO_IIOP_Endpoint *iiop_endpoint = 0;
+
+ if (transport != 0)
+ {
+ for (unsigned i = 0; i < count; i++)
+ {
+ if (transport == tlist[i])
+ {
+ svc_handler = sh_list[i];
+ iiop_endpoint = ep_list[i];
+ break;
+ }
}
}
+
+ // Done with the transport list
+ delete [] tlist;
+
// In case of errors transport is zero
if (transport == 0)
{
// Give users a clue to the problem.
if (TAO_debug_level > 3)
+ {
+ for (unsigned i = 0; i < count; i++)
ACE_DEBUG ((LM_ERROR,
- "TAO (%P|%t) - IIOP_Connector::make_connection, "
- "connection to <%s:%d> failed (%p)\n",
- iiop_endpoint->host (), iiop_endpoint->port (),
+ ACE_TEXT ("(%P|%t) IIOP_Connector::make_connection, ")
+ ACE_TEXT("connection to <%s:%d> failed (%p)\n"),
+ ACE_TEXT_CHAR_TO_TCHAR (ep_list[i]->host ()),
+ ep_list[i]->port (),
ACE_TEXT("errno")));
+ }
return 0;
}
- // At this point, the connection has be successfully created
- // connected or not connected, but we have a connection.
+
if (TAO_debug_level > 2)
+ {
ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) - IIOP_Connector::make_connection, "
- "new %s connection to <%s:%d> on Transport[%d]\n",
- transport->is_connected() ? "connected" : "not connected",
- iiop_endpoint->host (),
+ ACE_TEXT ("TAO (%P|%t) - IIOP_Connector::make_connection, ")
+ ACE_TEXT ("new %s connection to <%s:%d> on Transport[%d]\n"),
+ transport->is_connected() ?
+ ACE_TEXT("connected") : ACE_TEXT("not connected"),
+ ACE_TEXT_CHAR_TO_TCHAR (iiop_endpoint->host ()),
iiop_endpoint->port (),
svc_handler->peer ().get_handle ()));
+ }
+ TAO_Base_Transport_Property desc(iiop_endpoint,0);
// Add the handler to Cache
int retval =
this->orb_core ()->lane_resources ().transport_cache ().cache_transport (
@@ -264,8 +492,8 @@ TAO_IIOP_Connector::make_connection (TAO::Profile_Transport_Resolver *r,
if (TAO_debug_level > 0)
{
ACE_ERROR ((LM_ERROR,
- "TAO (%P|%t) - IIOP_Connector::make_connection, "
- "could not add the new connection to cache\n"));
+ ACE_TEXT ("(%P|%t) IIOP_Connector::make_connection, ")
+ ACE_TEXT ("could not add new connection to cache\n")));
}
return 0;
@@ -285,9 +513,9 @@ TAO_IIOP_Connector::make_connection (TAO::Profile_Transport_Resolver *r,
if (TAO_debug_level > 0)
ACE_ERROR ((LM_ERROR,
- "TAO (%P|%t) - IIOP_Connector [%d]::make_connection, "
- "could not register the transport "
- "in the reactor.\n",
+ ACE_TEXT ("(%P|%t) IIOP_Connector [%d]::make_connection, ")
+ ACE_TEXT ("could not register the transport ")
+ ACE_TEXT ("in the reactor.\n"),
transport->id ()));
return 0;
@@ -395,10 +623,15 @@ TAO_IIOP_Connector::cancel_svc_handler (
// Cancel from the connector
if (handler)
+ {
+ handler->abort();
return this->base_connector_.cancel (handler);
+ }
return -1;
}
+
+
//@@ TAO_CONNECTOR_SPL_COPY_HOOK_END
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/IIOP_Connector.h b/TAO/tao/IIOP_Connector.h
index f465814dbc6..c1026010a09 100644
--- a/TAO/tao/IIOP_Connector.h
+++ b/TAO/tao/IIOP_Connector.h
@@ -90,12 +90,23 @@ public:
//@@ TAO_CONNECTOR_SPL_PUBLIC_METHODS_COPY_HOOK_END
protected:
+ /// A flag indicating the actual connector supports parallel
+ /// connection attempts. The base implementation always returns
+ /// 0. Override to return non-zero if parallel connection attempts
+ /// may be tried.
+ virtual int supports_parallel_connects (void) const;
// = The TAO_Connector methods, please check the documentation on
// Transport_Connector.h
int set_validate_endpoint (TAO_Endpoint *ep);
- TAO_Transport *make_connection (TAO::Profile_Transport_Resolver *r,
+ virtual TAO_Transport *make_connection (
+ TAO::Profile_Transport_Resolver *r,
+ TAO_Transport_Descriptor_Interface &desc,
+ ACE_Time_Value *timeout = 0);
+
+ virtual TAO_Transport *make_parallel_connection (
+ TAO::Profile_Transport_Resolver *r,
TAO_Transport_Descriptor_Interface &desc,
ACE_Time_Value *timeout = 0);
@@ -118,6 +129,26 @@ protected:
const bool lite_flag_;
private:
+ /// This is the first half of making a connection. Both make_connection
+ /// and make_parallel_connection will start out using begin_connection.
+ int begin_connection (TAO_IIOP_Connection_Handler *&svc_handler,
+ TAO::Profile_Transport_Resolver *r,
+ TAO_IIOP_Endpoint *endpoint,
+ ACE_Time_Value *timeout = 0);
+
+ /// This is the second half of making a connection when several endpoints
+ /// are involved. This works with modified wait strategies to wait for one
+ /// of many transports, and when once completes it will cancel the rest.
+ /// The winning transport is returned.
+ TAO_Transport *complete_connection (int result,
+ TAO_IIOP_Connection_Handler **&sh_list,
+ TAO_IIOP_Endpoint **ep_list,
+ unsigned count,
+ TAO::Profile_Transport_Resolver *r,
+ TAO_LF_Multi_Event *mev,
+ ACE_Time_Value *timeout = 0);
+
+
/// Return the remote endpoint, a helper function
TAO_IIOP_Endpoint *remote_endpoint (TAO_Endpoint *ep);
diff --git a/TAO/tao/IIOP_Endpoint.cpp b/TAO/tao/IIOP_Endpoint.cpp
index 2ca751b4ba2..f72f3999629 100644
--- a/TAO/tao/IIOP_Endpoint.cpp
+++ b/TAO/tao/IIOP_Endpoint.cpp
@@ -109,6 +109,22 @@ TAO_IIOP_Endpoint::TAO_IIOP_Endpoint (const char *host,
//@@ TAO_ENDPOINT_SPL_COPY_HOOK_END
+TAO_IIOP_Endpoint &
+TAO_IIOP_Endpoint::operator= (const TAO_IIOP_Endpoint &other)
+{
+ this->host_ = other.host_;
+ this->port_ = other.port_;
+#if defined (ACE_HAS_IPV6)
+ this->is_ipv6_decimal_ = other.is_ipv6_decimal_;
+#endif /* ACE_HAS_IPV6 */
+ this->is_encodable_ = other.is_encodable_;
+ this->object_addr_set_ = other.object_addr_set_;
+ this->object_addr_ = other.object_addr_;
+ this->preferred_path_ = other.preferred_path_;
+ this->next_ = 0; // do not copy list membership, since we are only cloning the values
+ return *this;
+}
+
TAO_IIOP_Endpoint::~TAO_IIOP_Endpoint (void)
{
}
@@ -227,6 +243,75 @@ TAO_IIOP_Endpoint::next (void)
return this->next_;
}
+TAO_Endpoint *
+TAO_IIOP_Endpoint::next_filtered (TAO_ORB_Core * orb_core, TAO_Endpoint *root)
+{
+ bool want_ipv6 = false;
+ bool ipv6_only = false;
+ bool prefer_ipv6 = false;
+#if defined (ACE_HAS_IPV6)
+ want_ipv6 = true;
+ ipv6_only = orb_core->orb_params()->connect_ipv6_only();
+ prefer_ipv6 = orb_core->orb_params()->prefer_ipv6_interfaces();
+#else
+ ACE_UNUSED_ARG (orb_core);
+#endif /* ACE_HAS_IPV6 */
+ return
+ this->next_filtered_i (static_cast(root),
+ ipv6_only,
+ prefer_ipv6,
+ want_ipv6);
+}
+
+TAO_IIOP_Endpoint*
+TAO_IIOP_Endpoint::next_filtered_i (TAO_IIOP_Endpoint *root,
+ bool ipv6_only,
+ bool prefer_ipv6,
+ bool want_ipv6)
+{
+ // the candidate is nominally the next entry in the list, but since
+ // the list may loop back on itself, the root of the list needs to be
+ // initialized.
+ TAO_IIOP_Endpoint *candidate = (root == 0) ? this : next_;
+ if (root == 0)
+ root = this;
+
+#if defined (ACE_HAS_IPV6)
+ if (ipv6_only)
+ {
+ if (candidate == 0 || candidate->is_ipv6_decimal())
+ return candidate;
+ const ACE_INET_Addr &addr = candidate->object_addr ();
+ bool allowed = addr.get_type () == AF_INET6 &&
+ !addr.is_ipv4_mapped_ipv6();
+
+ return allowed ? candidate :
+ candidate->next_filtered_i(root, ipv6_only, prefer_ipv6, true);
+ }
+ if (prefer_ipv6)
+ {
+ if (candidate == 0)
+ return !want_ipv6 ? candidate :
+ root->next_filtered_i(root, ipv6_only, prefer_ipv6, false);
+
+ if (want_ipv6 == candidate->is_ipv6_decimal())
+ return candidate;
+
+ const ACE_INET_Addr &addr = candidate->object_addr ();
+ bool really_ipv6 = addr.get_type () == AF_INET6 &&
+ !addr.is_ipv4_mapped_ipv6();
+ return (want_ipv6 == really_ipv6) ? candidate :
+ candidate->next_filtered_i(root, ipv6_only, prefer_ipv6, want_ipv6);
+ }
+#else
+ ACE_UNUSED_ARG (want_ipv6);
+ ACE_UNUSED_ARG (ipv6_only);
+ ACE_UNUSED_ARG (prefer_ipv6);
+#endif
+
+ return candidate;
+}
+
TAO_Endpoint *
TAO_IIOP_Endpoint::duplicate (void)
{
diff --git a/TAO/tao/IIOP_Endpoint.h b/TAO/tao/IIOP_Endpoint.h
index 73fda040cd1..fff92575b94 100644
--- a/TAO/tao/IIOP_Endpoint.h
+++ b/TAO/tao/IIOP_Endpoint.h
@@ -85,6 +85,23 @@ public:
virtual TAO_Endpoint *next (void);
+ /**
+ * Return the next endpoint in the list, but use protocol-specific
+ * filtering to constrain the value. The orb core is needed to supply
+ * any sort of filter arguments, and the root endpoint is needed in case
+ * the algorithm needs to rewind. If the supplied root is 0, then this
+ * is assumed to be the candidate next endpoint.
+ *
+ * To use this, the caller starts off the change with root == 0. This
+ * is a bit of a violation in logic, a more correct implementation would
+ * accept this == 0 and a non-null root.
+ * To do iteration using next_filtered, do:
+ * for (TAO_Endpoint *ep = root_endpoint->next_filtered (orb_core, 0);
+ * ep != 0;
+ * ep = ep->next_filtered(orb_core, root_endpoint)) { }
+ */
+ virtual TAO_Endpoint *next_filtered (TAO_ORB_Core *, TAO_Endpoint *root);
+
virtual int addr_to_string (char *buffer, size_t length);
/// Makes a copy of @c this
@@ -135,7 +152,17 @@ public:
//@@ TAO_ENDPOINT_SPL_PUBLIC_METHODS_COPY_HOOK_END
+
+ /// Need to have an assignment operator since the IIOP_Profile class may
+ /// have to reorder its list of endpoints based on filtering by the EndpointPolicy.
+ TAO_IIOP_Endpoint & operator= (const TAO_IIOP_Endpoint& other);
+
private:
+ TAO_IIOP_Endpoint *next_filtered_i (TAO_IIOP_Endpoint *root,
+ bool ipv6_only,
+ bool prefer_ipv6,
+ bool want_ipv6);
+
//@@ TAO_ENDPOINT_SPL_PRIVATE_DATA_COPY_HOOK_START
diff --git a/TAO/tao/IIOP_Profile.cpp b/TAO/tao/IIOP_Profile.cpp
index 93bc39cbd7d..4866b52a071 100644
--- a/TAO/tao/IIOP_Profile.cpp
+++ b/TAO/tao/IIOP_Profile.cpp
@@ -202,13 +202,16 @@ TAO_IIOP_Profile::parse_string_i (const char *ior
{
// A port number or port name was specified.
CORBA::ULong length_port = okd - cp_pos - 1;
-
CORBA::String_var tmp = CORBA::string_alloc (length_port);
ACE_OS::strncpy (tmp.inout (), cp_pos + 1, length_port);
tmp[length_port] = '\0';
-
- if (ACE_OS::strspn (tmp.in (), "1234567890") == length_port)
+ if (length_port == 0)
+ {
+ this->endpoint_.port_ = 2809; // default IIOP port for
+ // parsing corbaloc strings
+ }
+ else if (ACE_OS::strspn (tmp.in (), "1234567890") == length_port)
{
this->endpoint_.port_ =
static_cast (ACE_OS::atoi (tmp.in ()));
@@ -299,6 +302,9 @@ TAO_IIOP_Profile::parse_string_i (const char *ior
CORBA::Boolean
TAO_IIOP_Profile::do_is_equivalent (const TAO_Profile *other_profile)
{
+ if (other_profile == this)
+ return 1;
+
const TAO_IIOP_Profile *op =
dynamic_cast (other_profile);
@@ -306,6 +312,10 @@ TAO_IIOP_Profile::do_is_equivalent (const TAO_Profile *other_profile)
if (op == 0)
return 0;
+ if (this->count_ == 0 && op->count_ == 0)
+ return 1;
+ if (this->count_ != op->count_)
+ return 0;
// Check endpoints equivalence.
const TAO_IIOP_Endpoint *other_endp = &op->endpoint_;
for (TAO_IIOP_Endpoint *endp = &this->endpoint_;
@@ -372,6 +382,65 @@ TAO_IIOP_Profile::add_endpoint (TAO_IIOP_Endpoint *endp)
++this->count_;
}
+void
+TAO_IIOP_Profile::remove_endpoint (TAO_IIOP_Endpoint *endp)
+{
+ if (endp == 0)
+ return;
+
+ // special handling for the target matching the base endpoint
+ if (endp == &this->endpoint_)
+ {
+ if (--this->count_ > 0)
+ {
+ TAO_IIOP_Endpoint* n = this->endpoint_.next_;
+ this->endpoint_ = *n;
+ // since the assignment operator does not copy the next_
+ // pointer, we must do it by hand
+ this->endpoint_.next_ = n->next_;
+ delete n;
+ }
+ return;
+ }
+
+ TAO_IIOP_Endpoint* last = &this->endpoint_;
+ TAO_IIOP_Endpoint* cur = this->endpoint_.next_;
+
+ while (cur != 0)
+ {
+ if (cur == endp)
+ break;
+ last = cur;
+ cur = cur->next_;
+ }
+
+ if (cur != 0)
+ {
+ last->next_ = cur->next_;
+ cur->next_ = 0;
+ --this->count_;
+ delete cur;
+ }
+}
+
+void
+TAO_IIOP_Profile::remove_generic_endpoint (TAO_Endpoint *ep)
+{
+ this->remove_endpoint(dynamic_cast(ep));
+}
+
+void
+TAO_IIOP_Profile::add_generic_endpoint (TAO_Endpoint *endp)
+{
+ TAO_IIOP_Endpoint *iep = dynamic_cast(endp);
+ if (iep != 0)
+ {
+ TAO_IIOP_Endpoint *clone;
+ ACE_NEW (clone, TAO_IIOP_Endpoint(*iep));
+ this->add_endpoint(clone);
+ }
+}
+
char *
TAO_IIOP_Profile::to_string (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
{
diff --git a/TAO/tao/IIOP_Profile.h b/TAO/tao/IIOP_Profile.h
index 4c338cbc664..03cf95694bd 100644
--- a/TAO/tao/IIOP_Profile.h
+++ b/TAO/tao/IIOP_Profile.h
@@ -77,6 +77,18 @@ public:
*/
void add_endpoint (TAO_IIOP_Endpoint *endp);
+ /**
+ * Remove @a endp from this profile's list of endpoints and free the
+ * @a endp memory.
+ * This method assumes @a endp is in this profile's endpoint list.
+ */
+ void remove_endpoint (TAO_IIOP_Endpoint *endp);
+
+ virtual void remove_generic_endpoint (TAO_Endpoint *ep);
+
+ /// Add an endpoint when the specific endpoint type is unknown
+ virtual void add_generic_endpoint (TAO_Endpoint *ep);
+
//@@ TAO_PROFILE_SPL_PUBLIC_METHODS_COPY_HOOK_END
/// The object key delimiter that IIOP uses or expects.
diff --git a/TAO/tao/IORInterceptor/IORInfo.cpp b/TAO/tao/IORInterceptor/IORInfo.cpp
index 8c9f231166f..de6dd91494d 100644
--- a/TAO/tao/IORInterceptor/IORInfo.cpp
+++ b/TAO/tao/IORInterceptor/IORInfo.cpp
@@ -90,14 +90,16 @@ TAO_IORInfo::add_ior_component_to_profile (
ACE_CHECK;
}
-PortableInterceptor::AdapterManagerId
+char *
TAO_IORInfo::manager_id (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
- return this->poa_->get_manager_id (ACE_ENV_SINGLE_ARG_PARAMETER);
+ PortableServer::POAManager_var poa_manager = this->poa_->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+ return poa_manager->get_id (ACE_ENV_SINGLE_ARG_PARAMETER);
}
PortableInterceptor::AdapterState
diff --git a/TAO/tao/IORInterceptor/IORInfo.h b/TAO/tao/IORInterceptor/IORInfo.h
index d0314b30f7e..3d4803a6792 100644
--- a/TAO/tao/IORInterceptor/IORInfo.h
+++ b/TAO/tao/IORInterceptor/IORInfo.h
@@ -79,7 +79,7 @@ public:
ACE_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
- virtual PortableInterceptor::AdapterManagerId manager_id (
+ virtual char * manager_id (
ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
diff --git a/TAO/tao/IORInterceptor/IORInfoC.h b/TAO/tao/IORInterceptor/IORInfoC.h
index 80b0ab75f1d..488250f84ef 100644
--- a/TAO/tao/IORInterceptor/IORInfoC.h
+++ b/TAO/tao/IORInterceptor/IORInfoC.h
@@ -160,7 +160,7 @@ namespace PortableInterceptor
// TAO_IDL - Generated from
// be\be_visitor_operation/operation_ch.cpp:46
- virtual ::PortableInterceptor::AdapterManagerId manager_id (
+ virtual char * manager_id (
ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
)
ACE_THROW_SPEC ((
diff --git a/TAO/tao/IORInterceptor/IORInterceptorC.h b/TAO/tao/IORInterceptor/IORInterceptorC.h
index 7f78cfe946f..5b0df155836 100644
--- a/TAO/tao/IORInterceptor/IORInterceptorC.h
+++ b/TAO/tao/IORInterceptor/IORInterceptorC.h
@@ -235,7 +235,7 @@ namespace PortableInterceptor
// be\be_visitor_operation/operation_ch.cpp:46
virtual void adapter_manager_state_changed (
- ::PortableInterceptor::AdapterManagerId id,
+ const char * id,
::PortableInterceptor::AdapterState state
ACE_ENV_ARG_DECL_WITH_DEFAULTS
)
diff --git a/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.cpp b/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.cpp
index 35cbb376d28..00a00383fd6 100644
--- a/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.cpp
+++ b/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.cpp
@@ -220,7 +220,7 @@ TAO_IORInterceptor_Adapter_Impl::adapter_state_changed (
void
TAO_IORInterceptor_Adapter_Impl::adapter_manager_state_changed (
- PortableInterceptor::AdapterManagerId id,
+ const char * id,
PortableInterceptor::AdapterState state
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
diff --git a/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.h b/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.h
index 6257c699b9a..5dc289f77d8 100644
--- a/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.h
+++ b/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.h
@@ -80,7 +80,7 @@ public:
ACE_THROW_SPEC ((CORBA::SystemException));
virtual void adapter_manager_state_changed (
- PortableInterceptor::AdapterManagerId id,
+ const char * id,
PortableInterceptor::AdapterState state
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException));
diff --git a/TAO/tao/IORInterceptor_Adapter.h b/TAO/tao/IORInterceptor_Adapter.h
index ea337f5c9f3..5dc955a3393 100644
--- a/TAO/tao/IORInterceptor_Adapter.h
+++ b/TAO/tao/IORInterceptor_Adapter.h
@@ -101,7 +101,7 @@ public:
ACE_THROW_SPEC ((CORBA::SystemException)) = 0;
virtual void adapter_manager_state_changed (
- PortableInterceptor::AdapterManagerId id,
+ const char * id,
PortableInterceptor::AdapterState state
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException)) = 0;
diff --git a/TAO/tao/Invocation_Endpoint_Selectors.cpp b/TAO/tao/Invocation_Endpoint_Selectors.cpp
index bdb493bd648..5221ee8d9c5 100644
--- a/TAO/tao/Invocation_Endpoint_Selectors.cpp
+++ b/TAO/tao/Invocation_Endpoint_Selectors.cpp
@@ -14,7 +14,7 @@ ACE_RCSID (tao,
"$Id$")
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
+ TAO_BEGIN_VERSIONED_NAMESPACE_DECL
TAO_Invocation_Endpoint_Selector::~TAO_Invocation_Endpoint_Selector (void)
{
@@ -27,98 +27,10 @@ TAO_Default_Endpoint_Selector::~TAO_Default_Endpoint_Selector (void)
}
void
-TAO_Default_Endpoint_Selector::select_endpoint (
- TAO::Profile_Transport_Resolver *r,
- ACE_Time_Value *max_wait_time
- ACE_ENV_ARG_DECL)
+TAO_Default_Endpoint_Selector::select_endpoint (TAO::Profile_Transport_Resolver *r,
+ ACE_Time_Value *max_wait_time
+ ACE_ENV_ARG_DECL)
{
-#if defined (ACE_HAS_IPV6)
- // See if we have IIOP selector preference parameters set.
- // If so we need to walk a different path in selecting an endpoint.
- if (r->stub ()->orb_core ()->orb_params ()->prefer_ipv6_interfaces () ||
- r->stub ()->orb_core ()->orb_params ()->connect_ipv6_only ())
- {
- bool test_ipv6 = true; // first round try IPv6
-
- for (unsigned test_count = 2; test_count > 0 ;--test_count)
- {
- do
- {
- r->profile (r->stub ()->profile_in_use ());
-
- // Check whether we need to do a blocked wait or we have a
- // non-blocked wait and we support that. If this is not the
- // case we can't use this profile so try the next.
- if (r->blocked_connect () ||
- (!r->blocked_connect () &&
- r->profile ()->supports_non_blocking_oneways ()))
- {
- const size_t endpoint_count =
- r->profile ()->endpoint_count ();
-
- TAO_Endpoint *ep =
- r->profile ()->endpoint ();
-
- for (size_t i = 0; i < endpoint_count; ++i)
- {
- // in case we're running the first round:
- // try this endpoint if it either *not* an IIOP endpoint OR
- // if it is an IIOP IPv6 endpoint.
- // else
- // only try when it's an IPv4 IIOP endpoint
- bool try_ep = test_ipv6;
-
- if (r->profile ()->tag () == IOP::TAG_INTERNET_IOP)
- {
- TAO_IIOP_Endpoint *iep =
- dynamic_cast (ep);
- if (!iep->is_ipv6_decimal ())
- {
- const ACE_INET_Addr &addr = iep->object_addr ();
-
- if (test_ipv6)
- try_ep =
- addr.get_type () == AF_INET6 &&
- !addr.is_ipv4_mapped_ipv6();
- else
- try_ep =
- addr.get_type () == AF_INET ||
- (addr.get_type () == AF_INET6 &&
- addr.is_ipv4_mapped_ipv6());
- }
- }
-
- if (try_ep)
- {
- TAO_Base_Transport_Property desc (ep);
- const bool retval =
- r->try_connect (&desc,
- max_wait_time
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Check if the connect has completed.
- if (retval)
- return;
- }
-
- // Go to the next endpoint in this profile.
- ep = ep->next ();
- }
- }
- }
- while (r->stub ()->next_profile_retry () != 0);
-
- // If we get here we did not find any suitable non-IPv4 endpoint so
- // now try those if allowed
- if (!r->stub ()->orb_core ()->orb_params ()->connect_ipv6_only ())
- test_ipv6 = false;
- else
- break; // Do not test remaining (if any) IPv4 endpoints
- }
- }
- else
-#endif /* ACE_HAS_IPV6 */
do
{
r->profile (r->stub ()->profile_in_use ());
@@ -127,18 +39,41 @@ TAO_Default_Endpoint_Selector::select_endpoint (
// non-blocked wait and we support that. If this is not the
// case we can't use this profile so try the next.
if (r->blocked_connect () ||
- (!r->blocked_connect () && r->profile ()->supports_non_blocking_oneways ()))
+ (!r->blocked_connect () &&
+ r->profile ()->supports_non_blocking_oneways ()))
{
- size_t const endpoint_count =
- r->profile ()->endpoint_count ();
+ if (r->profile ()->endpoint_count () > 1 &&
+ r->use_parallel_connect())
+ {
+
+ TAO_Endpoint *ep =
+ r->profile ()->endpoint ();
- TAO_Endpoint * ep =
- r->profile ()->endpoint ();
+ TAO_Base_Transport_Property desc (ep);
+ bool success =
+ r->try_parallel_connect (&desc,
+ max_wait_time
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
- for (size_t i = 0; i < endpoint_count; ++i)
+ // Check if the connect has completed.
+ if (success)
+ return;
+ // The default implementation of try_parallel_connect returns
+ // a not supported errno. In this case, allow the ordinary
+ // connection mechanism to be tried. OTOH, if the connection
+ // attempt failed for some other reason, then abandon this
+ // profile and try the next one in the list.
+ else if (errno != ENOTSUP)
+ continue;
+ }
+
+ for (TAO_Endpoint *ep = r->profile ()->first_filtered_endpoint ();
+ ep != 0;
+ ep = r->profile ()->next_filtered_endpoint (ep))
{
TAO_Base_Transport_Property desc (ep);
- bool const retval =
+ bool retval =
r->try_connect (&desc,
max_wait_time
ACE_ENV_ARG_PARAMETER);
@@ -147,14 +82,13 @@ TAO_Default_Endpoint_Selector::select_endpoint (
// Check if the connect has completed.
if (retval)
return;
-
- // Go to the next endpoint in this profile.
- ep = ep->next ();
}
+
}
}
while (r->stub ()->next_profile_retry () != 0);
+
// If we get here, we completely failed to find an endpoint selector
// that we know how to use, so throw an exception.
ACE_THROW (CORBA::TRANSIENT (CORBA::OMGVMCID | 2,
diff --git a/TAO/tao/Invocation_Endpoint_Selectors.h b/TAO/tao/Invocation_Endpoint_Selectors.h
index 29b5580d88a..bd2c5101889 100644
--- a/TAO/tao/Invocation_Endpoint_Selectors.h
+++ b/TAO/tao/Invocation_Endpoint_Selectors.h
@@ -99,6 +99,7 @@ public:
virtual void select_endpoint (TAO::Profile_Transport_Resolver *r,
ACE_Time_Value *val
ACE_ENV_ARG_DECL);
+
};
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/LF_CH_Event.h b/TAO/tao/LF_CH_Event.h
index 2a92f9007ab..f9adcc5fb1b 100644
--- a/TAO/tao/LF_CH_Event.h
+++ b/TAO/tao/LF_CH_Event.h
@@ -23,6 +23,8 @@
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
+class TAO_LF_Multi_Event;
+
/**
* @class TAO_LF_CH_Event
*
@@ -35,6 +37,15 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL
class TAO_Export TAO_LF_CH_Event: public TAO_LF_Event
{
public:
+ /**
+ * The TAO_LF_Multi_Event class is another specialization of
+ * TAO_LF_Event, used for aggregating many connection handlers into
+ * a single event object.. It requires friendship so that it can
+ * check the is_state_final() flag on each of its contained
+ * connection handlers.
+ */
+ friend class TAO_LF_Multi_Event;
+
/// Constructor
TAO_LF_CH_Event (void);
diff --git a/TAO/tao/LF_Connect_Strategy.cpp b/TAO/tao/LF_Connect_Strategy.cpp
index d1d71b550e3..bc401286334 100644
--- a/TAO/tao/LF_Connect_Strategy.cpp
+++ b/TAO/tao/LF_Connect_Strategy.cpp
@@ -1,4 +1,5 @@
#include "tao/LF_Connect_Strategy.h"
+#include "tao/LF_Multi_Event.h"
#include "tao/Connection_Handler.h"
#include "tao/LF_Follower.h"
#include "tao/Leader_Follower.h"
@@ -41,41 +42,26 @@ TAO_LF_Connect_Strategy::synch_options (ACE_Time_Value *timeout,
}
int
-TAO_LF_Connect_Strategy::wait (TAO_Connection_Handler *ch,
+TAO_LF_Connect_Strategy::wait_i (TAO_LF_Event *ev,
+ TAO_Transport *transport,
ACE_Time_Value *max_wait_time)
{
- ACE_ASSERT (ch != 0);
-
- return this->wait (ch->transport (),
- max_wait_time);
-}
-
-int
-TAO_LF_Connect_Strategy::wait (TAO_Transport *transport,
- ACE_Time_Value *max_wait_time)
-{
- // Basically the connection was EINPROGRESS, but before we could
- // wait for it some other thread detected a failure and cleaned up
- // the connection handler.
if (transport == 0)
return -1;
- TAO_Connection_Handler *ch =
- transport->connection_handler ();
-
TAO_Leader_Follower &leader_follower =
this->orb_core_->leader_follower ();
int result =
- leader_follower.wait_for_event (ch,
+ leader_follower.wait_for_event (ev,
transport,
max_wait_time);
- // Set the result.
- if (ch->error_detected () && result != -1)
+ if (ev->error_detected () && result != -1)
result = -1;
return result;
}
+
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/LF_Connect_Strategy.h b/TAO/tao/LF_Connect_Strategy.h
index 4cff8ed7976..35e6e514046 100644
--- a/TAO/tao/LF_Connect_Strategy.h
+++ b/TAO/tao/LF_Connect_Strategy.h
@@ -28,7 +28,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-class TAO_Connector;
+class TAO_LF_Event;
/**
* @class TAO_LF_Connect_Strategy
@@ -53,13 +53,11 @@ public:
virtual void synch_options (ACE_Time_Value *val,
ACE_Synch_Options &opt);
- virtual int wait (TAO_Connection_Handler *ch,
+protected:
+ virtual int wait_i (TAO_LF_Event *ev,
+ TAO_Transport *t,
ACE_Time_Value *val);
- virtual int wait (TAO_Transport *ch,
- ACE_Time_Value *val);
-
-
};
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/LF_Event.h b/TAO/tao/LF_Event.h
index 678be63cb3c..473fc8a4868 100644
--- a/TAO/tao/LF_Event.h
+++ b/TAO/tao/LF_Event.h
@@ -65,12 +65,15 @@ public:
* method is used to bind the waiting thread to the event, in order
* to let the event signal any important state changes.
*
+ * This is virtual to allow the LF_Multi_Event derived type share
+ * the follower with all the subordinate LF_CH_Events.
+ *
* @return -1 if the LF_Event is already bound, 0 otherwise
*/
- int bind (TAO_LF_Follower *follower);
+ virtual int bind (TAO_LF_Follower *follower);
/// Unbind the follower
- int unbind (void);
+ virtual int unbind (void);
//@{
/** @name State management
diff --git a/TAO/tao/MProfile.cpp b/TAO/tao/MProfile.cpp
index 59e25c0bfb7..94fb9e4dbf0 100644
--- a/TAO/tao/MProfile.cpp
+++ b/TAO/tao/MProfile.cpp
@@ -364,4 +364,19 @@ TAO_MProfile::policy_list (ACE_ENV_SINGLE_ARG_DECL)
return ret_val;
}
+int
+TAO_MProfile::give_shared_profile (TAO_Profile *pfile)
+{
+ for (unsigned i = 0; i < this->last_; i++)
+ if (pfile->tag() == this->pfiles_[i]->tag() &&
+ pfile->compare_key(this->pfiles_[i]))
+ {
+ this->pfiles_[i]->add_generic_endpoint(pfile->endpoint());
+ pfile->_decr_refcnt();
+ return i;
+ }
+ return this->give_profile(pfile,0);
+}
+
+
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/MProfile.h b/TAO/tao/MProfile.h
index ba45b3a4a5d..7fef351e37c 100644
--- a/TAO/tao/MProfile.h
+++ b/TAO/tao/MProfile.h
@@ -140,7 +140,7 @@ public:
/// Return the index of this entry or -1 if it can not be added.
/// this object assumes ownership of this profile!!
- int give_profile (TAO_Profile *pfile);
+ int give_profile (TAO_Profile *pfile, int share = 0);
/// append the profiles in pfiles to this object. The count
/// will be incremented on the individual profile objects.
@@ -217,6 +217,12 @@ private:
/// Helper method to implement the destructor
void cleanup (void);
+ /// A helper to give_profile to be used when share is true. This
+ /// method is used primarily to help the corbaloc parser create a
+ /// single profile with multiple endpoints rather than constructing
+ /// multiple profiles with 1 endpoint per.
+ int give_shared_profile (TAO_Profile *pfile);
+
private:
/**
diff --git a/TAO/tao/MProfile.i b/TAO/tao/MProfile.i
index b3ebb70abf5..2cf4d05d274 100644
--- a/TAO/tao/MProfile.i
+++ b/TAO/tao/MProfile.i
@@ -142,8 +142,10 @@ TAO_MProfile::rewind (void)
current_ = 0;
}
ACE_INLINE int
-TAO_MProfile::give_profile (TAO_Profile *pfile)
+TAO_MProfile::give_profile (TAO_Profile *pfile, int share)
{
+ if (share)
+ return this->give_shared_profile(pfile);
// skip by the used slots
if (last_ == size_) // full!
return -1;
diff --git a/TAO/tao/Makefile.am b/TAO/tao/Makefile.am
index 8829c8e503c..40e0939707f 100644
--- a/TAO/tao/Makefile.am
+++ b/TAO/tao/Makefile.am
@@ -130,6 +130,7 @@ libTAO_la_SOURCES = \
LF_Follower_Auto_Adder.cpp \
LF_Follower_Auto_Ptr.cpp \
LF_Invocation_Event.cpp \
+ LF_Multi_Event.cpp \
LF_Strategy.cpp \
LF_Strategy_Complete.cpp \
LRU_Connection_Purging_Strategy.cpp \
@@ -276,6 +277,7 @@ nobase_include_HEADERS = \
Any_Insert_Policy_T.h \
Arg_Traits_T.h \
Argument.h \
+ Array_Traits_T.h \
Array_VarOut_T.cpp \
Array_VarOut_T.h \
Array_VarOut_T.inl \
@@ -301,6 +303,16 @@ nobase_include_HEADERS = \
BooleanSeq.pidl \
BooleanSeqC.h \
BooleanSeqS.h \
+ Bounded_Array_Allocation_Traits.h \
+ Bounded_Array_Sequence_T.h \
+ Bounded_Basic_String_Sequence_T.h \
+ Bounded_Object_Reference_Sequence_T.h \
+ Bounded_Reference_Allocation_Traits.h \
+ Bounded_Sequence_CDR_T.h \
+ Bounded_String_Sequence_T.h \
+ Bounded_Value_Allocation_Traits_T.h \
+ Bounded_Value_Sequence_T.h \
+ Bounded_Wstring_Sequence_T.h \
Buffer_Allocator_T.cpp \
Buffer_Allocator_T.h \
Buffering_Constraint_Policy.h \
@@ -405,6 +417,7 @@ nobase_include_HEADERS = \
GIOP_Message_Version.inl \
GIOP_Utils.h \
GUIResource_Factory.h \
+ Generic_Sequence_T.h \
IFR_Client_Adapter.h \
IIOP.pidl \
IIOPC.h \
@@ -461,6 +474,7 @@ nobase_include_HEADERS = \
LF_Follower_Auto_Ptr.h \
LF_Follower_Auto_Ptr.inl \
LF_Invocation_Event.h \
+ LF_Multi_Event.h \
LF_Strategy.h \
LF_Strategy_Complete.h \
LRU_Connection_Purging_Strategy.h \
@@ -518,6 +532,9 @@ nobase_include_HEADERS = \
Object_Proxy_Broker.h \
Object_Ref_Table.h \
Object_Ref_Table.inl \
+ Object_Reference_Sequence_Element_T.h \
+ Object_Reference_Traits_Base_T.h \
+ Object_Reference_Traits_T.h \
Object_T.cpp \
Object_T.h \
Objref_VarOut_T.cpp \
@@ -570,6 +587,7 @@ nobase_include_HEADERS = \
Pseudo_VarOut_T.h \
Pseudo_VarOut_T.inl \
Queued_Message.h \
+ Range_Checking_T.h \
Reactive_Connect_Strategy.h \
Reactive_Flushing_Strategy.h \
Refcounted_ObjectKey.h \
@@ -588,6 +606,7 @@ nobase_include_HEADERS = \
Seq_Var_T.cpp \
Seq_Var_T.h \
Seq_Var_T.inl \
+ Sequence_T.h \
ServerRequestInterceptor_Adapter.h \
ServerRequestInterceptor_Adapter_Factory.h \
Server_Strategy_Factory.h \
@@ -609,6 +628,10 @@ nobase_include_HEADERS = \
StringSeqC.h \
StringSeqS.h \
String_Alloc.h \
+ String_Manager_T.h \
+ String_Sequence_Element_T.h \
+ String_Traits_Base_T.h \
+ String_Traits_T.h \
Stub.h \
Stub.i \
Stub_Factory.h \
@@ -672,8 +695,20 @@ nobase_include_HEADERS = \
UShortSeq.pidl \
UShortSeqC.h \
UShortSeqS.h \
+ Unbounded_Array_Allocation_Traits_T.h \
+ Unbounded_Array_Sequence_T.h \
+ Unbounded_Basic_String_Sequence_T.h \
+ Unbounded_Object_Reference_Sequence_T.h \
+ Unbounded_Octet_Sequence_T.h \
+ Unbounded_Reference_Allocation_Traits_T.h \
+ Unbounded_Sequence_CDR_T.h \
+ Unbounded_String_Sequence_T.h \
+ Unbounded_Value_Allocation_Traits_T.h \
+ Unbounded_Value_Sequence_T.h \
+ Unbounded_Wstring_Sequence_T.h \
UserException.h \
UserException.inl \
+ Value_Traits_T.h \
Valuetype_Adapter.h \
Valuetype_Adapter_Factory.h \
VarOut_T.cpp \
@@ -1302,6 +1337,7 @@ libTAO_PortableServer_la_CPPFLAGS = \
-DTAO_PORTABLESERVER_BUILD_DLL
libTAO_PortableServer_la_SOURCES = \
+ PortableServer/Acceptor_Filter_Factory.cpp \
PortableServer/Active_Object_Map.cpp \
PortableServer/Active_Object_Map_Entry.cpp \
PortableServer/Active_Policy_Strategies.cpp \
@@ -1360,6 +1396,8 @@ libTAO_PortableServer_la_SOURCES = \
PortableServer/Operation_Table_Perfect_Hash.cpp \
PortableServer/POAManager.cpp \
PortableServer/POAManagerC.cpp \
+ PortableServer/POAManagerFactory.cpp \
+ PortableServer/POAManagerFactoryC.cpp \
PortableServer/POA_Cached_Policies.cpp \
PortableServer/POA_Current.cpp \
PortableServer/POA_Current_Factory.cpp \
@@ -1429,6 +1467,7 @@ libTAO_PortableServer_la_LIBADD = \
$(ACE_BUILDDIR)/ace/libACE.la
nobase_include_HEADERS += \
+ PortableServer/Acceptor_Filter_Factory.h \
PortableServer/Active_Object_Map.h \
PortableServer/Active_Object_Map.i \
PortableServer/Active_Object_Map_Entry.h \
@@ -1525,6 +1564,9 @@ nobase_include_HEADERS += \
PortableServer/POAManager.i \
PortableServer/POAManager.pidl \
PortableServer/POAManagerC.h \
+ PortableServer/POAManagerFactory.h \
+ PortableServer/POAManagerFactory.pidl \
+ PortableServer/POAManagerFactoryC.h \
PortableServer/POA_Cached_Policies.h \
PortableServer/POA_Cached_Policies.i \
PortableServer/POA_Current.h \
@@ -2242,6 +2284,74 @@ EXTRA_DIST += \
DynamicInterface/TAO_DynamicInterface.rc
+## Makefile.EndpointPolicy.am
+
+lib_LTLIBRARIES += libTAO_EndpointPolicy.la
+
+libTAO_EndpointPolicy_la_CPPFLAGS = \
+ -I$(ACE_ROOT) \
+ -I$(ACE_BUILDDIR) \
+ -I$(TAO_ROOT) \
+ -I$(TAO_BUILDDIR) \
+ -DTAO_ENDPOINTPOLICY_BUILD_DLL
+
+libTAO_EndpointPolicy_la_SOURCES = \
+ EndpointPolicy/EndpointPolicy.cpp \
+ EndpointPolicy/EndpointPolicyA.cpp \
+ EndpointPolicy/EndpointPolicyC.cpp \
+ EndpointPolicy/EndpointPolicyTypeA.cpp \
+ EndpointPolicy/EndpointPolicyTypeC.cpp \
+ EndpointPolicy/EndpointPolicy_Factory.cpp \
+ EndpointPolicy/EndpointPolicy_ORBInitializer.cpp \
+ EndpointPolicy/EndpointPolicy_i.cpp \
+ EndpointPolicy/Endpoint_Acceptor_Filter.cpp \
+ EndpointPolicy/Endpoint_Acceptor_Filter_Factory.cpp \
+ EndpointPolicy/IIOPEndpointValueA.cpp \
+ EndpointPolicy/IIOPEndpointValueC.cpp \
+ EndpointPolicy/IIOPEndpointValue_i.cpp
+
+libTAO_EndpointPolicy_la_LDFLAGS = \
+ -version-number @TAO_MAJOR@:@TAO_MINOR@:@TAO_BETA@
+
+libTAO_EndpointPolicy_la_LIBADD = \
+ libTAO_PI.la \
+ libTAO_CodecFactory.la \
+ libTAO_PortableServer.la \
+ libTAO_AnyTypeCode.la \
+ libTAO.la \
+ $(ACE_BUILDDIR)/ace/libACE.la
+
+nobase_include_HEADERS += \
+ EndpointPolicy/EndpointPolicy.h \
+ EndpointPolicy/EndpointPolicyA.h \
+ EndpointPolicy/EndpointPolicyC.h \
+ EndpointPolicy/EndpointPolicyC.inl \
+ EndpointPolicy/EndpointPolicyTypeA.h \
+ EndpointPolicy/EndpointPolicyTypeC.h \
+ EndpointPolicy/EndpointPolicy_Export.h \
+ EndpointPolicy/EndpointPolicy_Factory.h \
+ EndpointPolicy/EndpointPolicy_ORBInitializer.h \
+ EndpointPolicy/EndpointPolicy_i.h \
+ EndpointPolicy/Endpoint_Acceptor_Filter.h \
+ EndpointPolicy/Endpoint_Acceptor_Filter_Factory.h \
+ EndpointPolicy/Endpoint_Value_Impl.h \
+ EndpointPolicy/IIOPEndpointValueA.h \
+ EndpointPolicy/IIOPEndpointValueC.h \
+ EndpointPolicy/IIOPEndpointValue_i.h
+
+pkgconfig_DATA += \
+ TAO_EndpointPolicy.pc
+
+CLEANFILES += \
+ TAO_EndpointPolicy.pc
+
+TAO_EndpointPolicy.pc: ${top_builddir}/config.status ${srcdir}/EndpointPolicy/TAO_EndpointPolicy.pc.in
+ ${top_builddir}/config.status --file $@:${srcdir}/EndpointPolicy/TAO_EndpointPolicy.pc.in
+
+EXTRA_DIST += \
+ EndpointPolicy/TAO_EndpointPolicy.pc.in
+
+
## Makefile.ObjRefTemplate.am
lib_LTLIBRARIES += libTAO_ObjRefTemplate.la
diff --git a/TAO/tao/Messaging/ExceptionHolderC.cpp b/TAO/tao/Messaging/ExceptionHolderC.cpp
index 8de5efc6d7b..3c9396ae7da 100644
--- a/TAO/tao/Messaging/ExceptionHolderC.cpp
+++ b/TAO/tao/Messaging/ExceptionHolderC.cpp
@@ -89,6 +89,12 @@ Messaging::ExceptionHolder::_tao_obv_repository_id (void) const
return this->_tao_obv_static_repository_id ();
}
+void
+Messaging::ExceptionHolder::_tao_obv_truncatable_repo_ids (Repository_Id_List& ids) const
+{
+ ids.push_back (this->_tao_obv_static_repository_id ());
+}
+
void
Messaging::ExceptionHolder::_tao_any_destructor (void *_tao_void_pointer)
{
@@ -100,57 +106,49 @@ Messaging::ExceptionHolder::_tao_any_destructor (void *_tao_void_pointer)
Messaging::ExceptionHolder::~ExceptionHolder (void)
{}
-::CORBA::Boolean Messaging::ExceptionHolder::_tao_marshal_v (TAO_OutputCDR & strm) const
+::CORBA::Boolean
+Messaging::ExceptionHolder::_tao_marshal_v (TAO_OutputCDR & strm) const
{
return this->_tao_marshal__Messaging_ExceptionHolder (strm);
}
-::CORBA::Boolean Messaging::ExceptionHolder::_tao_unmarshal_v (TAO_InputCDR & strm)
+::CORBA::Boolean
+Messaging::ExceptionHolder::_tao_unmarshal_v (TAO_InputCDR & strm)
{
return this->_tao_unmarshal__Messaging_ExceptionHolder (strm);
}
-::CORBA::Boolean Messaging::ExceptionHolder::_tao_unmarshal (
+::CORBA::Boolean
+Messaging::ExceptionHolder::_tao_match_formal_type (ptrdiff_t formal_type_id) const
+{
+ return formal_type_id ==
+ reinterpret_cast(&Messaging::ExceptionHolder::_downcast);
+}
+
+::CORBA::Boolean
+Messaging::ExceptionHolder::_tao_unmarshal (
TAO_InputCDR &strm,
ExceptionHolder *&new_object
)
{
::CORBA::ValueBase *base = 0;
- ::CORBA::ValueFactory_var factory;
::CORBA::Boolean retval =
::CORBA::ValueBase::_tao_unmarshal_pre (
strm,
- factory.out (),
base,
ExceptionHolder::_tao_obv_static_repository_id ()
);
if (retval == 0)
- {
return 0;
- }
- if (factory.in () != 0)
- {
- base = factory->create_for_unmarshal ();
-
- if (base == 0)
- {
- return 0; // %! except.?
- }
-
- retval = base->_tao_unmarshal_v (strm);
-
- if (retval == 0)
- {
+ if (base != 0 && !base->_tao_unmarshal_v (strm))
return 0;
- }
- }
// Now base must be null or point to the unmarshaled object.
// Align the pointer to the right subobject.
new_object = ExceptionHolder::_downcast (base);
- return retval;
+ return 1;
}
// TAO_IDL - Generated from
diff --git a/TAO/tao/Messaging/ExceptionHolderC.h b/TAO/tao/Messaging/ExceptionHolderC.h
index 841d6712b25..edbcde265bd 100644
--- a/TAO/tao/Messaging/ExceptionHolderC.h
+++ b/TAO/tao/Messaging/ExceptionHolderC.h
@@ -42,7 +42,7 @@
#include "tao/Messaging/messaging_export.h"
#include "tao/Valuetype/ValueBase.h"
-#include "tao/Valuetype/Valuetype_Adapter_Impl.h"
+#include "tao/Valuetype/Valuetype_Adapter_Factory_Impl.h"
#include "tao/ORB.h"
#include "tao/SystemException.h"
#include "tao/Environment.h"
@@ -109,6 +109,8 @@ namespace Messaging
virtual const char* _tao_obv_repository_id (void) const;
+ virtual void _tao_obv_truncatable_repo_ids (Repository_Id_List &) const;
+
static const char* _tao_obv_static_repository_id (void);
static void _tao_any_destructor (void *);
@@ -160,6 +162,7 @@ namespace Messaging
virtual ::CORBA::Boolean _tao_marshal_v (TAO_OutputCDR &) const;
virtual ::CORBA::Boolean _tao_unmarshal_v (TAO_InputCDR &);
+ virtual ::CORBA::Boolean _tao_match_formal_type (ptrdiff_t ) const;
private:
ExceptionHolder (const ExceptionHolder &);
@@ -295,5 +298,3 @@ TAO_END_VERSIONED_NAMESPACE_DECL
#include /**/ "ace/post.h"
#endif /* ifndef */
-
-
diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp
index 3bcc3e37d36..98bb700a342 100644
--- a/TAO/tao/ORB.cpp
+++ b/TAO/tao/ORB.cpp
@@ -36,6 +36,7 @@ ACE_RCSID (tao,
#endif /* ! __ACE_INLINE__ */
#include "ace/Dynamic_Service.h"
+#include "ace/Service_Config.h"
#include "ace/Arg_Shifter.h"
#include "ace/Reactor.h"
#include "ace/Argv_Type_Converter.h"
@@ -188,7 +189,7 @@ CORBA::ORB::destroy (ACE_ENV_SINGLE_ARG_DECL)
if (TAO_debug_level > 2)
{
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("CORBA::ORB::destroy() has been called on ORB <%s>.\n"),
+ ACE_TEXT ("CORBA::ORB::destroy() called on ORB <%s>.\n"),
ACE_TEXT_TO_TCHAR_IN (this->orb_core ()->orbid ())));
}
@@ -1074,7 +1075,8 @@ CORBA::ORB::resolve_initial_references (const char *name,
}
else if (ACE_OS::strcmp (name, TAO_OBJID_POACURRENT) == 0)
{
- result = this->orb_core ()->resolve_poa_current (ACE_ENV_SINGLE_ARG_PARAMETER);
+ result = this->orb_core ()->resolve_poa_current
+ (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (CORBA::Object::_nil ());
}
else if (ACE_OS::strcmp (name, TAO_OBJID_POLICYMANAGER) == 0)
@@ -1087,33 +1089,39 @@ CORBA::ORB::resolve_initial_references (const char *name,
}
else if (ACE_OS::strcmp (name, TAO_OBJID_IORMANIPULATION) == 0)
{
- result = this->orb_core ()->resolve_ior_manipulation (ACE_ENV_SINGLE_ARG_PARAMETER);
+ result = this->orb_core ()->resolve_ior_manipulation
+ (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (CORBA::Object::_nil ());
}
else if (ACE_OS::strcmp (name, TAO_OBJID_IORTABLE) == 0)
{
- result = this->orb_core ()->resolve_ior_table (ACE_ENV_SINGLE_ARG_PARAMETER);
+ result = this->orb_core ()->resolve_ior_table
+ (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (CORBA::Object::_nil ());
}
else if (ACE_OS::strcmp (name, TAO_OBJID_DYNANYFACTORY) == 0)
{
- result = this->orb_core ()->resolve_dynanyfactory (ACE_ENV_SINGLE_ARG_PARAMETER);
+ result = this->orb_core ()->resolve_dynanyfactory
+ (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (CORBA::Object::_nil ());
}
else if (ACE_OS::strcmp (name, TAO_OBJID_TYPECODEFACTORY) == 0)
{
- result = this->orb_core ()->resolve_typecodefactory (ACE_ENV_SINGLE_ARG_PARAMETER);
+ result = this->orb_core ()->resolve_typecodefactory
+ (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (CORBA::Object::_nil ());
}
else if (ACE_OS::strcmp (name, TAO_OBJID_CODECFACTORY) == 0)
{
- result = this->orb_core ()->resolve_codecfactory (ACE_ENV_SINGLE_ARG_PARAMETER);
+ result = this->orb_core ()->resolve_codecfactory
+ (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (CORBA::Object::_nil ());
}
#if TAO_HAS_INTERCEPTORS == 1
else if (ACE_OS::strcmp (name, TAO_OBJID_PICurrent) == 0)
{
- result = this->orb_core ()->resolve_picurrent (ACE_ENV_SINGLE_ARG_PARAMETER);
+ result = this->orb_core ()->resolve_picurrent
+ (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (CORBA::Object::_nil ());
}
#endif
@@ -1151,7 +1159,7 @@ CORBA::ORB::resolve_initial_references (const char *name,
// Look for an environment variable called "IOR".
//
CORBA::String_var ior_env_var_name =
- CORBA::string_alloc (static_cast (ACE_OS::strlen (name) + 3));
+ CORBA::string_alloc (static_cast (ACE_OS::strlen (name) + 3));
ACE_OS::strcpy (ior_env_var_name.inout (),
name);
@@ -1279,7 +1287,6 @@ TAO::ORB::init_orb_globals (ACE_ENV_SINGLE_ARG_DECL)
++orb_init_count;
}
-#if defined (ACE_HAS_EXCEPTIONS)
// This must be done after the system TypeCodes and Exceptions have
// been initialized. An unexpected exception will cause TAO's
// unexpected exception handler to be called. That handler
@@ -1293,39 +1300,6 @@ TAO::ORB::init_orb_globals (ACE_ENV_SINGLE_ARG_DECL)
*/
TAO_Singleton_Manager::instance ()->_set_unexpected (
::TAO_unexpected_exception_handler);
-#endif /* ACE_HAS_EXCEPTIONS */
-
- // Verify some of the basic implementation requirements. This test
- // gets optimized away by a decent compiler (or else the rest of the
- // routine does).
- //
- // NOTE: we still "just" assume that native floating point is IEEE.
- if ( sizeof (CORBA::Boolean) != 1
- || sizeof (CORBA::Short) != 2
- || sizeof (CORBA::Long) != 4
- || sizeof (CORBA::LongLong) != 8
- || sizeof (CORBA::Float) != 4
- || sizeof (CORBA::Double) != 8
- || sizeof (CORBA::LongDouble) != 16
- || sizeof (CORBA::WChar) < 2
- || sizeof (void *) != ACE_SIZEOF_VOID_P)
- {
- ACE_ERROR ((LM_ERROR,
- "%N; ERROR: unexpected basic type size; "
- "b:%d s:%d l:%d ll:%d f:%d d:%d ld:%d wc:%d v:%d\n"
- "please reconfigure TAO\n",
- sizeof (CORBA::Boolean),
- sizeof (CORBA::Short),
- sizeof (CORBA::Long),
- sizeof (CORBA::LongLong),
- sizeof (CORBA::Float),
- sizeof (CORBA::Double),
- sizeof (CORBA::LongDouble),
- sizeof (CORBA::WChar),
- sizeof (void *)));
-
- ACE_THROW (CORBA::INITIALIZE ());
- }
}
const ACE_CString &
@@ -1361,15 +1335,6 @@ CORBA::ORB_init (int &argc,
char *argv[],
const char *orb_name)
{
- // Make sure TAO's singleton manager is initialized.
- //
- // We need to initialize before TAO_default_environment() is called
- // since that call instantiates a TAO_TSS_Singleton.
- if (TAO_Singleton_Manager::instance ()->init () == -1)
- {
- return CORBA::ORB::_nil ();
- }
-
return CORBA::ORB_init (argc,
argv,
orb_name,
@@ -1400,6 +1365,8 @@ CORBA::ORB_init (int &argc,
CORBA::ORB::_nil ()));
// Make sure TAO's singleton manager is initialized.
+ // We need to initialize before TAO_default_environment() is called
+ // since that call instantiates a TAO_TSS_Singleton.
if (TAO_Singleton_Manager::instance ()->init () == -1)
{
return CORBA::ORB::_nil ();
@@ -1435,6 +1402,8 @@ CORBA::ORB_init (int &argc,
CORBA::ORB::_nil ());
}
+
+
if (orbid_string.length () == 0)
{
ACE_Arg_Shifter arg_shifter (command_line.get_argc (),
@@ -1503,10 +1472,33 @@ CORBA::ORB_init (int &argc,
oc.reset (tmp);
}
+
+ // Having the ORB's default static services be shared among all ORBs
+ // is tempting from the point of view of reducing the dynamic
+ // footprint. However, if the ORB in a DLL and the rest of that
+ // application most likely neither cares, nor wishes to know about
+ // them. Furthermore, if the ORB DLL gets unloaded, the static
+ // services it had registered globaly will no longer be accesible,
+ // which will have disastrous consequences at the process
+ // shutdown. Hence, the ACE_Service_Config_Guard ensures that for
+ // the current thread, any references to the global
+ // ACE_Service_Config will be forwarded to the ORB's.
+
+ // Making sure the initialization process in the current thread uses
+ // the correct service repository (ours), instead of the global one.
+ ACE_Service_Config_Guard scg (oc->configuration ());
+
+ /*
+ * Currently I choose to make the ORB an owner of its configuration,
+ * which in general is not quite correct because it is very common ORBs to
+ * need to share the same configuration.
+ */
+
// Initialize the Service Configurator. This must occur before the
// ORBInitializer::pre_init() method is invoked on each registered
// ORB initializer.
- int result = TAO::ORB::open_services (command_line.get_argc (),
+ int result = TAO::ORB::open_services (oc->configuration (),
+ command_line.get_argc (),
command_line.get_TCHAR_argv ());
// Check for errors returned from .
diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp
index 3487f46ca0a..99877176ed8 100644
--- a/TAO/tao/ORB_Core.cpp
+++ b/TAO/tao/ORB_Core.cpp
@@ -99,7 +99,8 @@ TAO_ORB_Core_Static_Resources* TAO_ORB_Core_Static_Resources::instance_ = 0;
// Force an instance to be created at module initialization time,
// since we do not want to worry about double checked locking and
// the race condition to initialize the lock.
-TAO_ORB_Core_Static_Resources* TAO_ORB_Core_Static_Resources::initialization_reference_ =
+TAO_ORB_Core_Static_Resources*
+TAO_ORB_Core_Static_Resources::initialization_reference_ =
TAO_ORB_Core_Static_Resources::instance ();
TAO_ORB_Core_Static_Resources*
@@ -126,7 +127,9 @@ TAO_ORB_Core_Static_Resources::TAO_ORB_Core_Static_Resources (void)
timeout_hook_ (0),
connection_timeout_hook_ (0),
endpoint_selector_factory_name_ ("Default_Endpoint_Selector_Factory"),
- thread_lane_resources_manager_factory_name_ ("Default_Thread_Lane_Resources_Manager_Factory"),
+ thread_lane_resources_manager_factory_name_
+ ("Default_Thread_Lane_Resources_Manager_Factory"),
+
collocation_resolver_name_ ("Default_Collocation_Resolver"),
stub_factory_name_ ("Default_Stub_Factory"),
resource_factory_name_ ("Resource_Factory"),
@@ -136,7 +139,13 @@ TAO_ORB_Core_Static_Resources::TAO_ORB_Core_Static_Resources (void)
iorinterceptor_adapter_factory_name_ ("IORInterceptor_Adapter_Factory"),
valuetype_adapter_factory_name_ ("valuetype_Adapter_Factory"),
poa_factory_name_ ("TAO_Object_Adapter_Factory"),
- poa_factory_directive_ (ACE_TEXT_TO_CHAR_IN (ACE_DYNAMIC_SERVICE_DIRECTIVE("TAO_Object_Adapter_Factory", "TAO_PortableServer", "_make_TAO_Object_Adapter_Factory", "")))
+ poa_factory_directive_
+ (ACE_TEXT_TO_CHAR_IN
+ (ACE_DYNAMIC_SERVICE_DIRECTIVE("TAO_Object_Adapter_Factory",
+ "TAO_PortableServer",
+ "_make_TAO_Object_Adapter_Factory",
+ ""))),
+ alt_connection_timeout_hook_ (0)
{
}
@@ -252,6 +261,17 @@ TAO_ORB_Core::TAO_ORB_Core (const char *orbid)
// Initialize the default request dispatcher.
ACE_NEW (this->request_dispatcher_,
TAO_Request_Dispatcher);
+
+ /*
+ * @TODO: Get rid of the "magic number" for the Service repository size.
+ * Can this be dynamic container instead?
+ */
+ if (ACE_OS::strnlen (this->orbid_, 1) == 0)
+ // (re)use the default/global getsalt
+ ACE_NEW (this->config_, ACE_Service_Gestalt);
+ else
+ ACE_NEW (this->config_,
+ ACE_Service_Gestalt (ACE_Service_Gestalt::MAX_SERVICES / 4));
}
TAO_ORB_Core::~TAO_ORB_Core (void)
@@ -288,6 +308,9 @@ TAO_ORB_Core::~TAO_ORB_Core (void)
orbinitializer_registry_ = 0;
::CORBA::release (this->orb_);
+
+ delete this->config_;
+ this->config_ = 0;
}
int
@@ -338,6 +361,9 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL)
// Use SO_KEEPALIVE (default 0).
int so_keepalive = 0;
+ // Use SO_DONTROUTE (default 0)
+ int so_dontroute = 0;
+
// Use dotted decimal addresses
// @@ This option will be treated as a suggestion to each loaded
// protocol to use a character representation for the numeric
@@ -359,6 +385,8 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL)
int linger = -1;
+ int use_parallel_connects = 0;
+
// Copy command line parameter not to use original.
ACE_Argv_Type_Converter command_line (argc, argv);
@@ -452,6 +480,15 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL)
so_keepalive =
ACE_OS::atoi (current_arg);
+ arg_shifter.consume_arg ();
+ }
+ else if (0 != (current_arg = arg_shifter.get_the_parameter
+ (ACE_LIB_TEXT("-ORBDontRoute"))))
+ {
+ // Use SO_DONTROUTE or not.
+ so_dontroute =
+ ACE_OS::atoi (current_arg);
+
arg_shifter.consume_arg ();
}
else if (0 != (current_arg = arg_shifter.get_the_parameter
@@ -878,7 +915,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL)
ACE_CString lane (ACE_TEXT_TO_CHAR_IN (current_arg));
arg_shifter.consume_arg ();
- if(arg_shifter.is_option_next ())
+ if (arg_shifter.is_option_next ())
return -1;
ACE_CString endpoints (ACE_TEXT_TO_CHAR_IN (arg_shifter.get_current ()));
@@ -915,6 +952,20 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL)
{
negotiate_codesets =
(ACE_OS::atoi (current_arg));
+
+ arg_shifter.consume_arg ();
+ }
+ else if ((current_arg = arg_shifter.get_the_parameter
+ (ACE_LIB_TEXT("-ORBUseParallelConnects"))))
+ {
+ use_parallel_connects = ACE_OS::atoi (current_arg);
+ arg_shifter.consume_arg ();
+ }
+ else if ((current_arg = arg_shifter.get_the_parameter
+ (ACE_LIB_TEXT("-ORBParallelConnectDelay"))))
+ {
+ this->orb_params ()->parallel_connect_delay
+ (ACE_OS::atoi (current_arg));
arg_shifter.consume_arg ();
}
else if (0 != (current_arg = arg_shifter.get_the_parameter
@@ -962,7 +1013,8 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL)
ACE_DEBUG ((LM_ERROR,
ACE_TEXT ("ERROR: Unknown \"-ORB\" option ")
ACE_TEXT ("<%s>.\n"),
- ((current_arg == 0) ? ACE_TEXT("") : current_arg)));
+ ((current_arg == 0) ? ACE_TEXT("")
+ : current_arg)));
}
ACE_THROW_RETURN (CORBA::BAD_PARAM (
@@ -996,7 +1048,8 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL)
if (TAO_debug_level > 0)
{
ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("ERROR: Environment variable TAO_ORBENDPOINT set to invalid value ")
+ ACE_TEXT ("ERROR: Environment variable ")
+ ACE_TEXT ("TAO_ORBENDPOINT set to invalid value ")
ACE_TEXT ("<%s>.\n"),
env_endpoint));
}
@@ -1022,6 +1075,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL)
(void) ACE_OS::signal (SIGPIPE, (ACE_SignalHandler) SIG_IGN);
#endif /* SIGPIPE */
+
// Calling the open method here so that the svc.conf file is
// opened and TAO_default_resource_factory::init () is called by the
// time this method is called.
@@ -1155,9 +1209,14 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL)
this->orb_params ()->cache_incoming_by_dotted_decimal_address
(no_server_side_name_lookups
|| dotted_decimal_addresses);
+
+ this->orb_params ()->use_parallel_connects
+ (use_parallel_connects != 0);
+
this->orb_params ()->linger (linger);
this->orb_params ()->nodelay (nodelay);
this->orb_params ()->sock_keepalive (so_keepalive);
+ this->orb_params ()->sock_dontroute (so_dontroute);
if (rcv_sock_size >= 0)
this->orb_params ()->sock_rcvbuf_size (rcv_sock_size);
if (snd_sock_size >= 0)
@@ -1196,9 +1255,13 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL)
this->flushing_strategy_ = trf->create_flushing_strategy ();
// Look in the service repository for an instance of the Protocol Hooks.
+ const ACE_CString &protocols_hooks_name =
+ TAO_ORB_Core_Static_Resources::instance ()->protocols_hooks_name_;
+
this->protocols_hooks_ =
ACE_Dynamic_Service::instance
- (TAO_ORB_Core_Static_Resources::instance ()->protocols_hooks_name_.c_str());
+ (this->configuration (),
+ ACE_TEXT_CHAR_TO_TCHAR (protocols_hooks_name.c_str()));
// Must have valid protocol hooks.
if (this->protocols_hooks_ == 0)
@@ -1283,7 +1346,7 @@ TAO_ORB_Core::fini (void)
if (this->thread_lane_resources_manager_ != 0)
this->thread_lane_resources_manager_->finalize ();
- (void) TAO::ORB::close_services ();
+ (void) TAO::ORB::close_services (this->configuration ());
// Destroy the object_key table
this->object_key_table_.destroy ();
@@ -1405,9 +1468,13 @@ TAO_ORB_Core::resource_factory (void)
}
// Look in the service repository for an instance.
+ ACE_CString &resource_factory_name =
+ TAO_ORB_Core_Static_Resources::instance ()->resource_factory_name_;
+
this->resource_factory_ =
ACE_Dynamic_Service::instance
- (TAO_ORB_Core_Static_Resources::instance ()->resource_factory_name_.c_str());
+ (this->configuration (),
+ ACE_TEXT_CHAR_TO_TCHAR (resource_factory_name.c_str()));
return this->resource_factory_;
}
@@ -1427,9 +1494,13 @@ TAO_ORB_Core::thread_lane_resources_manager (void)
return *this->thread_lane_resources_manager_;
// If not, lookup the corresponding factory and ask it to make one.
+ const ACE_CString &thread_lane_resources_manager_factory_name =
+ TAO_ORB_Core_Static_Resources::instance ()->thread_lane_resources_manager_factory_name_;
+
TAO_Thread_Lane_Resources_Manager_Factory *factory =
ACE_Dynamic_Service::instance
- (TAO_ORB_Core_Static_Resources::instance ()->thread_lane_resources_manager_factory_name_.c_str());
+ (this->configuration (),
+ ACE_TEXT_CHAR_TO_TCHAR (thread_lane_resources_manager_factory_name.c_str()));
this->thread_lane_resources_manager_ =
factory->create_thread_lane_resources_manager (*this);
@@ -1445,9 +1516,13 @@ TAO_ORB_Core::collocation_resolver (void)
return *this->collocation_resolver_;
// If not, lookup it up.
+ const ACE_CString &collocation_resolver_name =
+ TAO_ORB_Core_Static_Resources::instance ()->collocation_resolver_name_;
+
this->collocation_resolver_ =
ACE_Dynamic_Service::instance
- (TAO_ORB_Core_Static_Resources::instance ()->collocation_resolver_name_.c_str());
+ (this->configuration (),
+ ACE_TEXT_CHAR_TO_TCHAR (collocation_resolver_name.c_str()));
return *this->collocation_resolver_;
}
@@ -1457,18 +1532,21 @@ TAO_ORB_Core::policy_factory_registry_i (void)
{
TAO_PolicyFactory_Registry_Factory *loader =
- ACE_Dynamic_Service::instance (
- "PolicyFactory_Loader");
+ ACE_Dynamic_Service::instance
+ (this->configuration (),
+ ACE_TEXT ("PolicyFactory_Loader"));
+
if (loader == 0)
{
- ACE_Service_Config::process_directive (
+ this->configuration ()->process_directive (
ACE_DYNAMIC_SERVICE_DIRECTIVE("PolicyFactory_Loader",
"TAO_PI",
- "_make_PolicyFactory_Loader",
+ "_make_TAO_PolicyFactory_Loader",
""));
loader =
- ACE_Dynamic_Service::instance (
- "PolicyFactory_Loader");
+ ACE_Dynamic_Service::instance
+ (this->configuration (),
+ ACE_TEXT ("PolicyFactory_Loader"));
}
if (loader != 0)
@@ -1486,7 +1564,8 @@ TAO_ORB_Core::orbinitializer_registry_i (void)
// If not, lookup it up.
this->orbinitializer_registry_ =
ACE_Dynamic_Service::instance
- ("ORBInitializer_Registry");
+ (this->configuration (),
+ ACE_TEXT ("ORBInitializer_Registry"));
#if !defined (TAO_AS_STATIC_LIBS)
// In case we build shared, try to load the PI Client library, in a
@@ -1494,14 +1573,15 @@ TAO_ORB_Core::orbinitializer_registry_i (void)
// output an error then.
if (orbinitializer_registry_ == 0)
{
- ACE_Service_Config::process_directive (
+ this->configuration ()->process_directive (
ACE_DYNAMIC_SERVICE_DIRECTIVE("ORBInitializer_Registry",
"TAO_PI",
"_make_ORBInitializer_Registry",
""));
orbinitializer_registry_ =
ACE_Dynamic_Service::instance
- ("ORBInitializer_Registry");
+ (this->configuration (),
+ ACE_TEXT ("ORBInitializer_Registry"));
}
#endif /* !TAO_AS_STATIC_LIBS */
@@ -1516,9 +1596,13 @@ TAO_ORB_Core::stub_factory (void)
return this->stub_factory_;
// If not, look in the service repository for an instance.
+ const ACE_CString &stub_factory_name =
+ TAO_ORB_Core_Static_Resources::instance ()->stub_factory_name_;
+
this->stub_factory_ =
ACE_Dynamic_Service::instance
- (TAO_ORB_Core_Static_Resources::instance ()->stub_factory_name_.c_str());
+ (this->configuration (),
+ ACE_TEXT_CHAR_TO_TCHAR (stub_factory_name.c_str()));
return this->stub_factory_;
}
@@ -1554,9 +1638,13 @@ TAO_ORB_Core::endpoint_selector_factory (void)
return this->endpoint_selector_factory_;
// If not, look in the service repository for an instance.
+ const ACE_CString &endpoint_selector_factory_name =
+ TAO_ORB_Core_Static_Resources::instance ()->endpoint_selector_factory_name_;
+
this->endpoint_selector_factory_ =
ACE_Dynamic_Service::instance
- (TAO_ORB_Core_Static_Resources::instance ()->endpoint_selector_factory_name_.c_str());
+ (this->configuration (),
+ ACE_TEXT_CHAR_TO_TCHAR (endpoint_selector_factory_name.c_str()));
return this->endpoint_selector_factory_;
}
@@ -1642,7 +1730,9 @@ TAO_ORB_Core::client_factory (void)
{
// Look in the service repository for an instance.
this->client_factory_ =
- ACE_Dynamic_Service::instance ("Client_Strategy_Factory");
+ ACE_Dynamic_Service::instance
+ (this->configuration (),
+ ACE_TEXT ("Client_Strategy_Factory"));
}
return this->client_factory_;
@@ -1655,7 +1745,9 @@ TAO_ORB_Core::server_factory (void)
{
// Look in the service repository for an instance.
this->server_factory_ =
- ACE_Dynamic_Service::instance ("Server_Strategy_Factory");
+ ACE_Dynamic_Service::instance
+ (this->configuration (),
+ ACE_TEXT ("Server_Strategy_Factory"));
}
return this->server_factory_;
@@ -1667,20 +1759,28 @@ TAO_ORB_Core::root_poa (ACE_ENV_SINGLE_ARG_DECL)
// DCL ..
if (CORBA::is_nil (this->root_poa_.in ()))
{
+
+ // Making sure the initialization process in the current thread uses
+ // the correct service repository (ours), instead of the global one.
+ ACE_Service_Config_Guard scg (this->configuration ());
+
+
TAO_ORB_Core_Static_Resources* static_resources =
TAO_ORB_Core_Static_Resources::instance ();
TAO_Adapter_Factory *factory =
- ACE_Dynamic_Service::instance (
+ ACE_Dynamic_Service::instance
+ (this->configuration (),
static_resources->poa_factory_name_.c_str());
if (factory == 0)
{
- ACE_Service_Config::process_directive (
- ACE_TEXT_TO_TCHAR_IN (
+ this->configuration()->process_directive (ACE_TEXT_TO_TCHAR_IN (
static_resources->poa_factory_directive_.c_str()));
+
factory =
- ACE_Dynamic_Service::instance (
+ ACE_Dynamic_Service::instance
+ (this->configuration (),
static_resources->poa_factory_name_.c_str());
}
@@ -1799,7 +1899,8 @@ TAO_ORB_Core::load_policy_validators (TAO_Policy_Validator &validator
if (this->bidir_adapter_ == 0)
{
this->bidir_adapter_ =
- ACE_Dynamic_Service::instance ("BiDirGIOP_Loader");
+ ACE_Dynamic_Service::instance
+ (this->configuration (), ACE_TEXT ("BiDirGIOP_Loader"));
}
// Call the BiDir library if it has been loaded
@@ -1983,6 +2084,8 @@ TAO_ORB_Core::run (ACE_Time_Value *tv,
int perform_work
ACE_ENV_ARG_DECL_NOT_USED)
{
+ ACE_Service_Config_Guard guard (this->configuration());
+
if (TAO_debug_level > 2)
{
ACE_DEBUG ((LM_DEBUG,
@@ -2067,6 +2170,7 @@ TAO_ORB_Core::run (ACE_Time_Value *tv,
// A timeout, terminate the loop...
break;
}
+
if (perform_work)
{
// This is running on behalf of a perform_work() call,
@@ -2171,8 +2275,7 @@ TAO_ORB_Core::destroy (ACE_ENV_SINGLE_ARG_DECL)
//
// Shutdown the ORB and block until the shutdown is complete.
- this->shutdown (1
- ACE_ENV_ARG_PARAMETER);
+ this->shutdown (1 ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
// Invoke Interceptor::destroy() on all registered interceptors.
@@ -2201,7 +2304,6 @@ TAO_ORB_Core::check_shutdown (ACE_ENV_SINGLE_ARG_DECL)
void
TAO_ORB_Core::destroy_interceptors (ACE_ENV_SINGLE_ARG_DECL)
{
-
ACE_TRY
{
ACE_GUARD (TAO_SYNCH_MUTEX, monitor, this->lock_);
@@ -2264,19 +2366,28 @@ void
TAO_ORB_Core::resolve_typecodefactory_i (ACE_ENV_SINGLE_ARG_DECL)
{
TAO_Object_Loader *loader =
- ACE_Dynamic_Service::instance ("TypeCodeFactory_Loader");
+ ACE_Dynamic_Service::instance
+ (this->configuration (),
+ ACE_TEXT ("TypeCodeFactory_Loader"));
+
+#if !defined(TAO_AS_STATIC_LIBS)
if (loader == 0)
{
- ACE_Service_Config::process_directive (
- ACE_DYNAMIC_SERVICE_DIRECTIVE("TypeCodeFactory_Loader",
+ this->configuration ()->process_directive (
+ ACE_DYNAMIC_SERVICE_DIRECTIVE("TypeCodeFactory",
"TAO_TypeCodeFactory",
"_make_TAO_TypeCodeFactory_Loader",
""));
loader =
- ACE_Dynamic_Service::instance ("TypeCodeFactory_Loader");
+ ACE_Dynamic_Service::instance
+ (this->configuration (),
+ ACE_TEXT ("TypeCodeFactory_Loader"));
+
if (loader == 0)
ACE_THROW (CORBA::ORB::InvalidName ());
}
+#endif /* !defined (TAO_AS_STATIC_LIBS) */
+
this->typecode_factory_ =
loader->create_object (this->orb_, 0, 0 ACE_ENV_ARG_PARAMETER);
}
@@ -2285,17 +2396,26 @@ void
TAO_ORB_Core::resolve_codecfactory_i (ACE_ENV_SINGLE_ARG_DECL)
{
TAO_Object_Loader *loader =
- ACE_Dynamic_Service::instance ("CodecFactory_Loader");
+ ACE_Dynamic_Service::instance
+ (this->configuration (),
+ ACE_TEXT ("CodecFactory_Loader"));
+
+#if !defined(TAO_AS_STATIC_LIBS)
if (loader == 0)
{
- ACE_Service_Config::process_directive (
- ACE_DYNAMIC_SERVICE_DIRECTIVE("CodecFactory_Loader",
+ this->configuration()->process_directive (
+ ACE_DYNAMIC_SERVICE_DIRECTIVE("CodecFactory",
"TAO_CodecFactory",
"_make_TAO_CodecFactory_Loader",
""));
loader =
- ACE_Dynamic_Service::instance ("CodecFactory_Loader");
+ ACE_Dynamic_Service::instance
+ (this->configuration (),
+ ACE_TEXT ("CodecFactory_Loader"));
+
}
+#endif /* !defined (TAO_AS_STATIC_LIBS) */
+
if (loader != 0)
{
this->codec_factory_ =
@@ -2308,17 +2428,29 @@ void
TAO_ORB_Core::resolve_poa_current_i (ACE_ENV_SINGLE_ARG_DECL)
{
TAO_Object_Loader *loader =
- ACE_Dynamic_Service::instance ("TAO_POA_Current_Factory");
+ ACE_Dynamic_Service::instance
+ (this->configuration(),
+ ACE_TEXT ("TAO_POA_Current_Factory"));
+
+#if !defined(TAO_AS_STATIC_LIBS)
if (loader == 0)
{
- ACE_Service_Config::process_directive (
+ this->configuration()->process_directive (
ACE_DYNAMIC_SERVICE_DIRECTIVE("TAO_POA_Current_Factory",
"TAO_PortableServer",
"_make_TAO_POA_Current_Factory",
""));
loader =
- ACE_Dynamic_Service::instance ("TAO_POA_Current_Factory");
+ ACE_Dynamic_Service::instance
+ (this->configuration(),
+ ACE_TEXT ("TAO_POA_Current_Factory"));
}
+
+ if (loader == 0)
+ ACE_THROW (CORBA::ORB::InvalidName ());
+
+#endif /* !defined (TAO_AS_STATIC_LIBS) */
+
if (loader != 0)
{
this->poa_current_ =
@@ -2333,17 +2465,24 @@ void
TAO_ORB_Core::resolve_picurrent_i (ACE_ENV_SINGLE_ARG_DECL)
{
TAO_Object_Loader *loader =
- ACE_Dynamic_Service::instance ("PICurrent_Loader");
+ ACE_Dynamic_Service::instance
+ (this->configuration (),
+ ACE_TEXT ("PICurrent_Loader"));
+
+#if !defined(TAO_AS_STATIC_LIBS)
if (loader == 0)
{
- ACE_Service_Config::process_directive (
+ this->configuration ()->process_directive (
ACE_DYNAMIC_SERVICE_DIRECTIVE("PICurrent_Loader",
"TAO_PI",
"_make_TAO_PICurrent_Loader",
""));
loader =
- ACE_Dynamic_Service::instance ("PICurrent_Loader");
+ ACE_Dynamic_Service::instance
+ (this->configuration (),
+ ACE_TEXT ("PICurrent_Loader"));
}
+#endif /* !defined (TAO_AS_STATIC_LIBS) */
if (loader != 0)
{
@@ -2362,17 +2501,24 @@ void
TAO_ORB_Core::resolve_dynanyfactory_i (ACE_ENV_SINGLE_ARG_DECL)
{
TAO_Object_Loader *loader =
- ACE_Dynamic_Service::instance ("DynamicAny_Loader");
+ ACE_Dynamic_Service::instance
+ (this->configuration (),
+ ACE_TEXT ("DynamicAny_Loader"));
+
+#if !defined(TAO_AS_STATIC_LIBS)
if (loader == 0)
{
- ACE_Service_Config::process_directive (
+ this->configuration ()->process_directive (
ACE_DYNAMIC_SERVICE_DIRECTIVE("DynamicAny_Loader",
"TAO_DynamicAny",
"_make_TAO_DynamicAny_Loader",
""));
loader =
- ACE_Dynamic_Service::instance ("DynamicAny_Loader");
+ ACE_Dynamic_Service::instance
+ (this->configuration (),
+ ACE_TEXT ("DynamicAny_Loader"));
}
+#endif /* !defined (TAO_AS_STATIC_LIBS) */
if (loader != 0)
{
@@ -2386,18 +2532,25 @@ void
TAO_ORB_Core::resolve_iormanipulation_i (ACE_ENV_SINGLE_ARG_DECL)
{
TAO_Object_Loader *loader =
- ACE_Dynamic_Service::instance ("IORManip_Loader");
+ ACE_Dynamic_Service::instance
+ (this->configuration (),
+ ACE_TEXT ("IORManip_Loader"));
+#if !defined(TAO_AS_STATIC_LIBS)
if (loader == 0)
{
- ACE_Service_Config::process_directive (
+ this->configuration()->process_directive (
ACE_DYNAMIC_SERVICE_DIRECTIVE("IORManip_Loader",
"TAO_IORManip",
"_make_TAO_IORManip_Loader",
""));
loader =
- ACE_Dynamic_Service::instance ("IORManip_Loader");
+ ACE_Dynamic_Service::instance
+ (this->configuration (),
+ ACE_TEXT ("IORManip_Loader"));
}
+#endif /* !defined (TAO_AS_STATIC_LIBS) */
+
if (loader != 0)
{
this->ior_manip_factory_ =
@@ -2410,29 +2563,39 @@ void
TAO_ORB_Core::resolve_ior_table_i (ACE_ENV_SINGLE_ARG_DECL)
{
TAO_Adapter_Factory *factory =
- ACE_Dynamic_Service::instance ("TAO_IORTable");
+ ACE_Dynamic_Service::instance
+ (this->configuration (),
+ ACE_TEXT ("TAO_IORTable"));
+
+#if !defined(TAO_AS_STATIC_LIBS)
if (factory == 0)
{
- ACE_Service_Config::process_directive (
+ this->configuration ()->process_directive (
ACE_DYNAMIC_SERVICE_DIRECTIVE("TAO_IORTable",
"TAO_IORTable",
"_make_TAO_Table_Adapter_Factory",
""));
factory =
- ACE_Dynamic_Service::instance ("TAO_IORTable");
+ ACE_Dynamic_Service::instance
+ (this->configuration (),
+ ACE_TEXT ("TAO_IORTable"));
}
+#endif /* !defined (TAO_AS_STATIC_LIBS) */
if (factory != 0)
{
- // @@ Not exception safe
- TAO_Adapter *iortable_adapter = factory->create (this);
- this->adapter_registry_.insert (iortable_adapter ACE_ENV_ARG_PARAMETER);
+ ACE_Auto_Ptr iortable_adapter (factory->create (this));
+ iortable_adapter->open (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK;
- iortable_adapter->open (ACE_ENV_SINGLE_ARG_PARAMETER);
+ CORBA::Object_var tmp_root = iortable_adapter->root ();
+
+ this->adapter_registry_.insert (iortable_adapter.get () ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
- this->ior_table_ = iortable_adapter->root ();
+ // It is now (exception) safe to release ownership from the auto pointers
+ this->ior_table_= tmp_root._retn ();
+ iortable_adapter.release ();
}
}
@@ -2709,7 +2872,8 @@ TAO_ORB_Core::implrepo_service (void)
ACE_TRY_NEW_ENV
{
- CORBA::Object_var temp = this->orb_->resolve_initial_references ("ImplRepoService" ACE_ENV_ARG_PARAMETER);
+ CORBA::Object_var temp =
+ this->orb_->resolve_initial_references ("ImplRepoService" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, CORBA::Object::_nil ());
@@ -2719,7 +2883,8 @@ TAO_ORB_Core::implrepo_service (void)
}
ACE_CATCHANY
{
- // Just make sure that we have a null pointer. Ignore the exception anyway.
+ // Just make sure that we have a null pointer. Ignore the exception
+ // anyway.
this->implrepo_service_ = CORBA::Object::_nil ();
}
ACE_ENDTRY;
@@ -2803,15 +2968,77 @@ TAO_ORB_Core::call_timeout_hook (TAO_Stub *stub,
return;
}
(*timeout_hook) (this, stub, has_timeout, time_value);
+
+ Timeout_Hook alt_connection_timeout_hook =
+ TAO_ORB_Core_Static_Resources::instance ()->alt_connection_timeout_hook_;
+
+ if (alt_connection_timeout_hook == 0)
+ return;
+
+ if (!has_timeout || time_value == ACE_Time_Value::zero )
+ {
+ (*alt_connection_timeout_hook) (this, stub, has_timeout,time_value);
+ return;
+ }
+
+ // At this point, both the primary and alternate hooks are defined, and
+ // the primary did indeed set a value
+ ACE_Time_Value tv1;
+ bool ht1;
+ (*alt_connection_timeout_hook) (this, stub, ht1,tv1);
+ if (ht1 && tv1 > ACE_Time_Value::zero && tv1 < time_value)
+ time_value = tv1;
}
void
TAO_ORB_Core::set_timeout_hook (Timeout_Hook hook)
{
// Saving the hook pointer so that we can use it later when needed.
- TAO_ORB_Core_Static_Resources::instance ()->timeout_hook_ = hook;
+ // For now there are only two entry points that may supply a connection
+ // timeout hook. But there might be future entry points, so this should
+ // probably be addressed by a more sophisticated mechanism.
+
+#define TOCSRi TAO_ORB_Core_Static_Resources::instance ()
+
+ // A consern was raised that since this function is called by two
+ // different initializers there may be a race condition that might
+ // require a lock. We are not using a lock at this time because of
+ // two callers, one happens only during service directive processing
+ // and the other only during ORB Initialization time. The former
+ // happens when the OC_Endpoint_Selector_Factory is loaded, the
+ // latter is part of the messaging library. The messaging library
+ // calls this function as part of pre_init processing, and this call
+ // happes for every ORB instance. This was the case before these The
+ // latter call occurs when the messaging library is loaded. The
+ // redundant calls occured then as well. Second, it isn't clear how
+ // a lock in this static method would react in the face of windows
+ // dlls, shared memory segments, etc. Therefore we are continuing to
+ // keep this code lockless as it always was, assuming no
+ // simultanious overwrite will occur.
+
+ if (TOCSRi->connection_timeout_hook_ == 0)
+ {
+ if (TAO_debug_level > 2)
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT("TAO (%P|%t) setting primary hook\n")));
+ TOCSRi->connection_timeout_hook_ = hook;
+ }
+ else if (TOCSRi->connection_timeout_hook_ != hook &&
+ TOCSRi->alt_connection_timeout_hook_ == 0)
+ {
+ if (TAO_debug_level > 2)
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT("TAO (%P|%t) setting alternate hook\n")));
+ TOCSRi->alt_connection_timeout_hook_ = hook;
+ }
+ else
+ if (TAO_debug_level > 2)
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("TAO (%P|%t) not overwriting alternate hook.")
+ ACE_TEXT (" Is it still null? %d\n"),
+ TOCSRi->alt_connection_timeout_hook_ == 0));
- return;
+#undef TOCSRi
}
void
@@ -2991,16 +3218,38 @@ TAO_ORB_Core::ior_interceptor_adapter (void)
ACE_TRY
{
TAO_IORInterceptor_Adapter_Factory * ior_ap_factory =
- ACE_Dynamic_Service::instance (
- TAO_ORB_Core::iorinterceptor_adapter_factory_name ()
- );
+ ACE_Dynamic_Service::instance
+ (this->configuration (),
+ ACE_TEXT_CHAR_TO_TCHAR (TAO_ORB_Core::iorinterceptor_adapter_factory_name ()));
- if (ior_ap_factory)
+#if !defined (TAO_AS_STATIC_LIBS)
+ // In case we build shared, try to load the IOR_Interceptor factory. In a
+ // static build we just can't do this, so don't try it
+ if (ior_ap_factory == 0)
+ {
+ this->configuration()->process_directive
+ (ACE_DYNAMIC_SERVICE_DIRECTIVE("Concrete_IORInterceptor_Adapter_Factory",
+ "TAO_IORInterceptor",
+ "_make_TAO_IORInterceptor_Adapter_Factory_Impl",
+ ""));
+ ior_ap_factory =
+ ACE_Dynamic_Service::instance
+ (this->configuration (), ACE_TEXT("Concrete_IORInterceptor_Adapter_Factory"));
+ }
+#endif /* !TAO_AS_STATIC_LIBS */
+
+ if (ior_ap_factory == 0)
{
- this->ior_interceptor_adapter_ =
- ior_ap_factory->create (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) Unable to get a IORInterceptor factory\n")),
+ 0);
+ ACE_THROW (CORBA::INTERNAL ());
}
+
+ this->ior_interceptor_adapter_ =
+ ior_ap_factory->create (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
}
ACE_CATCHANY
{
@@ -3034,7 +3283,8 @@ TAO_ORB_Core::add_interceptor (
ACE_ERROR ((LM_ERROR,
ACE_TEXT ("(%P|%t) %p\n"),
ACE_TEXT ("ERROR: ORB Core unable to find the ")
- ACE_TEXT ("Client Request Interceptor Adapter Factory instance")));
+ ACE_TEXT ("Client Request Interceptor Adapter Factory ")
+ ACE_TEXT ("instance")));
ACE_THROW (CORBA::INTERNAL ());
}
@@ -3053,9 +3303,9 @@ TAO_ORB_Core::clientrequestinterceptor_adapter_i (void)
if (this->client_request_interceptor_adapter_ == 0)
{
TAO_ClientRequestInterceptor_Adapter_Factory *factory =
- ACE_Dynamic_Service::instance (
- "ClientRequestInterceptor_Adapter_Factory"
- );
+ ACE_Dynamic_Service::instance
+ (this->configuration (),
+ ACE_TEXT ("ClientRequestInterceptor_Adapter_Factory"));
if (factory)
{
@@ -3084,7 +3334,8 @@ TAO_ORB_Core::add_interceptor (
ACE_ERROR ((LM_ERROR,
ACE_TEXT ("(%P|%t) %p\n"),
ACE_TEXT ("ERROR: ORB Core unable to find the ")
- ACE_TEXT ("Server Request Interceptor Adapter Factory instance")));
+ ACE_TEXT ("Server Request Interceptor Adapter Factory ")
+ ACE_TEXT ("instance")));
ACE_THROW (CORBA::INTERNAL ());
}
@@ -3110,7 +3361,8 @@ TAO_ORB_Core::add_interceptor (
ACE_ERROR ((LM_ERROR,
ACE_TEXT ("(%P|%t) %p\n"),
ACE_TEXT ("ERROR: ORB Core unable to find the ")
- ACE_TEXT ("Client Request Interceptor Adapter Factory instance")));
+ ACE_TEXT ("Client Request Interceptor Adapter Factory ")
+ ACE_TEXT ("instance")));
ACE_THROW (CORBA::INTERNAL ());
}
@@ -3136,7 +3388,8 @@ TAO_ORB_Core::add_interceptor (
ACE_ERROR ((LM_ERROR,
ACE_TEXT ("(%P|%t) %p\n"),
ACE_TEXT ("ERROR: ORB Core unable to find the ")
- ACE_TEXT ("Server Request Interceptor Adapter Factory instance")));
+ ACE_TEXT ("Server Request Interceptor Adapter Factory ")
+ ACE_TEXT ("instance")));
ACE_THROW (CORBA::INTERNAL ());
}
@@ -3155,9 +3408,9 @@ TAO_ORB_Core::serverrequestinterceptor_adapter_i (void)
if (this->server_request_interceptor_adapter_ == 0)
{
TAO_ServerRequestInterceptor_Adapter_Factory *factory =
- ACE_Dynamic_Service::instance (
- "ServerRequestInterceptor_Adapter_Factory"
- );
+ ACE_Dynamic_Service::instance
+ (this->configuration (),
+ ACE_TEXT ("ServerRequestInterceptor_Adapter_Factory"));
if (factory)
{
@@ -3167,6 +3420,11 @@ TAO_ORB_Core::serverrequestinterceptor_adapter_i (void)
}
}
+ if (TAO_debug_level > 2)
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("(%P|%t) Server request interceptor adapter list at %@\n"),
+ this->server_request_interceptor_adapter_));
+
return this->server_request_interceptor_adapter_;
}
diff --git a/TAO/tao/ORB_Core.h b/TAO/tao/ORB_Core.h
index d0144373b4b..b9a0581bf39 100644
--- a/TAO/tao/ORB_Core.h
+++ b/TAO/tao/ORB_Core.h
@@ -316,7 +316,7 @@ public:
* Sets the value of gui_resource_factory in TSS. ORB_Core is responsible
* for releasing this factory if needed.
*/
- static void set_gui_resource_factory (TAO::GUIResource_Factory *gui_resource_factory);
+ static void set_gui_resource_factory (TAO::GUIResource_Factory *gui_factory);
/// Sets the value of TAO_ORB_Core::protocols_hooks_
static void set_protocols_hooks (const char *protocols_hooks_name);
@@ -508,6 +508,30 @@ public:
ACE_Time_Value &time_value);
/// Define the Timeout_Hook signature
+ /**
+ * The connection timeout hook was originally defined to allow the
+ * TAO Messaging code to be factored out of the core TAO library and
+ * placed in to an optional library. Since then, a new invocation
+ * endpoint selector, the optimised connection endpoint selector
+ * (see Strategies/OC_Endpoint_Selector.h) reused this connection
+ * timeout hook. However, this set up a problem when both the
+ * Messaging library and OCES are being used in the same
+ * application.
+ *
+ * The solution was to add a new connection timeout hook attribute
+ * (see alt_connection_timeout_hook_ below). This method now checks
+ * to see if the connection timeout hook is already set, and if so
+ * assigns the supplied hook value to the alternate connection
+ * timeout hook. This functionality has a side-effect of assuming
+ * that hooks are NEVER unloaded or actively replaced. IOW, no one
+ * will call this method with a 0 or some other pointer value to
+ * replace an existing hook.
+ *
+ * If such functionality as unloading a hook pointer is required,
+ * then this method must be extended to give some kind of identity
+ * for the hook. Additional changes to the definition of the hook
+ * will also be necessary to support such identity and manipulation.
+ */
static void connection_timeout_hook (Timeout_Hook hook);
void call_sync_scope_hook (TAO_Stub *stub,
@@ -893,6 +917,9 @@ public:
(const CORBA::Object_ptr obj,
const TAO_Service_Context &service_context);
+ /// Configuration accessor method
+ ACE_Service_Gestalt* configuration () const;
+
/// Get outgoing fragmentation strategy.
auto_ptr
fragmentation_strategy (TAO_Transport * transport);
@@ -1235,6 +1262,8 @@ protected:
/// Code Set Manager - points to service object in the service repo
TAO_Codeset_Manager *codeset_manager_;
+ /// ORB's service configuration
+ ACE_Service_Gestalt *config_;
};
// ****************************************************************
@@ -1379,6 +1408,9 @@ public:
*/
ACE_CString poa_factory_directive_;
+ /// An alternative hook to be set for the ConnectionTimeoutPolicy
+ TAO_ORB_Core::Timeout_Hook alt_connection_timeout_hook_;
+
private:
/// Constructor.
diff --git a/TAO/tao/ORB_Core.i b/TAO/tao/ORB_Core.i
index b78066a39eb..3f5f53cd423 100644
--- a/TAO/tao/ORB_Core.i
+++ b/TAO/tao/ORB_Core.i
@@ -7,6 +7,12 @@
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
+ACE_INLINE ACE_Service_Gestalt*
+TAO_ORB_Core::configuration (void) const
+{
+ return this->config_;
+}
+
ACE_INLINE CORBA::ULong
TAO_ORB_Core::_incr_refcnt (void)
{
@@ -250,23 +256,6 @@ TAO_ORB_Core::orb_params(void)
return &(this->orb_params_);
}
-ACE_INLINE TAO_Codeset_Manager *
-TAO_ORB_Core::codeset_manager()
-{
- if (this->orb_params()->negotiate_codesets() == 0)
- return 0;
- if (this->codeset_manager_ == 0)
- {
- // This causes a factory to be loaded which will call
- // the codeset_manager setter in this thread.
- this->codeset_manager_ =
- this->resource_factory()->codeset_manager();
- if (this->codeset_manager_ == 0)
- this->orb_params()->negotiate_codesets(false);
- }
- return this->codeset_manager_;
-}
-
#define TAO_OC_RETRIEVE(member) \
((this->member##_ == 0) \
? (this->member##_ = this->resource_factory ()->get_##member ()) \
@@ -447,6 +436,23 @@ TAO_ORB_Core::server_id (void) const
return this->server_id_.c_str();
}
+ACE_INLINE TAO_Codeset_Manager *
+TAO_ORB_Core::codeset_manager()
+{
+ if (this->orb_params()->negotiate_codesets() == 0)
+ return 0;
+ if (this->codeset_manager_ == 0)
+ {
+ // This causes a factory to be loaded which will call
+ // the codeset_manager setter in this thread.
+ this->codeset_manager_ =
+ this->resource_factory()->codeset_manager();
+ if (this->codeset_manager_ == 0)
+ this->orb_params()->negotiate_codesets(false);
+ }
+ return this->codeset_manager_;
+}
+
ACE_INLINE TAO::ORBInitializer_Registry_Adapter *
TAO_ORB_Core::orbinitializer_registry ()
{
diff --git a/TAO/tao/ObjRefTemplate/Default_ORTC.cpp b/TAO/tao/ObjRefTemplate/Default_ORTC.cpp
index b3a94f7c90a..ef7dde2671c 100644
--- a/TAO/tao/ObjRefTemplate/Default_ORTC.cpp
+++ b/TAO/tao/ObjRefTemplate/Default_ORTC.cpp
@@ -91,6 +91,12 @@ TAO_Default_ORT::ObjectReferenceTemplate::_tao_obv_repository_id (void) const
return this->_tao_obv_static_repository_id ();
}
+void
+TAO_Default_ORT::ObjectReferenceTemplate::_tao_obv_truncatable_repo_ids (Repository_Id_List& ids) const
+{
+ ids.push_back (this->_tao_obv_static_repository_id ());
+}
+
void
TAO_Default_ORT::ObjectReferenceTemplate::_tao_any_destructor (void *_tao_void_pointer)
{
@@ -112,53 +118,42 @@ CORBA::Boolean TAO_Default_ORT::ObjectReferenceTemplate::_tao_unmarshal_v (TAO_I
return this->_tao_unmarshal__TAO_Default_ORT_ObjectReferenceTemplate (strm);
}
+CORBA::Boolean TAO_Default_ORT::ObjectReferenceTemplate::_tao_match_formal_type (ptrdiff_t formal_type_id) const
+{
+ return formal_type_id ==
+ reinterpret_cast(&TAO_Default_ORT::ObjectReferenceTemplate::_downcast);
+}
+
CORBA::Boolean TAO_Default_ORT::ObjectReferenceTemplate::_tao_unmarshal (
TAO_InputCDR &strm,
ObjectReferenceTemplate *&new_object
)
{
CORBA::ValueBase *base = 0;
- CORBA::ValueFactory_var factory;
CORBA::Boolean retval =
CORBA::ValueBase::_tao_unmarshal_pre (
strm,
- factory.out (),
base,
ObjectReferenceTemplate::_tao_obv_static_repository_id ()
);
-
+
if (retval == 0)
- {
return 0;
- }
-
- if (factory.in () != 0)
- {
- base = factory->create_for_unmarshal ();
-
- if (base == 0)
- {
- return 0; // %! except.?
- }
-
- retval = base->_tao_unmarshal_v (strm);
-
- if (retval == 0)
- {
+
+ if (base != 0 && ! base->_tao_unmarshal_v (strm))
return 0;
- }
- }
-
+
// Now base must be null or point to the unmarshaled object.
// Align the pointer to the right subobject.
new_object = ObjectReferenceTemplate::_downcast (base);
- return retval;
+ return 1;
}
// TAO_IDL - Generated from
// be\be_visitor_valuetype/valuetype_obv_cs.cpp:58
OBV_TAO_Default_ORT::ObjectReferenceTemplate::ObjectReferenceTemplate (void)
+: require_truncation_ (false)
{}
OBV_TAO_Default_ORT::ObjectReferenceTemplate::~ObjectReferenceTemplate (void)
@@ -242,4 +237,10 @@ OBV_TAO_Default_ORT::ObjectReferenceTemplate::_tao_unmarshal_state (TAO_InputCDR
);
}
+void
+OBV_TAO_Default_ORT::ObjectReferenceTemplate::truncation_hook (void)
+{
+ this->require_truncation_ = true;
+}
+
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/ObjRefTemplate/Default_ORTC.h b/TAO/tao/ObjRefTemplate/Default_ORTC.h
index bf461b7efcd..cce4f9d2850 100644
--- a/TAO/tao/ObjRefTemplate/Default_ORTC.h
+++ b/TAO/tao/ObjRefTemplate/Default_ORTC.h
@@ -42,7 +42,7 @@
#include "tao/ObjRefTemplate/ort_export.h"
#include "tao/Valuetype/ValueBase.h"
-#include "tao/Valuetype/Valuetype_Adapter_Impl.h"
+#include "tao/Valuetype/Valuetype_Adapter_Factory_Impl.h"
#include "tao/ORB.h"
#include "tao/SystemException.h"
#include "tao/Environment.h"
@@ -71,22 +71,22 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL
namespace TAO_Default_ORT
{
-
+
// TAO_IDL - Generated from
// be\be_valuetype.cpp:524
-
-
+
+
#if !defined (_TAO_DEFAULT_ORT_OBJECTREFERENCETEMPLATE__VAR_OUT_CH_)
#define _TAO_DEFAULT_ORT_OBJECTREFERENCETEMPLATE__VAR_OUT_CH_
-
+
class ObjectReferenceTemplate;
typedef
TAO_Value_Var_T<
ObjectReferenceTemplate
>
ObjectReferenceTemplate_var;
-
+
typedef
TAO_Value_Out_T<
ObjectReferenceTemplate
@@ -94,61 +94,64 @@ namespace TAO_Default_ORT
ObjectReferenceTemplate_out;
#endif /* end #if !defined */
-
+
// TAO_IDL - Generated from
// be\be_visitor_valuetype/valuetype_ch.cpp:56
#if !defined (_TAO_DEFAULT_ORT_OBJECTREFERENCETEMPLATE_CH_)
#define _TAO_DEFAULT_ORT_OBJECTREFERENCETEMPLATE_CH_
-
+
class TAO_ORT_Export ObjectReferenceTemplate
: public virtual PortableInterceptor::ObjectReferenceTemplate
{
public:
typedef ObjectReferenceTemplate_var _var_type;
-
+
static ObjectReferenceTemplate* _downcast (CORBA::ValueBase *);
-
+
// (TAO extensions or internals)
static CORBA::Boolean _tao_unmarshal (
TAO_InputCDR &,
ObjectReferenceTemplate *&
);
-
+
virtual const char* _tao_obv_repository_id (void) const;
-
+
+ virtual void _tao_obv_truncatable_repo_ids (Repository_Id_List &) const;
+
static const char* _tao_obv_static_repository_id (void);
-
+
static void _tao_any_destructor (void *);
-
+
// TAO_IDL - Generated from
// be\be_visitor_valuetype/valuetype_ch.cpp:246
-
+
protected:
ObjectReferenceTemplate (void);
-
+
virtual ~ObjectReferenceTemplate (void);
-
+
virtual CORBA::Boolean _tao_marshal_v (TAO_OutputCDR &) const;
virtual CORBA::Boolean _tao_unmarshal_v (TAO_InputCDR &);
-
+ virtual CORBA::Boolean _tao_match_formal_type (ptrdiff_t ) const;
+
private:
ObjectReferenceTemplate (const ObjectReferenceTemplate &);
void operator= (const ObjectReferenceTemplate &);
-
+
protected:
virtual CORBA::Boolean
_tao_marshal__TAO_Default_ORT_ObjectReferenceTemplate (TAO_OutputCDR &) const = 0;
-
+
virtual CORBA::Boolean
_tao_unmarshal__TAO_Default_ORT_ObjectReferenceTemplate (TAO_InputCDR &) = 0;
};
#endif /* end #if !defined */
-
+
// TAO_IDL - Generated from
// be\be_visitor_typecode/typecode_decl.cpp:44
-
+
extern TAO_ORT_Export ::CORBA::TypeCode_ptr const _tc_ObjectReferenceTemplate;
// TAO_IDL - Generated from
@@ -161,35 +164,37 @@ namespace TAO_Default_ORT
namespace OBV_TAO_Default_ORT
{
-
+
// TAO_IDL - Generated from
// be\be_visitor_valuetype/valuetype_obv_ch.cpp:58
#if !defined (_TAO_DEFAULT_ORT_OBJECTREFERENCETEMPLATE___OBV_CH_)
#define _TAO_DEFAULT_ORT_OBJECTREFERENCETEMPLATE___OBV_CH_
-
+
// OBV_ class
class TAO_ORT_Export ObjectReferenceTemplate
: public virtual TAO_Default_ORT::ObjectReferenceTemplate
{
public:
-
+
protected:
ObjectReferenceTemplate (void);
virtual ~ObjectReferenceTemplate (void);
-
+
protected:
virtual CORBA::Boolean
_tao_marshal__TAO_Default_ORT_ObjectReferenceTemplate (TAO_OutputCDR &) const;
-
+
virtual CORBA::Boolean
_tao_unmarshal__TAO_Default_ORT_ObjectReferenceTemplate (TAO_InputCDR &);
-
+
CORBA::Boolean _tao_marshal_state (TAO_OutputCDR &) const;
CORBA::Boolean _tao_unmarshal_state (TAO_InputCDR &);
-
+ virtual void truncation_hook (void);
+
private:
- };
+ CORBA::Boolean require_truncation_;
+};
#endif /* end #if !defined */
}
@@ -203,7 +208,7 @@ namespace TAO
#if !defined (_TAO_DEFAULT_ORT_OBJECTREFERENCETEMPLATE__TRAITS_CH_)
#define _TAO_DEFAULT_ORT_OBJECTREFERENCETEMPLATE__TRAITS_CH_
-
+
template<>
struct TAO_ORT_Export Value_Traits
{
@@ -257,5 +262,3 @@ TAO_END_VERSIONED_NAMESPACE_DECL
#include /**/ "ace/post.h"
#endif /* ifndef */
-
-
diff --git a/TAO/tao/ObjRefTemplate/ObjectReferenceTemplateC.cpp b/TAO/tao/ObjRefTemplate/ObjectReferenceTemplateC.cpp
index 1a419ab1be5..8672196c8f2 100644
--- a/TAO/tao/ObjRefTemplate/ObjectReferenceTemplateC.cpp
+++ b/TAO/tao/ObjRefTemplate/ObjectReferenceTemplateC.cpp
@@ -117,6 +117,12 @@ PortableInterceptor::ObjectReferenceFactory::_tao_obv_repository_id (void) const
return this->_tao_obv_static_repository_id ();
}
+void
+PortableInterceptor::ObjectReferenceFactory::_tao_obv_truncatable_repo_ids (Repository_Id_List& ids) const
+{
+ ids.push_back (this->_tao_obv_static_repository_id ());
+}
+
void
PortableInterceptor::ObjectReferenceFactory::_tao_any_destructor (void *_tao_void_pointer)
{
@@ -128,47 +134,30 @@ PortableInterceptor::ObjectReferenceFactory::_tao_any_destructor (void *_tao_voi
PortableInterceptor::ObjectReferenceFactory::~ObjectReferenceFactory (void)
{}
-CORBA::Boolean PortableInterceptor::ObjectReferenceFactory::_tao_unmarshal (
+CORBA::Boolean
+PortableInterceptor::ObjectReferenceFactory::_tao_unmarshal (
TAO_InputCDR &strm,
ObjectReferenceFactory *&new_object
)
{
CORBA::ValueBase *base = 0;
- CORBA::ValueFactory_var factory;
CORBA::Boolean retval =
CORBA::ValueBase::_tao_unmarshal_pre (
strm,
- factory.out (),
base,
ObjectReferenceFactory::_tao_obv_static_repository_id ()
);
if (retval == 0)
- {
return 0;
- }
- if (factory.in () != 0)
- {
- base = factory->create_for_unmarshal ();
-
- if (base == 0)
- {
- return 0; // %! except.?
- }
-
- retval = base->_tao_unmarshal_v (strm);
-
- if (retval == 0)
- {
+ if (base != 0 && ! base->_tao_unmarshal_v (strm))
return 0;
- }
- }
// Now base must be null or point to the unmarshaled object.
// Align the pointer to the right subobject.
new_object = ObjectReferenceFactory::_downcast (base);
- return retval;
+ return 1;
}
// TAO_IDL - Generated from
@@ -210,6 +199,12 @@ PortableInterceptor::ObjectReferenceTemplate::_tao_obv_repository_id (void) cons
return this->_tao_obv_static_repository_id ();
}
+void
+PortableInterceptor::ObjectReferenceTemplate::_tao_obv_truncatable_repo_ids (Repository_Id_List& ids) const
+{
+ ids.push_back (this->_tao_obv_static_repository_id ());
+}
+
void
PortableInterceptor::ObjectReferenceTemplate::_tao_any_destructor (void *_tao_void_pointer)
{
@@ -227,41 +222,30 @@ CORBA::Boolean PortableInterceptor::ObjectReferenceTemplate::_tao_unmarshal (
)
{
CORBA::ValueBase *base = 0;
- CORBA::ValueFactory_var factory;
CORBA::Boolean retval =
CORBA::ValueBase::_tao_unmarshal_pre (
strm,
- factory.out (),
base,
ObjectReferenceTemplate::_tao_obv_static_repository_id ()
);
if (retval == 0)
- {
- return 0;
- }
-
- if (factory.in () != 0)
- {
- base = factory->create_for_unmarshal ();
-
- if (base == 0)
- {
- return 0; // %! except.?
- }
+ return 0;
- retval = base->_tao_unmarshal_v (strm);
-
- if (retval == 0)
- {
- return 0;
- }
- }
+ if (base != 0 && ! base->_tao_unmarshal_v (strm))
+ return 0;
// Now base must be null or point to the unmarshaled object.
// Align the pointer to the right subobject.
new_object = ObjectReferenceTemplate::_downcast (base);
- return retval;
+ return 1;
+}
+
+CORBA::Boolean
+PortableInterceptor::ObjectReferenceFactory::_tao_match_formal_type (ptrdiff_t formal_type_id) const
+{
+ return formal_type_id ==
+ reinterpret_cast(&PortableInterceptor::ObjectReferenceFactory::_downcast);
}
// TAO_IDL - Generated from
diff --git a/TAO/tao/ObjRefTemplate/ObjectReferenceTemplateC.h b/TAO/tao/ObjRefTemplate/ObjectReferenceTemplateC.h
index eab7a48e6b6..6997ded8853 100644
--- a/TAO/tao/ObjRefTemplate/ObjectReferenceTemplateC.h
+++ b/TAO/tao/ObjRefTemplate/ObjectReferenceTemplateC.h
@@ -45,7 +45,7 @@
#include "tao/ObjRefTemplate/ort_export.h"
#include "tao/Valuetype/ValueBase.h"
-#include "tao/Valuetype/Valuetype_Adapter_Impl.h"
+#include "tao/Valuetype/Valuetype_Adapter_Factory_Impl.h"
#include "tao/ORB.h"
#include "tao/SystemException.h"
#include "tao/Environment.h"
@@ -127,6 +127,8 @@ namespace PortableInterceptor
static const char* _tao_obv_static_repository_id (void);
+ virtual void _tao_obv_truncatable_repo_ids (Repository_Id_List& ids) const;
+
static void _tao_any_destructor (void *);
// TAO_IDL - Generated from
@@ -145,6 +147,7 @@ namespace PortableInterceptor
virtual ~ObjectReferenceFactory (void);
+ virtual CORBA::Boolean _tao_match_formal_type(ptrdiff_t ) const;
private:
ObjectReferenceFactory (const ObjectReferenceFactory &);
@@ -204,6 +207,8 @@ namespace PortableInterceptor
virtual const char* _tao_obv_repository_id (void) const;
+ virtual void _tao_obv_truncatable_repo_ids (Repository_Id_List &) const;
+
static const char* _tao_obv_static_repository_id (void);
static void _tao_any_destructor (void *);
@@ -440,5 +445,3 @@ TAO_END_VERSIONED_NAMESPACE_DECL
#include /**/ "ace/post.h"
#endif /* ifndef */
-
-
diff --git a/TAO/tao/Object.cpp b/TAO/tao/Object.cpp
index 0df3b311b58..e39e2e473a3 100644
--- a/TAO/tao/Object.cpp
+++ b/TAO/tao/Object.cpp
@@ -158,7 +158,7 @@ CORBA::Object::marshal (TAO_OutputCDR &cdr)
}
/*static*/ CORBA::Boolean
-CORBA::Object::marshal (CORBA::Object_ptr x,
+CORBA::Object::marshal (const CORBA::Object_ptr x,
TAO_OutputCDR &cdr)
{
if (x == 0)
diff --git a/TAO/tao/Object.h b/TAO/tao/Object.h
index c6bd922d66a..7c806d0a58b 100644
--- a/TAO/tao/Object.h
+++ b/TAO/tao/Object.h
@@ -276,8 +276,8 @@ namespace CORBA
/// Marshalling operator used by the stub code. A long story why
/// the stub code uses this, let us keep it short here.
- static CORBA::Boolean marshal (const Object_ptr obj,
- TAO_OutputCDR &strm);
+ static CORBA::Boolean marshal (const Object_ptr x,
+ TAO_OutputCDR &cdr);
/// Accessor for the cached servant reference held on the stub
/// if this object is collocated
diff --git a/TAO/tao/PI/ORBInitializer_Registry_Impl.cpp b/TAO/tao/PI/ORBInitializer_Registry_Impl.cpp
index 919abb2706e..57834a96e38 100644
--- a/TAO/tao/PI/ORBInitializer_Registry_Impl.cpp
+++ b/TAO/tao/PI/ORBInitializer_Registry_Impl.cpp
@@ -1,6 +1,7 @@
#include "tao/PI/ORBInitializer_Registry_Impl.h"
#include "tao/PI/ORBInitInfo.h"
#include "tao/PI/PICurrent.h"
+#include "tao/PI/PI_ORBInitializer.h"
#include "tao/ORB_Core.h"
#include "tao/ORB_Constants.h"
@@ -10,6 +11,10 @@
#include "ace/Recursive_Thread_Mutex.h"
#include "ace/Log_Msg.h"
+#include "tao/PI/ClientRequestInterceptor_Factory_Impl.h"
+#include "tao/PI/PICurrent_Loader.h"
+#include "tao/PI/PolicyFactory_Loader.h"
+
ACE_RCSID (PI,
ORBInitializer_Registry,
"$Id$")
@@ -23,6 +28,66 @@ TAO::ORBInitializer_Registry::ORBInitializer_Registry (void)
{
}
+int
+TAO::ORBInitializer_Registry::init (int, ACE_TCHAR *[])
+{
+ ACE_GUARD_RETURN (TAO_SYNCH_RECURSIVE_MUTEX,
+ guard,
+ this->lock_,
+ -1);
+
+#if TAO_HAS_INTERCEPTORS == 1
+
+ ACE_Service_Config::process_directive
+ (ace_svc_desc_TAO_PolicyFactory_Loader);
+
+ ACE_Service_Config::process_directive
+ (ace_svc_desc_TAO_ClientRequestInterceptor_Adapter_Factory_Impl);
+
+ ACE_Service_Config::process_directive
+ (ace_svc_desc_TAO_PICurrent_Loader);
+
+ PortableInterceptor::ORBInitializer_ptr temp_orb_initializer =
+ PortableInterceptor::ORBInitializer::_nil ();
+
+ PortableInterceptor::ORBInitializer_var orb_initializer;
+
+ ACE_DECLARE_NEW_CORBA_ENV;
+ ACE_TRY
+ {
+ /// Register the PI ORBInitializer.
+
+ ACE_NEW_THROW_EX (temp_orb_initializer,
+ TAO_PI_ORBInitializer,
+ CORBA::NO_MEMORY (
+ CORBA::SystemException::_tao_minor_code (
+ TAO::VMCID,
+ ENOMEM),
+ CORBA::COMPLETED_NO));
+ ACE_TRY_CHECK;
+
+ orb_initializer = temp_orb_initializer;
+
+ this->register_orb_initializer (orb_initializer.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+ ACE_CATCHANY
+ {
+ if (TAO_debug_level > 0)
+ {
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "(%P | %t) Caught exception:");
+ }
+ return -1;
+ }
+ ACE_ENDTRY;
+#endif /* TAO_HAS_INTERCEPTORS == 1 */
+
+ return 0;
+}
+
+
int
TAO::ORBInitializer_Registry::fini (void)
{
diff --git a/TAO/tao/PI/ORBInitializer_Registry_Impl.h b/TAO/tao/PI/ORBInitializer_Registry_Impl.h
index edb5a2bfc26..1e4788a2602 100644
--- a/TAO/tao/PI/ORBInitializer_Registry_Impl.h
+++ b/TAO/tao/PI/ORBInitializer_Registry_Impl.h
@@ -76,6 +76,17 @@ namespace TAO
PortableInterceptor::SlotId slotid
ACE_ENV_ARG_DECL);
+ protected:
+
+ // Added to provide registration for the several static service objects,
+ // brought in with this ORBInitializer_Registry implementation. Note that
+ // this is more reliable than using static initializers, since multiple
+ // copies of the dynamic service object will require their own (multiple)
+ // copies of the dependent static service objects. That is just impossible
+ // without registering those static services in the same repo, the dynamic
+ // SO is registered with.
+ virtual int init (int, ACE_TCHAR *[]);
+
private:
// Prevent copying
ORBInitializer_Registry (const ORBInitializer_Registry &);
diff --git a/TAO/tao/PI/PI.cpp b/TAO/tao/PI/PI.cpp
index 3e18928cf8c..ebec2effb3f 100644
--- a/TAO/tao/PI/PI.cpp
+++ b/TAO/tao/PI/PI.cpp
@@ -1,11 +1,4 @@
#include "tao/PI/PI.h"
-#include "tao/PI/ORBInitializer_Registry_Impl.h"
-#include "tao/PI/PolicyFactory_Loader.h"
-#include "tao/PI/ClientRequestInterceptor_Factory_Impl.h"
-#include "tao/PI/PICurrent_Loader.h"
-#include "tao/PI/PI_ORBInitializer.h"
-#include "tao/ORBInitializer_Registry.h"
-#include "tao/ORB_Constants.h"
ACE_RCSID (PI,
PI,
@@ -13,55 +6,4 @@ ACE_RCSID (PI,
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-int
-TAO_PI_Init::Initializer (void)
-{
-#if TAO_HAS_INTERCEPTORS == 1
- ACE_Service_Config::process_directive (ace_svc_desc_TAO_ClientRequestInterceptor_Adapter_Factory_Impl);
-
- ACE_Service_Config::process_directive (ace_svc_desc_TAO_PICurrent_Loader);
-#endif /* TAO_HAS_INTERCEPTORS == 1 */
-
- int status = ACE_Service_Config::process_directive (
- ace_svc_desc_ORBInitializer_Registry);
-#if TAO_HAS_INTERCEPTORS == 1
- PortableInterceptor::ORBInitializer_ptr temp_orb_initializer =
- PortableInterceptor::ORBInitializer::_nil ();
-
- PortableInterceptor::ORBInitializer_var orb_initializer;
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- /// Register the PI ORBInitializer.
-
- ACE_NEW_THROW_EX (temp_orb_initializer,
- TAO_PI_ORBInitializer,
- CORBA::NO_MEMORY (
- CORBA::SystemException::_tao_minor_code (
- TAO::VMCID,
- ENOMEM),
- CORBA::COMPLETED_NO));
- ACE_TRY_CHECK;
-
- orb_initializer = temp_orb_initializer;
-
- PortableInterceptor::register_orb_initializer (orb_initializer.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- if (TAO_debug_level > 0)
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "(%P | %t) Caught exception:");
- }
- return -1;
- }
- ACE_ENDTRY;
-#endif /* TAO_HAS_INTERCEPTORS == 1 */
- return status;
-}
-
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/PI/PI.h b/TAO/tao/PI/PI.h
index da45315f182..6facdc7fc2d 100644
--- a/TAO/tao/PI/PI.h
+++ b/TAO/tao/PI/PI.h
@@ -25,22 +25,6 @@
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-/**
- * @class TAO_PI_Init
- *
- */
-class TAO_PI_Export TAO_PI_Init
-{
-public:
-
- /// Used to force the initialization of the ORB code.
- static int Initializer (void);
-};
-
-static int
-TAO_Requires_PI_Initializer =
- TAO_PI_Init::Initializer ();
-
TAO_END_VERSIONED_NAMESPACE_DECL
#include /**/ "ace/post.h"
diff --git a/TAO/tao/PI/PolicyFactory_Loader.cpp b/TAO/tao/PI/PolicyFactory_Loader.cpp
index 3b8e49f062c..1e4f6e44d5a 100644
--- a/TAO/tao/PI/PolicyFactory_Loader.cpp
+++ b/TAO/tao/PI/PolicyFactory_Loader.cpp
@@ -14,9 +14,6 @@
#include "tao/PI/PolicyFactory_Loader.h"
#include "tao/PI/PolicyFactory_Registry.h"
-#include "tao/ORB.h"
-#include "tao/debug.h"
-
ACE_RCSID (PI,
PolicyFactory_Loader,
"$Id$")
@@ -33,12 +30,6 @@ TAO_PolicyFactory_Loader::create (void)
return obj;
}
-int
-TAO_PolicyFactory_Loader::Initializer (void)
-{
- return ACE_Service_Config::process_directive (ace_svc_desc_TAO_PolicyFactory_Loader);
-}
-
TAO_END_VERSIONED_NAMESPACE_DECL
ACE_STATIC_SVC_DEFINE (TAO_PolicyFactory_Loader,
diff --git a/TAO/tao/PI/PolicyFactory_Loader.h b/TAO/tao/PI/PolicyFactory_Loader.h
index a25c378676e..4ee3c5a2c56 100644
--- a/TAO/tao/PI/PolicyFactory_Loader.h
+++ b/TAO/tao/PI/PolicyFactory_Loader.h
@@ -34,14 +34,8 @@ class TAO_PI_Export TAO_PolicyFactory_Loader
public:
/// Creates a Codec factory and returns it.
virtual TAO::PolicyFactory_Registry_Adapter* create (void);
-
- /// Used to force the initialization of the ORB code.
- static int Initializer (void);
};
-static int
-TAO_Requires_PolicyFactory_Initializer = TAO_PolicyFactory_Loader::Initializer ();
-
TAO_END_VERSIONED_NAMESPACE_DECL
ACE_STATIC_SVC_DECLARE (TAO_PolicyFactory_Loader)
diff --git a/TAO/tao/PI_Forward.pidl b/TAO/tao/PI_Forward.pidl
index f704658e38c..4ace2af6e7b 100644
--- a/TAO/tao/PI_Forward.pidl
+++ b/TAO/tao/PI_Forward.pidl
@@ -43,7 +43,7 @@ module PortableInterceptor
typedef string ORBId;
typedef CORBA::StringSeq AdapterName;
typedef CORBA::OctetSeq ObjectId;
- typedef long AdapterManagerId;
+ typedef string AdapterManagerId;
typedef short AdapterState;
typedef unsigned long SlotId;
typedef short ReplyStatus;
diff --git a/TAO/tao/PI_ForwardC.h b/TAO/tao/PI_ForwardC.h
index d8672822375..898705618bc 100644
--- a/TAO/tao/PI_ForwardC.h
+++ b/TAO/tao/PI_ForwardC.h
@@ -100,8 +100,9 @@ namespace PortableInterceptor
// TAO_IDL - Generated from
// be\be_visitor_typedef/typedef_ch.cpp:379
- typedef CORBA::Long AdapterManagerId;
- typedef CORBA::Long_out AdapterManagerId_out;
+ typedef char * AdapterManagerId;
+ typedef CORBA::String_var AdapterManagerId_var;
+ typedef CORBA::String_out AdapterManagerId_out;
// TAO_IDL - Generated from
// be\be_visitor_typedef/typedef_ch.cpp:379
diff --git a/TAO/tao/Parser_Registry.cpp b/TAO/tao/Parser_Registry.cpp
index 1d873b9ae12..7b21273679e 100644
--- a/TAO/tao/Parser_Registry.cpp
+++ b/TAO/tao/Parser_Registry.cpp
@@ -49,7 +49,8 @@ TAO_Parser_Registry::open (TAO_ORB_Core *orb_core)
for (size_t i = 0; i != this->size_; ++i)
{
this->parsers_[i] =
- ACE_Dynamic_Service::instance (names [i]);
+ ACE_Dynamic_Service::instance (orb_core->configuration (),
+ names [i]);
if (this->parsers_[i] == 0)
{
diff --git a/TAO/tao/PortableServer/Default_Acceptor_Filter.h b/TAO/tao/PortableServer/Default_Acceptor_Filter.h
index b9288216837..3b1bca11b17 100644
--- a/TAO/tao/PortableServer/Default_Acceptor_Filter.h
+++ b/TAO/tao/PortableServer/Default_Acceptor_Filter.h
@@ -46,7 +46,7 @@ public:
TAO_Default_Acceptor_Filter (void);
/// Populate @a mprofile with all available endpoints.
- int fill_profile (const TAO::ObjectKey &object_key,
+ virtual int fill_profile (const TAO::ObjectKey &object_key,
TAO_MProfile &mprofile,
TAO_Acceptor **acceptors_begin,
TAO_Acceptor **acceptors_end,
diff --git a/TAO/tao/PortableServer/Default_Servant_Dispatcher.cpp b/TAO/tao/PortableServer/Default_Servant_Dispatcher.cpp
index ae93dee3d61..44d6a2356dd 100644
--- a/TAO/tao/PortableServer/Default_Servant_Dispatcher.cpp
+++ b/TAO/tao/PortableServer/Default_Servant_Dispatcher.cpp
@@ -15,7 +15,7 @@ TAO_Default_Servant_Dispatcher::~TAO_Default_Servant_Dispatcher (void)
TAO_Root_POA *
TAO_Default_Servant_Dispatcher::create_Root_POA (const ACE_CString &name,
- TAO_POA_Manager &poa_manager,
+ PortableServer::POAManager_ptr poa_manager,
const TAO_POA_Policy_Set &policies,
ACE_Lock &lock,
TAO_SYNCH_MUTEX &thread_lock,
diff --git a/TAO/tao/PortableServer/Default_Servant_Dispatcher.h b/TAO/tao/PortableServer/Default_Servant_Dispatcher.h
index 412e8eea9c6..e5f5f2b71db 100644
--- a/TAO/tao/PortableServer/Default_Servant_Dispatcher.h
+++ b/TAO/tao/PortableServer/Default_Servant_Dispatcher.h
@@ -62,7 +62,7 @@ public:
/// Factory method for creating new POA's.
TAO_Root_POA *create_Root_POA (
const ACE_CString &name,
- TAO_POA_Manager &poa_manager,
+ PortableServer::POAManager_ptr poa_manager,
const TAO_POA_Policy_Set &policies,
ACE_Lock &lock,
TAO_SYNCH_MUTEX &thread_lock,
diff --git a/TAO/tao/PortableServer/Object_Adapter.cpp b/TAO/tao/PortableServer/Object_Adapter.cpp
index 224b531864f..45519170d6e 100644
--- a/TAO/tao/PortableServer/Object_Adapter.cpp
+++ b/TAO/tao/PortableServer/Object_Adapter.cpp
@@ -11,6 +11,7 @@
#include "tao/PortableServer/Default_Servant_Dispatcher.h"
#include "tao/PortableServer/Collocated_Object_Proxy_Broker.h"
#include "tao/PortableServer/POAManager.h"
+#include "tao/PortableServer/POAManagerFactory.h"
#include "tao/PortableServer/Servant_Base.h"
// -- ACE Include --
@@ -591,13 +592,16 @@ TAO_Object_Adapter::open (ACE_ENV_SINGLE_ARG_DECL)
TAO_Default_Servant_Dispatcher);
}
- TAO_POA_Manager *poa_manager;
- ACE_NEW_THROW_EX (poa_manager,
- TAO_POA_Manager (*this),
+ ACE_NEW_THROW_EX (this->poa_manager_factory_,
+ TAO_POAManager_Factory (*this),
CORBA::NO_MEMORY ());
- ACE_CHECK;
- PortableServer::POAManager_var safe_poa_manager = poa_manager;
+ ::CORBA::PolicyList policy;
+ PortableServer::POAManager_var poa_manager
+ = poa_manager_factory_->create_POAManager (TAO_DEFAULT_ROOTPOAMANAGER_NAME,
+ policy
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
// This makes sure that the default resources are open when the Root
// POA is created.
@@ -639,7 +643,7 @@ TAO_Object_Adapter::open (ACE_ENV_SINGLE_ARG_DECL)
TAO_Root_POA::String root_poa_name (TAO_DEFAULT_ROOTPOA_NAME);
this->root_ =
this->servant_dispatcher_->create_Root_POA (root_poa_name,
- *poa_manager,
+ poa_manager.in (),
policies,
this->lock (),
this->thread_lock (),
@@ -662,11 +666,6 @@ TAO_Object_Adapter::open (ACE_ENV_SINGLE_ARG_DECL)
// for this servant.
this->root_->establish_components (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK;
-
- // Release the POA_Manager_var since we got here without error. The
- // TAO_POA object takes ownership of the POA_Manager object
- // (actually it shares the ownership with its peers).
- (void) safe_poa_manager._retn ();
}
void
@@ -684,14 +683,18 @@ TAO_Object_Adapter::close (int wait_for_completion
// destroyed. In the case of the POA, this means that all object
// etherealizations have finished and root POA has been destroyed
// (implying that all descendent POAs have also been destroyed).
-
TAO_Root_POA *root = 0;
+ TAO_POAManager_Factory* factory = 0;
{
ACE_GUARD (ACE_Lock, ace_mon, this->lock ());
if (this->root_ == 0)
return;
root = this->root_;
this->root_ = 0;
+ if (this->poa_manager_factory_ == 0)
+ return;
+ factory = this->poa_manager_factory_;
+ this->poa_manager_factory_ = 0;
}
CORBA::Boolean etherealize_objects = 1;
root->destroy (etherealize_objects,
@@ -699,6 +702,7 @@ TAO_Object_Adapter::close (int wait_for_completion
ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
::CORBA::release (root);
+ ::CORBA::release (factory);
}
void
diff --git a/TAO/tao/PortableServer/Object_Adapter.h b/TAO/tao/PortableServer/Object_Adapter.h
index edcdda83bc7..6d36e4631a4 100644
--- a/TAO/tao/PortableServer/Object_Adapter.h
+++ b/TAO/tao/PortableServer/Object_Adapter.h
@@ -50,6 +50,7 @@ class TAO_POA_Manager;
class TAO_TSS_Resources;
class TAO_Transport;
class TAO_Servant_Dispatcher;
+class TAO_POAManager_Factory;
namespace TAO
{
@@ -493,6 +494,9 @@ private:
/// The Root POA
TAO_Root_POA *root_;
+ /// The POAManager factory.
+ TAO_POAManager_Factory *poa_manager_factory_;
+
/// The default validator and the beginning of the chain of
/// policy validators.
TAO_POA_Default_Policy_Validator default_validator_;
diff --git a/TAO/tao/PortableServer/POAManager.cpp b/TAO/tao/PortableServer/POAManager.cpp
index 8a8055d8c23..1c92bb471e0 100644
--- a/TAO/tao/PortableServer/POAManager.cpp
+++ b/TAO/tao/PortableServer/POAManager.cpp
@@ -1,6 +1,7 @@
// $Id$
#include "tao/PortableServer/POAManager.h"
+#include "tao/PortableServer/POAManagerFactory.h"
#include "tao/PortableServer/Root_POA.h"
#include "tao/PortableServer/poa_macros.h"
#include "tao/Server_Strategy_Factory.h"
@@ -17,23 +18,36 @@ ACE_RCSID (PortableServer,
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-TAO_POA_Manager::TAO_POA_Manager (TAO_Object_Adapter &object_adapter)
+TAO_POA_Manager::TAO_POA_Manager (
+ TAO_Object_Adapter &object_adapter,
+ const char * id,
+ const ::CORBA::PolicyList &policies,
+ PortableServer::POAManagerFactory_ptr poa_manager_factory)
: state_ (PortableServer::POAManager::HOLDING),
lock_ (object_adapter.lock ()),
poa_collection_ (),
object_adapter_ (object_adapter),
- poa_manager_id_ (this->generate_manager_id ())
+ id_ (id == 0 ? this->generate_manager_id () : CORBA::string_dup (id)),
+ poa_manager_factory_ (* (dynamic_cast (poa_manager_factory))),
+ policies_ (policies)
{
+ poa_manager_factory->_add_ref ();
}
TAO_POA_Manager::~TAO_POA_Manager (void)
{
+ if (TAO_debug_level > 0)
+ {
+ ACE_DEBUG ((LM_DEBUG, "(%P|%t)~TAO_POA_Manager : %s\n", this->id_.in ()));
+ }
+ poa_manager_factory_._remove_ref ();
}
-PortableInterceptor::AdapterManagerId
-TAO_POA_Manager::get_manager_id (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+char *
+TAO_POA_Manager::get_id (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
{
- return this->poa_manager_id_;
+ return CORBA::string_dup (this->id_.in ());
}
void
@@ -162,7 +176,7 @@ TAO_POA_Manager::adapter_manager_state_changed (PortableServer::POAManager::Stat
if (ior_adapter)
{
- ior_adapter->adapter_manager_state_changed (TAO_POA_Manager::poa_manager_id_,
+ ior_adapter->adapter_manager_state_changed (this->id_.in (),
adapter_state
ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
@@ -303,7 +317,7 @@ TAO_POA_Manager::remove_poa (TAO_Root_POA *poa)
{
if (this->poa_collection_.is_empty ())
{
- ::CORBA::release (this);
+ this->poa_manager_factory_.remove_poamanager (this);
}
}
diff --git a/TAO/tao/PortableServer/POAManager.h b/TAO/tao/PortableServer/POAManager.h
index 056efb7578c..5e90d177cc2 100644
--- a/TAO/tao/PortableServer/POAManager.h
+++ b/TAO/tao/PortableServer/POAManager.h
@@ -42,7 +42,13 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL
// Forward decl.
class TAO_Root_POA;
class TAO_Object_Adapter;
+class TAO_POAManager_Factory;
+namespace PortableServer
+{
+ class POAManagerFactory;
+ typedef POAManagerFactory *POAManagerFactory_ptr;
+}
class TAO_PortableServer_Export TAO_POA_Manager :
public PortableServer::POAManager,
@@ -80,11 +86,15 @@ public:
PortableServer::POAManager::State get_state (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
- TAO_POA_Manager (TAO_Object_Adapter &object_adapter);
+ char *get_id (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
- ~TAO_POA_Manager (void);
+ TAO_POA_Manager (TAO_Object_Adapter &object_adapter,
+ const char * id,
+ const ::CORBA::PolicyList & policies,
+ PortableServer::POAManagerFactory_ptr poa_manager_factory);
- PortableInterceptor::AdapterManagerId get_manager_id (ACE_ENV_SINGLE_ARG_DECL);
+ ~TAO_POA_Manager (void);
/// Check the state of this POA manager
void check_state (ACE_ENV_SINGLE_ARG_DECL);
@@ -96,6 +106,8 @@ public:
ACE_ENV_SINGLE_ARG_DECL
);
+ CORBA::PolicyList& get_policies ();
+
protected:
void activate_i (ACE_ENV_SINGLE_ARG_DECL)
@@ -134,13 +146,6 @@ protected:
int register_poa (TAO_Root_POA *poa);
- /**
- * Generate an AdapterManagerId for this POAManager.
- * @return A value that uniquely identifies the POAManager within a
- * given process.
- */
- PortableInterceptor::AdapterManagerId generate_manager_id (void) const;
-
protected:
PortableServer::POAManager::State state_;
@@ -153,8 +158,21 @@ protected:
TAO_Object_Adapter &object_adapter_;
- PortableInterceptor::AdapterManagerId poa_manager_id_;
+ CORBA::String_var id_;
+
+ TAO_POAManager_Factory& poa_manager_factory_;
+
+ CORBA::PolicyList policies_;
+
+private :
+ /**
+ * Generate an id for this POAManager.
+ * @return A value that uniquely identifies the POAManager within a
+ * given process.
+ * @note: The id_ has the ownership of the memory allocated in this method.
+ */
+ char* generate_manager_id (void) const;
};
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/PortableServer/POAManager.i b/TAO/tao/PortableServer/POAManager.i
index 19adb23dd8f..5dad4c14de5 100644
--- a/TAO/tao/PortableServer/POAManager.i
+++ b/TAO/tao/PortableServer/POAManager.i
@@ -84,7 +84,7 @@ TAO_POA_Manager::get_state (ACE_ENV_SINGLE_ARG_DECL)
return this->get_state_i ();
}
-ACE_INLINE PortableInterceptor::AdapterManagerId
+ACE_INLINE char*
TAO_POA_Manager::generate_manager_id (void) const
{
// The AdapterManagerId must be unique across all Adapter Managers
@@ -101,7 +101,7 @@ TAO_POA_Manager::generate_manager_id (void) const
// shifting of 64 bit addresses is performed since the
// TAO_POA_Manager object is not large enough to allow that trick.
- PortableInterceptor::AdapterManagerId id = 0;
+ CORBA::Long id = 0;
// Note that we reinterpret_cast to an "unsigned long" instead of
// CORBA::ULong since we need to first cast to an integer large
@@ -109,14 +109,10 @@ TAO_POA_Manager::generate_manager_id (void) const
// 64-bit platforms.
if (sizeof (this) == 4) // 32 bit address
- id =
- static_cast
- (reinterpret_cast (this));
+ id = reinterpret_cast (this);
else if (sizeof (this) == 8) // 64 bit address -- use lower 32 bits
- id =
- static_cast
- (reinterpret_cast (this) & 0xFFFFFFFFu);
+ id = reinterpret_cast (this) & 0xFFFFFFFFu;
// @@ If we ever hit a platform where neither of the above cases are
// satisfied, we're up the creek!
@@ -126,7 +122,16 @@ TAO_POA_Manager::generate_manager_id (void) const
// // ORB, or perhaps specific to the process.
// id = ...GENERATE_ID_ATOMICALLY...; // Fallback
- return id;
+ char* buf = new char [25];
+ ACE_OS::sprintf (buf, "POAManager%d", id);
+ return buf;
}
+ACE_INLINE
+CORBA::PolicyList& TAO_POA_Manager::get_policies ()
+{
+ return this->policies_;
+}
+
+
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/PortableServer/POAManager.pidl b/TAO/tao/PortableServer/POAManager.pidl
index 6c9f72580be..c678575ac30 100644
--- a/TAO/tao/PortableServer/POAManager.pidl
+++ b/TAO/tao/PortableServer/POAManager.pidl
@@ -50,6 +50,8 @@ module PortableServer
raises(AdapterInactive);
State get_state ();
+
+ string get_id();
};
};
diff --git a/TAO/tao/PortableServer/POAManagerC.h b/TAO/tao/PortableServer/POAManagerC.h
index 9d767071182..7de37664de8 100644
--- a/TAO/tao/PortableServer/POAManagerC.h
+++ b/TAO/tao/PortableServer/POAManagerC.h
@@ -248,6 +248,13 @@ namespace PortableServer
CORBA::SystemException
)) = 0;
+ virtual char * get_id (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
+ )
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException
+ )) = 0;
+
// TAO_IDL - Generated from
// be\be_visitor_interface/interface_ch.cpp:210
diff --git a/TAO/tao/PortableServer/POAManagerFactory.cpp b/TAO/tao/PortableServer/POAManagerFactory.cpp
index 25d6b0bdc28..2b86ca3a829 100644
--- a/TAO/tao/PortableServer/POAManagerFactory.cpp
+++ b/TAO/tao/PortableServer/POAManagerFactory.cpp
@@ -128,7 +128,7 @@ TAO_POAManager_Factory::find (
(*iterator)->get_id (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (::PortableServer::POAManager::_nil());
- if (ACE_OS::strcmp (id, poamanagerid) == 0)
+ if (ACE_OS::strcmp (id, poamanagerid.in()) == 0)
{
poamanager = PortableServer::POAManager::_duplicate (*iterator);
break;
diff --git a/TAO/tao/PortableServer/PortableServer.h b/TAO/tao/PortableServer/PortableServer.h
index 4c27f187332..256499a7456 100644
--- a/TAO/tao/PortableServer/PortableServer.h
+++ b/TAO/tao/PortableServer/PortableServer.h
@@ -41,6 +41,7 @@ TAO_END_VERSIONED_NAMESPACE_DECL
#include "tao/PortableServer/PortableServerC.h"
#undef TAO_PORTABLESERVER_SAFE_INCLUDE
#include "tao/PortableServer/POAManagerC.h"
+#include "tao/PortableServer/POAManagerFactoryC.h"
#include "tao/PortableServer/PS_CurrentC.h"
#include "tao/PortableServer/PortableServer_Functions.h"
#include "tao/PortableServer/PortableServer_WFunctions.h"
diff --git a/TAO/tao/PortableServer/PortableServer.pidl b/TAO/tao/PortableServer/PortableServer.pidl
index 938c7edeaec..50000e9bcb8 100644
--- a/TAO/tao/PortableServer/PortableServer.pidl
+++ b/TAO/tao/PortableServer/PortableServer.pidl
@@ -74,9 +74,12 @@ module PortableServer
const CORBA::PolicyType SERVANT_RETENTION_POLICY_ID = 21;
const CORBA::PolicyType REQUEST_PROCESSING_POLICY_ID = 22;
- // Forward declaration
+ // Forward declaration POAManager interface.
local interface POAManager;
+ // Forward declaration POAManagerFactory interface.
+ local interface POAManagerFactory;
+
// Forward declaration AdapterActivator interface.
local interface AdapterActivator;
@@ -146,6 +149,7 @@ module PortableServer
readonly attribute POA the_parent;
readonly attribute POAList the_children;
readonly attribute POAManager the_POAManager;
+ readonly attribute POAManagerFactory the_POAManagerFactory;
attribute AdapterActivator the_activator;
// Servant Manager registration:
diff --git a/TAO/tao/PortableServer/PortableServerC.h b/TAO/tao/PortableServer/PortableServerC.h
index f84d9eeaa47..80c5bdc4fcc 100644
--- a/TAO/tao/PortableServer/PortableServerC.h
+++ b/TAO/tao/PortableServer/PortableServerC.h
@@ -197,6 +197,25 @@ namespace PortableServer
#endif /* end #if !defined */
+#if !defined (_PORTABLESERVER_POAMANAGERFACTORY__VAR_OUT_CH_)
+#define _PORTABLESERVER_POAMANAGERFACTORY__VAR_OUT_CH_
+
+ class POAManagerFactory;
+ typedef POAManagerFactory *POAManagerFactory_ptr;
+
+ typedef
+ TAO_Objref_Var_T<
+ POAManagerFactory
+ >
+ POAManagerFactory_var;
+
+ typedef
+ TAO_Objref_Out_T<
+ POAManagerFactory
+ >
+ POAManagerFactory_out;
+
+#endif /* end #if !defined */
// TAO_IDL - Generated from
// be\be_interface.cpp:598
@@ -978,6 +997,13 @@ namespace PortableServer
CORBA::SystemException
)) = 0;
+ virtual ::PortableServer::POAManagerFactory_ptr the_POAManagerFactory (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ )) = 0;
+
// TAO_IDL - Generated from
// be\be_visitor_operation/operation_ch.cpp:46
diff --git a/TAO/tao/PortableServer/Regular_POA.cpp b/TAO/tao/PortableServer/Regular_POA.cpp
index 7383d7bd9cf..08f4965c8e7 100644
--- a/TAO/tao/PortableServer/Regular_POA.cpp
+++ b/TAO/tao/PortableServer/Regular_POA.cpp
@@ -12,7 +12,7 @@ ACE_RCSID (PortableServer,
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
TAO_Regular_POA::TAO_Regular_POA (const TAO_Root_POA::String &name,
- TAO_POA_Manager &poa_manager,
+ PortableServer::POAManager_ptr poa_manager,
const TAO_POA_Policy_Set &policies,
TAO_Root_POA *parent,
ACE_Lock &lock,
diff --git a/TAO/tao/PortableServer/Regular_POA.h b/TAO/tao/PortableServer/Regular_POA.h
index 7a6d3c2289c..eddd7bf3205 100644
--- a/TAO/tao/PortableServer/Regular_POA.h
+++ b/TAO/tao/PortableServer/Regular_POA.h
@@ -39,7 +39,7 @@ class TAO_PortableServer_Export TAO_Regular_POA
{
public:
TAO_Regular_POA (const String &name,
- TAO_POA_Manager &poa_manager,
+ PortableServer::POAManager_ptr poa_manager,
const TAO_POA_Policy_Set &policies,
TAO_Root_POA *parent,
ACE_Lock &lock,
diff --git a/TAO/tao/PortableServer/Root_POA.cpp b/TAO/tao/PortableServer/Root_POA.cpp
index 2ec60bb2e41..1ec42159b3c 100644
--- a/TAO/tao/PortableServer/Root_POA.cpp
+++ b/TAO/tao/PortableServer/Root_POA.cpp
@@ -19,6 +19,7 @@
#include "tao/PortableServer/AdapterActivatorC.h"
#include "tao/PortableServer/Non_Servant_Upcall.h"
#include "tao/PortableServer/POAManager.h"
+#include "tao/PortableServer/POAManagerFactory.h"
#include "tao/PortableServer/ServantManagerC.h"
#include "tao/PortableServer/poa_macros.h"
#include "tao/PortableServer/POA_Guard.h"
@@ -30,6 +31,7 @@
#include "tao/PortableServer/ServantRetentionStrategy.h"
#include "tao/PortableServer/ImplicitActivationStrategy.h"
#include "tao/PortableServer/ThreadStrategy.h"
+#include "tao/PortableServer/Acceptor_Filter_Factory.h"
#include "tao/StringSeqC.h"
#include "tao/PortableInterceptorC.h"
@@ -199,7 +201,7 @@ TAO_Root_POA::set_obj_ref_factory (
}
TAO_Root_POA::TAO_Root_POA (const TAO_Root_POA::String &name,
- TAO_POA_Manager &poa_manager,
+ PortableServer::POAManager_ptr poa_manager,
const TAO_POA_Policy_Set &policies,
TAO_Root_POA *parent,
ACE_Lock &lock,
@@ -208,7 +210,8 @@ TAO_Root_POA::TAO_Root_POA (const TAO_Root_POA::String &name,
TAO_Object_Adapter *object_adapter
ACE_ENV_ARG_DECL)
: name_ (name),
- poa_manager_ (poa_manager),
+ poa_manager_ (* (dynamic_cast (poa_manager))),
+ poa_manager_factory_ (* (object_adapter->poa_manager_factory_)),
tagged_component_ (),
tagged_component_id_ (),
profile_id_array_ (0),
@@ -232,6 +235,7 @@ TAO_Root_POA::TAO_Root_POA (const TAO_Root_POA::String &name,
wait_for_completion_pending_ (0),
waiting_destruction_ (0),
servant_deactivation_condition_ (thread_lock),
+ filter_factory_ (0),
caller_key_to_object_ (0),
servant_for_key_to_object_ (0)
{
@@ -311,6 +315,10 @@ TAO_Root_POA::TAO_Root_POA (const TAO_Root_POA::String &name,
TAO_Root_POA::~TAO_Root_POA (void)
{
+ if (TAO_debug_level > 0)
+ {
+ ACE_DEBUG ((LM_DEBUG, "(%P|%t)~TAO_Root_POA : %s\n", this->the_name ()));
+ }
}
void
@@ -399,41 +407,53 @@ TAO_Root_POA::create_POA_i (const char *adapter_name,
// created and associated with the new POA. Otherwise, the specified
// POAManager object is associated with the new POA. The POAManager
// object can be obtained using the attribute name the_POAManager.
- TAO_POA_Manager* tao_poa_manager = 0;
- PortableServer::POAManager_var safe_poa_manager;
+
+ PortableServer::POAManager_var the_poa_manager;
+
if (CORBA::is_nil (poa_manager))
{
- ACE_NEW_THROW_EX (tao_poa_manager,
- TAO_POA_Manager (this->object_adapter ()),
- CORBA::NO_MEMORY ());
+ PortableServer::POA_var poa = PortableServer::POA::_duplicate (this);
+ PortableServer::POA_var root_poa;
+
+ // Find the RootPOA by traversing the POA hierarchy until the
+ // RootPOA is reached. The RootPOA has no parent.
+ while (!CORBA::is_nil (poa.in ()))
+ {
+ root_poa = poa;
+ poa = poa->the_parent (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (PortableServer::POA::_nil ());
+ }
+
+ // Get the POAManagerFactory instance owned by RootPOA.
+ PortableServer::POAManagerFactory_var tao_poa_manager_factory
+ = root_poa->the_POAManagerFactory ();
+
+ CORBA::PolicyList empty_policies;
+ // The POAManager name will be generated when the POAManager instance
+ // is created.
+ the_poa_manager
+ = tao_poa_manager_factory->create_POAManager (0,
+ empty_policies
+ ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (PortableServer::POA::_nil ());
- safe_poa_manager = tao_poa_manager;
}
else
{
- // This is the POAManager that was passed in. Do not put it in the
- // safe_poa_manager as we do not want it to be destroyed in case
- // an exception is thrown during the create_POA_i() method.
- tao_poa_manager = dynamic_cast (poa_manager);
+ the_poa_manager = PortableServer::POAManager::_duplicate (poa_manager);
}
PortableServer::POA_var poa = this->create_POA_i (adapter_name,
- *tao_poa_manager,
+ the_poa_manager.in (),
tao_policies
ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (PortableServer::POA::_nil ());
- // Release the POA_Manager_var since we got here without error. The
- // TAO_Regular_POA object takes ownership of the POA_Manager object
- // (actually it shares the ownership with its peers).
- (void) safe_poa_manager._retn ();
-
return poa._retn ();
}
TAO_Root_POA *
TAO_Root_POA::new_POA (const String &name,
- TAO_POA_Manager &poa_manager,
+ PortableServer::POAManager_ptr poa_manager,
const TAO_POA_Policy_Set &policies,
TAO_Root_POA *parent,
ACE_Lock &lock,
@@ -462,7 +482,7 @@ TAO_Root_POA::new_POA (const String &name,
PortableServer::POA_ptr
TAO_Root_POA::create_POA_i (const TAO_Root_POA::String &adapter_name,
- TAO_POA_Manager &poa_manager,
+ PortableServer::POAManager_ptr poa_manager,
const TAO_POA_Policy_Set &policies
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException,
@@ -2252,13 +2272,22 @@ TAO_Root_POA::key_to_stub_i (const TAO::ObjectKey &key,
ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
- TAO_Default_Acceptor_Filter filter;
+ if (this->filter_factory_ == 0)
+ this->filter_factory_
+ = ACE_Dynamic_Service::instance ("TAO_Acceptor_Filter_Factory");
+
+ TAO_Acceptor_Filter* filter =
+ this->filter_factory_->create_object (this->poa_manager_);
+
+ // Give ownership to the auto pointer.
+ auto_ptr new_filter (filter);
+
TAO_Stub *data =
this->create_stub_object (
key,
type_id,
client_exposed_policies._retn (),
- &filter,
+ filter,
this->orb_core_.lane_resources ().acceptor_registry ()
ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
@@ -2486,7 +2515,8 @@ TAO_Root_POA::find_servant_priority (
TAO::ORT_Adapter_Factory *
TAO_Root_POA::ORT_adapter_factory (void)
{
- return ACE_Dynamic_Service::instance (
+ return ACE_Dynamic_Service::instance
+ (orb_core_.configuration (),
TAO_Root_POA::ort_adapter_factory_name ());
}
@@ -2532,8 +2562,8 @@ TAO_Root_POA::ORT_adapter_i (void)
ACE_CATCHANY
{
ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Cannot initialize the "
- "object_reference_template_adapter");
+ "(%P|%t) Cannot initialize the "
+ "object_reference_template_adapter\n");
}
ACE_ENDTRY;
ACE_CHECK_RETURN (0);
@@ -2862,13 +2892,14 @@ TAO_Root_POA::the_POAManager (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
return PortableServer::POAManager::_duplicate (&this->poa_manager_);
}
-PortableInterceptor::AdapterManagerId
-TAO_Root_POA::get_manager_id (ACE_ENV_SINGLE_ARG_DECL)
+PortableServer::POAManagerFactory_ptr
+TAO_Root_POA::the_POAManagerFactory (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- return this->poa_manager_.get_manager_id (ACE_ENV_SINGLE_ARG_PARAMETER);
+ return PortableServer::POAManagerFactory::_duplicate (&this->poa_manager_factory_);
}
+
CORBA::ORB_ptr
TAO_Root_POA::_get_orb (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
{
diff --git a/TAO/tao/PortableServer/Root_POA.h b/TAO/tao/PortableServer/Root_POA.h
index 59d8e490c0c..eb6502c9ad1 100644
--- a/TAO/tao/PortableServer/Root_POA.h
+++ b/TAO/tao/PortableServer/Root_POA.h
@@ -68,9 +68,11 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL
// Forward Declaration
class TAO_Acceptor_Filter;
+class TAO_Acceptor_Filter_Factory;
class TAO_Acceptor_Registry;
class TAO_IORInfo;
class TAO_Regular_POA;
+class TAO_POAManager_Factory;
namespace PortableInterceptor
{
@@ -208,11 +210,8 @@ public:
ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
- /// @todo At the moment to POAManagerFactory is implemented and the
- /// POAManager has the get_id method this can be zapped, IORInfo can
- /// then just call get_id
- PortableInterceptor::AdapterManagerId get_manager_id (
- ACE_ENV_SINGLE_ARG_DECL)
+ PortableServer::POAManagerFactory_ptr the_POAManagerFactory (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
/// This method returns the adapter_name as a sequence of strings of
@@ -359,7 +358,7 @@ public:
);
TAO_Root_POA (const String &name,
- TAO_POA_Manager &poa_manager,
+ PortableServer::POAManager_ptr poa_manager,
const TAO_POA_Policy_Set &policies,
TAO_Root_POA *parent,
ACE_Lock &lock,
@@ -605,7 +604,7 @@ protected:
/// Template method for creating new POA's of this type.
virtual TAO_Root_POA *new_POA (const String &name,
- TAO_POA_Manager &poa_manager,
+ PortableServer::POAManager_ptr poa_manager,
const TAO_POA_Policy_Set &policies,
TAO_Root_POA *parent,
ACE_Lock &lock,
@@ -625,7 +624,7 @@ protected:
PortableServer::POA::InvalidPolicy));
PortableServer::POA_ptr create_POA_i (const String &adapter_name,
- TAO_POA_Manager &poa_manager,
+ PortableServer::POAManager_ptr poa_manager,
const TAO_POA_Policy_Set &policies
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException,
@@ -879,8 +878,10 @@ protected:
String name_;
- /// The POA Manager belonging to this POA
+ /// Reference to the POAManager that this poa assicuates with.
TAO_POA_Manager &poa_manager_;
+ /// Reference to the POAManagerFactory that generate the POAManager.
+ TAO_POAManager_Factory& poa_manager_factory_;
IOP::TaggedComponentList tagged_component_;
@@ -942,6 +943,8 @@ protected:
TAO_SYNCH_CONDITION servant_deactivation_condition_;
+ TAO_Acceptor_Filter_Factory * filter_factory_;
+
public:
// @todo Temporarily for servant retention
CORBA::ULong caller_key_to_object_;
diff --git a/TAO/tao/PortableServer/Servant_Dispatcher.h b/TAO/tao/PortableServer/Servant_Dispatcher.h
index d2741f46546..10c062e52d1 100644
--- a/TAO/tao/PortableServer/Servant_Dispatcher.h
+++ b/TAO/tao/PortableServer/Servant_Dispatcher.h
@@ -36,6 +36,12 @@ class TAO_Root_POA;
class TAO_ORB_Core;
class TAO_ServerRequest;
+namespace PortableServer
+{
+ class POAManager;
+ typedef POAManager *POAManager_ptr;
+}
+
/**
* @class TAO_Servant_Dispatcher
*
@@ -70,7 +76,7 @@ public:
/// Factory method for creating new POA's.
virtual TAO_Root_POA *create_Root_POA (
const ACE_CString &name,
- TAO_POA_Manager &poa_manager,
+ PortableServer::POAManager_ptr poa_manager,
const TAO_POA_Policy_Set &policies,
ACE_Lock &lock,
TAO_SYNCH_MUTEX &thread_lock,
diff --git a/TAO/tao/Profile.cpp b/TAO/tao/Profile.cpp
index 9879ff26ef4..6807655a876 100644
--- a/TAO/tao/Profile.cpp
+++ b/TAO/tao/Profile.cpp
@@ -10,6 +10,7 @@
#include "tao/CDR.h"
#include "tao/SystemException.h"
#include "tao/PolicyC.h"
+#include "tao/Endpoint.h"
#include "ace/ACE.h"
#include "ace/OS_NS_string.h"
@@ -254,8 +255,8 @@ TAO_Profile::decode (TAO_InputCDR& cdr)
encap_len));
}
- // Decode any additional endpoints per profile. (At the present,
- // only RTCORBA takes advantage of this feature.)
+ // Decode any additional endpoints per profile. This is used by RTCORBA
+ // and by IIOP when TAG_ALTERNATE_IIOP_ADDRESS components are present.
if (this->decode_endpoints () == -1)
{
return -1;
@@ -728,6 +729,36 @@ TAO_Profile::is_equivalent (const TAO_Profile *other)
return result;
}
+CORBA::Boolean
+TAO_Profile::compare_key (const TAO_Profile *other) const
+{
+ return (this->ref_object_key_ == other->ref_object_key_) ||
+ ((this->ref_object_key_ != 0 &&
+ other->ref_object_key_ != 0 &&
+ this->ref_object_key_->object_key() ==
+ other->ref_object_key_->object_key()));
+}
+
+TAO_Endpoint *
+TAO_Profile::first_filtered_endpoint (void)
+{
+ return this->endpoint()->next_filtered(this->orb_core_,0);
+}
+
+TAO_Endpoint *
+TAO_Profile::next_filtered_endpoint (TAO_Endpoint *source)
+{
+ if (source == 0)
+ return this->first_filtered_endpoint();
+ return this->endpoint()->next_filtered(this->orb_core_,this->endpoint());
+}
+
+void
+TAO_Profile::add_generic_endpoint (TAO_Endpoint *)
+{
+ // noop for the base type
+}
+
TAO_Service_Callbacks::Profile_Equivalence
TAO_Profile::is_equivalent_hook (const TAO_Profile *other)
{
@@ -760,6 +791,12 @@ TAO_Profile::encode_alternate_endpoints(void)
return 0;
}
+void
+TAO_Profile::remove_generic_endpoint (TAO_Endpoint *)
+{
+ // default for virtual methods, thus a no-op
+}
+
//@@ TAO_PROFILE_SPL_COMMENT_HOOK_END
//@@ TAO_PROFILE_SPL_METHODS_ADD_HOOK
@@ -898,6 +935,8 @@ TAO_Unknown_Profile::create_profile_body (TAO_OutputCDR &) const
return;
}
+
+
// *************************************************************
// Operators for TAO_opaque encoding and decoding
// *************************************************************
diff --git a/TAO/tao/Profile.h b/TAO/tao/Profile.h
index d31e55b6257..700b257c6ec 100644
--- a/TAO/tao/Profile.h
+++ b/TAO/tao/Profile.h
@@ -206,7 +206,7 @@ public:
virtual int encode_alternate_endpoints (void);
/**
- * Return pointer to this profile's endpoint. If the profile
+ * Return a pointer to this profile's endpoint. If the profile
* contains more than one endpoint, i.e., a list, the method returns
* the head of the list.
*/
@@ -215,6 +215,33 @@ public:
/// Return how many endpoints this profile contains.
virtual CORBA::ULong endpoint_count (void) const = 0;
+ /**
+ * Return the first endpoint in the list that matches some filtering
+ * constraint, such as IPv6 compatibility for IIOP endpoints. This
+ * method is implemented in terms of TAO_Endpoint;:next_filtered().
+ */
+ TAO_Endpoint *first_filtered_endpoint (void);
+
+ /// Return the next filtered endpoint in the list after the one
+ /// passed in. This method is implemented in terms of
+ /// TAO_Endpoint;:next_filtered(). If the supplied source endpoint
+ /// is null, this returns the first filtered endpoint.
+ TAO_Endpoint *next_filtered_endpoint (TAO_Endpoint *source);
+
+ /**
+ * Remove the provided endpoint from the profile. Some
+ * subclasses of TAO_Profile already have a protocol-specific
+ * version of remove_endpoint, but this generic interface is
+ * required. The default implementation is a no-op. Protocol
+ * maintainers wishing to add support for the EndpointPolicy must
+ * implement remove_generic_endpoint to call their protocol-specific
+ * version of remove_endpoint
+ */
+ virtual void remove_generic_endpoint (TAO_Endpoint *ep);
+
+ /// Add a protocol-agnostic endpoint
+ virtual void add_generic_endpoint (TAO_Endpoint *ep);
+
/// Verify profile equivalance.
/**
* Two profiles are equivalent if their tag, object_key, version
@@ -227,6 +254,12 @@ public:
*/
CORBA::Boolean is_equivalent (const TAO_Profile* other_profile);
+ /**
+ * Compare the object key for this profile with that of
+ * another. This is weaker than is_equivalent
+ */
+ CORBA::Boolean compare_key (const TAO_Profile *other) const;
+
/// Return a hash value for this object.
virtual CORBA::ULong hash (CORBA::ULong max
ACE_ENV_ARG_DECL) = 0;
diff --git a/TAO/tao/Profile_Transport_Resolver.cpp b/TAO/tao/Profile_Transport_Resolver.cpp
index 123dc6c1425..8f87bb6f619 100644
--- a/TAO/tao/Profile_Transport_Resolver.cpp
+++ b/TAO/tao/Profile_Transport_Resolver.cpp
@@ -14,6 +14,7 @@
#include "tao/Transport_Connector.h"
#include "tao/Endpoint.h"
#include "tao/SystemException.h"
+#include "tao/Client_Strategy_Factory.h"
#include "ace/Countdown_Time.h"
@@ -119,13 +120,34 @@ namespace TAO
}
}
-
bool
Profile_Transport_Resolver::try_connect (
TAO_Transport_Descriptor_Interface *desc,
ACE_Time_Value *max_time_value
ACE_ENV_ARG_DECL
)
+ {
+ return this->try_connect_i (desc,max_time_value,0 ACE_ENV_ARG_PARAMETER);
+ };
+
+ bool
+ Profile_Transport_Resolver::try_parallel_connect (
+ TAO_Transport_Descriptor_Interface *desc,
+ ACE_Time_Value *max_time_value
+ ACE_ENV_ARG_DECL
+ )
+ {
+ return this->try_connect_i (desc,max_time_value,1 ACE_ENV_ARG_PARAMETER);
+ };
+
+
+ bool
+ Profile_Transport_Resolver::try_connect_i (
+ TAO_Transport_Descriptor_Interface *desc,
+ ACE_Time_Value *max_time_value,
+ bool parallel
+ ACE_ENV_ARG_DECL
+ )
{
TAO_Connector_Registry *conn_reg =
this->stub_->orb_core ()->connector_registry (
@@ -147,28 +169,30 @@ namespace TAO
bool const is_conn_timeout =
this->get_connection_timeout (connection_timeout);
+ ACE_Time_Value *max_wait_time =
+ is_conn_timeout ? &connection_timeout : max_time_value;
- ACE_Time_Value *max_wait_time = 0;
-
- if (is_conn_timeout == true)
+ if (parallel)
{
- max_wait_time = &connection_timeout;
+ this->transport_ =
+ conn_reg->get_connector (desc->endpoint ()->tag ())->
+ parallel_connect (this,
+ desc,
+ max_wait_time
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (false);
}
else
{
- max_wait_time = max_time_value;
- }
-
-
// Obtain a connection.
this->transport_ =
- conn_reg->get_connector (desc->endpoint ()->tag ())->connect (
- this,
+ conn_reg->get_connector (desc->endpoint ()->tag ())->
+ connect (this,
desc,
max_wait_time
ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (false);
-
+ }
// A timeout error occurred.
// If the user has set a roundtrip timeout policy, throw a timeout
// exception. Otherwise, just fall through and return false to
@@ -192,6 +216,20 @@ namespace TAO
return true;
}
+ bool
+ Profile_Transport_Resolver::use_parallel_connect (void) const
+ {
+ TAO_ORB_Core *oc = this->stub_->orb_core();
+ return (oc->orb_params()->use_parallel_connects()
+#if 0 // it was decided that even with blocked connects
+ // parallel connects could be useful, at least for cache
+ // processing.
+ oc->client_factory()->connect_strategy() !=
+ TAO_Client_Strategy_Factory::TAO_BLOCKED_CONNECT
+#endif /* 0 */
+ );
+ }
+
bool
Profile_Transport_Resolver::get_connection_timeout (
ACE_Time_Value &max_wait_time)
diff --git a/TAO/tao/Profile_Transport_Resolver.h b/TAO/tao/Profile_Transport_Resolver.h
index 5ec4889a76b..34cef016395 100644
--- a/TAO/tao/Profile_Transport_Resolver.h
+++ b/TAO/tao/Profile_Transport_Resolver.h
@@ -130,13 +130,27 @@ namespace TAO
/// released back to the cache.
void transport_released (void) const;
- /// This is a callback method used by the endpoint selectors, to
+ /// This is a callback method used by the endpoint selectors to
/// delegate the responsibility of reserving a transport from the
- /// connection cache for this invocation.
+ /// connection cache for this invocation. When the descriptor
+ /// contains more than one endpoint (as part of a linked list) and
+ /// the parallel flag is true then the connector will look for a
+ /// connection on any of the endpoints if it supports that
+ /// behavior, otherwise an ENOTSUP errno will be set and the
+ /// method will return false.
bool try_connect (TAO_Transport_Descriptor_Interface *desc,
ACE_Time_Value *val
ACE_ENV_ARG_DECL);
+ bool try_parallel_connect (TAO_Transport_Descriptor_Interface *desc,
+ ACE_Time_Value *val
+ ACE_ENV_ARG_DECL);
+
+ /// This method wraps a call to the orb core to see if parallel
+ /// connection attempts are even desired. This is controlled by
+ /// the -ORBUseParallelConnects 1|0 commandline option.
+ bool use_parallel_connect (void) const;
+
/// Initialize the inconsistent policy list that this object has
/// cached.
void init_inconsistent_policies (ACE_ENV_SINGLE_ARG_DECL)
@@ -152,6 +166,10 @@ namespace TAO
bool get_connection_timeout (ACE_Time_Value &max_wait_time);
private:
+ bool try_connect_i (TAO_Transport_Descriptor_Interface *desc,
+ ACE_Time_Value *val,
+ bool parallel
+ ACE_ENV_ARG_DECL);
/// Target object
mutable CORBA::Object *obj_;
diff --git a/TAO/tao/RTPortableServer/RT_POA.cpp b/TAO/tao/RTPortableServer/RT_POA.cpp
index 6d4baacc932..7cfc74d470f 100644
--- a/TAO/tao/RTPortableServer/RT_POA.cpp
+++ b/TAO/tao/RTPortableServer/RT_POA.cpp
@@ -38,7 +38,7 @@ ACE_RCSID (RTPortableServer,
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
TAO_RT_POA::TAO_RT_POA (const TAO_Root_POA::String &name,
- TAO_POA_Manager &poa_manager,
+ PortableServer::POAManager_ptr poa_manager,
const TAO_POA_Policy_Set &policies,
TAO_Root_POA *parent,
ACE_Lock &lock,
@@ -71,7 +71,7 @@ TAO_RT_POA::~TAO_RT_POA (void)
TAO_Root_POA *
TAO_RT_POA::new_POA (const String &name,
- TAO_POA_Manager &poa_manager,
+ PortableServer::POAManager_ptr poa_manager,
const TAO_POA_Policy_Set &policies,
TAO_Root_POA *parent,
ACE_Lock &lock,
diff --git a/TAO/tao/RTPortableServer/RT_POA.h b/TAO/tao/RTPortableServer/RT_POA.h
index 5ae1c845166..2e255935f4b 100644
--- a/TAO/tao/RTPortableServer/RT_POA.h
+++ b/TAO/tao/RTPortableServer/RT_POA.h
@@ -256,7 +256,7 @@ public:
ACE_ENV_ARG_DECL);
TAO_RT_POA (const String &name,
- TAO_POA_Manager &poa_manager,
+ PortableServer::POAManager_ptr poa_manager,
const TAO_POA_Policy_Set &policies,
TAO_Root_POA *parent,
ACE_Lock &lock,
@@ -273,7 +273,7 @@ protected:
/// Template method for creating new POA's of this type.
virtual TAO_Root_POA *new_POA (const String &name,
- TAO_POA_Manager &poa_manager,
+ PortableServer::POAManager_ptr poa_manager,
const TAO_POA_Policy_Set &policies,
TAO_Root_POA *parent,
ACE_Lock &lock,
diff --git a/TAO/tao/RTPortableServer/RT_Servant_Dispatcher.cpp b/TAO/tao/RTPortableServer/RT_Servant_Dispatcher.cpp
index 9273b3d716c..fc64eb1e52c 100644
--- a/TAO/tao/RTPortableServer/RT_Servant_Dispatcher.cpp
+++ b/TAO/tao/RTPortableServer/RT_Servant_Dispatcher.cpp
@@ -372,7 +372,7 @@ TAO_RT_Servant_Dispatcher::post_invoke (TAO_Root_POA &poa,
TAO_Root_POA *
TAO_RT_Servant_Dispatcher::create_Root_POA (const ACE_CString &name,
- TAO_POA_Manager &poa_manager,
+ PortableServer::POAManager_ptr poa_manager,
const TAO_POA_Policy_Set &policies,
ACE_Lock &lock,
TAO_SYNCH_MUTEX &thread_lock,
diff --git a/TAO/tao/RTPortableServer/RT_Servant_Dispatcher.h b/TAO/tao/RTPortableServer/RT_Servant_Dispatcher.h
index 138523ff62a..2e3af3ce333 100644
--- a/TAO/tao/RTPortableServer/RT_Servant_Dispatcher.h
+++ b/TAO/tao/RTPortableServer/RT_Servant_Dispatcher.h
@@ -63,7 +63,7 @@ public:
/// Factory method for creating new POA's.
TAO_Root_POA *create_Root_POA (const ACE_CString &name,
- TAO_POA_Manager &poa_manager,
+ PortableServer::POAManager_ptr poa_manager,
const TAO_POA_Policy_Set &policies,
ACE_Lock &lock,
TAO_SYNCH_MUTEX &thread_lock,
diff --git a/TAO/tao/Reactive_Connect_Strategy.cpp b/TAO/tao/Reactive_Connect_Strategy.cpp
index 0883b3ee91c..17a9d2d642a 100644
--- a/TAO/tao/Reactive_Connect_Strategy.cpp
+++ b/TAO/tao/Reactive_Connect_Strategy.cpp
@@ -3,6 +3,7 @@
#include "tao/ORB_Core.h"
#include "tao/debug.h"
#include "tao/Transport.h"
+#include "tao/LF_Multi_Event.h"
#include "ace/Synch_Options.h"
@@ -41,9 +42,14 @@ TAO_Reactive_Connect_Strategy::synch_options (ACE_Time_Value *timeout,
}
int
-TAO_Reactive_Connect_Strategy::wait (TAO_Connection_Handler *ch,
- ACE_Time_Value *max_wait_time)
+TAO_Reactive_Connect_Strategy::wait_i (TAO_LF_Event *ev,
+ TAO_Transport *,
+ ACE_Time_Value * max_wait_time)
{
+ int result = 0;
+ if (ev == 0)
+ return -1;
+
if (TAO_debug_level > 2)
{
ACE_DEBUG ((LM_DEBUG,
@@ -51,12 +57,10 @@ TAO_Reactive_Connect_Strategy::wait (TAO_Connection_Handler *ch,
ACE_TEXT ("connection completion - wait ()\n")));
}
- int result = 0;
-
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
- while (ch->keep_waiting ())
+ while (ev->keep_waiting ())
{
result =
this->orb_core_->run (max_wait_time, 1 ACE_ENV_ARG_PARAMETER);
@@ -84,7 +88,7 @@ TAO_Reactive_Connect_Strategy::wait (TAO_Connection_Handler *ch,
ACE_ENDTRY;
// Set the result.
- if (ch->error_detected () && result != -1)
+ if (result != -1 && ev->error_detected ())
{
result = -1;
}
@@ -92,15 +96,4 @@ TAO_Reactive_Connect_Strategy::wait (TAO_Connection_Handler *ch,
return result;
}
-int
-TAO_Reactive_Connect_Strategy::wait (TAO_Transport *t,
- ACE_Time_Value *val)
-{
- if (t == 0)
- return -1;
-
- return this->wait (t->connection_handler (),
- val);
-}
-
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/Reactive_Connect_Strategy.h b/TAO/tao/Reactive_Connect_Strategy.h
index 305b5e9576e..694bbb49560 100644
--- a/TAO/tao/Reactive_Connect_Strategy.h
+++ b/TAO/tao/Reactive_Connect_Strategy.h
@@ -28,8 +28,6 @@ ACE_END_VERSIONED_NAMESPACE_DECL
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-class TAO_Connector;
-
/**
* @class TAO_Reactive_Connect_Strategy
*
@@ -53,12 +51,8 @@ public:
virtual void synch_options (ACE_Time_Value *val,
ACE_Synch_Options &opt);
- virtual int wait (TAO_Connection_Handler *ch,
- ACE_Time_Value *val);
-
-
- virtual int wait (TAO_Transport *t,
- ACE_Time_Value *val);
+protected:
+ virtual int wait_i (TAO_LF_Event *ch, TAO_Transport *, ACE_Time_Value *val);
};
diff --git a/TAO/tao/Strategies/OC_Endpoint_Selector_Loader.cpp b/TAO/tao/Strategies/OC_Endpoint_Selector_Loader.cpp
index c250cd76240..314ec97354b 100644
--- a/TAO/tao/Strategies/OC_Endpoint_Selector_Loader.cpp
+++ b/TAO/tao/Strategies/OC_Endpoint_Selector_Loader.cpp
@@ -1,3 +1,13 @@
+// =================================================================
+/**
+ * @file OC_Endpoint_Selector_Loader.cpp
+ *
+ * $Id$
+ *
+ * @author Phil Mesnier
+ *
+ */
+// =================================================================
// $Id$
#include "tao/Strategies/OC_Endpoint_Selector_Loader.h"
@@ -9,11 +19,10 @@ ACE_RCSID (tao,
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-TAO_OC_Endpoint_Selector_Loader::TAO_OC_Endpoint_Selector_Loader (void)
+int
+TAO_OC_Endpoint_Selector_Loader::init (void)
{
-#if defined (TAO_AS_STATIC_LIBS)
- ACE_Service_Config::process_directive (ace_svc_desc_TAO_OC_Endpoint_Selector_Factory);
-#endif /* TAO_AS_STATIC_LIBS */
+ return ACE_Service_Config::process_directive (ace_svc_desc_TAO_OC_Endpoint_Selector_Factory);
}
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/Strategies/OC_Endpoint_Selector_Loader.h b/TAO/tao/Strategies/OC_Endpoint_Selector_Loader.h
index 5edc517027d..a19f9cf5b1e 100644
--- a/TAO/tao/Strategies/OC_Endpoint_Selector_Loader.h
+++ b/TAO/tao/Strategies/OC_Endpoint_Selector_Loader.h
@@ -49,11 +49,12 @@ class TAO_Optimized_Connection_Endpoint_Selector;
class TAO_Strategies_Export TAO_OC_Endpoint_Selector_Loader
{
public:
- TAO_OC_Endpoint_Selector_Loader (void);
+ static int init(void);
};
-
-static TAO_OC_Endpoint_Selector_Loader _TAO_oc_endpoint_selector_loader;
+static int
+TAO_Requires_OC_Endpoint_Selector_Loader =
+ TAO_OC_Endpoint_Selector_Loader::init ();
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/Strategies/Optimized_Connection_Endpoint_Selector.cpp b/TAO/tao/Strategies/Optimized_Connection_Endpoint_Selector.cpp
index dae584e8152..ad864ad1b9f 100644
--- a/TAO/tao/Strategies/Optimized_Connection_Endpoint_Selector.cpp
+++ b/TAO/tao/Strategies/Optimized_Connection_Endpoint_Selector.cpp
@@ -27,7 +27,7 @@ TAO_Optimized_Connection_Endpoint_Selector::TAO_Optimized_Connection_Endpoint_Se
if (TAO_debug_level)
{
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("TAO(%P|%t) Optimized Connection Enpoint Selector:")
+ ACE_TEXT ("TAO(%P|%t) Optimized Connection Enpoint Selector: ")
ACE_TEXT ("Initializing timeout hook tv = %d sec, %d usec\n"),
tv.sec(), tv.usec()));
}
diff --git a/TAO/tao/TAO_Internal.cpp b/TAO/tao/TAO_Internal.cpp
index d288fbf7e6c..297fa56eaa3 100644
--- a/TAO/tao/TAO_Internal.cpp
+++ b/TAO/tao/TAO_Internal.cpp
@@ -48,33 +48,71 @@ ACE_RCSID (tao,
namespace
{
+
+ /**
+ * Parses the supplied command-line arguments to extract any that
+ * apply to the process (globally)
+ *
+ * @brief Modifies the argc to reflect any arguments it has
+ * "consumed"
+ */
+ int
+ parse_global_args_i (int &argc,
+ char **argv,
+ CORBA::StringSeq &svc_config_argv);
+
/**
- * Initialize the ACE Service Configurator. This is a one-shot
- * method, i.e., it can be called multiple times but it will only do
- * its work once. It does, however, track the number of times it's
- * called (see @c open_services()). It is fully thread-safe.
+ * Initialize the ACE Service Configurator with the process-global
+ * services (available to any ORB).
*
* @return @c 0 if successful, @c -1 with @c errno set if failure.
*
* @note You can provide your program a set of default `svc.conf'
* entries by setting @a ignore_default_svc_conf_file to
* non-zero and use @c default_svc_conf_entries() before
- * calling @c open_services(). In addition, you can @a
+ * calling @c open_global_services(). In addition, you can @a
* skip_service_config_open altogether, which used to be
* important when the ORB is linked in via the
- * ACE_Service_Configurator, since the
- * ACE_Service_Configurator was non-reentrant. However, the
- * ACE_Service_Configurator is now reentrant meaning that it
- * is really no longer necessary to do so.
+ * ACE_Service_Config, since the ACE_Service_Config was
+ * non-reentrant. However, the ACE_Service_Config is now
+ * reentrant meaning that it is really no longer necessary to
+ * do so.
+ */
+ void register_global_services_i (ACE_Service_Gestalt * pcfg);
+ int open_global_services_i (ACE_Service_Gestalt* theone,
+ int & argc,
+ char ** argv,
+ bool skip_service_config_open);
+
+ /**
+ * Parses the supplied command-line arguments to extract any
+ * instance-specific ones.
+ *
+ * @brief Modifies the argc to reflect any arguments it has
+ * "consumed"
+ */
+ int
+ parse_private_args_i (int &argc,
+ char **argv,
+ CORBA::StringSeq & svc_config_argv,
+ bool & skip_service_config_open);
+
+ /**
+ * Initialize ORB-local (private) ACE Service Configurator
+ * repository.
+ *
+ * @return @c 0 if successful, @c -1 with @c errno set if failure.
+ *
*/
- int open_services_i (int & argc,
- char ** argv,
- bool ignore_default_svc_conf_file = false,
- bool skip_service_config_open = false);
+ int open_private_services_i (ACE_Service_Gestalt* pcfg,
+ int & argc,
+ char ** argv,
+ bool skip_service_config_open = false);
- /// Number of times open_services() has been called. Incremented by
- /// open_services(), and decremented by close_services().
/**
+ * Number of times open_services() has been called. Incremented by
+ * open_global_services_i(), and decremented by close_services().
+ *
* @note In/decrement operations are atomic.
*/
long service_open_count = 0;
@@ -90,7 +128,9 @@ namespace
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
int
-TAO::ORB::open_services (int &argc, ACE_TCHAR **argv)
+TAO::ORB::open_services (ACE_Service_Gestalt* pcfg,
+ int &argc,
+ ACE_TCHAR **argv)
{
// Construct an argument vector specific to the Service
// Configurator.
@@ -105,7 +145,6 @@ TAO::ORB::open_services (int &argc, ACE_TCHAR **argv)
argv0 = ACE_TEXT_TO_CHAR_OUT (argv[0]);
}
- CORBA::ULong len = 0;
svc_config_argv.length (1);
svc_config_argv[0] = argv0.c_str ();
@@ -117,157 +156,66 @@ TAO::ORB::open_services (int &argc, ACE_TCHAR **argv)
// -Ossama
bool skip_service_config_open = false;
-#if defined (TAO_DEBUG) && !defined (ACE_HAS_WINCE)
- // Make it a little easier to debug programs using this code.
+ // Extract any ORB options from the argument vector.
+ if (parse_private_args_i (argc,
+ argv,
+ svc_config_argv,
+ skip_service_config_open) == -1)
+ return -1;
+ else
{
- TAO_debug_level = ACE_Env_Value ("TAO_ORB_DEBUG", 0);
+ ACE_MT (ACE_GUARD_RETURN (TAO_SYNCH_RECURSIVE_MUTEX,
+ guard,
+ *ACE_Static_Object_Lock::instance (),
+ -1));
- char * const value = ACE_OS::getenv ("TAO_ORB_DEBUG");
+ service_open_count++;
- if (value != 0)
+ ACE_Service_Gestalt * theone = ACE_Service_Config::global ();
+ if (pcfg != theone)
+ {
+ int status = open_global_services_i (theone, argc, argv, skip_service_config_open);
+ if (status == -1)
{
- TAO_debug_level = ACE_OS::atoi (value);
-
- if (TAO_debug_level <= 0)
- {
- TAO_debug_level = 1;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("TAO_debug_level == %d\n"),
- TAO_debug_level));
+ if (TAO_debug_level > 0)
+ ACE_ERROR_RETURN ((LM_DEBUG,
+ ACE_LIB_TEXT ("TAO (%P|%t) Failed to ")
+ ACE_LIB_TEXT("open process-wide service configuration\n")),
+ -1);
+ return -1;
}
- }
-#endif /* TAO_DEBUG && !ACE_HAS_WINCE */
-
- // Extract the Service Configurator ORB options from the argument
- // vector.
- ACE_Arg_Shifter arg_shifter (argc, argv);
+ }
- while (arg_shifter.is_anything_left ())
+ int svc_config_argc = svc_config_argv.length ();
+ int status =
+ open_private_services_i (pcfg,
+ svc_config_argc,
+ svc_config_argv.get_buffer (),
+ skip_service_config_open);
+ if (status == -1)
{
- const ACE_TCHAR *current_arg = 0;
-
- // Start with the parameterless flags.
- if (arg_shifter.cur_arg_strncasecmp
- (ACE_TEXT ("-ORBSkipServiceConfigOpen")) == 0)
- {
- skip_service_config_open = true;
-
- arg_shifter.consume_arg ();
- }
- else if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT ("-ORBDebug")) == 0)
- {
- // later, replace all of these
- // warning this turns on a daemon
- ACE::debug (1);
- arg_shifter.consume_arg ();
- }
- else if (0 != (current_arg = arg_shifter.get_the_parameter
- (ACE_TEXT ("-ORBDebugLevel"))))
- {
- TAO_debug_level =
- ACE_OS::atoi (current_arg);
-
- arg_shifter.consume_arg ();
- }
- else if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT ("-ORBDaemon")) == 0)
- {
- // Be a daemon
-
- len = svc_config_argv.length ();
- svc_config_argv.length (len + 1);
-
- svc_config_argv[len] = CORBA::string_dup ("-b");
-
- arg_shifter.consume_arg ();
- }
- // Continue with flags that accept parameters.
- else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT ("-ORBSvcConfDirective"))))
- {
- len = svc_config_argv.length ();
- svc_config_argv.length (len + 2); // 2 arguments to add
-
- // This is used to pass arguments to the Service
- // Configurator using the "command line" to provide
- // configuration information rather than using a svc.conf
- // file. Pass the "-S" to the service configurator.
- svc_config_argv[len] = CORBA::string_dup ("-S");
- svc_config_argv[len + 1] = CORBA::string_dup (current_arg);
-
- arg_shifter.consume_arg ();
- }
- else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT ("-ORBSvcConf"))))
- {
- // Specify the name of the svc.conf file to be used.
-
- // Proceeds only if the configuration file exists.
- FILE * const conf_file = ACE_OS::fopen (current_arg, ACE_TEXT ("r"));
-
- if (conf_file == 0)
- {
- // Assigning EINVAL to errno to make an exception
- // thrown. calling code does not throw an exception if
- // the errno is set to ENOENT for some reason.
- errno = EINVAL;
-
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("TAO (%P|%t) Service Configurator ")
- ACE_TEXT ("unable to open file %s\n"),
- current_arg),
- -1);
-
- }
- else
- {
- ACE_OS::fclose (conf_file);
- }
-
- len = svc_config_argv.length ();
- svc_config_argv.length (len + 2); // 2 arguments to add
-
- svc_config_argv[len] = CORBA::string_dup ("-f");
- svc_config_argv[len + 1] = CORBA::string_dup (current_arg);
-
- arg_shifter.consume_arg();
- }
- else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT ("-ORBServiceConfigLoggerKey"))))
- {
- len = svc_config_argv.length ();
- svc_config_argv.length (len + 2); // 2 arguments to add
-
- svc_config_argv[len] = CORBA::string_dup ("-k");
- svc_config_argv[len + 1] = CORBA::string_dup (current_arg);
-
- arg_shifter.consume_arg ();
- }
- // Can't interpret this argument. Move on to the next argument.
- else
- {
- // Any arguments that don't match are ignored so that the
- // caller can still use them.
- arg_shifter.ignore_arg ();
- }
+ if (TAO_debug_level > 0)
+ ACE_ERROR_RETURN ((LM_DEBUG,
+ ACE_TEXT ("TAO (%P|%t) Failed to ")
+ ACE_TEXT("open orb service configuration\n")),
+ -1);
+ return -1;
}
- int svc_config_argc = svc_config_argv.length ();
- return open_services_i (svc_config_argc,
- svc_config_argv.get_buffer (),
- 0, // @@ What about this argument?
- skip_service_config_open);
+ return 0;
+ }
}
int
-TAO::ORB::close_services (void)
+TAO::ORB::close_services (ACE_Service_Gestalt* pcfg)
{
ACE_MT (ACE_GUARD_RETURN (TAO_SYNCH_RECURSIVE_MUTEX,
guard,
*ACE_Static_Object_Lock::instance (),
-1));
+ service_open_count--;
- --service_open_count;
-
- return 0;
+ return pcfg->close ();
}
void
@@ -285,32 +233,78 @@ TAO_END_VERSIONED_NAMESPACE_DECL
// -----------------------------------------------------
namespace
{
+
+ ///
+
int
- open_services_i (int & argc,
- char ** argv,
- bool ignore_default_svc_conf_file,
- bool skip_service_config_open)
+ open_global_services_i (ACE_Service_Gestalt * theone,
+ int & argc,
+ ACE_TCHAR ** argv,
+ bool skip_service_config_open)
+ {
+ // Construct an argument vector specific to the process-wide
+ // (global) Service Configurator instance.
+ CORBA::StringSeq global_svc_config_argv;
+
+ // Be certain to copy the program name so that service configurator
+ // has something to skip!
+ ACE_CString argv0 ("");
+
+ if (argc > 0 && argv != 0)
+ {
+ argv0 = ACE_TEXT_ALWAYS_CHAR (argv[0]);
+ }
+
+ global_svc_config_argv.length (1);
+ global_svc_config_argv[0] = argv0.c_str ();
+
+ if (parse_global_args_i (argc, argv, global_svc_config_argv) == -1)
+ return -1;
+
+ ACE_Service_Config_Guard guard (theone);
+ register_global_services_i (theone);
+
+ int global_svc_config_argc = global_svc_config_argv.length ();
+ if (!skip_service_config_open)
+ {
+ return theone->open (global_svc_config_argc,
+ global_svc_config_argv.get_buffer ());
+ }
+ return 0;
+ }
+
+
+ ///
+
+ int
+ open_private_services_i (ACE_Service_Gestalt * pcfg,
+ int & argc,
+ ACE_TCHAR ** argv,
+ bool skip_service_config_open)
{
#if defined (TAO_PLATFORM_SVC_CONF_FILE_NOTSUP)
- ignore_default_svc_conf_file = true;
+ bool ignore_default_svc_conf_file = true;
+#else
+ bool ignore_default_svc_conf_file = false;
#endif /* TAO_PLATFORM_SVC_CONF_FILE_NOTSUP */
- {
- ACE_MT (ACE_GUARD_RETURN (TAO_SYNCH_RECURSIVE_MUTEX,
- guard,
- *ACE_Static_Object_Lock::instance (),
- -1));
+ if (skip_service_config_open)
+ return 0;
- if (service_open_count++ != 0) // Atomic increment
- return 0;
- }
+ return pcfg->open (argc,
+ argv,
+ ACE_DEFAULT_LOGGER_KEY,
+ 0, // Don't ignore static services.
+ ignore_default_svc_conf_file);
+ }
- ACE_Service_Config::process_directive (
- ace_svc_desc_TAO_Default_Resource_Factory);
- ACE_Service_Config::process_directive (
- ace_svc_desc_TAO_Default_Client_Strategy_Factory);
- ACE_Service_Config::process_directive (
- ace_svc_desc_TAO_Default_Server_Strategy_Factory);
+ /// @brief registers all process-wide (global) services, available to all ORBs
+ void
+ register_global_services_i (ACE_Service_Gestalt * pcfg)
+ {
+ pcfg->process_directive (ace_svc_desc_TAO_Default_Resource_Factory);
+ pcfg->process_directive (ace_svc_desc_TAO_Default_Client_Strategy_Factory);
+ pcfg->process_directive (ace_svc_desc_TAO_Default_Server_Strategy_Factory);
// Configure the IIOP factory. You do *NOT* need modify this
// code to add your own protocol, instead simply add the
@@ -321,125 +315,273 @@ namespace
//
// where PN is the name of your protocol and LIB is the base
// name of the shared library that implements the protocol.
+
#if defined (TAO_HAS_IIOP) && (TAO_HAS_IIOP != 0)
- ACE_Service_Config::process_directive (
- ace_svc_desc_TAO_IIOP_Protocol_Factory);
+ pcfg->process_directive (ace_svc_desc_TAO_IIOP_Protocol_Factory);
#endif /* TAO_HAS_IIOP && TAO_HAS_IIOP != 0 */
// add descriptor to list of static objects.
- ACE_Service_Config::process_directive (
- ace_svc_desc_TAO_MCAST_Parser);
- ACE_Service_Config::process_directive (
- ace_svc_desc_TAO_CORBANAME_Parser);
- ACE_Service_Config::process_directive (
- ace_svc_desc_TAO_CORBALOC_Parser);
- ACE_Service_Config::process_directive (
- ace_svc_desc_TAO_FILE_Parser);
- ACE_Service_Config::process_directive (
- ace_svc_desc_TAO_DLL_Parser);
- ACE_Service_Config::process_directive (
- ace_svc_desc_TAO_Default_Stub_Factory);
- ACE_Service_Config::process_directive (
- ace_svc_desc_TAO_Default_Endpoint_Selector_Factory);
- ACE_Service_Config::process_directive (
- ace_svc_desc_TAO_Default_Protocols_Hooks);
- ACE_Service_Config::process_directive (
- ace_svc_desc_TAO_Default_Thread_Lane_Resources_Manager_Factory);
- ACE_Service_Config::process_directive (
- ace_svc_desc_TAO_Default_Collocation_Resolver);
-
- int result = 0;
-
- if (!skip_service_config_open)
- {
- // Copy command line parameter not to use original.
- ACE_Argv_Type_Converter command_line (argc, argv);
-
- result =
- ACE_Service_Config::open (command_line.get_argc(),
- command_line.get_TCHAR_argv(),
- ACE_DEFAULT_LOGGER_KEY,
- 0, // Don't ignore static services.
- ignore_default_svc_conf_file);
- }
+ pcfg->process_directive (ace_svc_desc_TAO_MCAST_Parser);
+ pcfg->process_directive (ace_svc_desc_TAO_CORBANAME_Parser);
+ pcfg->process_directive (ace_svc_desc_TAO_CORBALOC_Parser);
+ pcfg->process_directive (ace_svc_desc_TAO_FILE_Parser);
+ pcfg->process_directive (ace_svc_desc_TAO_DLL_Parser);
+ pcfg->process_directive (ace_svc_desc_TAO_Default_Stub_Factory);
+ pcfg->process_directive (ace_svc_desc_TAO_Default_Endpoint_Selector_Factory);
+ pcfg->process_directive (ace_svc_desc_TAO_Default_Protocols_Hooks);
+ pcfg->process_directive (ace_svc_desc_TAO_Default_Thread_Lane_Resources_Manager_Factory);
+ pcfg->process_directive (ace_svc_desc_TAO_Default_Collocation_Resolver);
+
+ // @@ What the heck do these things do and do we need to avoid
+ // calling them if we're not invoking the svc.conf file?
+ // @@ They are needed for platforms that have no file system,
+ // like VxWorks.
+ if (resource_factory_args != 0)
+ {
+ pcfg->process_directive
+ (ACE_TEXT_CHAR_TO_TCHAR (resource_factory_args));
+ }
+
+ if (client_strategy_factory_args != 0)
+ {
+ pcfg->process_directive
+ (ACE_TEXT_CHAR_TO_TCHAR (client_strategy_factory_args));
+ }
+
+ if (server_strategy_factory_args != 0)
+ {
+ pcfg->process_directive
+ (ACE_TEXT_CHAR_TO_TCHAR (server_strategy_factory_args));
+ }
// If available, allow the Adapter Factory to setup.
ACE_Service_Object *adapter_factory =
- ACE_Dynamic_Service::instance (
- TAO_ORB_Core::poa_factory_name ().c_str());
+ ACE_Dynamic_Service::instance
+ (pcfg, TAO_ORB_Core::poa_factory_name ().c_str());
if (adapter_factory != 0)
- {
- adapter_factory->init (0, 0);
- }
+ {
+ adapter_factory->init (0, 0);
+ }
ACE_Service_Object * const pi_server_loader =
- ACE_Dynamic_Service::instance ("PI_Server_Loader");
+ ACE_Dynamic_Service::instance (pcfg, "PI_Server_Loader");
if (pi_server_loader != 0)
- {
- pi_server_loader->init (0, 0);
- }
+ {
+ pi_server_loader->init (0, 0);
+ }
ACE_Service_Object * const bidir_loader =
- ACE_Dynamic_Service::instance ("BiDirGIOP_Loader");
+ ACE_Dynamic_Service::instance (pcfg, "BiDirGIOP_Loader");
if (bidir_loader != 0)
- {
- bidir_loader->init (0, 0);
- }
+ {
+ bidir_loader->init (0, 0);
+ }
ACE_Service_Object * const messaging_loader =
- ACE_Dynamic_Service::instance ("Messaging_Loader");
+ ACE_Dynamic_Service::instance (pcfg, "Messaging_Loader");
if (messaging_loader != 0)
- {
- messaging_loader->init (0, 0);
- }
+ {
+ messaging_loader->init (0, 0);
+ }
// Handle RTCORBA library special case. Since RTCORBA needs
// its init method call to register several hooks, call it
// here if it hasn't already been called.
ACE_Service_Object * const rt_loader =
- ACE_Dynamic_Service::instance ("RT_ORB_Loader");
+ ACE_Dynamic_Service::instance (pcfg, "RT_ORB_Loader");
if (rt_loader != 0)
- {
- rt_loader->init (0, 0);
- }
+ {
+ rt_loader->init (0, 0);
+ }
ACE_Service_Object * const rtscheduler_loader =
- ACE_Dynamic_Service::instance ("RTScheduler_Loader");
+ ACE_Dynamic_Service::instance (pcfg, "RTScheduler_Loader");
if (rtscheduler_loader != 0)
+ {
+ rtscheduler_loader->init (0, 0);
+ }
+
+ } /* register_additional_services_i */
+
+
+ int
+ parse_private_args_i (int &argc,
+ char **argv,
+ CORBA::StringSeq &svc_config_argv,
+ bool & skip_service_config_open)
+ {
+ // Extract the Service Configurator ORB options from the argument
+ // vector.
+ ACE_Arg_Shifter arg_shifter (argc, argv);
+
+ CORBA::ULong len = 0;
+ while (arg_shifter.is_anything_left ())
+ {
+ const ACE_TCHAR *current_arg = 0;
+
+ // Start with the parameterless flags.
+ if (arg_shifter.cur_arg_strncasecmp
+ (ACE_TEXT ("-ORBSkipServiceConfigOpen")) == 0)
{
- rtscheduler_loader->init (0, 0);
+ skip_service_config_open = true;
+
+ arg_shifter.consume_arg ();
}
+ // Continue with flags that accept parameters.
+ else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT ("-ORBSvcConfDirective"))))
+ {
+ len = svc_config_argv.length ();
+ svc_config_argv.length (len + 2); // 2 arguments to add
- // @@ What the heck do these things do and do we need to avoid
- // calling them if we're not invoking the svc.conf file?
- // @@ They are needed for platforms that have no file system,
- // like VxWorks.
- if (resource_factory_args != 0)
+ // This is used to pass arguments to the Service
+ // Configurator using the "command line" to provide
+ // configuration information rather than using a svc.conf
+ // file. Pass the "-S" to the service configurator.
+ svc_config_argv[len] = CORBA::string_dup ("-S");
+ svc_config_argv[len + 1] = CORBA::string_dup (ACE_TEXT_ALWAYS_CHAR(current_arg));
+
+ arg_shifter.consume_arg ();
+ }
+ else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT ("-ORBSvcConf"))))
+ {
+ // Specify the name of the svc.conf file to be used.
+
+ // Proceeds only if the configuration file exists.
+ FILE * const conf_file = ACE_OS::fopen (current_arg, ACE_TEXT ("r"));
+
+ if (conf_file == 0)
+ {
+ // Assigning EINVAL to errno to make an exception
+ // thrown. calling code does not throw an exception if
+ // the errno is set to ENOENT for some reason.
+ errno = EINVAL;
+
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("TAO (%P|%t) Service Configurator ")
+ ACE_TEXT ("unable to open file %s\n"),
+ current_arg),
+ -1);
+
+ }
+ else
+ {
+ ACE_OS::fclose (conf_file);
+ }
+
+ len = svc_config_argv.length ();
+ svc_config_argv.length (len + 2); // 2 arguments to add
+
+ svc_config_argv[len] = CORBA::string_dup ("-f");
+ svc_config_argv[len + 1] = CORBA::string_dup (ACE_TEXT_ALWAYS_CHAR(current_arg));
+
+ arg_shifter.consume_arg();
+ }
+ else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT ("-ORBServiceConfigLoggerKey"))))
+ {
+ len = svc_config_argv.length ();
+ svc_config_argv.length (len + 2); // 2 arguments to add
+
+ svc_config_argv[len] = CORBA::string_dup ("-k");
+ svc_config_argv[len + 1] = CORBA::string_dup (ACE_TEXT_ALWAYS_CHAR(current_arg));
+
+ arg_shifter.consume_arg ();
+ }
+ // Can't interpret this argument. Move on to the next argument.
+ else
{
- ACE_Service_Config::process_directive (
- ACE_TEXT_TO_TCHAR_IN (resource_factory_args));
+ // Any arguments that don't match are ignored so that the
+ // caller can still use them.
+ arg_shifter.ignore_arg ();
}
+ }
- if (client_strategy_factory_args != 0)
+ return 0;
+
+ } /* parse_private_args_i */
+
+ int
+ parse_global_args_i (int &argc,
+ char **argv,
+ CORBA::StringSeq &svc_config_argv)
+ {
+
+#if defined (TAO_DEBUG) && !defined (ACE_HAS_WINCE)
+ // Make it a little easier to debug programs using this code.
+ {
+ TAO_debug_level = ACE_Env_Value ("TAO_ORB_DEBUG", 0);
+
+ char * const value = ACE_OS::getenv ("TAO_ORB_DEBUG");
+
+ if (value != 0)
{
- ACE_Service_Config::process_directive (
- ACE_TEXT_TO_TCHAR_IN (client_strategy_factory_args));
+ TAO_debug_level = ACE_OS::atoi (value);
+
+ if (TAO_debug_level <= 0)
+ {
+ TAO_debug_level = 1;
+ }
+
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("TAO_debug_level == %d\n"),
+ TAO_debug_level));
}
+ }
+#endif /* TAO_DEBUG && !ACE_HAS_WINCE */
- if (server_strategy_factory_args != 0)
+
+ // Extract the Service Configurator ORB options from the argument
+ // vector.
+ ACE_Arg_Shifter arg_shifter (argc, argv);
+ CORBA::ULong len = 0;
+
+ while (arg_shifter.is_anything_left ())
+ {
+ const ACE_TCHAR *current_arg = 0;
+ if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT ("-ORBDebug")) == 0)
{
- ACE_Service_Config::process_directive (
- ACE_TEXT_TO_TCHAR_IN (server_strategy_factory_args));
+ // later, replace all of these
+ // warning this turns on a daemon
+ ACE::debug (1);
+ arg_shifter.consume_arg ();
}
+ else if (0 != (current_arg = arg_shifter.get_the_parameter
+ (ACE_TEXT ("-ORBDebugLevel"))))
+ {
+ TAO_debug_level =
+ ACE_OS::atoi (current_arg);
- return result;
- }
-}
+ arg_shifter.consume_arg ();
+ }
+ else if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT ("-ORBDaemon")) == 0)
+ {
+ // Be a daemon
+
+ len = svc_config_argv.length ();
+ svc_config_argv.length (len + 1);
+
+ svc_config_argv[len] = CORBA::string_dup ("-b");
+ arg_shifter.consume_arg ();
+ }
+ // Can't interpret this argument. Move on to the next argument.
+ else
+ {
+ // Any arguments that don't match are ignored so that the
+ // caller can still use them.
+ arg_shifter.ignore_arg ();
+ }
+ }
+
+ return 0;
+
+ } /* parse_global_args_i */
+
+
+}
// TAO_BEGIN_VERSIONED_NAMESPACE_DECL -- ended prior to anonymous namespace.
diff --git a/TAO/tao/TAO_Internal.h b/TAO/tao/TAO_Internal.h
index e528980821c..3a40ef07bd6 100644
--- a/TAO/tao/TAO_Internal.h
+++ b/TAO/tao/TAO_Internal.h
@@ -24,6 +24,11 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
+ACE_BEGIN_VERSIONED_NAMESPACE_DECL
+/// Forward declaration
+class ACE_Service_Gestalt;
+ACE_END_VERSIONED_NAMESPACE_DECL
+
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
namespace TAO
@@ -38,13 +43,14 @@ namespace TAO
*/
namespace ORB
{
- /// Extract ACE Service Configurator arguments from the given
- /// argument vector, and initialize the ACE Service Configurator.
/**
+ * Extract ACE Service Configurator arguments from the given
+ * argument vector, and initialize the ACE Service Configurator.
+ *
* @note This method should be called before the ORB Core is
* initialized, and before any ORBInitializers are invoked.
*/
- int open_services (int& argc, ACE_TCHAR** argv);
+ int open_services (ACE_Service_Gestalt* cfg, int& argc, ACE_TCHAR** argv);
/**
* The complement to @c open_services(), this will perform
@@ -52,13 +58,16 @@ namespace TAO
* should be called as many times as @c open_services(), and will
* only actually close things down on the last call. It is fully
* thread-safe.
+ *
* @return @c 0 if successful, @c -1 with @c errno set if
* failure.
*/
- int close_services (void);
+ int close_services (ACE_Service_Gestalt* pcfg);
- /// Set default @c `svc.conf' content. This call has no effect if
- /// This function must be called before first ORB initialization.
+ /**
+ * Set default @c `svc.conf' content.
+ * This function must be called before first ORB initialization.
+ */
void default_svc_conf_entries (char const * rf_args,
char const * ssf_args,
char const * csf_args);
diff --git a/TAO/tao/Transport.cpp b/TAO/tao/Transport.cpp
index 1d067684b6c..3c130b10691 100644
--- a/TAO/tao/Transport.cpp
+++ b/TAO/tao/Transport.cpp
@@ -1224,6 +1224,7 @@ TAO_Transport::send_asynchronous_message_i (TAO_Stub *stub,
if (this->queue_message_i(message_block) == -1)
{
+ if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("TAO (%P|%t) - Transport[%d]::send_asynchronous_message_i, ")
ACE_TEXT ("cannot queue message for ")
@@ -2335,7 +2336,6 @@ TAO_Transport::post_open (size_t id)
ace_mon,
*this->handler_lock_,
false);
-
this->is_connected_ = true;
}
diff --git a/TAO/tao/Transport_Connector.cpp b/TAO/tao/Transport_Connector.cpp
index 0d6c1ee6692..0b2b433813d 100644
--- a/TAO/tao/Transport_Connector.cpp
+++ b/TAO/tao/Transport_Connector.cpp
@@ -7,11 +7,14 @@
#include "tao/Thread_Lane_Resources.h"
#include "tao/debug.h"
#include "tao/Connect_Strategy.h"
+#include "tao/LF_Multi_Event.h"
#include "tao/Client_Strategy_Factory.h"
#include "tao/Connection_Handler.h"
#include "tao/Profile_Transport_Resolver.h"
#include "tao/Wait_Strategy.h"
#include "tao/SystemException.h"
+#include "tao/Endpoint.h"
+#include "tao/Base_Transport_Property.h"
#include "ace/OS_NS_string.h"
@@ -242,6 +245,81 @@ TAO_Connector::make_mprofile (const char *string,
return 0; // Success
}
+int
+TAO_Connector::supports_parallel_connects(void) const
+{
+ return 0; // by default, we don't support parallel connection attempts;
+}
+
+TAO_Transport*
+TAO_Connector::make_parallel_connection (TAO::Profile_Transport_Resolver *,
+ TAO_Transport_Descriptor_Interface &,
+ ACE_Time_Value *)
+{
+ return 0;
+}
+
+
+TAO_Transport*
+TAO_Connector::parallel_connect (TAO::Profile_Transport_Resolver *r,
+ TAO_Transport_Descriptor_Interface *desc,
+ ACE_Time_Value *timeout
+ ACE_ENV_ARG_DECL_NOT_USED)
+{
+ if (this->supports_parallel_connects() == 0)
+ {
+ errno = ENOTSUP;
+ return 0;
+ }
+
+ errno = 0; // need to clear errno to ensure a stale enotsup is not set
+ if (desc == 0)
+ return 0;
+ unsigned int endpoint_count = 0;
+ TAO_Endpoint *root_ep = desc->endpoint();
+ for (TAO_Endpoint *ep = root_ep->next_filtered (this->orb_core(),0);
+ ep != 0;
+ ep = ep->next_filtered(this->orb_core(),root_ep))
+ if (this->set_validate_endpoint (ep) == 0)
+ ++endpoint_count;
+ if (endpoint_count == 0)
+ return 0;
+
+ TAO_Transport *base_transport = 0;
+
+ TAO::Transport_Cache_Manager &tcm =
+ this->orb_core ()->lane_resources ().transport_cache ();
+
+ // Iterate through the endpoints. Since find_transport takes a
+ // Transport Descriptor rather than an endpoint, we must create a
+ // local TDI for each endpoint. The first one found will be used.
+ for (TAO_Endpoint *ep = root_ep->next_filtered (this->orb_core(),0);
+ ep != 0;
+ ep = ep->next_filtered(this->orb_core(),root_ep))
+ {
+ TAO_Base_Transport_Property desc2(ep,0);
+ if (tcm.find_transport (&desc2,
+ base_transport) == 0)
+ {
+ if (TAO_debug_level)
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("(%P|%t) TAO_Connector::parallel_connect: ")
+ ACE_TEXT ("found a transport [%d]\n"),
+ base_transport->id()));
+ return base_transport;
+ }
+ }
+
+ // Now we have searched the cache on all endpoints and come up
+ // empty. We need to initiate connections on each of the
+ // endpoints. Presumably only one will have a route and will succeed,
+ // and the rest will fail. This requires the use of asynch
+ // connection establishment. Maybe a custom wait strategy is needed
+ // at this point to register several potential transports so that
+ // when one succeeds the rest are cancelled or closed.
+
+ return this->make_parallel_connection (r,*desc,timeout);
+}
TAO_Transport*
TAO_Connector::connect (TAO::Profile_Transport_Resolver *r,
@@ -280,8 +358,8 @@ TAO_Connector::connect (TAO::Profile_Transport_Resolver *r,
if (TAO_debug_level > 4)
ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) - Transport_Connector::connect, "
- "opening Transport[%d] in TAO_CLIENT_ROLE\n",
+ ACE_TEXT("(%P|%t) Transport_Connector::connect, ")
+ ACE_TEXT("opening Transport[%d] in TAO_CLIENT_ROLE\n"),
t->id ()));
// Call post connect hook. If the post_connect_hook () returns
@@ -315,10 +393,13 @@ TAO_Connector::connect (TAO::Profile_Transport_Resolver *r,
"TAO_UNSPECIFIED_ROLE" ));
}
- // If connected return..
+ // If connected return.
if (base_transport->is_connected ())
return base_transport;
+ // It it possible to get a transport from the cache that is not
+ // connected? If not, then the following code is bogus. We cannot
+ // wait for a connection to complete on a transport in the cache.
if (!this->wait_for_connection_completion (r,
base_transport,
timeout))
@@ -432,10 +513,100 @@ TAO_Connector::wait_for_connection_completion (
}
}
+ // Connection not ready yet but we can use this transport, if
+ // we need a connected one we will block later to make sure
+ // it is connected
+ return true;
+}
+
+bool
+TAO_Connector::wait_for_connection_completion (
+ TAO::Profile_Transport_Resolver *r,
+ TAO_Transport *&the_winner,
+ TAO_Transport **transport,
+ unsigned int count,
+ TAO_LF_Multi_Event *mev,
+ ACE_Time_Value *timeout)
+{
+ if (TAO_debug_level > 2)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT("(%P|%t) Transport_Connector::")
+ ACE_TEXT("wait_for_connection_completion, ")
+ ACE_TEXT("waiting for connection completion on ")
+ ACE_TEXT("%d transports, ["),
+ count));
+ for (unsigned int i = 0; i < count; i++)
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT("%d%s"),transport[i]->id(),
+ (i < (count -1) ? ", " : "]\n")));
+ }
+
+ // If we don't need to block for a transport just set the timeout to
+ // be zero.
+ ACE_Time_Value tmp_zero (ACE_Time_Value::zero);
+ if (!r->blocked_connect ())
+ {
+ timeout = &tmp_zero;
+ }
+
+ int result = this->active_connect_strategy_->wait (mev,timeout);
+ the_winner = 0;
+
+ if (result != -1)
+ {
+ the_winner = mev->winner()->transport();
+ if (TAO_debug_level > 2)
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT("(%P|%t) Transport_Connector::")
+ ACE_TEXT("wait_for_connection_completion, ")
+ ACE_TEXT("transport [%d]\n"),
+ the_winner->id ()));
+ }
+ else if (errno == ETIME)
+ {
+ // this is the most difficult case. In this situation, there is no
+ // nominated by the Multi_Event. The best we can do is pick one of
+ // the pending connections.
+ // Of course, this shouldn't happen in any case, since the wait
+ // strategy is called with a timeout value of 0.
+ for (unsigned int i = 0; i < count; i++)
+ if (!transport[i]->connection_handler()->is_closed())
+ {
+ the_winner = transport[i];
+ break;
+ }
+ }
+
+ // It is possible that we have more than one connection that happened
+ // to complete, or that none completed. Therefore we need to traverse
+ // the list and ensure that all of the losers are closed.
+ for (unsigned int i = 0; i < count; i++)
+ {
+ if (transport[i] != the_winner)
+ this->check_connection_closure (transport[i]->connection_handler());
+ // since we are doing this on may connections, the result isn't
+ // particularly important.
+ }
+
+ // In case of errors.
+ if (the_winner == 0)
+ {
+ // Report that making the connection failed, don't print errno
+ // because we touched the reactor and errno could be changed
+ if (TAO_debug_level > 2)
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) Transport_Connector::")
+ ACE_TEXT ("wait_for_connection_completion, failed\n")
+ ));
+
+ return false;
+ }
+
// Fix for a subtle problem. What happens if we are supposed to do
// blocked connect but the transport is NOT connected? Force close
// the connections
- if (r->blocked_connect () && !transport->is_connected ())
+ if (r->blocked_connect () && !the_winner->is_connected ())
{
if (TAO_debug_level > 2)
ACE_DEBUG ((LM_DEBUG,
@@ -446,8 +617,8 @@ TAO_Connector::wait_for_connection_completion (
// Forget the return value. We are busted anyway. Try our best
// here.
- (void) this->cancel_svc_handler (transport->connection_handler ());
- transport = 0;
+ (void) this->cancel_svc_handler (the_winner->connection_handler ());
+ the_winner = 0;
return false;
}
diff --git a/TAO/tao/Transport_Connector.h b/TAO/tao/Transport_Connector.h
index e29d0b251b3..f457ee5ec9a 100644
--- a/TAO/tao/Transport_Connector.h
+++ b/TAO/tao/Transport_Connector.h
@@ -41,6 +41,7 @@ class TAO_ORB_Core;
class TAO_Connect_Strategy;
class TAO_Transport;
class TAO_Connection_Handler;
+class TAO_LF_Multi_Event;
namespace TAO
{
@@ -121,6 +122,14 @@ public:
ACE_Time_Value *timeout
ACE_ENV_ARG_DECL);
+ /// A variation on connect that will try simultanious connections
+ /// on all endpoints listed in the desc.
+ virtual TAO_Transport* parallel_connect (
+ TAO::Profile_Transport_Resolver *r,
+ TAO_Transport_Descriptor_Interface *desc,
+ ACE_Time_Value *timeout
+ ACE_ENV_ARG_DECL);
+
/// Create a profile for this protocol and initialize it based on the
/// encapsulation in @a cdr
virtual TAO_Profile *create_profile (
@@ -137,6 +146,10 @@ public:
//@@ TAO_CONNECTOR_SPL_PUBLIC_METHODS_ADD_HOOK
protected:
+ /// A flag indicating the actual connector supports parallel connection
+ /// attempts. The base implementation alwayse returns 0. Override to return
+ /// non-zero if parallel connection attempts may be tried.
+ virtual int supports_parallel_connects (void) const;
/// Create a profile with a given endpoint.
virtual TAO_Profile *make_profile (ACE_ENV_SINGLE_ARG_DECL) = 0;
@@ -151,6 +164,13 @@ protected:
TAO_Transport_Descriptor_Interface &desc,
ACE_Time_Value *timeout) = 0;
+ /// Make a connection using - not a pure virtual since not all
+ /// protocols support this.
+ virtual TAO_Transport* make_parallel_connection (
+ TAO::Profile_Transport_Resolver *r,
+ TAO_Transport_Descriptor_Interface &desc,
+ ACE_Time_Value *timeout);
+
/// Cancel the passed cvs handler from the connector
virtual int cancel_svc_handler (
TAO_Connection_Handler *svc_handler) = 0;
@@ -175,6 +195,17 @@ protected:
TAO_Transport *&transport,
ACE_Time_Value *timeout);
+ /// In the case of a parallel connection attempt, we take an array of
+ /// transports, and wait on any of them. When the first one completes,
+ /// the rest are closed.
+ virtual bool wait_for_connection_completion(
+ TAO::Profile_Transport_Resolver *r,
+ TAO_Transport *&the_winner,
+ TAO_Transport **transport,
+ unsigned int count,
+ TAO_LF_Multi_Event *mev,
+ ACE_Time_Value *timeout);
+
/// Set the ORB Core pointer
void orb_core (TAO_ORB_Core *orb_core);
diff --git a/TAO/tao/Transport_Descriptor_Interface.cpp b/TAO/tao/Transport_Descriptor_Interface.cpp
index a58af5ac064..9db80555cf8 100644
--- a/TAO/tao/Transport_Descriptor_Interface.cpp
+++ b/TAO/tao/Transport_Descriptor_Interface.cpp
@@ -15,7 +15,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL
TAO_Transport_Descriptor_Interface::~TAO_Transport_Descriptor_Interface (void)
{
- if (this->endpoint_from_heap_)
+ if (this->release_)
{
delete this->endpoint_;
}
diff --git a/TAO/tao/Transport_Descriptor_Interface.h b/TAO/tao/Transport_Descriptor_Interface.h
index 0934238d072..7cc891fecff 100644
--- a/TAO/tao/Transport_Descriptor_Interface.h
+++ b/TAO/tao/Transport_Descriptor_Interface.h
@@ -73,7 +73,7 @@ protected:
/// Constructor
TAO_Transport_Descriptor_Interface (TAO_Endpoint *endpoint,
- CORBA::Boolean flag = 0);
+ CORBA::Boolean take_ownership = 0);
/// The base property of the connection ie. the peer's endpoint
TAO_Endpoint *endpoint_;
@@ -83,7 +83,7 @@ protected:
/// Is the endpoint allocated on the heap? If so, we will have to
/// delete it when we destruct ourselves.
- CORBA::Boolean endpoint_from_heap_;
+ CORBA::Boolean release_;
};
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/Transport_Descriptor_Interface.inl b/TAO/tao/Transport_Descriptor_Interface.inl
index 6d1bbcb6d56..4e667f946a9 100644
--- a/TAO/tao/Transport_Descriptor_Interface.inl
+++ b/TAO/tao/Transport_Descriptor_Interface.inl
@@ -7,10 +7,10 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_INLINE
TAO_Transport_Descriptor_Interface::TAO_Transport_Descriptor_Interface (
TAO_Endpoint *endpoint,
- CORBA::Boolean flag)
+ CORBA::Boolean take_ownership)
: endpoint_ (endpoint),
bidir_flag_ (false),
- endpoint_from_heap_ (flag)
+ release_ (take_ownership)
{
}
@@ -18,7 +18,7 @@ ACE_INLINE
TAO_Transport_Descriptor_Interface::TAO_Transport_Descriptor_Interface (void)
: endpoint_ (0),
bidir_flag_ (false),
- endpoint_from_heap_ (false)
+ release_ (false)
{
}
diff --git a/TAO/tao/Unbounded_Sequence_CDR_T.h b/TAO/tao/Unbounded_Sequence_CDR_T.h
index 5c5d2cc982e..d942e07e9f3 100644
--- a/TAO/tao/Unbounded_Sequence_CDR_T.h
+++ b/TAO/tao/Unbounded_Sequence_CDR_T.h
@@ -12,6 +12,7 @@
*/
#include "tao/orbconf.h"
+#include "tao/SystemException.h"
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -363,6 +364,8 @@ namespace TAO {
namespace TAO {
template
bool marshal_sequence(stream & strm, const TAO::unbounded_value_sequence & source) {
+ if (0 == &source)
+ ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false);
::CORBA::ULong const length = source.length ();
if (!(strm << length)) {
return false;
@@ -372,6 +375,8 @@ namespace TAO {
template
bool marshal_sequence(stream & strm, const TAO::unbounded_value_sequence & source) {
+ if (0 == &source)
+ ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false);
::CORBA::ULong const length = source.length ();
if (!(strm << length)) {
return false;
@@ -381,6 +386,8 @@ namespace TAO {
template
bool marshal_sequence(stream & strm, const TAO::unbounded_value_sequence & source) {
+ if (0 == &source)
+ ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false);
::CORBA::ULong const length = source.length ();
if (!(strm << length)) {
return false;
@@ -390,6 +397,8 @@ namespace TAO {
template
bool marshal_sequence(stream & strm, const TAO::unbounded_value_sequence & source) {
+ if (0 == &source)
+ ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false);
::CORBA::ULong const length = source.length ();
if (!(strm << length)) {
return false;
@@ -400,6 +409,8 @@ namespace TAO {
#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
template
bool marshal_sequence(stream & strm, const TAO::unbounded_value_sequence & source) {
+ if (0 == &source)
+ ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false);
::CORBA::ULong const length = source.length ();
if (!(strm << length)) {
return false;
@@ -412,6 +423,8 @@ namespace TAO {
#else
template
bool marshal_sequence(stream & strm, const TAO::unbounded_value_sequence & source) {
+ if (0 == &source)
+ ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false);
::CORBA::ULong const length = source.length ();
if (!(strm << length)) {
return false;
@@ -422,6 +435,8 @@ namespace TAO {
template
bool marshal_sequence(stream & strm, const TAO::unbounded_value_sequence & source) {
+ if (0 == &source)
+ ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false);
::CORBA::ULong const length = source.length ();
if (!(strm << length)) {
return false;
@@ -432,6 +447,8 @@ namespace TAO {
# if defined (ACE_HAS_WCHAR) || defined (ACE_HAS_XPG4_MULTIBYTE_CHAR)
template
bool marshal_sequence(stream & strm, const TAO::unbounded_value_sequence & source) {
+ if (0 == &source)
+ ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false);
::CORBA::ULong const length = source.length ();
if (!(strm << length)) {
return false;
@@ -442,6 +459,8 @@ namespace TAO {
template
bool marshal_sequence(stream & strm, const TAO::unbounded_value_sequence & source) {
+ if (0 == &source)
+ ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false);
::CORBA::ULong const length = source.length ();
if (!(strm << length)) {
return false;
@@ -451,6 +470,8 @@ namespace TAO {
template
bool marshal_sequence(stream & strm, const TAO::unbounded_value_sequence & source) {
+ if (0 == &source)
+ ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false);
::CORBA::ULong const length = source.length ();
if (!(strm << length)) {
return false;
@@ -460,6 +481,8 @@ namespace TAO {
template
bool marshal_sequence(stream & strm, const TAO::unbounded_value_sequence & source) {
+ if (0 == &source)
+ ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false);
::CORBA::ULong const length = source.length ();
if (!(strm << length)) {
return false;
@@ -469,6 +492,8 @@ namespace TAO {
template
bool marshal_sequence(stream & strm, const TAO::unbounded_value_sequence & source) {
+ if (0 == &source)
+ ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false);
::CORBA::ULong const length = source.length ();
if (!(strm << length)) {
return false;
@@ -478,6 +503,8 @@ namespace TAO {
template
bool marshal_sequence(stream & strm, const TAO::unbounded_value_sequence & source) {
+ if (0 == &source)
+ ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false);
::CORBA::ULong const length = source.length ();
if (!(strm << length)) {
return false;
@@ -487,6 +514,8 @@ namespace TAO {
template
bool marshal_sequence(stream & strm, const TAO::unbounded_value_sequence & source) {
+ if (0 == &source)
+ ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false);
::CORBA::ULong const length = source.length ();
if (!(strm << length)) {
return false;
@@ -501,6 +530,8 @@ namespace TAO {
template
bool marshal_sequence(stream & strm, const TAO::details::unbounded_basic_string_sequence & source) {
+ if (0 == &source)
+ ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false);
::CORBA::ULong const length = source.length ();
if (!(strm << length)) {
return false;
@@ -516,6 +547,8 @@ namespace TAO {
template |