diff options
author | kirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-07-12 00:09:40 +0000 |
---|---|---|
committer | kirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-07-12 00:09:40 +0000 |
commit | 40251337dcb508f0951c46a1652499479a0f6521 (patch) | |
tree | 8f8acc910cfe4ca994616f5fdb6b6b2024c1b103 | |
parent | 62fa11fd17289fad58e96947e40c178b92e1a9e9 (diff) | |
download | ATCD-40251337dcb508f0951c46a1652499479a0f6521.tar.gz |
*** empty log message ***
-rw-r--r-- | TAO/tao/Request_Info.cpp | 54 | ||||
-rw-r--r-- | TAO/tao/Request_Info.h | 39 |
2 files changed, 51 insertions, 42 deletions
diff --git a/TAO/tao/Request_Info.cpp b/TAO/tao/Request_Info.cpp index 2d92703e7c6..0df364aff6a 100644 --- a/TAO/tao/Request_Info.cpp +++ b/TAO/tao/Request_Info.cpp @@ -24,9 +24,9 @@ ACE_RCSID(tao, request_info, "$Id$") TAO_ClientRequest_Info::TAO_ClientRequest_Info (const char * operation, - IOP::ServiceContextList &service_context_list , - CORBA::Object * target, - CORBA::Environment &) + IOP::ServiceContextList &service_context_list , + CORBA::Object * target, + CORBA::Environment &) : operation_ (operation), service_context_list_ (service_context_list), target_ (CORBA_Object::_duplicate (target)) @@ -53,6 +53,9 @@ TAO_ClientRequest_Info::effective_profile (CORBA::Environment &) return 0; } +// Use at own risk. There is no way currently of extracting an +// exception from an Any. This method is in place just to be compliant +// with the spec. CORBA::Any * TAO_ClientRequest_Info::received_exception (CORBA::Environment &) ACE_THROW_SPEC ((CORBA::SystemException)) @@ -62,6 +65,15 @@ TAO_ClientRequest_Info::received_exception (CORBA::Environment &) this->any_exception_ <<= *this->caught_exception_; return &this->any_exception_; } + +// = TAO specific method done since there currently is no simple way +// to extract exceptions from an Any +CORBA::Exception * +TAO_ClientRequest_Info::_received_exception (CORBA::Environment &) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + return this->caught_exception_; +} char * TAO_ClientRequest_Info::received_exception_id (CORBA::Environment &) @@ -232,25 +244,8 @@ TAO_ClientRequest_Info::request_id (CORBA::ULong request_id) this->request_id_ = request_id; } -//**************************************************************** +//**************************************************************** -/* -TAO_ServerRequest_Info::TAO_ServerRequest_Info(CORBA::ULong request_id, - char * operation, - Dynamic::ParameterList * arguments, - Dynamic::ExceptionList * exceptions, - Dynamic::ContextList * contexts, - Dynamic::RequestContext * operation_context, - CORBA::Object_ptr forward_reference, - PortableInterceptor::OctetSeq *object_id, - PortableInterceptor::OctetSeq *adapter_id, - CORBA::Environment &) - : Request_Info (request_id, operation, arguments, exceptions, contexts, operation_context, forward_reference), - object_id_ (object_id), - adapter_id_ (adapter_id) -{ -} -*/ TAO_ServerRequest_Info::TAO_ServerRequest_Info (const char * operation, IOP::ServiceContextList &service_context_list , CORBA::Environment &) @@ -373,8 +368,12 @@ TAO_ServerRequest_Info::get_reply_service_context (IOP::ServiceId id, return 0; } -CORBA::Any * -TAO_ServerRequest_Info::sending_exception (CORBA::Environment &ACE_TRY_ENV) + +// Use at own risk. There is no way currently of extracting an +// exception from an Any. This method is in place just to be compliant +// with the spec. +CORBA::Any * +TAO_ServerRequest_Info::sending_exception (CORBA::Environment &) ACE_THROW_SPEC ((CORBA::SystemException)) { // The spec says that if it is a user exception which cant be inserted @@ -382,6 +381,15 @@ TAO_ServerRequest_Info::sending_exception (CORBA::Environment &ACE_TRY_ENV) this->any_exception_ <<= *this->caught_exception_; return &this->any_exception_; } + +// = TAO specific method done since there currently is no simple way +// to extract exceptions from an Any +CORBA::Exception * +TAO_ServerRequest_Info::_sending_exception (CORBA::Environment &) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + return this->caught_exception_; +} PortableInterceptor::OctetSeq * TAO_ServerRequest_Info::object_id (CORBA::Environment &) diff --git a/TAO/tao/Request_Info.h b/TAO/tao/Request_Info.h index c908620509d..e84d3078ed7 100644 --- a/TAO/tao/Request_Info.h +++ b/TAO/tao/Request_Info.h @@ -42,22 +42,8 @@ class TAO_Export TAO_ClientRequest_Info : public virtual PortableInterceptor::ClientRequestInfo { public: - - /*ClientRequest_Info (CORBA::ULong request_id, - char * operation, - Dynamic::ParameterList * arguments, - Dynamic::ExceptionList * exceptions, - Dynamic::ContextList * contexts, - Dynamic::RequestContext * operation_context, - CORBA::Object_ptr forward_reference, - CORBA::Object * target, - CORBA::Object * effective_target, - IOP::ServiceContextList_ptr &service_context_list , - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment ());*/ - TAO_ClientRequest_Info (const char * operation, - IOP::ServiceContextList &service_context_list, + IOP::ServiceContextList &service_context_list, CORBA::Object * target, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()); @@ -106,7 +92,6 @@ class TAO_Export TAO_ClientRequest_Info TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)) ; - // Probably the following methods shoudl be delegated to teh POICurrentx virtual CORBA::Any * get_slot (PortableInterceptor::SlotId id, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) @@ -138,7 +123,15 @@ class TAO_Export TAO_ClientRequest_Info virtual CORBA::Any * received_exception (CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); - + // This method causes problem since there is no trivial way to + // extract the exception from the Any. + + virtual CORBA::Exception * _received_exception (CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment ()) + ACE_THROW_SPEC ((CORBA::SystemException)); + // Note: This is TAO specific and was done to combat the previous + // problem to some extent. + virtual char * received_exception_id (CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); @@ -274,8 +267,16 @@ class TAO_Export TAO_ServerRequest_Info ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::Any * sending_exception (CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment ()) - ACE_THROW_SPEC ((CORBA::SystemException)); + TAO_default_environment ()) + ACE_THROW_SPEC ((CORBA::SystemException)); + // This method causes problem since there is no trivial way to + // extract the exception from the Any. + + virtual CORBA::Exception * _sending_exception (CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment ()) + ACE_THROW_SPEC ((CORBA::SystemException)); + // Note: This is TAO specific and was done to combat the previous + // problem to some extent. virtual PortableInterceptor::OctetSeq * object_id (CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) |