summaryrefslogtreecommitdiff
path: root/TAO/tao/TAO_Server_Request.cpp
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2005-08-19 08:02:52 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2005-08-19 08:02:52 +0000
commit7f61ed4f18c496890fbdf75300b1135d6911d9aa (patch)
tree384c03f0891bbd738983cd5477ac803253f7aaee /TAO/tao/TAO_Server_Request.cpp
parenta2e27000b6545e6b410ca3960af80605df18fd7a (diff)
downloadATCD-7f61ed4f18c496890fbdf75300b1135d6911d9aa.tar.gz
ChangeLogTag Fri Aug 19 07:56:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO/tao/TAO_Server_Request.cpp')
-rw-r--r--TAO/tao/TAO_Server_Request.cpp71
1 files changed, 67 insertions, 4 deletions
diff --git a/TAO/tao/TAO_Server_Request.cpp b/TAO/tao/TAO_Server_Request.cpp
index b95b1b41038..c7075d34bf7 100644
--- a/TAO/tao/TAO_Server_Request.cpp
+++ b/TAO/tao/TAO_Server_Request.cpp
@@ -14,6 +14,7 @@
#if TAO_HAS_INTERCEPTORS == 1
#include "PortableInterceptorC.h"
+#include "ServerRequestInterceptor_Adapter.h"
#endif
#if !defined (__ACE_INLINE__)
@@ -72,8 +73,8 @@ TAO_ServerRequest::TAO_ServerRequest (TAO_Pluggable_Messaging *mesg_base,
argument_flag_ (1)
#if TAO_HAS_INTERCEPTORS == 1
, interceptor_count_ (0)
- , rs_pi_current_ ()
- , pi_current_copy_callback_ ()
+ , rs_pi_current_ (0)
+ , pi_current_copy_callback_ (0)
, result_seq_ (0)
, caught_exception_ (0)
, reply_status_ (-1)
@@ -115,7 +116,8 @@ TAO_ServerRequest::TAO_ServerRequest (TAO_Pluggable_Messaging *mesg_base,
argument_flag_ (true)
#if TAO_HAS_INTERCEPTORS == 1
, interceptor_count_ (0)
- , rs_pi_current_ ()
+ , rs_pi_current_ (0)
+ , pi_current_copy_callback_ (0)
, result_seq_ (0)
, caught_exception_ (0)
, reply_status_ (-1)
@@ -150,7 +152,8 @@ TAO_ServerRequest::TAO_ServerRequest (TAO_ORB_Core * orb_core,
argument_flag_ (false)
#if TAO_HAS_INTERCEPTORS == 1
, interceptor_count_ (0)
- , rs_pi_current_ ()
+ , rs_pi_current_ (0)
+ , pi_current_copy_callback_ (0)
, result_seq_ (0)
, caught_exception_ (0)
, reply_status_ (-1)
@@ -179,6 +182,31 @@ TAO_ServerRequest::TAO_ServerRequest (TAO_ORB_Core * orb_core,
TAO_ServerRequest::~TAO_ServerRequest (void)
{
+#if TAO_HAS_INTERCEPTORS == 1
+ if (this->pi_current_copy_callback_)
+ {
+ TAO::ServerRequestInterceptor_Adapter *interceptor_adapter =
+ this->orb_core_->serverrequestinterceptor_adapter ();
+
+ if (interceptor_adapter)
+ {
+ interceptor_adapter->deallocate_pi_current_callback (
+ this->pi_current_copy_callback_);
+ }
+ }
+
+ if (this->rs_pi_current_)
+ {
+ TAO::ServerRequestInterceptor_Adapter *interceptor_adapter =
+ this->orb_core_->serverrequestinterceptor_adapter ();
+
+ if (interceptor_adapter)
+ {
+ interceptor_adapter->deallocate_pi_current (
+ this->rs_pi_current_);
+ }
+ }
+#endif /* TAO_HAS_INTERCEPTORS == 1 */
}
CORBA::ORB_ptr
@@ -499,4 +527,39 @@ TAO_ServerRequest::caught_exception (CORBA::Exception *exception)
this->caught_exception_ = exception;
}
+TAO::PICurrent_Impl *
+TAO_ServerRequest::rs_pi_current (void)
+{
+ if (!this->rs_pi_current_)
+ {
+ TAO::ServerRequestInterceptor_Adapter *interceptor_adapter =
+ this->orb_core_->serverrequestinterceptor_adapter ();
+
+ if (interceptor_adapter)
+ {
+ this->rs_pi_current_ = interceptor_adapter->allocate_pi_current ();
+ }
+ }
+
+ return this->rs_pi_current_;
+}
+
+TAO::PICurrent_Copy_Callback *
+TAO_ServerRequest::pi_current_copy_callback (void)
+{
+ if (!this->pi_current_copy_callback_)
+ {
+ TAO::ServerRequestInterceptor_Adapter *interceptor_adapter =
+ this->orb_core_->serverrequestinterceptor_adapter ();
+
+ if (interceptor_adapter)
+ {
+ this->pi_current_copy_callback_ =
+ interceptor_adapter->allocate_pi_current_callback ();
+ }
+ }
+
+ return this->pi_current_copy_callback_;
+}
+
#endif /*TAO_HAS_INTERCEPTORS*/