diff options
author | bala <balanatarajan@users.noreply.github.com> | 2003-12-23 17:07:43 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 2003-12-23 17:07:43 +0000 |
commit | 5edb3b7966cc24de8f87b6bf913b3f84c513f8bf (patch) | |
tree | 9134476c7666525402a24e1097f50b8d81c9fd98 /TAO | |
parent | 33a7ea0d92bea420586cf2b77a18207f277a8773 (diff) | |
download | ATCD-5edb3b7966cc24de8f87b6bf913b3f84c513f8bf.tar.gz |
ChangeLogTag:Tue Dec 23 11:04:06 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu>
Diffstat (limited to 'TAO')
-rw-r--r-- | TAO/ChangeLog | 15 | ||||
-rw-r--r-- | TAO/tao/PortableInterceptorC.h | 2 | ||||
-rw-r--r-- | TAO/tao/PortableServer/Object_Adapter.cpp | 3 | ||||
-rw-r--r-- | TAO/tao/PortableServer/ServerInterceptorAdapter.cpp | 52 | ||||
-rw-r--r-- | TAO/tao/PortableServer/ServerInterceptorAdapter.h | 5 |
5 files changed, 76 insertions, 1 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index d11fdcdf8bd..0f9cd049f9d 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,18 @@ +Tue Dec 23 11:04:06 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu> + + * tao/PortableInterceptorC.h: + * tao/PortableServer/Object_Adapter.cpp: + * tao/PortableServer/ServerInterceptorAdapter.cpp: + * tao/PortableServer/ServerInterceptorAdapter.h: + + Added an #define TAO_HAS_EXTENDED_FT_INTERCEPTORS, to protect + the extended interceptor call. The extended call is only for our + FT capabilities and is proprietary. A compliant implementation + of an application level PortableInterceptor will start running + into trouble without this #define. This change is to protect + compliant implementations of application intereceptors from + having any surprises. + Tue Dec 23 09:48:52 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu> * tests/IDL_Test/Makefile: diff --git a/TAO/tao/PortableInterceptorC.h b/TAO/tao/PortableInterceptorC.h index a67190c7a5c..65e9f7fa3f5 100644 --- a/TAO/tao/PortableInterceptorC.h +++ b/TAO/tao/PortableInterceptorC.h @@ -1234,6 +1234,7 @@ namespace PortableInterceptor // TAO_IDL - Generated from // W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/operation_ch.cpp:46 +#if TAO_HAS_EXTENDED_FT_INTERCEPTORS == 1 virtual void tao_ft_interception_point ( PortableInterceptor::ServerRequestInfo_ptr , CORBA::OctetSeq_out @@ -1243,6 +1244,7 @@ namespace PortableInterceptor CORBA::SystemException , PortableInterceptor::ForwardRequest )) {}; +#endif /*TAO_HAS_EXTENDED_FT_INTERCEPTORS*/ // TAO_IDL - Generated from // W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/operation_ch.cpp:46 diff --git a/TAO/tao/PortableServer/Object_Adapter.cpp b/TAO/tao/PortableServer/Object_Adapter.cpp index 6de46d08e93..0cec196074b 100644 --- a/TAO/tao/PortableServer/Object_Adapter.cpp +++ b/TAO/tao/PortableServer/Object_Adapter.cpp @@ -737,6 +737,7 @@ TAO_Object_Adapter::dispatch (TAO::ObjectKey &key, ACE_TRY { +#if TAO_HAS_EXTENDED_FT_INTERCEPTORS == 1 CORBA::OctetSeq_var ocs; sri_adapter.tao_ft_interception_point (&ri, ocs.out () @@ -752,6 +753,8 @@ TAO_Object_Adapter::dispatch (TAO::ObjectKey &key, return TAO_Adapter::DS_OK; } +#endif /*TAO_HAS_EXTENDED_FT_INTERCEPTORS*/ + // The receive_request_service_contexts() interception point // must be invoked before the operation is dispatched to the // servant. diff --git a/TAO/tao/PortableServer/ServerInterceptorAdapter.cpp b/TAO/tao/PortableServer/ServerInterceptorAdapter.cpp index 32d01d6f424..130fa8381db 100644 --- a/TAO/tao/PortableServer/ServerInterceptorAdapter.cpp +++ b/TAO/tao/PortableServer/ServerInterceptorAdapter.cpp @@ -21,6 +21,7 @@ TAO_ServerRequestInterceptor_Adapter:: { } +#if TAO_HAS_EXTENDED_FT_INTERCEPTORS == 1 void TAO_ServerRequestInterceptor_Adapter::tao_ft_interception_point ( TAO_ServerRequestInfo *ri, @@ -119,6 +120,57 @@ receive_request_service_contexts ( ACE_CHECK; } +#elif TAO_HAS_EXTENDED_FT_INTERCEPTORS == 0 + +/// NOTE: Yes, we have two versions of this. This is easier than +/// messing around things in the same function, which is harder to +/// read and could make the code buggier. +void +TAO_ServerRequestInterceptor_Adapter:: +receive_request_service_contexts ( + TAO_ServerRequestInfo *ri + ACE_ENV_ARG_DECL) +{ + + // This method implements one of the "starting" server side + // interception point if extended interceptors are not in place. + + ACE_TRY + { + // Copy the request scope current (RSC) to the thread scope + // current (TSC) upon leaving this scope, i.e. just after the + // receive_request_service_contexts() completes. A "guard" is + // used to make the copy also occur if an exception is thrown. + TAO_PICurrent_Guard pi_guard (ri->server_request (), + 0 /* Copy RSC to TSC */); + + for (size_t i = 0 ; i < this->len_; ++i) + { + this->interceptors_[i]->receive_request_service_contexts ( + ri + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + // The starting interception point completed successfully. + // Push the interceptor on to the flow stack. + ++this->stack_size_; + } + } + ACE_CATCH (PortableInterceptor::ForwardRequest, exc) + { + ri->forward_reference (exc); + this->send_other (ri + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + this->location_forwarded_ = 1; + } + ACE_ENDTRY; + ACE_CHECK; +} + +#endif /*TAO_HAS_EXTENDED_FT_INTERCEPTORS*/ + void TAO_ServerRequestInterceptor_Adapter:: receive_request (TAO_ServerRequestInfo *ri diff --git a/TAO/tao/PortableServer/ServerInterceptorAdapter.h b/TAO/tao/PortableServer/ServerInterceptorAdapter.h index 3fc77e56415..1fea6879a6a 100644 --- a/TAO/tao/PortableServer/ServerInterceptorAdapter.h +++ b/TAO/tao/PortableServer/ServerInterceptorAdapter.h @@ -65,6 +65,7 @@ public: * The "receive_request_service_contexts()" and "send_other()" * PortableInterceptor interception points are missing. */ +#if TAO_HAS_EXTENDED_FT_INTERCEPTORS == 1 //@{ /// This method implements the "starting" server side interception /// point. It will be used as the first interception point and it is @@ -74,9 +75,11 @@ public: TAO_ServerRequestInfo *ri , CORBA::OctetSeq_out oc ACE_ENV_ARG_DECL); +#endif /*TAO_HAS_EXTENDED_FT_INTERCEPTORS*/ /// This method implements the "intermediate" server side interception - /// point. + /// point if the above #ifdef is set to 1 and a starting intercetion + /// point if it is not set to 1. /// @@ NOTE: This method should have been the "starting" /// interception point according to the interceptor spec. This will /// be fixed once Bug 1369 is completely done. |