summaryrefslogtreecommitdiff
path: root/TAO/tao/PortableServer/ServerRequestInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/PortableServer/ServerRequestInfo.cpp')
-rw-r--r--TAO/tao/PortableServer/ServerRequestInfo.cpp123
1 files changed, 47 insertions, 76 deletions
diff --git a/TAO/tao/PortableServer/ServerRequestInfo.cpp b/TAO/tao/PortableServer/ServerRequestInfo.cpp
index fa590c398f5..c469667ca5c 100644
--- a/TAO/tao/PortableServer/ServerRequestInfo.cpp
+++ b/TAO/tao/PortableServer/ServerRequestInfo.cpp
@@ -5,11 +5,8 @@
#include "ServerRequestInfo.h"
#include "tao/TAO_Server_Request.h"
-#include "tao/PolicyC.h"
-ACE_RCSID (TAO_PortableServer,
- ServerRequestInfo,
- "$Id$")
+ACE_RCSID (PortableServer, ServerRequestInfo, "$Id$")
#if (TAO_HAS_INTERCEPTORS == 1)
@@ -20,9 +17,6 @@ ACE_RCSID (TAO_PortableServer,
TAO_ServerRequestInfo::TAO_ServerRequestInfo (
TAO_ServerRequest &server_request)
: server_request_ (server_request),
- forward_reference_ (),
- // poa_current_ (),
- adapter_id_ (),
caught_exception_ (0),
reply_status_ (-1)
{
@@ -46,40 +40,40 @@ Dynamic::ParameterList *
TAO_ServerRequestInfo::arguments (CORBA::Environment &ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (10, CORBA::COMPLETED_NO),
- 0);
+ // @@ Need the minor code once it becomes available.
+ ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), 0);
}
Dynamic::ExceptionList *
TAO_ServerRequestInfo::exceptions (CORBA::Environment &ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (10, CORBA::COMPLETED_NO),
- 0);
+ // @@ Need the minor code once it becomes available.
+ ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), 0);
}
Dynamic::ContextList *
TAO_ServerRequestInfo::contexts (CORBA::Environment &ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (10, CORBA::COMPLETED_NO),
- 0);
+ // @@ Need the minor code once it becomes available.
+ ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), 0);
}
Dynamic::RequestContext *
TAO_ServerRequestInfo::operation_context (CORBA::Environment &ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (10, CORBA::COMPLETED_NO),
- 0);
+ // @@ Need the minor code once it becomes available.
+ ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), 0);
}
CORBA::Any *
TAO_ServerRequestInfo::result (CORBA::Environment &ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (10, CORBA::COMPLETED_NO),
- 0);
+ // @@ Need the minor code once it becomes available.
+ ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), 0);
}
CORBA::Boolean
@@ -97,8 +91,8 @@ TAO_ServerRequestInfo::sync_scope (CORBA::Environment &ACE_TRY_ENV)
if (this->server_request_.sync_with_server ())
return Messaging::SYNC_WITH_SERVER;
- ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (10, CORBA::COMPLETED_NO),
- -1);
+ // @@ Need the minor once it becomes available.
+ ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), -1);
}
#endif /* TAO_HAS_CORBA_MESSAGING */
@@ -108,8 +102,7 @@ TAO_ServerRequestInfo::reply_status (CORBA::Environment &ACE_TRY_ENV)
{
if (this->reply_status_ == -1)
// A reply hasn't been received yet.
- ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (10, CORBA::COMPLETED_NO),
- -1);
+ ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), -1);
return this->reply_status_;
}
@@ -118,8 +111,10 @@ CORBA::Object_ptr
TAO_ServerRequestInfo::forward_reference (CORBA::Environment &ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- if (this->reply_status_ != PortableInterceptor::LOCATION_FORWARD)
- ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (10, CORBA::COMPLETED_NO),
+ if (this->reply_status_ != PortableInterceptor::LOCATION_FORWARD
+ && this->reply_status_ !=
+ PortableInterceptor::LOCATION_FORWARD_PERMANENT)
+ ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (),
CORBA::Object::_nil ());
// We don't get the forward reference from the TAO_ServerRequest
@@ -176,7 +171,11 @@ TAO_ServerRequestInfo::get_request_service_context (
return safe_service_context._retn ();
}
- ACE_THROW_RETURN (CORBA::BAD_PARAM (23, CORBA::COMPLETED_NO),
+ ACE_THROW_RETURN (CORBA::BAD_PARAM (
+ CORBA::SystemException::_tao_minor_code (
+ TAO_DEFAULT_MINOR_CODE,
+ EINVAL), // @@ Need minor code from PI spec!
+ CORBA::COMPLETED_NO),
0);
}
@@ -211,7 +210,11 @@ TAO_ServerRequestInfo::get_reply_service_context (
return safe_service_context._retn ();
}
- ACE_THROW_RETURN (CORBA::BAD_PARAM (23, CORBA::COMPLETED_NO),
+ ACE_THROW_RETURN (CORBA::BAD_PARAM (
+ CORBA::SystemException::_tao_minor_code (
+ TAO_DEFAULT_MINOR_CODE,
+ EINVAL), // @@ Need minor code from PI spec!
+ CORBA::COMPLETED_NO),
0);
}
@@ -226,14 +229,12 @@ TAO_ServerRequestInfo::sending_exception (CORBA::Environment &ACE_TRY_ENV)
if (this->reply_status_ != PortableInterceptor::SYSTEM_EXCEPTION
&& this->reply_status_ != PortableInterceptor::USER_EXCEPTION)
{
- ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (10,
- CORBA::COMPLETED_NO),
- 0);
+ // @@ Need the minor code once it is available.
+ ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), 0);
}
- // The spec says that if it is a user exception which cannot be
- // inserted then the UNKNOWN exception should be thrown with minor
- // code 1.
+ // The spec says that if it is a user exception which cant be inserted
+ // then the UNKNOWN exception needs to be thrown with minor code TBD_U.
CORBA::Any * temp = 0;
@@ -267,38 +268,11 @@ CORBA::OctetSeq *
TAO_ServerRequestInfo::object_id (CORBA::Environment &ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException))
{
-#if 0
- if (CORBA::is_nil (this->poa_current_.in ()))
- {
- CORBA::Object_var p =
- this->server_request_.orb_core ()->poa_current ();
-
- this->poa_current_ =
- PortableServer::Current::_narrow (p.in (),
- ACE_TRY_ENV);
- ACE_CHECK_RETURN (0);
-
- if (CORBA::is_nil (this->poa_current_.in ()))
- ACE_THROW_RETURN (CORBA::INTERNAL (), 0);
- }
-
- ACE_TRY
- {
- CORBA::OctetSeq_var obj_id =
- this->poa_current_->get_object_id (ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
- return obj_id._retn ();
- }
- ACE_CATCH (PortableServer::Current::NoContext, exc)
- {
- // Convert the NoContext exception to a NO_RESOURCES exception.
-
- ACE_THROW_RETURN (CORBA::NO_RESOURCES (1, CORBA::COMPLETED_NO),
- 0);
- }
- ACE_ENDTRY;
-#endif /* 0 */
+// if (this->object_id_.in () == 0)
+// {
+// // @@ Need the minor code once it is available.
+// ACE_THROW_RETURN (CORBA::NO_RESOURCES (), 0);
+// }
ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (
CORBA::SystemException::_tao_minor_code (
@@ -314,9 +288,8 @@ TAO_ServerRequestInfo::adapter_id (CORBA::Environment &ACE_TRY_ENV)
{
// if (this->adapter_id_.in () == 0)
// {
-// ACE_THROW_RETURN (CORBA::NO_RESOURCES (1,
-// CORBA::COMPLETED_NO),
-// 0);
+// // @@ Need the minor code once it is available.
+// ACE_THROW_RETURN (CORBA::NO_RESOURCES (), 0);
// }
ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (
@@ -332,20 +305,16 @@ TAO_ServerRequestInfo::target_most_derived_interface (
CORBA::Environment &ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- ACE_THROW_RETURN (CORBA::NO_RESOURCES (1, CORBA::COMPLETED_NO), 0);
+ // @@ Need the minor code once it is available.
+ ACE_THROW_RETURN (CORBA::NO_RESOURCES (), 0);
}
CORBA::Policy_ptr
TAO_ServerRequestInfo::get_server_policy (CORBA::PolicyType,
- CORBA::Environment &ACE_TRY_ENV)
+ CORBA::Environment &)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (
- CORBA::SystemException::_tao_minor_code (
- TAO_DEFAULT_MINOR_CODE,
- ENOTSUP),
- CORBA::COMPLETED_NO),
- CORBA::Policy::_nil ());
+ return 0;
}
void
@@ -367,7 +336,8 @@ TAO_ServerRequestInfo::target_is_a (const char * /* id */,
CORBA::Environment &ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- ACE_THROW_RETURN (CORBA::NO_RESOURCES (1, CORBA::COMPLETED_NO), 0);
+ // @@ Need the minor code once it is available.
+ ACE_THROW_RETURN (CORBA::NO_RESOURCES (), 0);
}
void
@@ -395,7 +365,8 @@ TAO_ServerRequestInfo::add_reply_service_context (
return;
}
else
- ACE_THROW (CORBA::BAD_INV_ORDER (11, CORBA::COMPLETED_NO));
+ // @@ Need the minor code once it becomes available.
+ ACE_THROW (CORBA::BAD_INV_ORDER ());
}
}