diff options
-rw-r--r-- | TAO/ChangeLog-99c | 78 | ||||
-rw-r--r-- | TAO/tao/CurrentS.cpp | 14 | ||||
-rw-r--r-- | TAO/tao/DynAnyS.cpp | 40 | ||||
-rw-r--r-- | TAO/tao/MessagingC.cpp | 165 | ||||
-rw-r--r-- | TAO/tao/MessagingC.h | 26 | ||||
-rw-r--r-- | TAO/tao/Messaging_Policy_i.h | 7 | ||||
-rw-r--r-- | TAO/tao/Messaging_Policy_i.i | 8 | ||||
-rw-r--r-- | TAO/tao/POA.cpp | 42 | ||||
-rw-r--r-- | TAO/tao/POA.h | 14 | ||||
-rw-r--r-- | TAO/tao/POAS.cpp | 112 | ||||
-rw-r--r-- | TAO/tao/POAS.h | 28 | ||||
-rw-r--r-- | TAO/tao/POA_CORBA.h | 69 | ||||
-rw-r--r-- | TAO/tao/PolicyC.cpp | 10 | ||||
-rw-r--r-- | TAO/tao/PolicyC.h | 16 | ||||
-rw-r--r-- | TAO/tao/PolicyS.cpp | 13 | ||||
-rw-r--r-- | TAO/tao/Servant_Base.cpp | 8 | ||||
-rw-r--r-- | TAO/tao/Servant_Base.h | 9 | ||||
-rw-r--r-- | TAO/tao/orbconf.h | 35 |
18 files changed, 197 insertions, 497 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c index 2fc39842647..675f88f9433 100644 --- a/TAO/ChangeLog-99c +++ b/TAO/ChangeLog-99c @@ -1,6 +1,52 @@ +Wed Jun 09 23:16:21 1999 Irfan Pyarali <irfan@cs.wustl.edu> + + * tao/orbconf.h: Without Minimum CORBA, the user will get regular + (no locality constraints) policies by default. With Minimum + CORBA, the user will get locality constraint policies by + default. + + If #define TAO_HAS_REMOTE_POLICIES 0, then the user will always + get locality constraint policies (regardless of Minimum CORBA). + + If #define TAO_HAS_REMOTE_POLICIES 1, then the user will always + get regular policies (regardless of Minimum CORBA). + + Thanks to Nanbor for helping with this. + + * tao/Servant_Base.cpp (_dispatch): Added a non-op, exception + throwing _dispatch(). + + * tao/Servant_Base.h: TAO_Local_ServantBase should virtually + inherit from TAO_ServantBase. + + * tao/POAS: + * tao/DynAnyS: + * tao/Current: + + Removed the _dispatch() method from all locality constraint + classes. Also for the policy classes, moved the _dispatch() + method into the TAO_HAS_LOCALITY_CONSTRAINT_POLICIES defines. + + * tao/Policy: Made the Policy stub and skeleton classes aware of + TAO_HAS_LOCALITY_CONSTRAINT_POLICIES, and moved the extra + methods not required for locality constraint policies under the + TAO_HAS_LOCALITY_CONSTRAINT_POLICIES #defines. + + * tao/Messaging_Policy_i (RelativeRoundtripTimeoutPolicy): Made + inheritance virtual and removed extra copy constructor. + + * tao/MessagingC (all policies): Since the policies are locality + constrained, we can make the stub methods pure virtual and make + sure that the _narrow method does not create the stub class. + + * tao/POA.h (all policies): Removed unnecessary copy constructors. + + * tao/POA_CORBA: Made the CORBA::Current, PolicyManager, and + PolicyCurrent classes locality constrained to match the spec. + Wed Jun 9 22:18:10 1999 Balachandran Natarajan <bala@cs.wustl.edu> - * tao/Sequence_T.cpp + * tao/Sequence_T.cpp * tao/Sequence_T.h * tao/Sequence_T.i: Added an operator= (T_var) in TAO_Object_Manager class. This was achieved by adding an extra @@ -10,22 +56,22 @@ Wed Jun 9 22:18:10 1999 Balachandran Natarajan <bala@cs.wustl.edu> had to be changed. An extra template parameter was added in these classes also. - * tao/DomainC.cpp - * tao/DomainC.h - * tao/DomainC.i - * tao/PolicyC.cpp + * tao/DomainC.cpp + * tao/DomainC.h + * tao/DomainC.i + * tao/PolicyC.cpp * tao/PolicyC.h - * tao/PolicyC.i - * tao/Request.cpp - * tao/Request.h + * tao/PolicyC.i + * tao/Request.cpp + * tao/Request.h * tao/corbafwd.h: The changes in these files were done to reflect the changes that were made in the classes above. They had to be done keep in sync with the new template class declarations. * TAO_IDL/be/be_visitor_sequence/elemtype.cpp * TAO_IDL/be/be_visitor_sequence/gen_object_manager_ch.cpp - * TAO_IDL/be/be_visitor_sequence/gen_object_manager_ci.cpp - * TAO_IDL/be/be_visitor_sequence/sequence_base.cpp + * TAO_IDL/be/be_visitor_sequence/gen_object_manager_ci.cpp + * TAO_IDL/be/be_visitor_sequence/sequence_base.cpp * TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp * TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp * TAO_IDL/be_include/be_visitor_sequence/sequence_base.h: Changes @@ -47,11 +93,11 @@ Wed Jun 9 20:16:36 1999 Carlos O'Ryan <coryan@cs.wustl.edu> + Requests are issued using version 1.1 or version 1.0, depending on the version of the profile. + Acceptors create v 1.1 profiles by default, but can generate - 1.0 profiles if a -ORBendpoint option with an explicit version + 1.0 profiles if a -ORBendpoint option with an explicit version is present (like -ORBendpoint iiop://1.0@host:0) + Replys are sent using the same version that the request - + There is a framework to receive a request (or reply) broken in - multiple fragments. The framework is not specially efficient, + + There is a framework to receive a request (or reply) broken in + multiple fragments. The framework is not specially efficient, is does not handle fragments with different byte order or different GIOP versions and is completely untested. TAO does *not* generate fragments. @@ -89,7 +135,7 @@ Wed Jun 9 20:16:36 1999 Carlos O'Ryan <coryan@cs.wustl.edu> Moved the code to initialize a Request or LocateRequest message to the transport classes, not only this isolates the use of TAO_GIOP even further, it is also needed because the transport - class needs to query the version of the Profile to determine the + class needs to query the version of the Profile to determine the version of the GIOP message. * tao/ORB_Core.h: @@ -102,8 +148,8 @@ Wed Jun 9 20:16:36 1999 Carlos O'Ryan <coryan@cs.wustl.edu> * tao/Transport_Mux_Strategy.h: * tao/Transport_Mux_Strategy.cpp: Changed the interfaces in the the ORB core to use a - TAO_GIOP_Message_State that keeps track of not only the payload, - but of any fragments for the current message, the current amount + TAO_GIOP_Message_State that keeps track of not only the payload, + but of any fragments for the current message, the current amount of data read on the fragment, etc. * tao/Pluggable.h: diff --git a/TAO/tao/CurrentS.cpp b/TAO/tao/CurrentS.cpp index faa403a31aa..cd5907ef82a 100644 --- a/TAO/tao/CurrentS.cpp +++ b/TAO/tao/CurrentS.cpp @@ -49,20 +49,6 @@ void* POA_CORBA::Current::_downcast ( return 0; } -void POA_CORBA::Current::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &env) -{ - TAO_Skeleton skel; // pointer to skeleton for operation - const char *opname = req.operation (); // retrieve operation name - // find the skeleton corresponding to this opname - if (this->_find (opname, skel) == -1) - { - env.exception (new CORBA_BAD_OPERATION ()); - ACE_ERROR ((LM_ERROR, "Bad operation <%s>\n", opname)); - } -else - skel (req, this, context, env); -} - const char* POA_CORBA::Current::_interface_repository_id (void) const { return "IDL:CORBA/Current:1.0"; diff --git a/TAO/tao/DynAnyS.cpp b/TAO/tao/DynAnyS.cpp index 845bcebe334..34c8b64e844 100644 --- a/TAO/tao/DynAnyS.cpp +++ b/TAO/tao/DynAnyS.cpp @@ -73,12 +73,6 @@ POA_CORBA::DynAny::_downcast (const char* logical_type_id) return 0; } -void POA_CORBA::DynAny::_dispatch (CORBA::ServerRequest &, - void *, - CORBA::Environment &) -{ -} - const char* POA_CORBA::DynAny::_interface_repository_id (void) const { @@ -640,13 +634,6 @@ POA_CORBA::DynEnum::_downcast ( return 0; } -void -POA_CORBA::DynEnum::_dispatch (CORBA::ServerRequest &, - void *, - CORBA::Environment &) -{ -} - const char* POA_CORBA::DynEnum::_interface_repository_id (void) const { @@ -793,13 +780,6 @@ POA_CORBA::DynStruct::_downcast ( return 0; } -void -POA_CORBA::DynStruct::_dispatch (CORBA::ServerRequest &, - void *, - CORBA::Environment &) -{ -} - const char* POA_CORBA::DynStruct::_interface_repository_id (void) const { @@ -944,12 +924,6 @@ POA_CORBA::DynUnion::_downcast ( return 0; } -void POA_CORBA::DynUnion::_dispatch (CORBA::ServerRequest &, - void *, - CORBA::Environment &) -{ -} - const char* POA_CORBA::DynUnion::_interface_repository_id (void) const { return "IDL:/CORBA_DynUnion:1.0"; @@ -1133,13 +1107,6 @@ POA_CORBA::DynSequence::_downcast ( return 0; } -void -POA_CORBA::DynSequence::_dispatch (CORBA::ServerRequest &, - void *, - CORBA::Environment &) -{ -} - const char* POA_CORBA::DynSequence::_interface_repository_id (void) const { @@ -1284,13 +1251,6 @@ POA_CORBA::DynArray::_downcast ( return 0; } -void -POA_CORBA::DynArray::_dispatch (CORBA::ServerRequest &, - void *, - CORBA::Environment &) -{ -} - const char* POA_CORBA::DynArray::_interface_repository_id (void) const { diff --git a/TAO/tao/MessagingC.cpp b/TAO/tao/MessagingC.cpp index ee1abfe7949..14df59f29b7 100644 --- a/TAO/tao/MessagingC.cpp +++ b/TAO/tao/MessagingC.cpp @@ -192,22 +192,13 @@ Messaging::RebindPolicy_ptr Messaging::RebindPolicy::_unchecked_narrow ( if (obj->_is_collocated () && obj->_servant() != 0) servant = obj->_servant()->_downcast ("IDL:Messaging/RebindPolicy:1.0"); if (servant == 0) - return new Messaging::RebindPolicy(stub); + ACE_THROW_RETURN (CORBA::MARSHAL (), Messaging::RebindPolicy::_nil ()); return new POA_Messaging::_tao_collocated_RebindPolicy( ACE_reinterpret_cast(POA_Messaging::RebindPolicy_ptr, servant), stub ); } -Messaging::RebindMode Messaging::RebindPolicy::rebind_mode ( - CORBA::Environment &ACE_TRY_ENV - ) -{ - Messaging::RebindMode _tao_retval = 0; - ACE_UNUSED_ARG (_tao_retval); - ACE_THROW_RETURN (CORBA::INV_OBJREF (), _tao_retval); -} - CORBA::Boolean Messaging::RebindPolicy::_is_a (const CORBA::Char *value, CORBA::Environment &env) { if ( @@ -265,22 +256,13 @@ Messaging::SyncScopePolicy_ptr Messaging::SyncScopePolicy::_unchecked_narrow ( if (obj->_is_collocated () && obj->_servant() != 0) servant = obj->_servant()->_downcast ("IDL:Messaging/SyncScopePolicy:1.0"); if (servant == 0) - return new Messaging::SyncScopePolicy(stub); + ACE_THROW_RETURN (CORBA::MARSHAL (), Messaging::SyncScopePolicy::_nil ()); return new POA_Messaging::_tao_collocated_SyncScopePolicy( ACE_reinterpret_cast(POA_Messaging::SyncScopePolicy_ptr, servant), stub ); } -Messaging::SyncScope Messaging::SyncScopePolicy::synchronization ( - CORBA::Environment &ACE_TRY_ENV - ) -{ - Messaging::SyncScope _tao_retval = 0; - ACE_UNUSED_ARG (_tao_retval); - ACE_THROW_RETURN (CORBA::INV_OBJREF (), _tao_retval); -} - CORBA::Boolean Messaging::SyncScopePolicy::_is_a (const CORBA::Char *value, CORBA::Environment &env) { if ( @@ -366,24 +348,13 @@ Messaging::RequestPriorityPolicy_ptr Messaging::RequestPriorityPolicy::_unchecke if (obj->_is_collocated () && obj->_servant() != 0) servant = obj->_servant()->_downcast ("IDL:Messaging/RequestPriorityPolicy:1.0"); if (servant == 0) - return new Messaging::RequestPriorityPolicy(stub); + ACE_THROW_RETURN (CORBA::MARSHAL (), Messaging::RequestPriorityPolicy::_nil ()); return new POA_Messaging::_tao_collocated_RequestPriorityPolicy( ACE_reinterpret_cast(POA_Messaging::RequestPriorityPolicy_ptr, servant), stub ); } -Messaging::PriorityRange Messaging::RequestPriorityPolicy::priority_range ( - CORBA::Environment &ACE_TRY_ENV - ) -{ - Messaging::PriorityRange _tao_retval; - _tao_retval.min = 0; - _tao_retval.max = 0; - ACE_UNUSED_ARG (_tao_retval); - ACE_THROW_RETURN (CORBA::INV_OBJREF (), _tao_retval); -} - CORBA::Boolean Messaging::RequestPriorityPolicy::_is_a (const CORBA::Char *value, CORBA::Environment &env) { if ( @@ -441,24 +412,13 @@ Messaging::ReplyPriorityPolicy_ptr Messaging::ReplyPriorityPolicy::_unchecked_na if (obj->_is_collocated () && obj->_servant() != 0) servant = obj->_servant()->_downcast ("IDL:Messaging/ReplyPriorityPolicy:1.0"); if (servant == 0) - return new Messaging::ReplyPriorityPolicy(stub); + ACE_THROW_RETURN (CORBA::MARSHAL (), Messaging::ReplyPriorityPolicy::_nil ()); return new POA_Messaging::_tao_collocated_ReplyPriorityPolicy( ACE_reinterpret_cast(POA_Messaging::ReplyPriorityPolicy_ptr, servant), stub ); } -Messaging::PriorityRange Messaging::ReplyPriorityPolicy::priority_range ( - CORBA::Environment &ACE_TRY_ENV - ) -{ - Messaging::PriorityRange _tao_retval; - _tao_retval.min = 0; - _tao_retval.max = 0; - ACE_UNUSED_ARG (_tao_retval); - ACE_THROW_RETURN (CORBA::INV_OBJREF (), _tao_retval); -} - CORBA::Boolean Messaging::ReplyPriorityPolicy::_is_a (const CORBA::Char *value, CORBA::Environment &env) { if ( @@ -516,26 +476,13 @@ Messaging::RequestStartTimePolicy_ptr Messaging::RequestStartTimePolicy::_unchec if (obj->_is_collocated () && obj->_servant() != 0) servant = obj->_servant()->_downcast ("IDL:Messaging/RequestStartTimePolicy:1.0"); if (servant == 0) - return new Messaging::RequestStartTimePolicy(stub); + ACE_THROW_RETURN (CORBA::MARSHAL (), Messaging::RequestStartTimePolicy::_nil ()); return new POA_Messaging::_tao_collocated_RequestStartTimePolicy( ACE_reinterpret_cast(POA_Messaging::RequestStartTimePolicy_ptr, servant), stub ); } -TimeBase::UtcT Messaging::RequestStartTimePolicy::start_time ( - CORBA::Environment &ACE_TRY_ENV - ) -{ - TimeBase::UtcT _tao_retval; - _tao_retval.time = 0; - _tao_retval.inacclo = 0; - _tao_retval.inacchi = 0; - _tao_retval.tdf = 0; - ACE_UNUSED_ARG (_tao_retval); - ACE_THROW_RETURN (CORBA::INV_OBJREF (), _tao_retval); -} - CORBA::Boolean Messaging::RequestStartTimePolicy::_is_a (const CORBA::Char *value, CORBA::Environment &env) { if ( @@ -593,26 +540,13 @@ Messaging::RequestEndTimePolicy_ptr Messaging::RequestEndTimePolicy::_unchecked_ if (obj->_is_collocated () && obj->_servant() != 0) servant = obj->_servant()->_downcast ("IDL:Messaging/RequestEndTimePolicy:1.0"); if (servant == 0) - return new Messaging::RequestEndTimePolicy(stub); + ACE_THROW_RETURN (CORBA::MARSHAL (), Messaging::RequestEndTimePolicy::_nil ()); return new POA_Messaging::_tao_collocated_RequestEndTimePolicy( ACE_reinterpret_cast(POA_Messaging::RequestEndTimePolicy_ptr, servant), stub ); } -TimeBase::UtcT Messaging::RequestEndTimePolicy::end_time ( - CORBA::Environment &ACE_TRY_ENV - ) -{ - TimeBase::UtcT _tao_retval; - _tao_retval.time = 0; - _tao_retval.inacclo = 0; - _tao_retval.inacchi = 0; - _tao_retval.tdf = 0; - ACE_UNUSED_ARG (_tao_retval); - ACE_THROW_RETURN (CORBA::INV_OBJREF (), _tao_retval); -} - CORBA::Boolean Messaging::RequestEndTimePolicy::_is_a (const CORBA::Char *value, CORBA::Environment &env) { if ( @@ -670,26 +604,13 @@ Messaging::ReplyStartTimePolicy_ptr Messaging::ReplyStartTimePolicy::_unchecked_ if (obj->_is_collocated () && obj->_servant() != 0) servant = obj->_servant()->_downcast ("IDL:Messaging/ReplyStartTimePolicy:1.0"); if (servant == 0) - return new Messaging::ReplyStartTimePolicy(stub); + ACE_THROW_RETURN (CORBA::MARSHAL (), Messaging::ReplyStartTimePolicy::_nil ()); return new POA_Messaging::_tao_collocated_ReplyStartTimePolicy( ACE_reinterpret_cast(POA_Messaging::ReplyStartTimePolicy_ptr, servant), stub ); } -TimeBase::UtcT Messaging::ReplyStartTimePolicy::start_time ( - CORBA::Environment &ACE_TRY_ENV - ) -{ - TimeBase::UtcT _tao_retval; - _tao_retval.time = 0; - _tao_retval.inacclo = 0; - _tao_retval.inacchi = 0; - _tao_retval.tdf = 0; - ACE_UNUSED_ARG (_tao_retval); - ACE_THROW_RETURN (CORBA::INV_OBJREF (), _tao_retval); -} - CORBA::Boolean Messaging::ReplyStartTimePolicy::_is_a (const CORBA::Char *value, CORBA::Environment &env) { if ( @@ -747,26 +668,13 @@ Messaging::ReplyEndTimePolicy_ptr Messaging::ReplyEndTimePolicy::_unchecked_narr if (obj->_is_collocated () && obj->_servant() != 0) servant = obj->_servant()->_downcast ("IDL:Messaging/ReplyEndTimePolicy:1.0"); if (servant == 0) - return new Messaging::ReplyEndTimePolicy(stub); + ACE_THROW_RETURN (CORBA::MARSHAL (), Messaging::ReplyEndTimePolicy::_nil ()); return new POA_Messaging::_tao_collocated_ReplyEndTimePolicy( ACE_reinterpret_cast(POA_Messaging::ReplyEndTimePolicy_ptr, servant), stub ); } -TimeBase::UtcT Messaging::ReplyEndTimePolicy::end_time ( - CORBA::Environment &ACE_TRY_ENV - ) -{ - TimeBase::UtcT _tao_retval; - _tao_retval.time = 0; - _tao_retval.inacclo = 0; - _tao_retval.inacchi = 0; - _tao_retval.tdf = 0; - ACE_UNUSED_ARG (_tao_retval); - ACE_THROW_RETURN (CORBA::INV_OBJREF (), _tao_retval); -} - CORBA::Boolean Messaging::ReplyEndTimePolicy::_is_a (const CORBA::Char *value, CORBA::Environment &env) { if ( @@ -824,22 +732,13 @@ Messaging::RelativeRequestTimeoutPolicy_ptr Messaging::RelativeRequestTimeoutPol if (obj->_is_collocated () && obj->_servant() != 0) servant = obj->_servant()->_downcast ("IDL:Messaging/RelativeRequestTimeoutPolicy:1.0"); if (servant == 0) - return new Messaging::RelativeRequestTimeoutPolicy(stub); + ACE_THROW_RETURN (CORBA::MARSHAL (), Messaging::RelativeRequestTimeoutPolicy::_nil ()); return new POA_Messaging::_tao_collocated_RelativeRequestTimeoutPolicy( ACE_reinterpret_cast(POA_Messaging::RelativeRequestTimeoutPolicy_ptr, servant), stub ); } -TimeBase::TimeT Messaging::RelativeRequestTimeoutPolicy::relative_expiry ( - CORBA::Environment &ACE_TRY_ENV - ) -{ - TimeBase::TimeT _tao_retval = 0; - ACE_UNUSED_ARG (_tao_retval); - ACE_THROW_RETURN (CORBA::INV_OBJREF (), _tao_retval); -} - CORBA::Boolean Messaging::RelativeRequestTimeoutPolicy::_is_a (const CORBA::Char *value, CORBA::Environment &env) { if ( @@ -897,22 +796,13 @@ Messaging::RelativeRoundtripTimeoutPolicy_ptr Messaging::RelativeRoundtripTimeou if (obj->_is_collocated () && obj->_servant() != 0) servant = obj->_servant()->_downcast ("IDL:Messaging/RelativeRoundtripTimeoutPolicy:1.0"); if (servant == 0) - return new Messaging::RelativeRoundtripTimeoutPolicy(stub); + ACE_THROW_RETURN (CORBA::MARSHAL (), Messaging::RelativeRoundtripTimeoutPolicy::_nil ()); return new POA_Messaging::_tao_collocated_RelativeRoundtripTimeoutPolicy( ACE_reinterpret_cast(POA_Messaging::RelativeRoundtripTimeoutPolicy_ptr, servant), stub ); } -TimeBase::TimeT Messaging::RelativeRoundtripTimeoutPolicy::relative_expiry ( - CORBA::Environment &ACE_TRY_ENV - ) -{ - TimeBase::TimeT _tao_retval = 0; - ACE_UNUSED_ARG (_tao_retval); - ACE_THROW_RETURN (CORBA::INV_OBJREF (), _tao_retval); -} - CORBA::Boolean Messaging::RelativeRoundtripTimeoutPolicy::_is_a (const CORBA::Char *value, CORBA::Environment &env) { if ( @@ -998,24 +888,13 @@ Messaging::RoutingPolicy_ptr Messaging::RoutingPolicy::_unchecked_narrow ( if (obj->_is_collocated () && obj->_servant() != 0) servant = obj->_servant()->_downcast ("IDL:Messaging/RoutingPolicy:1.0"); if (servant == 0) - return new Messaging::RoutingPolicy(stub); + ACE_THROW_RETURN (CORBA::MARSHAL (), Messaging::RoutingPolicy::_nil ()); return new POA_Messaging::_tao_collocated_RoutingPolicy( ACE_reinterpret_cast(POA_Messaging::RoutingPolicy_ptr, servant), stub ); } -Messaging::RoutingTypeRange Messaging::RoutingPolicy::routing_range ( - CORBA::Environment &ACE_TRY_ENV - ) -{ - Messaging::RoutingTypeRange _tao_retval; - _tao_retval.min = Messaging::ROUTE_NONE; - _tao_retval.max = Messaging::ROUTE_NONE; - ACE_UNUSED_ARG (_tao_retval); - ACE_THROW_RETURN (CORBA::INV_OBJREF (), _tao_retval); -} - CORBA::Boolean Messaging::RoutingPolicy::_is_a (const CORBA::Char *value, CORBA::Environment &env) { if ( @@ -1073,22 +952,13 @@ Messaging::MaxHopsPolicy_ptr Messaging::MaxHopsPolicy::_unchecked_narrow ( if (obj->_is_collocated () && obj->_servant() != 0) servant = obj->_servant()->_downcast ("IDL:Messaging/MaxHopsPolicy:1.0"); if (servant == 0) - return new Messaging::MaxHopsPolicy(stub); + ACE_THROW_RETURN (CORBA::MARSHAL (), Messaging::MaxHopsPolicy::_nil ()); return new POA_Messaging::_tao_collocated_MaxHopsPolicy( ACE_reinterpret_cast(POA_Messaging::MaxHopsPolicy_ptr, servant), stub ); } -CORBA::UShort Messaging::MaxHopsPolicy::max_hops ( - CORBA::Environment &ACE_TRY_ENV - ) -{ - CORBA::UShort _tao_retval = 0; - ACE_UNUSED_ARG (_tao_retval); - ACE_THROW_RETURN (CORBA::INV_OBJREF (), _tao_retval); -} - CORBA::Boolean Messaging::MaxHopsPolicy::_is_a (const CORBA::Char *value, CORBA::Environment &env) { if ( @@ -1146,22 +1016,13 @@ Messaging::QueueOrderPolicy_ptr Messaging::QueueOrderPolicy::_unchecked_narrow ( if (obj->_is_collocated () && obj->_servant() != 0) servant = obj->_servant()->_downcast ("IDL:Messaging/QueueOrderPolicy:1.0"); if (servant == 0) - return new Messaging::QueueOrderPolicy(stub); + ACE_THROW_RETURN (CORBA::MARSHAL (), Messaging::QueueOrderPolicy::_nil ()); return new POA_Messaging::_tao_collocated_QueueOrderPolicy( ACE_reinterpret_cast(POA_Messaging::QueueOrderPolicy_ptr, servant), stub ); } -Messaging::Ordering Messaging::QueueOrderPolicy::allowed_orders ( - CORBA::Environment &ACE_TRY_ENV - ) -{ - Messaging::Ordering _tao_retval = 0; - ACE_UNUSED_ARG (_tao_retval); - ACE_THROW_RETURN (CORBA::INV_OBJREF (), _tao_retval); -} - CORBA::Boolean Messaging::QueueOrderPolicy::_is_a (const CORBA::Char *value, CORBA::Environment &env) { if ( diff --git a/TAO/tao/MessagingC.h b/TAO/tao/MessagingC.h index c4c14644d9a..790d9395fef 100644 --- a/TAO/tao/MessagingC.h +++ b/TAO/tao/MessagingC.h @@ -177,7 +177,7 @@ TAO_NAMESPACE Messaging virtual RebindMode rebind_mode ( CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment () - ); + ) = 0; virtual CORBA::Boolean _is_a ( const CORBA::Char *type_id, CORBA::Environment &env = @@ -270,7 +270,7 @@ TAO_NAMESPACE Messaging virtual SyncScope synchronization ( CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment () - ); + ) = 0; virtual CORBA::Boolean _is_a ( const CORBA::Char *type_id, CORBA::Environment &env = @@ -400,7 +400,7 @@ TAO_NAMESPACE Messaging virtual PriorityRange priority_range ( CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment () - ); + ) = 0; virtual CORBA::Boolean _is_a ( const CORBA::Char *type_id, CORBA::Environment &env = @@ -493,7 +493,7 @@ TAO_NAMESPACE Messaging virtual PriorityRange priority_range ( CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment () - ); + ) = 0; virtual CORBA::Boolean _is_a ( const CORBA::Char *type_id, CORBA::Environment &env = @@ -586,7 +586,7 @@ TAO_NAMESPACE Messaging virtual TimeBase::UtcT start_time ( CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment () - ); + ) = 0; virtual CORBA::Boolean _is_a ( const CORBA::Char *type_id, CORBA::Environment &env = @@ -679,7 +679,7 @@ TAO_NAMESPACE Messaging virtual TimeBase::UtcT end_time ( CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment () - ); + ) = 0; virtual CORBA::Boolean _is_a ( const CORBA::Char *type_id, CORBA::Environment &env = @@ -772,7 +772,7 @@ TAO_NAMESPACE Messaging virtual TimeBase::UtcT start_time ( CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment () - ); + ) = 0; virtual CORBA::Boolean _is_a ( const CORBA::Char *type_id, CORBA::Environment &env = @@ -865,7 +865,7 @@ TAO_NAMESPACE Messaging virtual TimeBase::UtcT end_time ( CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment () - ); + ) = 0; virtual CORBA::Boolean _is_a ( const CORBA::Char *type_id, CORBA::Environment &env = @@ -958,7 +958,7 @@ TAO_NAMESPACE Messaging virtual TimeBase::TimeT relative_expiry ( CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment () - ); + ) = 0; virtual CORBA::Boolean _is_a ( const CORBA::Char *type_id, CORBA::Environment &env = @@ -1051,7 +1051,7 @@ TAO_NAMESPACE Messaging virtual TimeBase::TimeT relative_expiry ( CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment () - ); + ) = 0; virtual CORBA::Boolean _is_a ( const CORBA::Char *type_id, CORBA::Environment &env = @@ -1181,7 +1181,7 @@ TAO_NAMESPACE Messaging virtual RoutingTypeRange routing_range ( CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment () - ); + ) = 0; virtual CORBA::Boolean _is_a ( const CORBA::Char *type_id, CORBA::Environment &env = @@ -1274,7 +1274,7 @@ TAO_NAMESPACE Messaging virtual CORBA::UShort max_hops ( CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment () - ); + ) = 0; virtual CORBA::Boolean _is_a ( const CORBA::Char *type_id, CORBA::Environment &env = @@ -1367,7 +1367,7 @@ TAO_NAMESPACE Messaging virtual Ordering allowed_orders ( CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment () - ); + ) = 0; virtual CORBA::Boolean _is_a ( const CORBA::Char *type_id, CORBA::Environment &env = diff --git a/TAO/tao/Messaging_Policy_i.h b/TAO/tao/Messaging_Policy_i.h index 60996f4ff44..3548dbd3a12 100644 --- a/TAO/tao/Messaging_Policy_i.h +++ b/TAO/tao/Messaging_Policy_i.h @@ -28,7 +28,9 @@ #pragma warning(disable:4250) #endif /* _MSC_VER */ -class TAO_Export TAO_RelativeRoundtripTimeoutPolicy_i : public POA_Messaging::RelativeRoundtripTimeoutPolicy, public TAO_RefCountServantBase +class TAO_Export TAO_RelativeRoundtripTimeoutPolicy_i : public virtual PortableServer::RefCountServantBase, + public virtual POA_Messaging::RelativeRoundtripTimeoutPolicy + { // = TITLE // Messaging::RelativeRoundtripTimeoutPolicy implementation @@ -42,9 +44,6 @@ public: const TimeBase::TimeT& relative_expiry); // Constructor - TAO_RelativeRoundtripTimeoutPolicy_i (const TAO_RelativeRoundtripTimeoutPolicy_i& rhs); - // Copy constructor - static CORBA::Policy_ptr create ( PortableServer::POA_ptr poa, const CORBA::Any& val, diff --git a/TAO/tao/Messaging_Policy_i.i b/TAO/tao/Messaging_Policy_i.i index 36cf6fc745f..9b622cfe47d 100644 --- a/TAO/tao/Messaging_Policy_i.i +++ b/TAO/tao/Messaging_Policy_i.i @@ -8,11 +8,3 @@ TAO_RelativeRoundtripTimeoutPolicy_i::TAO_RelativeRoundtripTimeoutPolicy_i ( relative_expiry_ (relative_expiry) { } - -ACE_INLINE -TAO_RelativeRoundtripTimeoutPolicy_i::TAO_RelativeRoundtripTimeoutPolicy_i ( - const TAO_RelativeRoundtripTimeoutPolicy_i& rhs) - : poa_ (PortableServer::POA::_duplicate (rhs.poa_.in ())), - relative_expiry_ (rhs.relative_expiry_) -{ -} diff --git a/TAO/tao/POA.cpp b/TAO/tao/POA.cpp index 79925667d4b..9da91279093 100644 --- a/TAO/tao/POA.cpp +++ b/TAO/tao/POA.cpp @@ -2596,12 +2596,6 @@ TAO_Thread_Policy::TAO_Thread_Policy (PortableServer::ThreadPolicyValue value, { } -TAO_Thread_Policy::TAO_Thread_Policy (const TAO_Thread_Policy &rhs) - : value_ (rhs.value_), - poa_ (PortableServer::POA::_duplicate (rhs.poa_.in ())) -{ -} - PortableServer::ThreadPolicyValue TAO_Thread_Policy::value (CORBA::Environment &ACE_TRY_ENV) { @@ -2677,12 +2671,6 @@ TAO_Lifespan_Policy::TAO_Lifespan_Policy (PortableServer::LifespanPolicyValue va { } -TAO_Lifespan_Policy::TAO_Lifespan_Policy (const TAO_Lifespan_Policy &rhs) - : value_ (rhs.value_), - poa_ (PortableServer::POA::_duplicate (rhs.poa_.in ())) -{ -} - PortableServer::LifespanPolicyValue TAO_Lifespan_Policy::value (CORBA::Environment &ACE_TRY_ENV) { @@ -2756,12 +2744,6 @@ TAO_Id_Uniqueness_Policy::TAO_Id_Uniqueness_Policy (PortableServer::IdUniqueness { } -TAO_Id_Uniqueness_Policy::TAO_Id_Uniqueness_Policy (const TAO_Id_Uniqueness_Policy &rhs) - : value_ (rhs.value_), - poa_ (PortableServer::POA::_duplicate (rhs.poa_.in ())) -{ -} - PortableServer::IdUniquenessPolicyValue TAO_Id_Uniqueness_Policy::value (CORBA::Environment &ACE_TRY_ENV) { @@ -2835,12 +2817,6 @@ TAO_Id_Assignment_Policy::TAO_Id_Assignment_Policy (PortableServer::IdAssignment { } -TAO_Id_Assignment_Policy::TAO_Id_Assignment_Policy (const TAO_Id_Assignment_Policy &rhs) - : value_ (rhs.value_), - poa_ (PortableServer::POA::_duplicate (rhs.poa_.in ())) -{ -} - PortableServer::IdAssignmentPolicyValue TAO_Id_Assignment_Policy::value (CORBA::Environment &ACE_TRY_ENV) { @@ -2916,12 +2892,6 @@ TAO_Implicit_Activation_Policy::TAO_Implicit_Activation_Policy (PortableServer:: { } -TAO_Implicit_Activation_Policy::TAO_Implicit_Activation_Policy (const TAO_Implicit_Activation_Policy &rhs) - : value_ (rhs.value_), - poa_ (PortableServer::POA::_duplicate (rhs.poa_.in ())) -{ -} - PortableServer::ImplicitActivationPolicyValue TAO_Implicit_Activation_Policy::value (CORBA::Environment &ACE_TRY_ENV) { @@ -2995,12 +2965,6 @@ TAO_Servant_Retention_Policy::TAO_Servant_Retention_Policy (PortableServer::Serv { } -TAO_Servant_Retention_Policy::TAO_Servant_Retention_Policy (const TAO_Servant_Retention_Policy &rhs) - : value_ (rhs.value_), - poa_ (PortableServer::POA::_duplicate (rhs.poa_.in ())) -{ -} - PortableServer::ServantRetentionPolicyValue TAO_Servant_Retention_Policy::value (CORBA::Environment &ACE_TRY_ENV) { @@ -3074,12 +3038,6 @@ TAO_Request_Processing_Policy::TAO_Request_Processing_Policy (PortableServer::Re { } -TAO_Request_Processing_Policy::TAO_Request_Processing_Policy (const TAO_Request_Processing_Policy &rhs) - : value_ (rhs.value_), - poa_ (PortableServer::POA::_duplicate (rhs.poa_.in ())) -{ -} - PortableServer::RequestProcessingPolicyValue TAO_Request_Processing_Policy::value (CORBA::Environment &ACE_TRY_ENV) { diff --git a/TAO/tao/POA.h b/TAO/tao/POA.h index d7890541a56..1f0cafb1e51 100644 --- a/TAO/tao/POA.h +++ b/TAO/tao/POA.h @@ -65,8 +65,6 @@ public: TAO_Thread_Policy (PortableServer::ThreadPolicyValue value, PortableServer::POA_ptr poa); - TAO_Thread_Policy (const TAO_Thread_Policy &new_policy); - PortableServer::ThreadPolicyValue value (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); CORBA::Policy_ptr copy (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); @@ -92,8 +90,6 @@ public: TAO_Lifespan_Policy (PortableServer::LifespanPolicyValue value, PortableServer::POA_ptr poa); - TAO_Lifespan_Policy (const TAO_Lifespan_Policy &rhs); - PortableServer::LifespanPolicyValue value (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); CORBA::Policy_ptr copy (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); @@ -117,8 +113,6 @@ public: TAO_Id_Uniqueness_Policy (PortableServer::IdUniquenessPolicyValue value, PortableServer::POA_ptr poa); - TAO_Id_Uniqueness_Policy (const TAO_Id_Uniqueness_Policy &rhs); - PortableServer::IdUniquenessPolicyValue value (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); CORBA::Policy_ptr copy (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); @@ -142,8 +136,6 @@ public: TAO_Id_Assignment_Policy (PortableServer::IdAssignmentPolicyValue value, PortableServer::POA_ptr poa); - TAO_Id_Assignment_Policy (const TAO_Id_Assignment_Policy &rhs); - PortableServer::IdAssignmentPolicyValue value (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); CORBA::Policy_ptr copy (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); @@ -169,8 +161,6 @@ public: TAO_Implicit_Activation_Policy (PortableServer::ImplicitActivationPolicyValue value, PortableServer::POA_ptr poa); - TAO_Implicit_Activation_Policy (const TAO_Implicit_Activation_Policy &rhs); - PortableServer::ImplicitActivationPolicyValue value (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); CORBA::Policy_ptr copy (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); @@ -194,8 +184,6 @@ public: TAO_Servant_Retention_Policy (PortableServer::ServantRetentionPolicyValue value, PortableServer::POA_ptr poa); - TAO_Servant_Retention_Policy (const TAO_Servant_Retention_Policy &rhs); - PortableServer::ServantRetentionPolicyValue value (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); CORBA::Policy_ptr copy (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); @@ -219,8 +207,6 @@ public: TAO_Request_Processing_Policy (PortableServer::RequestProcessingPolicyValue value, PortableServer::POA_ptr poa); - TAO_Request_Processing_Policy (const TAO_Request_Processing_Policy &rhs); - PortableServer::RequestProcessingPolicyValue value (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); CORBA::Policy_ptr copy (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); diff --git a/TAO/tao/POAS.cpp b/TAO/tao/POAS.cpp index a7b9ade3008..cfdc1405679 100644 --- a/TAO/tao/POAS.cpp +++ b/TAO/tao/POAS.cpp @@ -215,6 +215,7 @@ void* POA_PortableServer::ThreadPolicy::_downcast ( return 0; } +#if !defined (TAO_HAS_LOCALITY_CONSTRAINT_POLICIES) void POA_PortableServer::ThreadPolicy::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &ACE_TRY_ENV) { TAO_Skeleton skel; // pointer to skeleton for operation @@ -228,6 +229,7 @@ void POA_PortableServer::ThreadPolicy::_dispatch (CORBA::ServerRequest &req, voi else skel (req, this, context, ACE_TRY_ENV); } +#endif /* !TAO_HAS_LOCALITY_CONSTRAINT_POLICIES */ const char* POA_PortableServer::ThreadPolicy::_interface_repository_id (void) const { @@ -501,6 +503,7 @@ void* POA_PortableServer::LifespanPolicy::_downcast ( return 0; } +#if !defined (TAO_HAS_LOCALITY_CONSTRAINT_POLICIES) void POA_PortableServer::LifespanPolicy::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &ACE_TRY_ENV) { TAO_Skeleton skel; // pointer to skeleton for operation @@ -514,6 +517,7 @@ void POA_PortableServer::LifespanPolicy::_dispatch (CORBA::ServerRequest &req, v else skel (req, this, context, ACE_TRY_ENV); } +#endif /* !TAO_HAS_LOCALITY_CONSTRAINT_POLICIES */ const char* POA_PortableServer::LifespanPolicy::_interface_repository_id (void) const { @@ -784,6 +788,7 @@ void* POA_PortableServer::IdUniquenessPolicy::_downcast ( return 0; } +#if !defined (TAO_HAS_LOCALITY_CONSTRAINT_POLICIES) void POA_PortableServer::IdUniquenessPolicy::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &ACE_TRY_ENV) { TAO_Skeleton skel; // pointer to skeleton for operation @@ -797,6 +802,7 @@ void POA_PortableServer::IdUniquenessPolicy::_dispatch (CORBA::ServerRequest &re else skel (req, this, context, ACE_TRY_ENV); } +#endif /* !TAO_HAS_LOCALITY_CONSTRAINT_POLICIES */ const char* POA_PortableServer::IdUniquenessPolicy::_interface_repository_id (void) const { @@ -1067,6 +1073,7 @@ void* POA_PortableServer::IdAssignmentPolicy::_downcast ( return 0; } +#if !defined (TAO_HAS_LOCALITY_CONSTRAINT_POLICIES) void POA_PortableServer::IdAssignmentPolicy::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &ACE_TRY_ENV) { TAO_Skeleton skel; // pointer to skeleton for operation @@ -1080,6 +1087,7 @@ void POA_PortableServer::IdAssignmentPolicy::_dispatch (CORBA::ServerRequest &re else skel (req, this, context, ACE_TRY_ENV); } +#endif /* !TAO_HAS_LOCALITY_CONSTRAINT_POLICIES */ const char* POA_PortableServer::IdAssignmentPolicy::_interface_repository_id (void) const { @@ -1352,6 +1360,7 @@ void* POA_PortableServer::ImplicitActivationPolicy::_downcast ( return 0; } +#if !defined (TAO_HAS_LOCALITY_CONSTRAINT_POLICIES) void POA_PortableServer::ImplicitActivationPolicy::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &ACE_TRY_ENV) { TAO_Skeleton skel; // pointer to skeleton for operation @@ -1365,6 +1374,7 @@ void POA_PortableServer::ImplicitActivationPolicy::_dispatch (CORBA::ServerReque else skel (req, this, context, ACE_TRY_ENV); } +#endif /* !TAO_HAS_LOCALITY_CONSTRAINT_POLICIES */ const char* POA_PortableServer::ImplicitActivationPolicy::_interface_repository_id (void) const { @@ -1635,6 +1645,7 @@ void* POA_PortableServer::ServantRetentionPolicy::_downcast ( return 0; } +#if !defined (TAO_HAS_LOCALITY_CONSTRAINT_POLICIES) void POA_PortableServer::ServantRetentionPolicy::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &ACE_TRY_ENV) { TAO_Skeleton skel; // pointer to skeleton for operation @@ -1648,6 +1659,7 @@ void POA_PortableServer::ServantRetentionPolicy::_dispatch (CORBA::ServerRequest else skel (req, this, context, ACE_TRY_ENV); } +#endif /* !TAO_HAS_LOCALITY_CONSTRAINT_POLICIES */ const char* POA_PortableServer::ServantRetentionPolicy::_interface_repository_id (void) const { @@ -1918,6 +1930,7 @@ void* POA_PortableServer::RequestProcessingPolicy::_downcast ( return 0; } +#if !defined (TAO_HAS_LOCALITY_CONSTRAINT_POLICIES) void POA_PortableServer::RequestProcessingPolicy::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &ACE_TRY_ENV) { TAO_Skeleton skel; // pointer to skeleton for operation @@ -1931,6 +1944,7 @@ void POA_PortableServer::RequestProcessingPolicy::_dispatch (CORBA::ServerReques else skel (req, this, context, ACE_TRY_ENV); } +#endif /* !TAO_HAS_LOCALITY_CONSTRAINT_POLICIES */ const char* POA_PortableServer::RequestProcessingPolicy::_interface_repository_id (void) const { @@ -2037,20 +2051,6 @@ void* POA_PortableServer::POAManager::_downcast ( return 0; } -void POA_PortableServer::POAManager::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &ACE_TRY_ENV) -{ - TAO_Skeleton skel; // pointer to skeleton for operation - const char *opname = req.operation (); // retrieve operation name - // find the skeleton corresponding to this opname - if (this->_find (opname, skel) == -1) - { - ACE_ERROR ((LM_ERROR, "Bad operation <%s>\n", opname)); - ACE_THROW (CORBA_BAD_OPERATION ()); - } - else - skel (req, this, context, ACE_TRY_ENV); -} - const char* POA_PortableServer::POAManager::_interface_repository_id (void) const { return "IDL:omg.org/PortableServer/POAManager:1.0"; @@ -2176,20 +2176,6 @@ void* POA_PortableServer::AdapterActivator::_downcast ( return 0; } -void POA_PortableServer::AdapterActivator::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &ACE_TRY_ENV) -{ - TAO_Skeleton skel; // pointer to skeleton for operation - const char *opname = req.operation (); // retrieve operation name - // find the skeleton corresponding to this opname - if (this->_find (opname, skel) == -1) - { - ACE_ERROR ((LM_ERROR, "Bad operation <%s>\n", opname)); - ACE_THROW (CORBA_BAD_OPERATION ()); - } - else - skel (req, this, context, ACE_TRY_ENV); -} - const char* POA_PortableServer::AdapterActivator::_interface_repository_id (void) const { return "IDL:omg.org/PortableServer/AdapterActivator:1.0"; @@ -2273,20 +2259,6 @@ void* POA_PortableServer::ServantManager::_downcast ( return 0; } -void POA_PortableServer::ServantManager::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &ACE_TRY_ENV) -{ - TAO_Skeleton skel; // pointer to skeleton for operation - const char *opname = req.operation (); // retrieve operation name - // find the skeleton corresponding to this opname - if (this->_find (opname, skel) == -1) - { - ACE_ERROR ((LM_ERROR, "Bad operation <%s>\n", opname)); - ACE_THROW (CORBA_BAD_OPERATION ()); - } - else - skel (req, this, context, ACE_TRY_ENV); -} - const char* POA_PortableServer::ServantManager::_interface_repository_id (void) const { return "IDL:omg.org/PortableServer/ServantManager:1.0"; @@ -2360,20 +2332,6 @@ void* POA_PortableServer::ServantActivator::_downcast ( return 0; } -void POA_PortableServer::ServantActivator::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &ACE_TRY_ENV) -{ - TAO_Skeleton skel; // pointer to skeleton for operation - const char *opname = req.operation (); // retrieve operation name - // find the skeleton corresponding to this opname - if (this->_find (opname, skel) == -1) - { - ACE_ERROR ((LM_ERROR, "Bad operation <%s>\n", opname)); - ACE_THROW (CORBA_BAD_OPERATION ()); - } - else - skel (req, this, context, ACE_TRY_ENV); -} - const char* POA_PortableServer::ServantActivator::_interface_repository_id (void) const { return "IDL:omg.org/PortableServer/ServantActivator:1.0"; @@ -2480,20 +2438,6 @@ void* POA_PortableServer::ServantLocator::_downcast ( return 0; } -void POA_PortableServer::ServantLocator::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &ACE_TRY_ENV) -{ - TAO_Skeleton skel; // pointer to skeleton for operation - const char *opname = req.operation (); // retrieve operation name - // find the skeleton corresponding to this opname - if (this->_find (opname, skel) == -1) - { - ACE_ERROR ((LM_ERROR, "Bad operation <%s>\n", opname)); - ACE_THROW (CORBA_BAD_OPERATION ()); - } - else - skel (req, this, context, ACE_TRY_ENV); -} - const char* POA_PortableServer::ServantLocator::_interface_repository_id (void) const { return "IDL:omg.org/PortableServer/ServantLocator:1.0"; @@ -2603,20 +2547,6 @@ void* POA_PortableServer::POA::_downcast ( return 0; } -void POA_PortableServer::POA::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &ACE_TRY_ENV) -{ - TAO_Skeleton skel; // pointer to skeleton for operation - const char *opname = req.operation (); // retrieve operation name - // find the skeleton corresponding to this opname - if (this->_find (opname, skel) == -1) - { - ACE_ERROR ((LM_ERROR, "Bad operation <%s>\n", opname)); - ACE_THROW (CORBA_BAD_OPERATION ()); - } - else - skel (req, this, context, ACE_TRY_ENV); -} - const char* POA_PortableServer::POA::_interface_repository_id (void) const { return "IDL:omg.org/PortableServer/POA:1.0"; @@ -3026,20 +2956,6 @@ void* POA_PortableServer::Current::_downcast ( return 0; } -void POA_PortableServer::Current::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &ACE_TRY_ENV) -{ - TAO_Skeleton skel; // pointer to skeleton for operation - const char *opname = req.operation (); // retrieve operation name - // find the skeleton corresponding to this opname - if (this->_find (opname, skel) == -1) - { - ACE_ERROR ((LM_ERROR, "Bad operation <%s>\n", opname)); - ACE_THROW (CORBA_BAD_OPERATION ()); - } - else - skel (req, this, context, ACE_TRY_ENV); -} - const char* POA_PortableServer::Current::_interface_repository_id (void) const { return "IDL:omg.org/PortableServer/Current:1.0"; diff --git a/TAO/tao/POAS.h b/TAO/tao/POAS.h index ff12c1390a8..1a013cabab1 100644 --- a/TAO/tao/POAS.h +++ b/TAO/tao/POAS.h @@ -67,9 +67,9 @@ TAO_NAMESPACE POA_PortableServer void *_tao_context, CORBA_Environment &TAO_IN_ENV = TAO_default_environment () ); -#endif /* !TAO_HAS_LOCALITY_CONSTRAINT_POLICIES */ virtual void _dispatch (CORBA::ServerRequest &req, void *context, CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()); +#endif /* !TAO_HAS_LOCALITY_CONSTRAINT_POLICIES */ PortableServer::ThreadPolicy *_this (CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()); virtual const char* _interface_repository_id (void) const; @@ -146,9 +146,9 @@ TAO_NAMESPACE POA_PortableServer void *_tao_context, CORBA_Environment &TAO_IN_ENV = TAO_default_environment () ); -#endif /* !TAO_HAS_LOCALITY_CONSTRAINT_POLICIES */ virtual void _dispatch (CORBA::ServerRequest &req, void *context, CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()); +#endif /* !TAO_HAS_LOCALITY_CONSTRAINT_POLICIES */ PortableServer::LifespanPolicy *_this (CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()); virtual const char* _interface_repository_id (void) const; @@ -225,9 +225,9 @@ TAO_NAMESPACE POA_PortableServer void *_tao_context, CORBA_Environment &TAO_IN_ENV = TAO_default_environment () ); -#endif /* !TAO_HAS_LOCALITY_CONSTRAINT_POLICIES */ virtual void _dispatch (CORBA::ServerRequest &req, void *context, CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()); +#endif /* !TAO_HAS_LOCALITY_CONSTRAINT_POLICIES */ PortableServer::IdUniquenessPolicy *_this (CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()); virtual const char* _interface_repository_id (void) const; @@ -304,9 +304,9 @@ TAO_NAMESPACE POA_PortableServer void *_tao_context, CORBA_Environment &TAO_IN_ENV = TAO_default_environment () ); -#endif /* !TAO_HAS_LOCALITY_CONSTRAINT_POLICIES */ virtual void _dispatch (CORBA::ServerRequest &req, void *context, CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()); +#endif /* !TAO_HAS_LOCALITY_CONSTRAINT_POLICIES */ PortableServer::IdAssignmentPolicy *_this (CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()); virtual const char* _interface_repository_id (void) const; @@ -385,9 +385,9 @@ TAO_NAMESPACE POA_PortableServer void *_tao_context, CORBA_Environment &TAO_IN_ENV = TAO_default_environment () ); -#endif /* !TAO_HAS_LOCALITY_CONSTRAINT_POLICIES */ virtual void _dispatch (CORBA::ServerRequest &req, void *context, CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()); +#endif /* !TAO_HAS_LOCALITY_CONSTRAINT_POLICIES */ PortableServer::ImplicitActivationPolicy *_this (CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()); virtual const char* _interface_repository_id (void) const; @@ -464,9 +464,9 @@ TAO_NAMESPACE POA_PortableServer void *_tao_context, CORBA_Environment &TAO_IN_ENV = TAO_default_environment () ); -#endif /* !TAO_HAS_LOCALITY_CONSTRAINT_POLICIES */ virtual void _dispatch (CORBA::ServerRequest &req, void *context, CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()); +#endif /* !TAO_HAS_LOCALITY_CONSTRAINT_POLICIES */ PortableServer::ServantRetentionPolicy *_this (CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()); virtual const char* _interface_repository_id (void) const; @@ -543,9 +543,9 @@ TAO_NAMESPACE POA_PortableServer void *_tao_context, CORBA_Environment &TAO_IN_ENV = TAO_default_environment () ); -#endif /* !TAO_HAS_LOCALITY_CONSTRAINT_POLICIES */ virtual void _dispatch (CORBA::ServerRequest &req, void *context, CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()); +#endif /* !TAO_HAS_LOCALITY_CONSTRAINT_POLICIES */ PortableServer::RequestProcessingPolicy *_this (CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()); virtual const char* _interface_repository_id (void) const; @@ -619,8 +619,6 @@ TAO_NAMESPACE POA_PortableServer virtual PortableServer::POAManager::State get_state (CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()) = 0; // pure virtual - virtual void _dispatch (CORBA::ServerRequest &req, void *context, CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()); - PortableServer::POAManager *_this (CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()); virtual const char* _interface_repository_id (void) const; }; @@ -691,8 +689,6 @@ TAO_NAMESPACE POA_PortableServer ); virtual CORBA::Boolean unknown_adapter (PortableServer::POA_ptr parent, const char *name, CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()) = 0; // pure virtual - virtual void _dispatch (CORBA::ServerRequest &req, void *context, CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()); - PortableServer::AdapterActivator *_this (CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()); virtual const char* _interface_repository_id (void) const; }; @@ -742,8 +738,6 @@ TAO_NAMESPACE POA_PortableServer const char* logical_type_id ); - virtual void _dispatch (CORBA::ServerRequest &req, void *context, CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()); - PortableServer::ServantManager *_this (CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()); virtual const char* _interface_repository_id (void) const; }; @@ -791,8 +785,6 @@ TAO_NAMESPACE POA_PortableServer virtual void etherealize (const PortableServer::ObjectId &oid, PortableServer::POA_ptr adapter, PortableServer::Servant serv, CORBA::Boolean cleanup_in_progress, CORBA::Boolean remaining_activations, CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()) = 0; // pure virtual - virtual void _dispatch (CORBA::ServerRequest &req, void *context, CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()); - PortableServer::ServantActivator *_this (CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()); virtual const char* _interface_repository_id (void) const; }; @@ -858,8 +850,6 @@ TAO_NAMESPACE POA_PortableServer virtual void postinvoke (const PortableServer::ObjectId &oid, PortableServer::POA_ptr adapter, const char *operation, PortableServer::ServantLocator::Cookie the_cookie, PortableServer::Servant the_servant, CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()) = 0; // pure virtual - virtual void _dispatch (CORBA::ServerRequest &req, void *context, CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()); - PortableServer::ServantLocator *_this (CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()); virtual const char* _interface_repository_id (void) const; }; @@ -992,8 +982,6 @@ TAO_NAMESPACE POA_PortableServer virtual CORBA::Object_ptr id_to_reference (const PortableServer::ObjectId &oid, CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()) = 0; // pure virtual - virtual void _dispatch (CORBA::ServerRequest &req, void *context, CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()); - PortableServer::POA *_this (CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()); virtual const char* _interface_repository_id (void) const; }; @@ -1176,8 +1164,6 @@ TAO_NAMESPACE POA_PortableServer virtual PortableServer::ObjectId * get_object_id ( CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()) = 0; // pure virtual - virtual void _dispatch (CORBA::ServerRequest &req, void *context, CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()); - PortableServer::Current *_this (CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()); virtual const char* _interface_repository_id (void) const; }; diff --git a/TAO/tao/POA_CORBA.h b/TAO/tao/POA_CORBA.h index 27adf2f9535..4554cf457d9 100644 --- a/TAO/tao/POA_CORBA.h +++ b/TAO/tao/POA_CORBA.h @@ -49,7 +49,7 @@ public: class Current; typedef Current *Current_ptr; - class Current : public virtual TAO_ServantBase + class Current : public virtual TAO_Local_ServantBase { protected: Current (void); @@ -62,8 +62,6 @@ public: const char* logical_type_id ); - virtual void _dispatch (CORBA::ServerRequest &_tao_req, void *_tao_context, CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()); - ACE_CORBA_1(Current) *_this (CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()); virtual const char* _interface_repository_id (void) const; @@ -95,7 +93,12 @@ public: class Policy; typedef Policy *Policy_ptr; + +#if !defined (TAO_HAS_LOCALITY_CONSTRAINT_POLICIES) class TAO_Export Policy : public virtual TAO_ServantBase +#else + class TAO_Export Policy : public virtual TAO_Local_ServantBase +#endif /* !TAO_HAS_LOCALITY_CONSTRAINT_POLICIES */ { protected: Policy (void); @@ -160,7 +163,6 @@ public: CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment () ); -#endif /* !TAO_HAS_LOCALITY_CONSTRAINT_POLICIES */ virtual void _dispatch ( CORBA::ServerRequest &_tao_req, @@ -168,6 +170,7 @@ public: CORBA_Environment &TAO_IN_ENV = TAO_default_environment () ); +#endif /* !TAO_HAS_LOCALITY_CONSTRAINT_POLICIES */ CORBA_Policy_ptr _this ( CORBA_Environment &TAO_IN_ENV = @@ -211,7 +214,7 @@ public: class PolicyManager; typedef PolicyManager *PolicyManager_ptr; - class TAO_Export PolicyManager : public virtual PortableServer::ServantBase + class TAO_Export PolicyManager : public virtual TAO_Local_ServantBase { protected: PolicyManager (void); @@ -237,13 +240,6 @@ public: CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment () ) = 0; - virtual void _dispatch ( - CORBA::ServerRequest &_tao_req, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - CORBA::Environment::default_environment () - ); - CORBA::PolicyManager *_this ( CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment () @@ -302,13 +298,6 @@ public: const char* logical_type_id ); - virtual void _dispatch ( - CORBA::ServerRequest &_tao_req, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = - CORBA::Environment::default_environment () - ); - CORBA::PolicyCurrent *_this ( CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment () @@ -1015,13 +1004,6 @@ public: CORBA::Environment::default_environment () ) = 0; - virtual void _dispatch ( - CORBA::ServerRequest &_tao_req, - void *_tao_context, - CORBA::Environment &_tao_env = - CORBA::Environment::default_environment () - ); - CORBA_DynAny *_this ( CORBA::Environment &TAO_IN_ENV = CORBA::Environment::default_environment () @@ -1279,13 +1261,6 @@ public: CORBA::Environment::default_environment () ) = 0; - virtual void _dispatch ( - CORBA::ServerRequest &_tao_req, - void *_tao_context, - CORBA::Environment &_tao_env = - CORBA::Environment::default_environment () - ); - CORBA_DynEnum *_this ( CORBA::Environment &TAO_IN_ENV = CORBA::Environment::default_environment () @@ -1374,13 +1349,6 @@ public: CORBA::Environment::default_environment () ) = 0; - virtual void _dispatch ( - CORBA::ServerRequest &_tao_req, - void *_tao_context, - CORBA::Environment &_tao_env = - CORBA::Environment::default_environment () - ); - CORBA_DynStruct *_this ( CORBA::Environment &TAO_IN_ENV = CORBA::Environment::default_environment () @@ -1489,13 +1457,6 @@ public: CORBA::Environment::default_environment () ) = 0; - virtual void _dispatch ( - CORBA::ServerRequest &_tao_req, - void *_tao_context, - CORBA::Environment &_tao_env = - CORBA::Environment::default_environment () - ); - CORBA_DynUnion *_this ( CORBA::Environment &TAO_IN_ENV = CORBA::Environment::default_environment () @@ -1609,13 +1570,6 @@ public: CORBA::Environment::default_environment () ); - virtual void _dispatch ( - CORBA::ServerRequest &_tao_req, - void *_tao_context, - CORBA::Environment &TAO_IN_ENV = - CORBA::Environment::default_environment () - ); - CORBA_DynSequence *_this ( CORBA::Environment &TAO_IN_ENV = CORBA::Environment::default_environment () @@ -1694,13 +1648,6 @@ public: CORBA::Environment::default_environment () ) = 0; - virtual void _dispatch ( - CORBA::ServerRequest &_tao_req, - void *_tao_context, - CORBA::Environment &_tao_env = - CORBA::Environment::default_environment () - ); - CORBA_DynArray *_this ( CORBA::Environment &TAO_IN_ENV = CORBA::Environment::default_environment () diff --git a/TAO/tao/PolicyC.cpp b/TAO/tao/PolicyC.cpp index d444ce0d785..83679db2980 100644 --- a/TAO/tao/PolicyC.cpp +++ b/TAO/tao/PolicyC.cpp @@ -179,7 +179,11 @@ CORBA_Policy_ptr CORBA_Policy::_narrow ( if (obj->_is_collocated () && obj->_servant() != 0) servant = obj->_servant()->_downcast ("IDL:omg.org/CORBA/Policy:1.0"); if (servant == 0) +#if defined (TAO_HAS_LOCALITY_CONSTRAINT_POLICIES) + ACE_THROW_RETURN (CORBA::MARSHAL (), CORBA::Policy::_nil ()); +#else return new CORBA_Policy(stub); +#endif /* TAO_HAS_LOCALITY_CONSTRAINT_POLICIES */ return new POA_CORBA::_tao_collocated_Policy( ACE_reinterpret_cast(POA_CORBA::Policy_ptr, servant), stub @@ -199,13 +203,18 @@ CORBA_Policy_ptr CORBA_Policy::_unchecked_narrow ( if (obj->_is_collocated () && obj->_servant() != 0) servant = obj->_servant()->_downcast ("IDL:omg.org/CORBA/Policy:1.0"); if (servant == 0) +#if defined (TAO_HAS_LOCALITY_CONSTRAINT_POLICIES) + ACE_THROW_RETURN (CORBA::MARSHAL (), CORBA::Policy::_nil ()); +#else return new CORBA_Policy(stub); +#endif /* TAO_HAS_LOCALITY_CONSTRAINT_POLICIES */ return new POA_CORBA::_tao_collocated_Policy( ACE_reinterpret_cast(POA_CORBA::Policy_ptr, servant), stub ); } +#if !defined (TAO_HAS_LOCALITY_CONSTRAINT_POLICIES) CORBA::PolicyType CORBA_Policy::policy_type ( CORBA::Environment &ACE_TRY_ENV ) @@ -343,6 +352,7 @@ void CORBA_Policy::destroy ( } } +#endif /* !TAO_HAS_LOCALITY_CONSTRAINT_POLICIES */ CORBA::Boolean CORBA_Policy::_is_a (const CORBA::Char *value, CORBA::Environment &env) { diff --git a/TAO/tao/PolicyC.h b/TAO/tao/PolicyC.h index 59471fd8b1e..5ee036fc789 100644 --- a/TAO/tao/PolicyC.h +++ b/TAO/tao/PolicyC.h @@ -148,6 +148,7 @@ public: ); static CORBA_Policy_ptr _nil (void); +#if !defined (TAO_HAS_LOCALITY_CONSTRAINT_POLICIES) virtual CORBA::PolicyType policy_type ( CORBA_Environment &TAO_IN_ENV = TAO_default_environment () @@ -160,6 +161,21 @@ public: CORBA_Environment &TAO_IN_ENV = TAO_default_environment () ); +#else + virtual CORBA::PolicyType policy_type ( + CORBA_Environment &TAO_IN_ENV = + TAO_default_environment () + ) = 0; + virtual CORBA_Policy_ptr copy ( + CORBA_Environment &TAO_IN_ENV = + TAO_default_environment () + ) = 0; + virtual void destroy ( + CORBA_Environment &TAO_IN_ENV = + TAO_default_environment () + ) = 0; +#endif /* !TAO_HAS_LOCALITY_CONSTRAINT_POLICIES */ + virtual CORBA::Boolean _is_a ( const CORBA::Char *type_id, CORBA_Environment &TAO_IN_ENV = diff --git a/TAO/tao/PolicyS.cpp b/TAO/tao/PolicyS.cpp index 079873eade6..c72f0668e98 100644 --- a/TAO/tao/PolicyS.cpp +++ b/TAO/tao/PolicyS.cpp @@ -255,6 +255,7 @@ void* POA_CORBA::Policy::_downcast ( return 0; } +#if !defined (TAO_HAS_LOCALITY_CONSTRAINT_POLICIES) void POA_CORBA::Policy::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &env) { TAO_Skeleton skel; // pointer to skeleton for operation @@ -268,6 +269,7 @@ void POA_CORBA::Policy::_dispatch (CORBA::ServerRequest &req, void *context, COR else skel (req, this, context, env); } +#endif /* !TAO_HAS_LOCALITY_CONSTRAINT_POLICIES */ const char* POA_CORBA::Policy::_interface_repository_id (void) const { @@ -375,12 +377,6 @@ void* POA_CORBA::PolicyManager::_downcast ( return 0; } -void POA_CORBA::PolicyManager::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &ACE_TRY_ENV) -{ - // @@ TODO - ACE_THROW (CORBA_BAD_OPERATION ()); -} - const char* POA_CORBA::PolicyManager::_interface_repository_id (void) const { return "IDL:omg.org/CORBA/PolicyManager:1.0"; @@ -491,11 +487,6 @@ void* POA_CORBA::PolicyCurrent::_downcast ( return 0; } -void POA_CORBA::PolicyCurrent::_dispatch (CORBA::ServerRequest &req, void *context, CORBA::Environment &ACE_TRY_ENV) -{ - ACE_THROW (CORBA_BAD_OPERATION ()); -} - const char* POA_CORBA::PolicyCurrent::_interface_repository_id (void) const { return "IDL:omg.org/CORBA/PolicyCurrent:1.0"; diff --git a/TAO/tao/Servant_Base.cpp b/TAO/tao/Servant_Base.cpp index 63563e95d18..39e060fd3af 100644 --- a/TAO/tao/Servant_Base.cpp +++ b/TAO/tao/Servant_Base.cpp @@ -332,6 +332,14 @@ TAO_Local_ServantBase::_create_stub (CORBA_Environment &ACE_TRY_ENV) ACE_TRY_ENV); } +void +TAO_Local_ServantBase::_dispatch (CORBA::ServerRequest &request, + void *context, + CORBA_Environment &ACE_TRY_ENV) +{ + ACE_THROW (CORBA::BAD_OPERATION ()); +} + #if !defined (TAO_HAS_MINIMUM_CORBA) CORBA::Object_ptr diff --git a/TAO/tao/Servant_Base.h b/TAO/tao/Servant_Base.h index 467dd59cf5b..72223be406e 100644 --- a/TAO/tao/Servant_Base.h +++ b/TAO/tao/Servant_Base.h @@ -223,14 +223,19 @@ public: // Returns hash value. }; -class TAO_Export TAO_Local_ServantBase : public TAO_ServantBase +class TAO_Export TAO_Local_ServantBase : public virtual TAO_ServantBase { // = TITLE // Base class for local skeletons and servants. protected: TAO_Stub *_create_stub (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); // This is an auxiliar method for _this(). Make sure *not* to - // register with the default POA + // register with the default POA. + + void _dispatch (CORBA::ServerRequest &request, + void *context, + CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); + // Throws CORBA::BAD_OPERATION exception. }; #if !defined (TAO_HAS_MINIMUM_CORBA) diff --git a/TAO/tao/orbconf.h b/TAO/tao/orbconf.h index 8a354bf8f5b..fa3f0ac9caa 100644 --- a/TAO/tao/orbconf.h +++ b/TAO/tao/orbconf.h @@ -300,14 +300,47 @@ // Minimum CORBA // #define TAO_HAS_MINIMUM_CORBA +// Without Minimum CORBA, the user will get regular (no locality +// constraints) policies by default. With Minimum CORBA, the user +// will get locality constraint policies by default. +// +// If #define TAO_HAS_REMOTE_POLICIES 0, then the user will always get +// locality constraint policies (regardless of Minimum CORBA). +// +// If #define TAO_HAS_REMOTE_POLICIES 1, then the user will always get +// regular policies (regardless of Minimum CORBA). + +// TAO_HAS_LOCALITY_CONSTRAINT_POLICIES is an internal macro and +// should not be set by the user. +#if defined (TAO_HAS_LOCALITY_CONSTRAINT_POLICIES) +# undef TAO_HAS_LOCALITY_CONSTRAINT_POLICIES +# warning TAO_HAS_LOCALITY_CONSTRAINT_POLICIES is an internal macro \ +and should not be set by the user. Please use TAO_HAS_REMOTE_POLICIES instead. +#endif /* TAO_HAS_LOCALITY_CONSTRAINT_POLICIES */ + +#if defined (TAO_HAS_MINIMUM_CORBA) + // With minimum CORBA, we don't have the ForwardRequest exception. // Therefore, we can't support the INS forwarding agent. -#if defined (TAO_HAS_MINIMUM_CORBA) # if !defined (TAO_NO_IOR_TABLE) # define TAO_NO_IOR_TABLE # endif /* TAO_NO_IOR_TABLE */ + +# if !defined (TAO_HAS_REMOTE_POLICIES) +# define TAO_HAS_REMOTE_POLICIES 0 +# endif /* TAO_HAS_REMOTE_POLICIES */ + #endif /* TAO_HAS_MINIMUM_CORBA */ +// Policies are not locality constraint by default. +#if !defined (TAO_HAS_REMOTE_POLICIES) +# define TAO_HAS_REMOTE_POLICIES 1 +#endif /* TAO_HAS_REMOTE_POLICIES */ + +#if (TAO_HAS_REMOTE_POLICIES == 0) +# define TAO_HAS_LOCALITY_CONSTRAINT_POLICIES +#endif /* TAO_HAS_REMOTE_POLICIES */ + // CORBA Messaging #define TAO_HAS_CORBA_MESSAGING |