summaryrefslogtreecommitdiff
path: root/TAO/tao/IORInterceptor
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/IORInterceptor')
-rw-r--r--TAO/tao/IORInterceptor/IORInfo.cpp31
-rw-r--r--TAO/tao/IORInterceptor/IORInfo.h6
-rw-r--r--TAO/tao/IORInterceptor/IORInfoC.cpp8
-rw-r--r--TAO/tao/IORInterceptor/IORInterceptor.pidl2
-rw-r--r--TAO/tao/IORInterceptor/IORInterceptorC.cpp8
-rw-r--r--TAO/tao/IORInterceptor/IORInterceptorC.h2
-rw-r--r--TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.cpp9
-rw-r--r--TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.h4
-rw-r--r--TAO/tao/IORInterceptor/diff/IORInterceptor.diff26
9 files changed, 33 insertions, 63 deletions
diff --git a/TAO/tao/IORInterceptor/IORInfo.cpp b/TAO/tao/IORInterceptor/IORInfo.cpp
index bb5377f0c9a..ca0a10a1038 100644
--- a/TAO/tao/IORInterceptor/IORInfo.cpp
+++ b/TAO/tao/IORInterceptor/IORInfo.cpp
@@ -1,5 +1,5 @@
#include "IORInfo.h"
-#include "tao/PortableServer/POA.h"
+#include "tao/PortableServer/Root_POA.h"
#include "tao/PolicyC.h"
#include "tao/IOPC.h"
@@ -15,7 +15,7 @@ ACE_RCSID (IORInterceptor,
#endif /* __ACE_INLINE__ */
-TAO_IORInfo::TAO_IORInfo (TAO_POA *poa)
+TAO_IORInfo::TAO_IORInfo (TAO_Root_POA *poa)
: poa_ (poa),
components_established_ (0)
{
@@ -33,28 +33,13 @@ TAO_IORInfo::get_effective_policy (CORBA::PolicyType type
this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (CORBA::Policy::_nil ());
- TAO_POA_Policy_Set &policies =
- this->poa_->policies ();
+ CORBA::Policy_var policy =
+ this->poa_->get_policy (type ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (CORBA::Policy::_nil ());
- // @@ This brain damaged implementation exists due to the fact
- // neither TAO_POA nor TAO_POA_Policy_Set exposes any methods
- // useful for retrieving a given Policy in the POA's PolicyList.
- // So, I use the lame interfaces for now.
- // -Ossama
- const CORBA::ULong num_policies = policies.num_policies ();
- for (CORBA::ULong i = 0; i < num_policies; ++i)
+ if (!CORBA::is_nil (policy.in ()))
{
- // @@ This incurs at least two locks per loop iteration due
- // to the reference counting found within the policy
- // object reference!!!
- CORBA::Policy_var policy = policies.get_policy_by_index (i);
-
- CORBA::PolicyType ptype =
- policy->policy_type (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (CORBA::Policy::_nil ());
-
- if (ptype == type)
- return policy._retn ();
+ return policy._retn ();
}
// TODO: Now check the global ORB policies.
@@ -201,7 +186,7 @@ TAO_IORInfo::check_validity (ACE_ENV_SINGLE_ARG_DECL)
// once the POA has invoked all IORInterceptor interception
// points. This also prevents memory access violations from
// occuring if the POA is destroyed before this IORInfo object.
- ACE_THROW (CORBA::OBJECT_NOT_EXIST (TAO_DEFAULT_MINOR_CODE,
+ ACE_THROW (CORBA::OBJECT_NOT_EXIST (TAO::VMCID,
CORBA::COMPLETED_NO));
}
}
diff --git a/TAO/tao/IORInterceptor/IORInfo.h b/TAO/tao/IORInterceptor/IORInfo.h
index 951b083ca6c..c377ff1c994 100644
--- a/TAO/tao/IORInterceptor/IORInfo.h
+++ b/TAO/tao/IORInterceptor/IORInfo.h
@@ -32,7 +32,7 @@
/// Forward declarations.
-class TAO_POA;
+class TAO_Root_POA;
/**
@@ -48,7 +48,7 @@ class TAO_IORInfo
public:
/// Constructor.
- TAO_IORInfo (TAO_POA *poa);
+ TAO_IORInfo (TAO_Root_POA *poa);
/**
* @name PortableInterceptor::IORInfo Methods
@@ -144,7 +144,7 @@ private:
private:
/// Pointer to POA
- TAO_POA *poa_;
+ TAO_Root_POA *poa_;
/// True if the IORInterceptor::components_established()
/// interception point was called. False otherwise.
diff --git a/TAO/tao/IORInterceptor/IORInfoC.cpp b/TAO/tao/IORInterceptor/IORInfoC.cpp
index 665c3b9c729..8c9737b4c12 100644
--- a/TAO/tao/IORInterceptor/IORInfoC.cpp
+++ b/TAO/tao/IORInterceptor/IORInfoC.cpp
@@ -43,7 +43,7 @@
#endif /* !defined INLINE */
// TAO_IDL - Generated from
-// be\be_visitor_arg_traits.cpp:65
+// be\be_visitor_arg_traits.cpp:66
// Arg traits specializations.
namespace TAO
@@ -171,14 +171,14 @@ PortableInterceptor::IORInfo::_is_a (
"IDL:omg.org/PortableInterceptor/IORInfo:1.0"
) ||
!ACE_OS::strcmp (
- (char *)value,
+ value,
"IDL:omg.org/CORBA/LocalObject:1.0"
) ||
!ACE_OS::strcmp (
- (char *)value,
+ value,
"IDL:omg.org/CORBA/Object:1.0"
)
- )
+ )
{
return 1; // success using local knowledge
}
diff --git a/TAO/tao/IORInterceptor/IORInterceptor.pidl b/TAO/tao/IORInterceptor/IORInterceptor.pidl
index ece8347ace7..368b2a9fdc4 100644
--- a/TAO/tao/IORInterceptor/IORInterceptor.pidl
+++ b/TAO/tao/IORInterceptor/IORInterceptor.pidl
@@ -20,7 +20,7 @@
* The command used to generate code is:
*
* tao_idl
- * -o orig -Gp -Gd -Ge 1 -Sa -St -Sc -GT
+ * -o orig -Gp -Gd -Ge 1 -Sa -Sc -St -GT
* -I$(TAO_ROOT)
* -Wb,export_macro=TAO_IORInterceptor_Export
* -Wb,export_include="iorinterceptor_export.h"
diff --git a/TAO/tao/IORInterceptor/IORInterceptorC.cpp b/TAO/tao/IORInterceptor/IORInterceptorC.cpp
index 9c3811144e0..27214c5462b 100644
--- a/TAO/tao/IORInterceptor/IORInterceptorC.cpp
+++ b/TAO/tao/IORInterceptor/IORInterceptorC.cpp
@@ -42,7 +42,7 @@
#endif /* !defined INLINE */
// TAO_IDL - Generated from
-// be\be_visitor_arg_traits.cpp:65
+// be\be_visitor_arg_traits.cpp:66
// Arg traits specializations.
namespace TAO
@@ -157,14 +157,14 @@ PortableInterceptor::IORInterceptor::_is_a (
"IDL:omg.org/PortableInterceptor/IORInterceptor:1.0"
) ||
!ACE_OS::strcmp (
- (char *)value,
+ value,
"IDL:omg.org/CORBA/LocalObject:1.0"
) ||
!ACE_OS::strcmp (
- (char *)value,
+ value,
"IDL:omg.org/CORBA/Object:1.0"
)
- )
+ )
{
return 1; // success using local knowledge
}
diff --git a/TAO/tao/IORInterceptor/IORInterceptorC.h b/TAO/tao/IORInterceptor/IORInterceptorC.h
index fa945405ce6..45f679ca84a 100644
--- a/TAO/tao/IORInterceptor/IORInterceptorC.h
+++ b/TAO/tao/IORInterceptor/IORInterceptorC.h
@@ -33,10 +33,10 @@
#include /**/ "ace/pre.h"
+
#ifndef TAO_IORINTERCEPTOR_SAFE_INCLUDE
#error "You should not include IORInterceptorC.h directly, use IORInterceptor.h"
#endif /* !TAO_IORINTERCEPTOR_SAFE_INCLUDE */
-
#include "ace/config-all.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
diff --git a/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.cpp b/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.cpp
index ecd898772e8..833c113391a 100644
--- a/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.cpp
+++ b/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.cpp
@@ -4,7 +4,8 @@
#include "IORInfo.h"
#include "tao/debug.h"
#include "tao/ORB_Constants.h"
-#include "tao/PortableServer/POA.h"
+#include "tao/PortableServer/Root_POA.h"
+#include "tao/PortableServer/Non_Servant_Upcall.h"
ACE_RCSID (IORInterceptor,
IORInterceptor_Adapter_Impl,
@@ -83,7 +84,7 @@ TAO_IORInterceptor_Adapter_Impl::interceptor_list (void)
void
TAO_IORInterceptor_Adapter_Impl::establish_components (
- TAO_POA* poa
+ TAO_Root_POA* poa
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
@@ -100,7 +101,7 @@ TAO_IORInterceptor_Adapter_Impl::establish_components (
TAO_IORInfo (poa),
CORBA::NO_MEMORY (
CORBA::SystemException::_tao_minor_code (
- TAO_DEFAULT_MINOR_CODE,
+ TAO::VMCID,
ENOMEM),
CORBA::COMPLETED_NO));
ACE_CHECK;
@@ -109,7 +110,7 @@ TAO_IORInterceptor_Adapter_Impl::establish_components (
// Release the POA during IORInterceptor calls to avoid potential
// deadlocks.
- TAO_Object_Adapter::Non_Servant_Upcall non_servant_upcall (*poa);
+ TAO::Portable_Server::Non_Servant_Upcall non_servant_upcall (*poa);
ACE_UNUSED_ARG (non_servant_upcall);
for (size_t i = 0; i < interceptor_count; ++i)
diff --git a/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.h b/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.h
index b1781953411..4e74b79bbcb 100644
--- a/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.h
+++ b/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.h
@@ -26,7 +26,7 @@
#include "tao/IORInterceptor/IORInterceptor_List.h"
#include "tao/IORInterceptor/IORInterceptor.h"
-class TAO_POA;
+class TAO_Root_POA;
/**
* @class TAO_IORInterceptor_Adapter_Impl
@@ -53,7 +53,7 @@ public:
virtual TAO_IORInterceptor_List *interceptor_list (void)
ACE_THROW_SPEC ((CORBA::SystemException));
- virtual void establish_components (TAO_POA *poa ACE_ENV_ARG_DECL)
+ virtual void establish_components (TAO_Root_POA *poa ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException));
/// Call the IORInterceptor::components_established() method on all
diff --git a/TAO/tao/IORInterceptor/diff/IORInterceptor.diff b/TAO/tao/IORInterceptor/diff/IORInterceptor.diff
index 70ecb288508..bdf00fec00e 100644
--- a/TAO/tao/IORInterceptor/diff/IORInterceptor.diff
+++ b/TAO/tao/IORInterceptor/diff/IORInterceptor.diff
@@ -1,13 +1,5 @@
---- orig/IORInterceptorC.h 2004-11-28 16:29:19.000000000 +0000
-+++ IORInterceptorC.h 2004-11-28 17:49:39.000000000 +0000
-@@ -1,6 +1,6 @@
- // -*- C++ -*-
- //
--// $Id$
-+// $Id$
-
- // **** Code generated by the The ACE ORB (TAO) IDL Compiler ****
- // TAO and the TAO IDL Compiler have been developed by:
+--- orig/IORInterceptorC.h 2005-02-11 14:57:02.053824000 +0100
++++ IORInterceptorC.h 2005-02-11 14:57:02.734803200 +0100
@@ -34,6 +34,9 @@
#include /**/ "ace/pre.h"
@@ -18,18 +10,10 @@
#include "ace/config-all.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
---- orig/IORInterceptorC.cpp 2004-11-28 16:29:19.000000000 +0000
-+++ IORInterceptorC.cpp 2004-11-28 17:47:42.000000000 +0000
-@@ -1,6 +1,6 @@
- // -*- C++ -*-
- //
--// $Id$
-+// $Id$
-
- // **** Code generated by the The ACE ORB (TAO) IDL Compiler ****
- // TAO and the TAO IDL Compiler have been developed by:
+--- orig/IORInterceptorC.cpp 2005-02-11 14:57:02.053824000 +0100
++++ IORInterceptorC.cpp 2005-02-11 14:57:02.854976000 +0100
@@ -29,7 +29,7 @@
- // be/be_codegen.cpp:301
+ // be\be_codegen.cpp:302
-#include "IORInterceptorC.h"