summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-10-31 18:14:53 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-10-31 18:14:53 +0000
commit572eafb31c0f8833df639bb7cf4cf5eb6d4689db (patch)
tree459333aaeffce07d580e66cfefcbc6a9b550b942
parent3e371c71ede1a5de41078e6eb84aa9010d69561b (diff)
downloadATCD-572eafb31c0f8833df639bb7cf4cf5eb6d4689db.tar.gz
ChangeLogTag: Tue Oct 31 12:01:10 2000 Jeff Parsons <parsons@cs.wustl.edu>
-rw-r--r--TAO/examples/POA/DSI/Database_i.cpp2
-rw-r--r--TAO/examples/POA/DSI/Database_i.h6
-rw-r--r--TAO/examples/POA/DSI/server.dsp4
-rw-r--r--TAO/performance-tests/Cubit/TAO/DII_Cubit/client.cpp1
-rw-r--r--TAO/performance-tests/Cubit/TAO/DII_Cubit/client.dsp4
-rw-r--r--TAO/performance-tests/Latency/deferred_synch_client.dsp4
-rw-r--r--TAO/performance-tests/Latency/dii_client.cpp1
-rw-r--r--TAO/tao/DomainC.cpp1
-rw-r--r--TAO/tao/DynamicInterface/Context.cpp (renamed from TAO/tao/Context.cpp)56
-rw-r--r--TAO/tao/DynamicInterface/Context.h (renamed from TAO/tao/Context.h)82
-rw-r--r--TAO/tao/DynamicInterface/Context.inl (renamed from TAO/tao/Context.i)29
-rw-r--r--TAO/tao/DynamicInterface/DII_Invocation.cpp (renamed from TAO/tao/DII_Invocation.cpp)13
-rw-r--r--TAO/tao/DynamicInterface/DII_Invocation.h (renamed from TAO/tao/DII_Invocation.h)35
-rw-r--r--TAO/tao/DynamicInterface/DII_Invocation.inl (renamed from TAO/tao/DII_Invocation.i)0
-rw-r--r--TAO/tao/DynamicInterface/DII_Reply_Dispatcher.cpp (renamed from TAO/tao/DII_Reply_Dispatcher.cpp)43
-rw-r--r--TAO/tao/DynamicInterface/DII_Reply_Dispatcher.h (renamed from TAO/tao/DII_Reply_Dispatcher.h)20
-rw-r--r--TAO/tao/DynamicInterface/DII_Reply_Dispatcher.inl (renamed from TAO/tao/DII_Reply_Dispatcher.i)0
-rw-r--r--TAO/tao/DynamicInterface/Dynamic_Adapter_Impl.cpp198
-rw-r--r--TAO/tao/DynamicInterface/Dynamic_Adapter_Impl.h122
-rw-r--r--TAO/tao/DynamicInterface/Dynamic_Implementation.cpp137
-rw-r--r--TAO/tao/DynamicInterface/Dynamic_Implementation.h85
-rw-r--r--TAO/tao/DynamicInterface/ExceptionList.cpp119
-rw-r--r--TAO/tao/DynamicInterface/ExceptionList.h152
-rw-r--r--TAO/tao/DynamicInterface/ExceptionList.inl137
-rw-r--r--TAO/tao/DynamicInterface/Makefile59
-rw-r--r--TAO/tao/DynamicInterface/Makefile.bor31
-rw-r--r--TAO/tao/DynamicInterface/Request.cpp428
-rw-r--r--TAO/tao/DynamicInterface/Request.h (renamed from TAO/tao/Request.h)111
-rw-r--r--TAO/tao/DynamicInterface/Request.inl (renamed from TAO/tao/Request.i)26
-rw-r--r--TAO/tao/DynamicInterface/Server_Request.cpp (renamed from TAO/tao/Server_Request.cpp)46
-rw-r--r--TAO/tao/DynamicInterface/Server_Request.h (renamed from TAO/tao/Server_Request.h)30
-rw-r--r--TAO/tao/DynamicInterface/Server_Request.inl44
-rw-r--r--TAO/tao/DynamicInterface/TAO_DynamicInterface.dsp259
-rw-r--r--TAO/tao/DynamicInterface/dynamicinterface_export.h40
-rw-r--r--TAO/tao/Dynamic_Adapter.cpp150
-rw-r--r--TAO/tao/Dynamic_Adapter.h99
-rw-r--r--TAO/tao/Exception.cpp96
-rw-r--r--TAO/tao/Exception.h190
-rw-r--r--TAO/tao/Exception.i123
-rw-r--r--TAO/tao/GIOP_Message_Acceptors.cpp11
-rw-r--r--TAO/tao/InterfaceC.cpp1
-rw-r--r--TAO/tao/Invocation.cpp71
-rw-r--r--TAO/tao/Invocation.h22
-rw-r--r--TAO/tao/LocalObject.cpp3
-rw-r--r--TAO/tao/Makefile11
-rw-r--r--TAO/tao/Makefile.am17
-rw-r--r--TAO/tao/Makefile.bor8
-rw-r--r--TAO/tao/ORB.cpp53
-rw-r--r--TAO/tao/ORB.h18
-rw-r--r--TAO/tao/Object.cpp118
-rw-r--r--TAO/tao/Object.h4
-rw-r--r--TAO/tao/PolicyC.cpp1
-rw-r--r--TAO/tao/PortableServer/POA.cpp1
-rw-r--r--TAO/tao/PortableServer/POA.h1
-rw-r--r--TAO/tao/PortableServer/POA.i1
-rw-r--r--TAO/tao/PortableServer/Servant_Base.cpp128
-rw-r--r--TAO/tao/PortableServer/Servant_Base.h56
-rw-r--r--TAO/tao/PortableServer/TAO_PortableServer.dsp8
-rw-r--r--TAO/tao/Request.cpp275
-rw-r--r--TAO/tao/Server_Request.i64
-rw-r--r--TAO/tao/Stub.cpp252
-rw-r--r--TAO/tao/Stub.h142
-rw-r--r--TAO/tao/Stub.i24
-rw-r--r--TAO/tao/TAO.dsp154
-rw-r--r--TAO/tao/TAO_Server_Request.cpp18
-rw-r--r--TAO/tao/TAO_Server_Request.h6
-rw-r--r--TAO/tao/corba.h2
-rw-r--r--TAO/tao/corbafwd.cpp1
-rw-r--r--TAO/tao/operation_details.h2
-rw-r--r--TAO/tao/target_specification.h2
-rw-r--r--TAO/tests/DSI_Gateway/test_dsi.cpp1
-rw-r--r--TAO/tests/DSI_Gateway/test_dsi.h5
-rw-r--r--TAO/tests/Param_Test/client.dsp4
-rw-r--r--TAO/tests/Param_Test/helper.h1
74 files changed, 2631 insertions, 1838 deletions
diff --git a/TAO/examples/POA/DSI/Database_i.cpp b/TAO/examples/POA/DSI/Database_i.cpp
index a4d3098e332..21a620ca87e 100644
--- a/TAO/examples/POA/DSI/Database_i.cpp
+++ b/TAO/examples/POA/DSI/Database_i.cpp
@@ -1,7 +1,7 @@
// $Id$
#include "Database_i.h"
-#include "tao/Server_Request.h"
+#include "tao/DynamicInterface/Server_Request.h"
ACE_RCSID(DSI, Database_i, "$Id$")
diff --git a/TAO/examples/POA/DSI/Database_i.h b/TAO/examples/POA/DSI/Database_i.h
index d19fd6b66e5..8145242ca0c 100644
--- a/TAO/examples/POA/DSI/Database_i.h
+++ b/TAO/examples/POA/DSI/Database_i.h
@@ -1,12 +1,14 @@
// $Id$
#include "DatabaseS.h"
-#include "ace/Malloc.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
+#include "tao/DynamicInterface/Dynamic_Implementation.h"
+#include "ace/Malloc.h"
+
class DatabaseImpl
{
public:
@@ -25,7 +27,7 @@ public:
//typedef ACE_Malloc_Iterator<ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex> DATABASE_ITERATOR;
typedef ACE_Malloc_Iterator<ACE_LOCAL_MEMORY_POOL, ACE_Null_Mutex> DATABASE_ITERATOR;
- class Entry : public PortableServer::DynamicImplementation
+ class Entry : public TAO_DynamicImplementation
{
public:
Entry (CORBA::ORB_ptr orb,
diff --git a/TAO/examples/POA/DSI/server.dsp b/TAO/examples/POA/DSI/server.dsp
index 43c90b86a7d..86910bcb960 100644
--- a/TAO/examples/POA/DSI/server.dsp
+++ b/TAO/examples/POA/DSI/server.dsp
@@ -51,7 +51,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 tao.lib ace.lib TAO_PortableServer.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\tao\PortableServer" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
+# ADD LINK32 TAO_DynamicInterface.lib TAO_PortableServer.lib tao.lib ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\tao\DynamicInterface" /libpath:"..\..\..\tao\PortableServer" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "POA DSI Server - Win32 Debug"
@@ -77,7 +77,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 TAOd.lib aced.lib TAO_PortableServerd.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\tao\PortableServer" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
+# ADD LINK32 TAO_DynamicInterfaced.lib TAO_PortableServerd.lib TAOd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\tao\DynamicInterface" /libpath:"..\..\..\tao\PortableServer" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
# SUBTRACT LINK32 /pdb:none
!ENDIF
diff --git a/TAO/performance-tests/Cubit/TAO/DII_Cubit/client.cpp b/TAO/performance-tests/Cubit/TAO/DII_Cubit/client.cpp
index 06e75b14959..21df4573b40 100644
--- a/TAO/performance-tests/Cubit/TAO/DII_Cubit/client.cpp
+++ b/TAO/performance-tests/Cubit/TAO/DII_Cubit/client.cpp
@@ -19,6 +19,7 @@
// ============================================================================
#include "tao/corba.h"
+#include "tao/DynamicInterface/Request.h"
#include "ace/Profile_Timer.h"
#include "ace/Get_Opt.h"
#include "ace/Read_Buffer.h"
diff --git a/TAO/performance-tests/Cubit/TAO/DII_Cubit/client.dsp b/TAO/performance-tests/Cubit/TAO/DII_Cubit/client.dsp
index 154f6ce1b7c..274a4ec8e4e 100644
--- a/TAO/performance-tests/Cubit/TAO/DII_Cubit/client.dsp
+++ b/TAO/performance-tests/Cubit/TAO/DII_Cubit/client.dsp
@@ -51,7 +51,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 TAO.lib ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\..\tao" /libpath:"..\..\..\..\..\ace" /libpath:"..\..\..\..\orbsvcs\orbsvcs"
+# ADD LINK32 TAO_DynamicInterface.lib TAO.lib ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\..\tao\DynamicInterface" /libpath:"..\..\..\..\tao" /libpath:"..\..\..\..\..\ace" /libpath:"..\..\..\..\orbsvcs\orbsvcs"
!ELSEIF "$(CFG)" == "DII_Cubit Client - Win32 Debug"
@@ -76,7 +76,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 TAOd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /libpath:"..\..\..\..\tao" /libpath:"..\..\..\..\..\ace" /libpath:"..\..\..\..\orbsvcs\orbsvcs"
+# ADD LINK32 TAO_DynamicInterfaced.lib TAOd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /libpath:"..\..\..\..\tao\DynamicInterface" /libpath:"..\..\..\..\tao" /libpath:"..\..\..\..\..\ace" /libpath:"..\..\..\..\orbsvcs\orbsvcs"
!ENDIF
diff --git a/TAO/performance-tests/Latency/deferred_synch_client.dsp b/TAO/performance-tests/Latency/deferred_synch_client.dsp
index f1381da2e90..c728390b284 100644
--- a/TAO/performance-tests/Latency/deferred_synch_client.dsp
+++ b/TAO/performance-tests/Latency/deferred_synch_client.dsp
@@ -51,7 +51,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ace.lib TAO.lib /nologo /subsystem:console /machine:I386 /out:"deferred_synch_client.exe" /libpath:"../../../ace" /libpath:"../../tao"
+# ADD LINK32 TAO_DynamicInterface.lib TAO.lib ace.lib /nologo /subsystem:console /machine:I386 /out:"deferred_synch_client.exe" /libpath:"../../../ace" /libpath:"../../tao" /libpath:"../../tao/DynamicInterface"
!ELSEIF "$(CFG)" == "Latency Tests Deferred Synch Client - Win32 Debug"
@@ -76,7 +76,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 aced.lib TAOd.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../../../ace" /libpath:"../../tao"
+# ADD LINK32 TAO_DynamicInterfaced.lib TAOd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../../../ace" /libpath:"../../tao" /libpath:"../../tao/DynamicInterface"
!ENDIF
diff --git a/TAO/performance-tests/Latency/dii_client.cpp b/TAO/performance-tests/Latency/dii_client.cpp
index 8d9a926c63d..6312f661730 100644
--- a/TAO/performance-tests/Latency/dii_client.cpp
+++ b/TAO/performance-tests/Latency/dii_client.cpp
@@ -5,6 +5,7 @@
#include "ace/High_Res_Timer.h"
#include "ace/Sched_Params.h"
#include "testC.h"
+#include "tao/DynamicInterface/Request.h"
ACE_RCSID(Latency, dii_client, "$Id$")
diff --git a/TAO/tao/DomainC.cpp b/TAO/tao/DomainC.cpp
index 70d7c4a1432..22b19765b15 100644
--- a/TAO/tao/DomainC.cpp
+++ b/TAO/tao/DomainC.cpp
@@ -422,6 +422,7 @@ void CORBA_ConstructionPolicy::make_domain_manager (
TAO_ClientRequestInterceptor_Adapter _tao_vfr (
istub->orb_core ()->client_request_interceptors ()
);
+
CORBA_ConstructionPolicy::TAO_ClientRequest_Info_CORBA_ConstructionPolicy_make_domain_manager ri (
"make_domain_manager",
_tao_call.service_info (),
diff --git a/TAO/tao/Context.cpp b/TAO/tao/DynamicInterface/Context.cpp
index 3f5510b9ce6..342208772dd 100644
--- a/TAO/tao/Context.cpp
+++ b/TAO/tao/DynamicInterface/Context.cpp
@@ -1,8 +1,8 @@
// $Id$
-#include "tao/Context.h"
+#include "Context.h"
-#if (TAO_HAS_MINIMUM_CORBA == 0)
+ACE_RCSID(DynamicInterface, Context, "$Id$")
#include "tao/Typecode.h"
#include "tao/Environment.h"
@@ -10,7 +10,7 @@
#include "tao/ORB.h"
#if !defined (__ACE_INLINE__)
-# include "tao/Context.i"
+# include "Context.inl"
#endif /* ! __ACE_INLINE__ */
CORBA_Context::CORBA_Context (void)
@@ -25,7 +25,11 @@ CORBA_Context::~CORBA_Context (void)
CORBA::ULong
CORBA_Context::_incr_refcnt (void)
{
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, this->refcount_lock_, 0);
+ ACE_GUARD_RETURN (ACE_SYNCH_MUTEX,
+ ace_mon,
+ this->refcount_lock_,
+ 0);
+
return refcount_++;
}
@@ -33,10 +37,17 @@ CORBA::ULong
CORBA_Context::_decr_refcnt (void)
{
{
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, this->refcount_lock_, 0);
+ ACE_GUARD_RETURN (ACE_SYNCH_MUTEX,
+ ace_mon,
+ this->refcount_lock_,
+ 0);
+
this->refcount_--;
+
if (this->refcount_ != 0)
- return this->refcount_;
+ {
+ return this->refcount_;
+ }
}
delete this;
@@ -109,7 +120,9 @@ CORBA_ContextList::CORBA_ContextList (CORBA::ULong len,
: ref_count_ (1)
{
for (CORBA::ULong i=0; i < len; i++)
- this->add (ctx_list [i]);
+ {
+ this->add (ctx_list [i]);
+ }
}
CORBA_ContextList::~CORBA_ContextList (void)
@@ -119,7 +132,9 @@ CORBA_ContextList::~CORBA_ContextList (void)
char **ctx;
if (this->ctx_list_.get (ctx, i) == -1)
- return;
+ {
+ return;
+ }
CORBA::string_free (*ctx);
}
@@ -141,12 +156,17 @@ char *
CORBA_ContextList::item (CORBA::ULong slot,
CORBA::Environment &ACE_TRY_ENV)
{
- char **ctx;
- if (this->ctx_list_.get (ctx,
- slot) == -1)
- ACE_THROW_RETURN (CORBA::TypeCode::Bounds (), 0);
+ char **ctx = 0;
+
+ if (this->ctx_list_.get (ctx, slot) == -1)
+ {
+ ACE_THROW_RETURN (CORBA::TypeCode::Bounds (),
+ 0);
+ }
else
- return CORBA::string_dup (*ctx);
+ {
+ return CORBA::string_dup (*ctx);
+ }
}
void
@@ -169,7 +189,9 @@ CORBA_ContextList::_destroy (void)
CORBA::ULong current = --this->ref_count_;
if (current == 0)
- delete this;
+ {
+ delete this;
+ }
}
void
@@ -182,8 +204,10 @@ void
CORBA_ContextList::_decr_refcnt (void)
{
this->ref_count_--;
- if (this->ref_count_ != 0)
+
+ if (this->ref_count_ != 0)
+ {
delete this;
+ }
}
-#endif /* TAO_HAS_MINIMUM_CORBA */
diff --git a/TAO/tao/Context.h b/TAO/tao/DynamicInterface/Context.h
index ff8239362fb..8459eb29b4d 100644
--- a/TAO/tao/Context.h
+++ b/TAO/tao/DynamicInterface/Context.h
@@ -27,23 +27,24 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#if (TAO_HAS_MINIMUM_CORBA == 0)
+#include "dynamicinterface_export.h"
-class TAO_Export CORBA_Context
+class TAO_DynamicInterface_Export CORBA_Context
{
// = TITLE
- // CORBA_Context
+ // CORBA_Context
//
// = DESCRIPTION
- // TAO's minimal implementation of the Context interface. Since
- // Contexts are inherently un-typesafe, there use is deprecated
- // and the feature may eventaully disappear from CORBA. It is
- // implemented only to make the arg list of
- // CORBA_Object::_create_request() compliant. The only (pointer)
- // value that should be passed is 0.
+ // TAO's minimal implementation of the Context interface. Since
+ // Contexts are inherently un-typesafe, there use is deprecated
+ // and the feature may eventaully disappear from CORBA. It is
+ // implemented only to make the arg list of
+ // CORBA_Object::_create_request() compliant. The only (pointer)
+ // value that should be passed is 0.
//
public:
// = Initialization and termination methods.
+
CORBA_Context (void);
// Constructor.
@@ -108,18 +109,18 @@ private:
typedef CORBA_Context* CORBA_Context_ptr;
-class TAO_Export CORBA_Context_var
+class TAO_DynamicInterface_Export CORBA_Context_var
{
// = TITLE
- // The T_var class for Context
+ // The T_var class for Context.
//
// = DESCRIPTION
- // As any other pseudo object Context must have a T_var class,
- // the interface an semantics are specified in the CORBA spec.
+ // As any other pseudo object Context must have a T_var class,
+ // the interface an semantics are specified in the CORBA spec.
//
- // We use <CORBA_Context_ptr> as the _ptr type instead of
- // <CORBA::Context_ptr> in an attempt to reduced the cyclic
- // dependencies in TAO.
+ // We use <CORBA_Context_ptr> as the _ptr type instead of
+ // <CORBA::Context_ptr> in an attempt to reduced the cyclic
+ // dependencies in TAO.
public:
CORBA_Context_var (void);
CORBA_Context_var (CORBA_Context_ptr);
@@ -143,18 +144,18 @@ private:
CORBA_Context_ptr ptr_;
};
-class TAO_Export CORBA_Context_out
+class TAO_DynamicInterface_Export CORBA_Context_out
{
// = TITLE
- // The T_out class for Context
+ // The T_out class for Context
//
// = DESCRIPTION
- // As any other pseudo object Context must have a T_out class,
- // the interface an semantics are specified in the CORBA spec.
+ // As any other pseudo object Context must have a T_out class,
+ // the interface an semantics are specified in the CORBA spec.
//
- // We use <CORBA_Context_ptr> as the _ptr type instead of
- // <CORBA::Context_ptr> in an attempt to reduced the cyclic
- // dependencies in TAO.
+ // We use <CORBA_Context_ptr> as the _ptr type instead of
+ // <CORBA::Context_ptr> in an attempt to reduced the cyclic
+ // dependencies in TAO.
public:
CORBA_Context_out (CORBA_Context_ptr &);
CORBA_Context_out (CORBA_Context_var &);
@@ -170,13 +171,13 @@ private:
CORBA_Context_ptr &ptr_;
};
-class CORBA_ContextList
+class TAO_DynamicInterface_Export CORBA_ContextList
{
// = TITLE
- // ContextList definition taken from CORBA v2.3a Dec 1998
+ // ContextList definition taken from CORBA v2.3a Dec 1998
//
// = DESCRIPTION
- // Maintains a list of strings for Contexts.
+ // Maintains a list of strings for Contexts.
public:
CORBA_ContextList (void);
// Constructor.
@@ -187,10 +188,10 @@ public:
// strings.
~CORBA_ContextList (void);
- // destructor
+ // Destructor.
- CORBA::ULong count ();
- // return the number of elements
+ CORBA::ULong count (void);
+ // Return the number of elements.
CORBA_ContextList_ptr _duplicate (void);
// Increment the reference count.
@@ -218,11 +219,11 @@ public:
void remove (CORBA::ULong slot,
CORBA_Environment &ACE_TRY_ENV =
TAO_default_environment ());
- // remove the typecode at slot i. Raises the "Bounds" exception
+ // Remove the typecode at slot i. Raises the "Bounds" exception.
void _incr_refcnt (void);
void _decr_refcnt (void);
- // Increment and decrement ref counts
+ // Increment and decrement ref counts.
#if !defined(__GNUC__) || __GNUC__ > 2 || __GNUC_MINOR__ >= 8
typedef CORBA::ContextList_ptr _ptr_type;
@@ -242,7 +243,7 @@ private:
// Internal list of typecodes.
};
-class TAO_Export CORBA_ContextList_var
+class TAO_DynamicInterface_Export CORBA_ContextList_var
{
public:
CORBA_ContextList_var (void); // default constructor
@@ -267,19 +268,19 @@ private:
CORBA_ContextList_ptr ptr_;
};
-class TAO_Export CORBA_ContextList_out
+class TAO_DynamicInterface_Export CORBA_ContextList_out
{
// = TITLE
- // The T_out class for ContextList
+ // The T_out class for ContextList
//
// = DESCRIPTION
- // As any other pseudo object ContextList must have a T_out class,
- // the interface an semantics are specified in the CORBA spec.
+ // As any other pseudo object ContextList must have a T_out class,
+ // the interface an semantics are specified in the CORBA spec.
//
// = NOTE
- // We use CORBA_ContextList_ptr as the _ptr type instead of
- // CORBA::ContextList_ptr, this is an attempt to reduced the cyclic
- // dependencies in TAO.
+ // We use CORBA_ContextList_ptr as the _ptr type instead of
+ // CORBA::ContextList_ptr, this is an attempt to reduced the cyclic
+ // dependencies in TAO.
//
public:
CORBA_ContextList_out (CORBA_ContextList_ptr &);
@@ -297,9 +298,8 @@ private:
};
#if defined (__ACE_INLINE__)
-# include "tao/Context.i"
+# include "Context.inl"
#endif /* __ACE_INLINE__ */
-#endif /* TAO_HAS_MINIMUM_CORBA */
#include "ace/post.h"
#endif /* TAO_CONTEXT_H */
diff --git a/TAO/tao/Context.i b/TAO/tao/DynamicInterface/Context.inl
index 63fd1441608..da06529d929 100644
--- a/TAO/tao/Context.i
+++ b/TAO/tao/DynamicInterface/Context.inl
@@ -2,34 +2,21 @@
// This may look like C, but it's really -*- C++ -*-
-// These should never be non-NULL, but the method
-// is required of pseudo objects.
-
-ACE_INLINE CORBA::Boolean
-CORBA::is_nil (CORBA::Context_ptr ctx)
-{
- return ctx == 0;
-}
-
-ACE_INLINE void
-CORBA::release (CORBA::Context_ptr ctx)
-{
- if (ctx)
- ctx->_decr_refcnt ();
-}
-
-ACE_INLINE CORBA_Context*
-CORBA_Context::_duplicate (CORBA_Context* x)
+ACE_INLINE CORBA_Context_ptr
+CORBA_Context::_duplicate (CORBA_Context_ptr x)
{
if (x != 0)
- x->_incr_refcnt ();
+ {
+ x->_incr_refcnt ();
+ }
+
return x;
}
-ACE_INLINE CORBA_Context*
+ACE_INLINE CORBA_Context_ptr
CORBA_Context::_nil (void)
{
- return (CORBA::Context*)0;
+ return (CORBA_Context_ptr)0;
}
// *************************************************************
diff --git a/TAO/tao/DII_Invocation.cpp b/TAO/tao/DynamicInterface/DII_Invocation.cpp
index f6a480f27b0..a1d7a4075f9 100644
--- a/TAO/tao/DII_Invocation.cpp
+++ b/TAO/tao/DynamicInterface/DII_Invocation.cpp
@@ -1,11 +1,9 @@
// $Id$
-#include "tao/DII_Invocation.h"
+#include "DII_Invocation.h"
-ACE_RCSID(tao, DII_Invocation, "$Id$")
-
-#if (TAO_HAS_MINIMUM_CORBA == 0)
+ACE_RCSID(DynamicInterface, DII_Invocation, "$Id$")
#include "tao/Stub.h"
#include "tao/Principal.h"
@@ -14,7 +12,7 @@ ACE_RCSID(tao, DII_Invocation, "$Id$")
#include "tao/debug.h"
#if !defined (__ACE_INLINE__)
-# include "tao/DII_Invocation.i"
+# include "DII_Invocation.inl"
#endif /* ! __ACE_INLINE__ */
@@ -66,7 +64,9 @@ TAO_GIOP_DII_Deferred_Invocation::invoke_i (CORBA::Environment &ACE_TRY_ENV)
ACE_CHECK_RETURN (retval);
if (retval != TAO_INVOKE_OK)
- return retval;
+ {
+ return retval;
+ }
// Everything executed ok; lets remember the transport for later.
this->rd_->transport (this->transport_);
@@ -75,4 +75,3 @@ TAO_GIOP_DII_Deferred_Invocation::invoke_i (CORBA::Environment &ACE_TRY_ENV)
return TAO_INVOKE_OK;
}
-#endif /* TAO_HAS_MINIMUM_CORBA */
diff --git a/TAO/tao/DII_Invocation.h b/TAO/tao/DynamicInterface/DII_Invocation.h
index e7b89201025..3c5d2439c12 100644
--- a/TAO/tao/DII_Invocation.h
+++ b/TAO/tao/DynamicInterface/DII_Invocation.h
@@ -5,14 +5,14 @@
// ============================================================================
//
// = LIBRARY
-// TAO
+// DynamicInterface
//
// = DESCRIPTION
-// Encapsulate the logic for remote Asynchronous Invocations.
+// The DII invocation classes.
//
// = AUTHOR
-// Carlos O'Ryan <coryan@cs.wustl.edu> and Alexander Babu Arulanthu
-// <alex@cs.wustl.edu>
+// Carlos O'Ryan <coryan@cs.wustl.edu> and Alexander Babu Arulanthu
+// <alex@cs.wustl.edu>
//
// ============================================================================
@@ -26,20 +26,19 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#if (TAO_HAS_MINIMUM_CORBA == 0)
+#include "DII_Reply_Dispatcher.h"
+#include "Request.h"
-#include "tao/DII_Reply_Dispatcher.h"
-#include "tao/Request.h"
-
-class TAO_Export TAO_GIOP_DII_Deferred_Invocation : public TAO_GIOP_Invocation
+class TAO_DynamicInterface_Export TAO_GIOP_DII_Deferred_Invocation
+ : public TAO_GIOP_Invocation
{
// = TITLE
- // Sends a two-way request does not expect the reply.
+ // Sends a two-way request does not expect the reply.
//
// = DESCRIPTION
- // This class connects (or lookups a connection from the cache) to
- // the remote server, builds the CDR stream for the Request, send
- // the CDR stream and returns.
+ // This class connects (or lookups a connection from the cache) to
+ // the remote server, builds the CDR stream for the Request, send
+ // the CDR stream and returns.
//
public:
TAO_GIOP_DII_Deferred_Invocation (TAO_Stub *data,
@@ -58,11 +57,6 @@ public:
// Send request, block until any reply comes back, and unmarshal
// reply parameters as appropriate.
-
- // TAO_InputCDR &inp_stream (void);
- // // Return the underlying input stream.
- //
-
const IOP::ServiceContextList& reply_service_info (void) const;
// Accessor to the reply ServiceContextList.
@@ -72,16 +66,13 @@ private:
// Implementation of the invoke() methods, handles the basic
// send/reply code and the system exceptions.
-private:
TAO_DII_Deferred_Reply_Dispatcher *rd_;
// Reply dispatcher for the current synchronous Asynch_Invocation.
};
#if defined (__ACE_INLINE__)
-# include "tao/DII_Invocation.i"
+# include "tao/DII_Invocation.inl"
#endif /* __ACE_INLINE__ */
-#endif /* TAO_HAS_MINIMUM_CORBA */
-
#include "ace/post.h"
#endif /* TAO_ASYNCH_INVOCATION_H */
diff --git a/TAO/tao/DII_Invocation.i b/TAO/tao/DynamicInterface/DII_Invocation.inl
index 70a21a36a73..70a21a36a73 100644
--- a/TAO/tao/DII_Invocation.i
+++ b/TAO/tao/DynamicInterface/DII_Invocation.inl
diff --git a/TAO/tao/DII_Reply_Dispatcher.cpp b/TAO/tao/DynamicInterface/DII_Reply_Dispatcher.cpp
index bd09d4e74b0..ff257fa4ea9 100644
--- a/TAO/tao/DII_Reply_Dispatcher.cpp
+++ b/TAO/tao/DynamicInterface/DII_Reply_Dispatcher.cpp
@@ -1,20 +1,18 @@
// $Id$
-#include "tao/DII_Reply_Dispatcher.h"
+#include "DII_Reply_Dispatcher.h"
-ACE_RCSID(tao, DII_Reply_Dispatcher, "$Id$")
-
-#if (TAO_HAS_MINIMUM_CORBA == 0)
+ACE_RCSID(DynamicInterface, DII_Reply_Dispatcher, "$Id$")
+#include "Request.h"
#include "tao/Pluggable.h"
#include "tao/Environment.h"
#include "tao/GIOP_Message_State.h"
-#include "tao/Request.h"
#include "tao/debug.h"
#if !defined (__ACE_INLINE__)
-#include "tao/DII_Reply_Dispatcher.i"
+#include "DII_Reply_Dispatcher.inl"
#endif /* __ACE_INLINE__ */
// Constructor.
@@ -28,20 +26,21 @@ TAO_DII_Deferred_Reply_Dispatcher::TAO_DII_Deferred_Reply_Dispatcher (const CORB
TAO_DII_Deferred_Reply_Dispatcher::~TAO_DII_Deferred_Reply_Dispatcher (void)
{
if (this->transport_ != 0)
- this->transport_->idle_after_reply ();
+ {
+ this->transport_->idle_after_reply ();
+ }
}
// Dispatch the reply.
int
TAO_DII_Deferred_Reply_Dispatcher::dispatch_reply (
CORBA::ULong reply_status,
- const TAO_GIOP_Version & /*version*/,
+ const TAO_GIOP_Version & /* version */,
IOP::ServiceContextList &reply_ctx,
TAO_GIOP_Message_State *message_state
)
{
this->reply_status_ = reply_status;
- //this->version_ = version;
this->message_state_ = message_state;
// Steal the buffer, that way we don't do any unnecesary copies of
@@ -51,7 +50,6 @@ TAO_DII_Deferred_Reply_Dispatcher::dispatch_reply (
IOP::ServiceContext* context_list = reply_ctx.get_buffer (1);
this->reply_service_info_.replace (max, len, context_list, 1);
-
if (TAO_debug_level >= 4)
{
ACE_DEBUG ((LM_DEBUG,
@@ -69,8 +67,10 @@ TAO_DII_Deferred_Reply_Dispatcher::dispatch_reply (
ACE_CATCHANY
{
if (TAO_debug_level >= 4)
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception during reply handler");
+ {
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "Exception during reply handler");
+ }
}
ACE_ENDTRY;
@@ -98,10 +98,15 @@ TAO_DII_Deferred_Reply_Dispatcher::connection_closed (void)
ACE_TRY_NEW_ENV
{
// Generate a fake exception....
- CORBA::COMM_FAILURE comm_failure (0, CORBA::COMPLETED_MAYBE);
+ CORBA::COMM_FAILURE comm_failure (0,
+ CORBA::COMPLETED_MAYBE);
+
TAO_OutputCDR out_cdr;
- comm_failure._tao_encode (out_cdr, ACE_TRY_ENV);
+
+ comm_failure._tao_encode (out_cdr,
+ ACE_TRY_ENV);
ACE_TRY_CHECK;
+
// Turn into an output CDR
TAO_InputCDR cdr (out_cdr);
@@ -113,11 +118,13 @@ TAO_DII_Deferred_Reply_Dispatcher::connection_closed (void)
ACE_CATCHANY
{
if (TAO_debug_level >= 4)
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "DII_Deferred_Reply_Dispacher::connection_closed");
-
+ {
+ ACE_PRINT_EXCEPTION (
+ ACE_ANY_EXCEPTION,
+ "DII_Deferred_Reply_Dispacher::connection_closed"
+ );
+ }
}
ACE_ENDTRY;
}
-#endif /* TAO_HAS_MINIMUM_CORBA */
diff --git a/TAO/tao/DII_Reply_Dispatcher.h b/TAO/tao/DynamicInterface/DII_Reply_Dispatcher.h
index a8ccb46e4fd..44854fa79aa 100644
--- a/TAO/tao/DII_Reply_Dispatcher.h
+++ b/TAO/tao/DynamicInterface/DII_Reply_Dispatcher.h
@@ -25,19 +25,18 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#if (TAO_HAS_MINIMUM_CORBA == 0)
-
+#include "dynamicinterface_export.h"
#include "tao/Reply_Dispatcher.h"
-class TAO_Export TAO_DII_Deferred_Reply_Dispatcher : public TAO_Reply_Dispatcher
+class TAO_DynamicInterface_Export TAO_DII_Deferred_Reply_Dispatcher
+ : public TAO_Reply_Dispatcher
{
// = TITLE
- //
- // Reply dispatcher for DII deferred requests.
+ // TAO_DII_Deferred_Reply_Dispatcher
//
// = DESCRIPTION
+ // Reply dispatcher for DII deferred requests.
//
-
public:
TAO_DII_Deferred_Reply_Dispatcher (const CORBA::Request_ptr req);
// Constructor.
@@ -75,9 +74,6 @@ private:
CORBA::ULong reply_status_;
// Reply or LocateReply status.
- //TAO_GIOP_Version version_;
- // The version
-
TAO_GIOP_Message_State *message_state_;
// CDR stream for reading the input.
// @@ Carlos : message_state should go away. All we need is the reply
@@ -90,12 +86,8 @@ private:
// This invocation is using this transport, may change...
};
-#endif /* TAO_HAS_MINIMUM_CORBA */
-
-// *********************************************************************
-
#if defined (__ACE_INLINE__)
-#include "tao/DII_Reply_Dispatcher.i"
+#include "tao/DII_Reply_Dispatcher.inl"
#endif /* __ACE_INLINE__ */
#include "ace/post.h"
diff --git a/TAO/tao/DII_Reply_Dispatcher.i b/TAO/tao/DynamicInterface/DII_Reply_Dispatcher.inl
index d1b661944c4..d1b661944c4 100644
--- a/TAO/tao/DII_Reply_Dispatcher.i
+++ b/TAO/tao/DynamicInterface/DII_Reply_Dispatcher.inl
diff --git a/TAO/tao/DynamicInterface/Dynamic_Adapter_Impl.cpp b/TAO/tao/DynamicInterface/Dynamic_Adapter_Impl.cpp
new file mode 100644
index 00000000000..5e87524c347
--- /dev/null
+++ b/TAO/tao/DynamicInterface/Dynamic_Adapter_Impl.cpp
@@ -0,0 +1,198 @@
+// $Id$
+
+#include "Dynamic_Adapter_Impl.h"
+#include "Request.h"
+#include "Server_Request.h"
+#include "tao/Invocation.h"
+
+ACE_RCSID(DynamicInterface, TAO_Dynamic_Adapter_Impl, "$Id$")
+
+TAO_Dynamic_Adapter_Impl::TAO_Dynamic_Adapter_Impl (void)
+{
+}
+
+TAO_Dynamic_Adapter_Impl::~TAO_Dynamic_Adapter_Impl (void)
+{
+}
+
+void
+TAO_Dynamic_Adapter_Impl::create_request (
+ CORBA::Object_ptr obj,
+ CORBA::ORB_ptr orb,
+ const char *operation,
+ CORBA::NVList_ptr arg_list,
+ CORBA::NamedValue_ptr result,
+ CORBA::ExceptionList_ptr exceptions,
+ CORBA::Request_ptr &request,
+ CORBA::Flags req_flags,
+ CORBA_Environment &ACE_TRY_ENV
+ )
+{
+ ACE_NEW_THROW_EX (request,
+ CORBA::Request (obj,
+ orb,
+ operation,
+ arg_list,
+ result,
+ req_flags,
+ exceptions,
+ ACE_TRY_ENV),
+ CORBA::NO_MEMORY (
+ CORBA_SystemException::_tao_minor_code (
+ TAO_DEFAULT_MINOR_CODE,
+ ENOMEM
+ ),
+ CORBA::COMPLETED_MAYBE
+ ));
+}
+
+CORBA::Request_ptr
+TAO_Dynamic_Adapter_Impl::request (CORBA::Object_ptr obj,
+ CORBA::ORB_ptr orb,
+ const char *operation,
+ CORBA::Environment &ACE_TRY_ENV)
+{
+ CORBA::Request_ptr req = CORBA::Request::_nil ();
+ ACE_NEW_THROW_EX (req,
+ CORBA::Request (obj,
+ orb,
+ operation,
+ ACE_TRY_ENV),
+ CORBA::NO_MEMORY (
+ CORBA_SystemException::_tao_minor_code (
+ TAO_DEFAULT_MINOR_CODE,
+ ENOMEM
+ ),
+ CORBA::COMPLETED_MAYBE
+ ));
+ ACE_CHECK_RETURN (CORBA::Request::_nil ());
+
+ return req;
+}
+
+CORBA::Boolean
+TAO_Dynamic_Adapter_Impl::context_is_nil (CORBA::Context_ptr ctx)
+{
+ return ctx == 0;
+}
+
+void
+TAO_Dynamic_Adapter_Impl::context_release (CORBA::Context_ptr ctx)
+{
+ if (ctx != 0)
+ {
+ ctx->_decr_refcnt ();
+ }
+}
+
+CORBA::Boolean
+TAO_Dynamic_Adapter_Impl::request_is_nil (CORBA::Request_ptr req)
+{
+ return req == 0;
+}
+
+void
+TAO_Dynamic_Adapter_Impl::request_release (CORBA::Request_ptr req)
+{
+ if (req != 0)
+ {
+ req->_decr_refcnt ();
+ }
+}
+
+CORBA::Boolean
+TAO_Dynamic_Adapter_Impl::server_request_is_nil (CORBA::ServerRequest_ptr req)
+{
+ return req == 0;
+}
+
+void
+TAO_Dynamic_Adapter_Impl::server_request_release (CORBA::ServerRequest_ptr req)
+{
+ if (req != 0)
+ {
+ req->_decr_refcnt ();
+ }
+}
+
+void
+TAO_Dynamic_Adapter_Impl::create_exception_list (
+ CORBA::ExceptionList_ptr &list,
+ CORBA_Environment &ACE_TRY_ENV
+ )
+{
+ ACE_NEW_THROW_EX (list,
+ CORBA::ExceptionList,
+ CORBA::NO_MEMORY (
+ CORBA_SystemException::_tao_minor_code (
+ TAO_DEFAULT_MINOR_CODE,
+ ENOMEM
+ ),
+ CORBA::COMPLETED_NO
+ ));
+}
+
+CORBA::Exception *
+TAO_Dynamic_Adapter_Impl::decode_user_exception (
+ CORBA::ExceptionList_ptr exceptions,
+ TAO_GIOP_Twoway_Invocation *invocation,
+ const char *buf,
+ CORBA::Environment &ACE_TRY_ENV
+ )
+{
+ for (CORBA::ULong i = 0;
+ exceptions != 0 && i < exceptions->count ();
+ i++)
+ {
+ CORBA::TypeCode_ptr tcp = exceptions->item (i,
+ ACE_TRY_ENV);
+ ACE_CHECK_RETURN (0);
+
+ const char *xid = tcp->id (ACE_TRY_ENV);
+ ACE_CHECK_RETURN (0);
+
+ if (ACE_OS::strcmp (buf, xid) != 0)
+ {
+ continue;
+ }
+
+ const ACE_Message_Block *cdr = invocation->inp_stream ().start ();
+
+ CORBA_Any any (tcp,
+ 0,
+ invocation->inp_stream ().byte_order (),
+ cdr);
+
+ CORBA_Exception *exception = 0;
+
+ ACE_NEW_RETURN (exception,
+ CORBA_UnknownUserException (any),
+ 0);
+
+ return exception;
+ }
+
+ return 0;
+}
+
+int
+TAO_Dynamic_Adapter_Impl::Initializer (void)
+{
+ ACE_Service_Config::static_svcs ()->insert (
+ &ace_svc_desc_TAO_Dynamic_Adapter_Impl
+ );
+
+ return 0;
+}
+
+ACE_STATIC_SVC_DEFINE (
+ TAO_Dynamic_Adapter_Impl,
+ ACE_TEXT ("Dynamic_Adapter"),
+ ACE_SVC_OBJ_T,
+ &ACE_SVC_NAME (TAO_Dynamic_Adapter_Impl),
+ ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ,
+ 0
+ )
+
+ACE_FACTORY_DEFINE (TAO_DynamicInterface, TAO_Dynamic_Adapter_Impl)
+
diff --git a/TAO/tao/DynamicInterface/Dynamic_Adapter_Impl.h b/TAO/tao/DynamicInterface/Dynamic_Adapter_Impl.h
new file mode 100644
index 00000000000..4503c0204e8
--- /dev/null
+++ b/TAO/tao/DynamicInterface/Dynamic_Adapter_Impl.h
@@ -0,0 +1,122 @@
+// This may look like C, but it's really -*- C++ -*-
+// $Id$
+
+// ============================================================================
+//
+// = LIBRARY
+// DynamicInterface
+//
+// = FILENAME
+// Dynamic_Adapter_Impl.h
+//
+// = DESCRIPTION
+// Header file for class TAO_Dynamic_Adapter_Impl.
+//
+// = AUTHOR
+// Jeff Parsons <parsons@cs.wustl.edu>
+//
+// ============================================================================
+
+#ifndef TAO_DYNAMIC_ADAPTER_IMPL_H
+#define TAO_DYNAMIC_ADAPTER_IMPL_H
+#include "ace/pre.h"
+
+#include "dynamicinterface_export.h"
+#include "tao/Dynamic_Adapter.h"
+#include "ace/Service_Config.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+class TAO_DynamicInterface_Export TAO_Dynamic_Adapter_Impl
+ : public TAO_Dynamic_Adapter
+{
+ // = TITLE
+ // TAO_Dynamic_Adapter_Impl.
+ //
+ // = DESCRIPTION
+ // Concrete subclass of TAO_Dynamic_Adapter
+ // in the TAO library. This class helps implement various
+ // functions in the CORBA namespace relating to DII/DSI
+ // invocations.
+ //
+public:
+ TAO_Dynamic_Adapter_Impl (void);
+ virtual ~TAO_Dynamic_Adapter_Impl (void);
+
+ // CORBA::Object::_create_request and CORBA::Object::_request.
+
+ virtual void create_request (CORBA::Object_ptr obj,
+ CORBA::ORB_ptr orb,
+ const char *operation,
+ CORBA::NVList_ptr arg_list,
+ CORBA::NamedValue_ptr result,
+ CORBA::ExceptionList_ptr exceptions,
+ CORBA::Request_ptr &request,
+ CORBA::Flags req_flags,
+ CORBA_Environment &ACE_TRY_ENV =
+ TAO_default_environment ());
+
+ virtual CORBA::Request_ptr request (CORBA::Object_ptr obj,
+ CORBA::ORB_ptr orb,
+ const char *op,
+ CORBA::Environment &ACE_TRY_ENV =
+ TAO_default_environment ());
+
+ // CORBA::is_nil and CORBA::release for Context, Request, and ServerRequest.
+
+ virtual CORBA::Boolean context_is_nil (CORBA::Context_ptr ctx);
+
+ virtual CORBA::Boolean request_is_nil (CORBA::Request_ptr req);
+
+ virtual CORBA::Boolean server_request_is_nil (CORBA::ServerRequest_ptr req);
+
+ virtual void context_release (CORBA::Context_ptr ctx);
+
+ virtual void request_release (CORBA::Request_ptr req);
+
+ virtual void server_request_release (CORBA::ServerRequest_ptr req);
+
+ // CORBA::ORB::create_exception_list.
+
+ virtual void create_exception_list (CORBA::ExceptionList_ptr &list,
+ CORBA_Environment &ACE_TRY_ENV =
+ TAO_default_environment ());
+
+ // Decoding the user exception in the DII version of
+ // TAO_GIOP_Twoway_Invocation::invoke().
+
+ virtual CORBA::Exception *decode_user_exception (
+ CORBA::ExceptionList_ptr exceptions,
+ TAO_GIOP_Twoway_Invocation *invocation,
+ const char *buf,
+ CORBA::Environment &ACE_TRY_ENV =
+ TAO_default_environment ()
+ );
+
+ // Used to force the initialization of the ORB code.
+ static int Initializer (void);
+};
+
+ACE_STATIC_SVC_DECLARE (TAO_Dynamic_Adapter_Impl)
+ACE_FACTORY_DECLARE (TAO_DynamicInterface, TAO_Dynamic_Adapter_Impl)
+
+#if defined(ACE_HAS_BROKEN_STATIC_CONSTRUCTORS)
+
+typedef int (*TAO_Module_Initializer) (void);
+
+static TAO_Module_Initializer
+TAO_Requires_Request_Factory_Initializer =
+ &TAO_Dynamic_Adapter_Impl::Initializer;
+
+#else
+
+static int
+TAO_Requires_Request_Factory_Initializer =
+ TAO_Dynamic_Adapter_Impl::Initializer ();
+
+#endif /* ACE_HAS_BROKEN_STATIC_CONSTRUCTORS */
+
+#include "ace/post.h"
+#endif /* TAO_DYNAMIC_ADAPTER_IMPL_H */
diff --git a/TAO/tao/DynamicInterface/Dynamic_Implementation.cpp b/TAO/tao/DynamicInterface/Dynamic_Implementation.cpp
new file mode 100644
index 00000000000..83c8003d8ab
--- /dev/null
+++ b/TAO/tao/DynamicInterface/Dynamic_Implementation.cpp
@@ -0,0 +1,137 @@
+// $Id$
+
+#include "Dynamic_Implementation.h"
+#include "Server_Request.h"
+#include "tao/ORB_Core.h"
+#include "tao/PortableServer/POA.h"
+#include "tao/PortableServer/Collocated_Object.h"
+
+ACE_RCSID(DynamicInterface, Dynamic_Implementation, "$Id$")
+
+CORBA::Object_ptr
+TAO_DynamicImplementation::_this (CORBA::Environment &ACE_TRY_ENV)
+{
+ // The _this() function returns a CORBA::Object_ptr for the target
+ // object. Unlike _this() for static skeletons, its return type is
+ // not interface-specific because a DSI servant may very well
+ // incarnate multiple CORBA objects of different types.
+ TAO_Stub *stub = this->_create_stub (ACE_TRY_ENV);
+ ACE_CHECK_RETURN (CORBA::Object::_nil ());
+
+ // Create a object.
+ TAO_Collocated_Object *retval = 0;
+ ACE_NEW_RETURN (retval,
+ TAO_Collocated_Object (stub,
+ 1,
+ this),
+ CORBA::Object::_nil ());
+
+ return retval;
+}
+
+const char *
+TAO_DynamicImplementation::_interface_repository_id (void) const
+{
+ // This should never be called.
+ return 0;
+}
+
+void *
+TAO_DynamicImplementation::_downcast (const char *repository_id)
+{
+ ACE_UNUSED_ARG (repository_id);
+
+ // Don't know enough to do better.
+ return this;
+}
+
+TAO_Stub *
+TAO_DynamicImplementation::_create_stub (CORBA::Environment &ACE_TRY_ENV)
+{
+ // If DynamicImplementation::_this() is invoked outside of the
+ // context of a request invocation on a target object being served
+ // by the DSI servant, it raises the PortableServer::WrongPolicy
+ // exception.
+ TAO_POA_Current_Impl *poa_current_impl =
+ ACE_static_cast(TAO_POA_Current_Impl *,
+ TAO_TSS_RESOURCES::instance ()->poa_current_impl_);
+
+ if (poa_current_impl == 0
+ || this != poa_current_impl->servant ())
+ {
+ ACE_THROW_RETURN (PortableServer::POA::WrongPolicy (),
+ 0);
+ }
+
+ PortableServer::POA_var poa = poa_current_impl->get_POA (ACE_TRY_ENV);
+ ACE_CHECK_RETURN (0);
+
+ CORBA::RepositoryId interface =
+ this->_primary_interface (poa_current_impl->object_id (),
+ poa.in (),
+ ACE_TRY_ENV);
+ ACE_CHECK_RETURN (0);
+
+ CORBA::PolicyList_var client_exposed_policies =
+ poa_current_impl->poa ()->client_exposed_policies (
+ poa_current_impl->priority (),
+ ACE_TRY_ENV
+ );
+ ACE_CHECK_RETURN (0);
+
+ // @@ PPOA
+ // @@ return orb->create_stub_object (
+ // @@ client_exposed_policies._retn (),
+ // @@ poa_current_impl->poa (),
+ // @@ ACE_TRY_ENV);
+ return poa_current_impl->poa ()->key_to_stub (
+ poa_current_impl->object_key (),
+ interface,
+ poa_current_impl->priority (),
+ ACE_TRY_ENV
+ );
+}
+
+void
+TAO_DynamicImplementation::_dispatch (TAO_ServerRequest &request,
+ void *context,
+ CORBA::Environment &ACE_TRY_ENV)
+{
+ ACE_UNUSED_ARG (context);
+
+ // Create DSI request object.
+ CORBA::ServerRequest *dsi_request = 0;
+ ACE_NEW (dsi_request,
+ CORBA::ServerRequest (request));
+
+ // Delegate to user.
+ this->invoke (dsi_request,
+ ACE_TRY_ENV);
+ ACE_CHECK;
+
+ if (request.response_expected ())
+ {
+ request.init_reply (ACE_TRY_ENV);
+ ACE_CHECK;
+
+ dsi_request->dsi_marshal (ACE_TRY_ENV);
+ ACE_CHECK;
+ }
+
+ ACE_TRY
+ {
+ if ((!request.sync_with_server () && request.response_expected ()))
+ {
+ request.tao_send_reply ();
+ ACE_TRY_CHECK;
+ }
+ }
+ ACE_CATCH(CORBA::Exception,ex)
+ {
+ request.tao_send_reply_exception(ex);
+ }
+ ACE_ENDTRY;
+
+ CORBA::release (dsi_request);
+}
+
diff --git a/TAO/tao/DynamicInterface/Dynamic_Implementation.h b/TAO/tao/DynamicInterface/Dynamic_Implementation.h
new file mode 100644
index 00000000000..810245bbbd5
--- /dev/null
+++ b/TAO/tao/DynamicInterface/Dynamic_Implementation.h
@@ -0,0 +1,85 @@
+// This may look like C, but it's really -*- C++ -*-
+// $Id$
+
+// ============================================================================
+//
+// = LIBRARY
+// DynamicInterface
+//
+// = FILENAME
+// Dynamic_Implementation.h
+//
+// = DESCRIPTION
+// Header file for class TAO_DynamicImplementation.
+//
+// = AUTHOR
+// Irfan Pyarali <irfan@cs.wustl.edu>
+//
+// ============================================================================
+
+#ifndef TAO_DYNAMIC_IMPLEMENTATION_H
+#define TAO_DYNAMIC_IMPLEMENTATION_H
+#include "ace/pre.h"
+
+#include "tao/PortableServer/Servant_Base.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "dynamicinterface_export.h"
+
+class TAO_DynamicInterface_Export TAO_DynamicImplementation
+ : public virtual TAO_ServantBase
+{
+ // = TITLE
+ // Base class for DSI.
+ //
+ // = DESCRIPTION
+ // It is expected that the <invoke> and <_primary_interface>
+ // methods will be only invoked by the POA in the context of
+ // serving a CORBA request. Invoking this method in other
+ // circumstances may lead to unpredictable results.
+public:
+ virtual void invoke (CORBA::ServerRequest_ptr request,
+ CORBA_Environment &ACE_TRY_ENV =
+ TAO_default_environment ()) = 0;
+ // The invoke() method receives requests issued to any CORBA object
+ // incarnated by the DSI servant and performs the processing
+ // necessary to execute the request.
+
+ virtual CORBA::RepositoryId _primary_interface (
+ const PortableServer::ObjectId &oid,
+ PortableServer::POA_ptr poa,
+ CORBA_Environment &ACE_TRY_ENV =
+ TAO_default_environment ()
+ ) = 0;
+ // The _primary_interface() method receives an ObjectId value and a
+ // POA_ptr as input parameters and returns a valid RepositoryId
+ // representing the most-derived interface for that oid.
+
+ CORBA::Object_ptr _this (CORBA_Environment &ACE_TRY_ENV =
+ TAO_default_environment ());
+ // Returns a CORBA::Object_ptr for the target object.
+
+protected:
+
+ virtual const char *_interface_repository_id (void) const;
+ // Return 0. Should never be used.
+
+ virtual void *_downcast (const char *repository_id);
+ // Simply returns "this"
+
+ virtual TAO_Stub *_create_stub (CORBA_Environment &ACE_TRY_ENV =
+ TAO_default_environment ());
+ // This is an auxiliary method for _this() and _narrow().
+
+ virtual void _dispatch (TAO_ServerRequest &request,
+ void *context,
+ CORBA_Environment &ACE_TRY_ENV =
+ TAO_default_environment ());
+ // Turns around and calls invoke.
+};
+
+#include "ace/post.h"
+#endif /* TAO_DYNAMIC_IMPLEMENTATION_H */
diff --git a/TAO/tao/DynamicInterface/ExceptionList.cpp b/TAO/tao/DynamicInterface/ExceptionList.cpp
new file mode 100644
index 00000000000..dfe4bace7a4
--- /dev/null
+++ b/TAO/tao/DynamicInterface/ExceptionList.cpp
@@ -0,0 +1,119 @@
+// $Id$
+
+#include "ExceptionList.h"
+#include "tao/Typecode.h"
+#include "tao/Environment.h"
+
+#if !defined (__ACE_INLINE__)
+# include "ExceptionList.inl"
+#endif /* __ACE_INLINE__ */
+
+ACE_RCSID(DynamicInterface, ExceptionList, "$Id$")
+
+CORBA_ExceptionList::CORBA_ExceptionList (CORBA::ULong len,
+ CORBA::TypeCode_ptr *tc_list)
+ : ref_count_ (1)
+{
+ for (CORBA::ULong i = 0; i < len; ++i)
+ {
+ this->add (tc_list [i]);
+ }
+}
+
+CORBA_ExceptionList::~CORBA_ExceptionList (void)
+{
+ for (CORBA::ULong i = 0; i < this->count (); ++i)
+ {
+ CORBA::TypeCode_ptr *tc = 0;
+
+ if (this->tc_list_.get (tc, i) == -1)
+ {
+ return;
+ }
+
+ CORBA::release (*tc);
+ }
+}
+
+void
+CORBA_ExceptionList::add (CORBA::TypeCode_ptr tc)
+{
+ this->tc_list_.enqueue_tail (CORBA::TypeCode::_duplicate (tc));
+}
+
+void
+CORBA_ExceptionList::add_consume (CORBA::TypeCode_ptr tc)
+{
+ this->tc_list_.enqueue_tail (tc);
+}
+
+CORBA::TypeCode_ptr
+CORBA_ExceptionList::item (CORBA::ULong slot,
+ CORBA::Environment &ACE_TRY_ENV)
+{
+ CORBA::TypeCode_ptr *tc = 0;
+
+ if (this->tc_list_.get (tc, slot) == -1)
+ {
+ ACE_THROW_RETURN (CORBA::TypeCode::Bounds (),
+ CORBA::TypeCode::_nil ());
+ }
+ else
+ {
+ return CORBA::TypeCode::_duplicate (*tc);
+ }
+}
+
+void
+CORBA_ExceptionList::remove (CORBA::ULong,
+ CORBA::Environment &ACE_TRY_ENV)
+{
+ ACE_THROW (CORBA::NO_IMPLEMENT ());
+}
+
+CORBA_ExceptionList_ptr
+CORBA_ExceptionList::_duplicate (void)
+{
+ this->_incr_refcnt ();
+ return this;
+}
+
+void
+CORBA_ExceptionList::_destroy (void)
+{
+ this->_decr_refcnt ();
+}
+
+void
+CORBA_ExceptionList::_incr_refcnt (void)
+{
+ this->ref_count_++;
+}
+
+void
+CORBA_ExceptionList::_decr_refcnt (void)
+{
+ this->ref_count_--;
+
+ if (this->ref_count_ == 0)
+ {
+ delete this;
+ }
+}
+
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+
+template class ACE_Node<CORBA::TypeCode_ptr>;
+template class ACE_Unbounded_Queue<CORBA::TypeCode_ptr>;
+template class ACE_Unbounded_Queue_Iterator<CORBA::TypeCode_ptr>;
+template class ACE_Atomic_Op<ACE_SYNCH_MUTEX, CORBA::ULong>;
+
+#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+
+#pragma instantiate ACE_Node<CORBA::TypeCode_ptr>
+#pragma instantiate ACE_Unbounded_Queue<CORBA::TypeCode_ptr>
+#pragma instantiate ACE_Unbounded_Queue_Iterator<CORBA::TypeCode_ptr>
+#pragma instantiate ACE_Atomic_Op<ACE_SYNCH_MUTEX, CORBA::ULong>
+
+#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
+
diff --git a/TAO/tao/DynamicInterface/ExceptionList.h b/TAO/tao/DynamicInterface/ExceptionList.h
new file mode 100644
index 00000000000..9a8f3e3f969
--- /dev/null
+++ b/TAO/tao/DynamicInterface/ExceptionList.h
@@ -0,0 +1,152 @@
+// This may look like C, but it's really -*- C++ -*-
+//
+// $Id$
+
+// ============================================================================
+//
+// = LIBRARY
+// DynamicInterface
+//
+// = FILENAME
+// ExceptionList.h
+//
+// = DESCRIPTION
+// This file defines the ExceptionList datatype used in
+// dynamic invocations.
+//
+// = AUTHOR
+// Copyright 1994-1995 by Sun Microsystems Inc.
+//
+// ============================================================================
+
+#ifndef TAO_CORBA_EXCEPTIONLIST_H
+#define TAO_CORBA_EXCEPTIONLIST_H
+#include "ace/pre.h"
+
+#include "tao/corbafwd.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "dynamicinterface_export.h"
+
+class CORBA_ExceptionList;
+typedef CORBA_ExceptionList *CORBA_ExceptionList_ptr;
+
+class TAO_DynamicInterface_Export CORBA_ExceptionList
+{
+ // = TITLE
+ // ExceptionList definition taken from CORBA v2.2 Feb 1998.
+ //
+ // = DESCRIPTION
+ // Maintains a list of TypeCodes for Exceptions.
+public:
+ // = Intialization and termination methods.
+
+ CORBA_ExceptionList (void);
+ // Constructor.
+
+ CORBA_ExceptionList (CORBA::ULong len,
+ CORBA::TypeCode_ptr *tc_list);
+ // Constructor - initialize given a length and an array of
+ // TypeCodes.
+
+ ~CORBA_ExceptionList (void);
+ // Destructor.
+
+ CORBA::ULong count (void);
+ // Return the number of elements.
+
+ CORBA_ExceptionList_ptr _duplicate (void);
+ // Increase the reference count.
+
+ static CORBA_ExceptionList_ptr _duplicate (CORBA_ExceptionList *);
+ // Increase the reference count in the spec defined manner.
+
+ void _destroy (void);
+
+ static CORBA_ExceptionList_ptr _nil (void);
+
+ void add (CORBA::TypeCode_ptr tc);
+ // Add a TypeCode to the list.
+
+ void add_consume (CORBA::TypeCode_ptr tc);
+ // Add and consume a TypeCode to the list.
+
+ CORBA::TypeCode_ptr item (CORBA::ULong slot,
+ CORBA_Environment &ACE_TRY_ENV =
+ TAO_default_environment ());
+ // Return the typecode at slot i. Raises the "Bounds" exception.
+
+ void remove (CORBA::ULong slot,
+ CORBA_Environment &ACE_TRY_ENV =
+ TAO_default_environment ());
+ // Remove the typecode at slot i. Raises the "Bounds" exception.
+
+ void _incr_refcnt (void);
+ void _decr_refcnt (void);
+ // Increment and decrement ref counts.
+
+#if !defined(__GNUC__) || __GNUC__ > 2 || __GNUC_MINOR__ >= 8
+ typedef CORBA::ExceptionList_ptr _ptr_type;
+ typedef CORBA::ExceptionList_var _var_type;
+#endif /* __GNUC__ */
+ // Useful for template programming.
+
+private:
+ // = Not allowed.
+ CORBA_ExceptionList (const CORBA_ExceptionList &);
+ CORBA_ExceptionList &operator= (const CORBA_ExceptionList &);
+
+ ACE_Atomic_Op<ACE_SYNCH_MUTEX, CORBA::ULong> ref_count_;
+ // Reference counter.
+
+ ACE_Unbounded_Queue<CORBA::TypeCode_ptr> tc_list_;
+ // Internal list of typecodes.
+};
+
+class TAO_DynamicInterface_Export CORBA_ExceptionList_var
+{
+ // = TITLE
+ // CORBA_ExceptionList_var
+ //
+ // = DESCRIPTION
+ // Lifecycle management helper class for ExceptionList objects.
+public:
+ CORBA_ExceptionList_var (void);
+ // Default constructor.
+
+ CORBA_ExceptionList_var (CORBA_ExceptionList_ptr);
+
+ CORBA_ExceptionList_var (const CORBA_ExceptionList_var &);
+ // Copy constructor.
+
+ ~CORBA_ExceptionList_var (void);
+ // Destructor.
+
+ CORBA_ExceptionList_var &operator= (CORBA_ExceptionList_ptr);
+ CORBA_ExceptionList_var &operator= (const CORBA_ExceptionList_var &);
+ CORBA_ExceptionList_ptr operator-> (void) const;
+
+ operator const CORBA_ExceptionList_ptr &() const;
+ operator CORBA_ExceptionList_ptr &();
+
+ // in, inout, out, _retn.
+ CORBA_ExceptionList_ptr in (void) const;
+ CORBA_ExceptionList_ptr &inout (void);
+ CORBA_ExceptionList_ptr &out (void);
+ CORBA_ExceptionList_ptr _retn (void);
+ CORBA_ExceptionList_ptr ptr (void) const;
+
+private:
+ CORBA_ExceptionList_ptr ptr_;
+};
+
+#if defined (__ACE_INLINE__)
+# include "ExceptionList.inl"
+#endif /* __ACE_INLINE__ */
+
+#include "ace/post.h"
+#endif /* TAO_CORBA_EXCEPTIONLIST_H */
+
diff --git a/TAO/tao/DynamicInterface/ExceptionList.inl b/TAO/tao/DynamicInterface/ExceptionList.inl
new file mode 100644
index 00000000000..dc7b3121afc
--- /dev/null
+++ b/TAO/tao/DynamicInterface/ExceptionList.inl
@@ -0,0 +1,137 @@
+ACE_INLINE
+CORBA_ExceptionList::CORBA_ExceptionList (void)
+ : ref_count_ (1)
+{
+}
+
+ACE_INLINE CORBA::ULong
+CORBA_ExceptionList::count (void)
+{
+ return (CORBA::ULong) this->tc_list_.size ();
+}
+
+ACE_INLINE CORBA_ExceptionList_ptr
+CORBA_ExceptionList::_nil (void)
+{
+ return (CORBA_ExceptionList_ptr)0;
+}
+
+ACE_INLINE CORBA_ExceptionList *
+CORBA_ExceptionList::_duplicate (CORBA_ExceptionList* x)
+{
+ if (x != 0)
+ {
+ x->_incr_refcnt ();
+ }
+
+ return x;
+}
+
+ACE_INLINE
+CORBA_ExceptionList_var::CORBA_ExceptionList_var (void) // default constructor
+ : ptr_ (CORBA_ExceptionList::_nil ())
+{}
+
+ACE_INLINE
+CORBA_ExceptionList_var::CORBA_ExceptionList_var (CORBA_ExceptionList_ptr p)
+ : ptr_ (p)
+{}
+
+ACE_INLINE CORBA_ExceptionList_ptr
+CORBA_ExceptionList_var::ptr (void) const
+{
+ return this->ptr_;
+}
+
+ACE_INLINE
+CORBA_ExceptionList_var::CORBA_ExceptionList_var (const CORBA_ExceptionList_var &p) // copy constructor
+ : ptr_ (CORBA_ExceptionList::_duplicate (p.ptr_))
+{
+}
+
+ACE_INLINE
+CORBA_ExceptionList_var::~CORBA_ExceptionList_var (void) // destructor
+{
+ if (this->ptr_ != 0)
+ {
+ this->ptr_->_destroy ();
+ }
+}
+
+ACE_INLINE CORBA_ExceptionList_var &
+CORBA_ExceptionList_var::operator= (CORBA_ExceptionList_ptr p)
+{
+ if (this->ptr_ != 0)
+ {
+ this->ptr_->_destroy ();
+ }
+
+ this->ptr_ = p;
+ return *this;
+}
+
+ACE_INLINE CORBA_ExceptionList_var &
+CORBA_ExceptionList_var::operator= (const CORBA_ExceptionList_var &p)
+{
+ if (this != &p)
+ {
+ if (this->ptr_ != 0)
+ {
+ this->ptr_->_destroy ();
+ }
+
+ this->ptr_ = CORBA_ExceptionList::_duplicate (p.ptr_);
+ }
+
+ return *this;
+}
+
+ACE_INLINE
+CORBA_ExceptionList_var::operator const CORBA_ExceptionList_ptr &() const
+{
+ return this->ptr_;
+}
+
+ACE_INLINE
+CORBA_ExceptionList_var::operator CORBA_ExceptionList_ptr &()
+{
+ return this->ptr_;
+}
+
+ACE_INLINE CORBA_ExceptionList_ptr
+CORBA_ExceptionList_var::operator-> (void) const
+{
+ return this->ptr_;
+}
+
+ACE_INLINE CORBA_ExceptionList_ptr
+CORBA_ExceptionList_var::in (void) const
+{
+ return this->ptr_;
+}
+
+ACE_INLINE CORBA_ExceptionList_ptr &
+CORBA_ExceptionList_var::inout (void)
+{
+ return this->ptr_;
+}
+
+ACE_INLINE CORBA_ExceptionList_ptr &
+CORBA_ExceptionList_var::out (void)
+{
+ if (this->ptr_ != 0)
+ {
+ this->ptr_->_destroy ();
+ }
+
+ this->ptr_ = CORBA_ExceptionList::_nil ();
+ return this->ptr_;
+}
+
+ACE_INLINE CORBA_ExceptionList_ptr
+CORBA_ExceptionList_var::_retn (void)
+{
+ CORBA_ExceptionList_ptr val = this->ptr_;
+ this->ptr_ = CORBA_ExceptionList::_nil ();
+ return val;
+}
diff --git a/TAO/tao/DynamicInterface/Makefile b/TAO/tao/DynamicInterface/Makefile
new file mode 100644
index 00000000000..11db7283986
--- /dev/null
+++ b/TAO/tao/DynamicInterface/Makefile
@@ -0,0 +1,59 @@
+#----------------------------------------------------------------------------
+#
+# $Id$
+#
+#----------------------------------------------------------------------------
+ifndef TAO_ROOT
+ TAO_ROOT = $(ACE_ROOT)/TAO
+endif # ! TAO_ROOT
+
+MAKEFILE = Makefile
+LIBNAME = libTAO_DynamicInterface
+LIB = $(LIBNAME).a
+SHLIB = $(LIBNAME).$(SOEXT)
+
+ACE_SHLIBS = -lTAO_PortableServer -lTAO -lACE
+
+#----------------------------------------------------------------------------
+# Include macros and targets
+#----------------------------------------------------------------------------
+
+include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
+include $(TAO_ROOT)/rules.tao.GNU
+
+CPP_SRCS += \
+ Context \
+ DII_Invocation \
+ DII_Reply_Dispatcher \
+ Dynamic_Adapter_Impl \
+ Dynamic_Implementation \
+ ExceptionList \
+ Request \
+ Server_Request
+
+FILES = $(CPP_SRCS)
+DEFS = $(addsuffix .h,$(FILES))
+LSRC = $(addsuffix .cpp,$(FILES))
+
+include $(ACE_ROOT)/include/makeinclude/macros.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
+
+#----------------------------------------------------------------------------
+# Local targets (and local hacks)
+#----------------------------------------------------------------------------
+
+LDFLAGS += -L$(TAO_ROOT)/tao
+CPPFLAGS += -I$(TAO_ROOT)
+
+#----------------------------------------------------------------------------
+# Dependencies
+#----------------------------------------------------------------------------
+
+# DO NOT DELETE THIS LINE -- g++dep uses it.
+# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
+
+
diff --git a/TAO/tao/DynamicInterface/Makefile.bor b/TAO/tao/DynamicInterface/Makefile.bor
new file mode 100644
index 00000000000..6f9327b7090
--- /dev/null
+++ b/TAO/tao/DynamicInterface/Makefile.bor
@@ -0,0 +1,31 @@
+#
+# Makefile for building the TAO DynamicInterface library
+#
+
+NAME = TAO_DynamicInterface
+
+OBJFILES = \
+ $(OBJDIR)\Context.obj \
+ $(OBJDIR)\DII_Invocation.obj \
+ $(OBJDIR)\DII_Reply_Dispatcher.obj \
+ $(OBJDIR)\Dynamic_Adapter_Impl.obj \
+ $(OBJDIR)\Dynamic_Implementation.obj \
+ $(OBJDIR)\ExceptionList.obj \
+ $(OBJDIR)\Request.obj \
+ $(OBJDIR)\Server_Request.obj
+
+!ifdef STATIC
+CFLAGS = $(ACE_CFLAGS) $(TAO_CFLAGS) $(TAO_DYNAMICINTERFACE_CFLAGS)
+!else
+CFLAGS = $(ACE_CFLAGS) $(TAO_CFLAGS) $(TAO_DYNAMICINTERFACE_CFLAGS) \
+ -DTAO_DYNAMICINTERFACE_BUILD_DLL
+!endif
+
+CPPDIR = .
+
+INCDIR_NAME = tao\DynamicInterface
+INCLUDES = *.h *.i
+
+LIBFILES = $(ACE_LIB) $(TAO_LIB) $(TAO_PORTABLESERVER_LIB)
+
+!include <$(ACE_ROOT)\include\makeinclude\build_core_library.bor>
diff --git a/TAO/tao/DynamicInterface/Request.cpp b/TAO/tao/DynamicInterface/Request.cpp
new file mode 100644
index 00000000000..9837a2e52fc
--- /dev/null
+++ b/TAO/tao/DynamicInterface/Request.cpp
@@ -0,0 +1,428 @@
+// $Id$
+
+#include "Request.h"
+#include "ExceptionList.h"
+#include "DII_Invocation.h"
+#include "tao/Object.h"
+
+#if !defined (__ACE_INLINE__)
+# include "Request.inl"
+#endif /* ! __ACE_INLINE__ */
+
+ACE_RCSID(DynamicInterface, Request, "$Id$")
+
+// Reference counting for DII Request object
+
+CORBA::ULong
+CORBA_Request::_incr_refcnt (void)
+{
+ ACE_GUARD_RETURN (ACE_SYNCH_MUTEX,
+ ace_mon,
+ this->lock_,
+ 0);
+
+ return this->refcount_++;
+}
+
+CORBA::ULong
+CORBA_Request::_decr_refcnt (void)
+{
+ {
+ ACE_GUARD_RETURN (ACE_SYNCH_MUTEX,
+ ace_mon,
+ this->lock_,
+ 0);
+
+ this->refcount_--;
+
+ if (this->refcount_ != 0)
+ {
+ return this->refcount_;
+ }
+ }
+
+ delete this;
+ return 0;
+}
+
+// DII Request class implementation
+
+CORBA_Request::CORBA_Request (CORBA::Object_ptr obj,
+ CORBA::ORB_ptr orb,
+ const CORBA::Char *op,
+ CORBA::NVList_ptr args,
+ CORBA::NamedValue_ptr result,
+ CORBA::Flags flags,
+ CORBA::ExceptionList_ptr exceptions,
+ CORBA::Environment &ACE_TRY_ENV)
+ : orb_ (CORBA::ORB::_duplicate (orb)),
+ args_ (CORBA::NVList::_duplicate (args)),
+ result_ (CORBA::NamedValue::_duplicate (result)),
+ flags_ (flags),
+ env_ (ACE_TRY_ENV),
+ exceptions_ (CORBA::ExceptionList::_duplicate (exceptions)),
+ contexts_ (0),
+ ctx_ (CORBA::Context::_nil ()),
+ refcount_ (1),
+ lazy_evaluation_ (0),
+ response_received_ (0)
+{
+ this->target_ = CORBA::Object::_duplicate (obj);
+ this->opname_ = CORBA::string_dup (op);
+
+ if (this->exceptions_.in () == 0)
+ {
+ CORBA::ExceptionList *tmp = 0;
+ ACE_NEW (tmp,
+ CORBA::ExceptionList);
+
+ this->exceptions_ = tmp;
+ }
+}
+
+CORBA_Request::CORBA_Request (CORBA::Object_ptr obj,
+ CORBA::ORB_ptr orb,
+ const CORBA::Char *op,
+ CORBA::Environment &ACE_TRY_ENV)
+ : orb_ (CORBA::ORB::_duplicate (orb)),
+ flags_ (0),
+ env_ (ACE_TRY_ENV),
+ contexts_ (0),
+ ctx_ (CORBA::Context::_nil ()),
+ refcount_ (1),
+ lazy_evaluation_ (0),
+ response_received_ (0)
+{
+ this->target_ = CORBA::Object::_duplicate (obj);
+ this->opname_ = CORBA::string_dup (op);
+
+ CORBA::ExceptionList *tmp = 0;
+ ACE_NEW (tmp,
+ CORBA::ExceptionList);
+
+ this->exceptions_ = tmp;
+
+ ACE_NEW (this->args_,
+ CORBA::NVList);
+
+ ACE_NEW (this->result_,
+ CORBA::NamedValue);
+}
+
+CORBA_Request::~CORBA_Request (void)
+{
+ ACE_ASSERT (refcount_ == 0);
+
+ CORBA::release (this->target_);
+ CORBA::string_free ((char*) this->opname_);
+ this->opname_ = 0;
+ CORBA::release (this->args_);
+ CORBA::release (this->result_);
+}
+
+// The public DII interfaces: normal and oneway calls.
+//
+// NOTE that using DII, programmers can get the special behaviour of
+// discarding the response for normal calls. This doesn't change the
+// semantics of any OMG-IDL interface, it just streamlines control
+// flow in some exotic situations.
+
+void
+CORBA_Request::invoke (CORBA::Environment &ACE_TRY_ENV)
+{
+ TAO_GIOP_Twoway_Invocation call (this->target_->_stubobj (),
+ this->opname_,
+ ACE_OS::strlen (this->opname_),
+ this->orb_->orb_core ());
+
+ // Loop as needed for forwarding.
+ for (;;)
+ {
+ call.start (ACE_TRY_ENV);
+ ACE_CHECK;
+
+ CORBA::Short flag = TAO_TWOWAY_RESPONSE_FLAG;
+
+ call.prepare_header (ACE_static_cast (CORBA::Octet,
+ flag),
+ ACE_TRY_ENV);
+ ACE_CHECK;
+
+ this->args_->_tao_encode (call.out_stream (),
+ this->orb_->orb_core (),
+ CORBA::ARG_IN | CORBA::ARG_INOUT,
+ ACE_TRY_ENV);
+ ACE_CHECK;
+
+ // Make the call ... blocking for the response.
+ int status = call.invoke (this->exceptions_.in (),
+ ACE_TRY_ENV);
+ ACE_CHECK;
+
+ if (status == TAO_INVOKE_RESTART)
+ {
+ continue;
+ }
+
+ if (status == TAO_INVOKE_EXCEPTION)
+ {
+ // Shouldn't happen.
+ return;
+ }
+
+ if (status != TAO_INVOKE_OK)
+ {
+ ACE_THROW (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE,
+ CORBA::COMPLETED_MAYBE));
+ }
+
+ // The only case left is status == TAO_INVOKE_OK, exit the
+ // loop. We cannot retry because at this point we either
+ // got a reply or something with an status of
+ // COMPLETED_MAYBE, thus we cannot reissue the request if we
+ // are to satisfy the "at most once" semantics.
+ break;
+ }
+
+ // Now, get all the "return", "out", and "inout" parameters
+ // from the response message body ... return parameter is
+ // first, the rest are in the order defined in the IDL spec
+ // (which is also the order that DII users are required to
+ // use).
+
+ if (this->result_ != 0)
+ {
+ this->result_->value ()->_tao_decode (call.inp_stream (),
+ ACE_TRY_ENV);
+ ACE_CHECK;
+ }
+
+ this->args_->_tao_incoming_cdr (call.inp_stream (),
+ CORBA::ARG_OUT | CORBA::ARG_INOUT,
+ this->lazy_evaluation_,
+ ACE_TRY_ENV);
+}
+
+void
+CORBA_Request::send_oneway (CORBA::Environment &ACE_TRY_ENV)
+{
+ TAO_GIOP_Oneway_Invocation call (this->target_->_stubobj (),
+ this->opname_,
+ ACE_OS::strlen (this->opname_),
+ this->orb_->orb_core ());
+
+ // Loop as needed for forwarding.
+ for (;;)
+ {
+ call.start (ACE_TRY_ENV);
+ ACE_CHECK;
+
+ CORBA::Octet response_flag = ACE_static_cast (CORBA::Octet,
+ call.sync_scope ());
+
+ call.prepare_header (response_flag,
+ ACE_TRY_ENV);
+ ACE_CHECK;
+
+ this->args_->_tao_encode (call.out_stream (),
+ this->orb_->orb_core (),
+ CORBA::ARG_IN | CORBA::ARG_INOUT,
+ ACE_TRY_ENV);
+ ACE_CHECK;
+
+ int status = call.invoke (ACE_TRY_ENV);
+ ACE_CHECK;
+
+ if (status == TAO_INVOKE_RESTART)
+ {
+ continue;
+ }
+
+ if (status == TAO_INVOKE_EXCEPTION)
+ {
+ // Shouldn't happen.
+ return;
+ }
+
+ if (status != TAO_INVOKE_OK)
+ {
+ ACE_THROW (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE,
+ CORBA::COMPLETED_MAYBE));
+ }
+
+ // The only case left is status == TAO_INVOKE_OK, exit the
+ // loop. We cannot retry because at this point we either
+ // got a reply or something with an status of
+ // COMPLETED_MAYBE, thus we cannot reissue the request if we
+ // are to satisfy the "at most once" semantics.
+ break;
+ }
+}
+
+void
+CORBA_Request::send_deferred (CORBA::Environment &ACE_TRY_ENV)
+{
+ {
+ ACE_GUARD (ACE_SYNCH_MUTEX,
+ ace_mon,
+ this->lock_);
+
+ this->response_received_ = 0;
+ }
+
+ TAO_GIOP_DII_Deferred_Invocation call (this->target_->_stubobj (),
+ this->orb_->orb_core (),
+ this);
+
+ // Loop as needed for forwarding.
+ for (;;)
+ {
+ call.start (ACE_TRY_ENV);
+ ACE_CHECK;
+
+ CORBA::Short flag = TAO_TWOWAY_RESPONSE_FLAG;
+
+ call.prepare_header (ACE_static_cast (CORBA::Octet, flag),
+ ACE_TRY_ENV);
+ ACE_CHECK;
+
+ this->args_->_tao_encode (call.out_stream (),
+ this->orb_->orb_core (),
+ CORBA::ARG_IN | CORBA::ARG_INOUT,
+ ACE_TRY_ENV);
+ ACE_CHECK;
+
+ // Make the call without blocking.
+ CORBA::ULong status = call.invoke (ACE_TRY_ENV);
+ ACE_CHECK;
+
+ if (status == TAO_INVOKE_RESTART)
+ {
+ continue;
+ }
+
+ if (status != TAO_INVOKE_OK)
+ {
+ ACE_THROW (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE,
+ CORBA::COMPLETED_MAYBE));
+ }
+
+ // The only case left is status == TAO_INVOKE_OK, exit the
+ // loop. We cannot retry because at this point we either
+ // got a reply or something with an status of
+ // COMPLETED_MAYBE, thus we cannot reissue the request if we
+ // are to satisfy the "at most once" semantics.
+ break;
+ }
+}
+
+void
+CORBA_Request::get_response (CORBA::Environment &ACE_TRY_ENV)
+{
+ while (!this->response_received_)
+ {
+ (void) this->orb_->perform_work ();
+ }
+
+ if (this->lazy_evaluation_)
+ {
+ this->args_->evaluate (ACE_TRY_ENV);
+ ACE_CHECK;
+ }
+}
+
+CORBA::Boolean
+CORBA_Request::poll_response (CORBA::Environment &)
+{
+ ACE_GUARD_RETURN (ACE_SYNCH_MUTEX,
+ ace_mon,
+ this->lock_,
+ 0);
+
+ return this->response_received_;
+}
+
+void
+CORBA_Request::handle_response (TAO_InputCDR &incoming,
+ CORBA::ULong reply_status,
+ CORBA::Environment &ACE_TRY_ENV)
+{
+ switch (reply_status)
+ {
+ case TAO_PLUGGABLE_MESSAGE_NO_EXCEPTION:
+ if (this->result_ != 0)
+ {
+ this->result_->value ()->_tao_decode (incoming,
+ ACE_TRY_ENV);
+ ACE_CHECK;
+ }
+
+ this->args_->_tao_incoming_cdr (incoming,
+ CORBA::ARG_OUT | CORBA::ARG_INOUT,
+ this->lazy_evaluation_,
+ ACE_TRY_ENV);
+ ACE_CHECK;
+
+ {
+ ACE_GUARD (ACE_SYNCH_MUTEX,
+ ace_mon,
+ this->lock_);
+
+ this->response_received_ = 1;
+ }
+
+ break;
+ case TAO_PLUGGABLE_MESSAGE_USER_EXCEPTION:
+ case TAO_PLUGGABLE_MESSAGE_SYSTEM_EXCEPTION:
+ case TAO_PLUGGABLE_MESSAGE_LOCATION_FORWARD:
+ default:
+ // @@ (JP) Don't know what to do about any of these yet.
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unhandled reply status\n")));
+ }
+}
+
+// Constructor.
+CORBA_ORB_RequestSeq::CORBA_ORB_RequestSeq (CORBA::ULong max)
+ : TAO_Unbounded_Pseudo_Sequence <CORBA_Request,CORBA_Request_var> (max)
+{
+ // No-op.
+}
+
+CORBA_ORB_RequestSeq::CORBA_ORB_RequestSeq (const CORBA_ORB_RequestSeq &rhs)
+ : TAO_Unbounded_Pseudo_Sequence <CORBA_Request,CORBA_Request_var> (rhs)
+{
+ // No-op.
+}
+
+CORBA_ORB_RequestSeq::CORBA_ORB_RequestSeq (CORBA::ULong max,
+ CORBA::ULong length,
+ CORBA_Request **data,
+ CORBA::Boolean release)
+ : TAO_Unbounded_Pseudo_Sequence <CORBA_Request,CORBA_Request_var> (max,
+ length,
+ data,
+ release)
+{
+ // No-op.
+}
+
+
+CORBA_ORB_RequestSeq::CORBA_ORB_RequestSeq (void)
+{
+ // No-op.
+}
+
+
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+
+template class TAO_Unbounded_Pseudo_Sequence<CORBA_Request,CORBA_Request_var>;
+template class TAO_Pseudo_Object_Manager<CORBA_Request,CORBA_Request_var>;
+
+#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+
+#pragma instantiate TAO_Unbounded_Pseudo_Sequence<CORBA_Request,CORBA_Request_var>
+#pragma instantiate TAO_Pseudo_Object_Manager<CORBA_Request,CORBA_Request_var>
+
+#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
+
diff --git a/TAO/tao/Request.h b/TAO/tao/DynamicInterface/Request.h
index b6f17d4cc1a..cd68a99aa32 100644
--- a/TAO/tao/Request.h
+++ b/TAO/tao/DynamicInterface/Request.h
@@ -29,24 +29,23 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#if (TAO_HAS_MINIMUM_CORBA == 0)
-
+#include "Context.h"
+#include "ExceptionList.h"
#include "tao/corbafwd.h"
#include "tao/ORB.h"
#include "tao/NVList.h"
#include "tao/Environment.h"
-#include "tao/Context.h"
#include "tao/Sequence.h"
#include "tao/MessagingC.h"
-class TAO_Export CORBA_Request
+class TAO_DynamicInterface_Export CORBA_Request
{
// = TITLE
- // CORBA_Request
+ // CORBA_Request
//
// = DESCRIPTION
- // Provides a way to create requests and populate it with parameters for
- // use in the Dynamic Invocation Interface
+ // Provides a way to create requests and populate it with parameters for
+ // use in the Dynamic Invocation Interface.
//
public:
CORBA::Object_ptr target (void) const;
@@ -88,10 +87,12 @@ public:
CORBA_Any &add_inout_arg (const char* name);
CORBA_Any &add_out_arg (void);
CORBA_Any &add_out_arg (const char* name);
- // Initialize the return type.
+
void set_return_type (CORBA::TypeCode_ptr tc);
- // Returns reference to Any for extraction using >>=.
+ // Initialize the return type.
+
CORBA_Any &return_value (void);
+ // Returns reference to Any for extraction using >>=.
void invoke (CORBA::Environment &ACE_TRY_ENV =
CORBA::Environment::default_environment ());
@@ -124,7 +125,7 @@ public:
CORBA::Environment &ACE_TRY_ENV =
CORBA::Environment::default_environment ());
- // Pseudo object methods
+ // Pseudo object methods.
static CORBA_Request* _duplicate (CORBA_Request*);
static CORBA_Request* _nil (void);
@@ -133,7 +134,7 @@ public:
CORBA::ULong _decr_refcnt (void);
void _tao_lazy_evaluation (int lazy_evaluation);
- // Set the lazy evaluation flag
+ // Set the lazy evaluation flag.
#if !defined(__GNUC__) || __GNUC__ > 2 || __GNUC_MINOR__ >= 8
typedef CORBA_Request_ptr _ptr_type;
@@ -142,9 +143,9 @@ public:
// Useful for template programming.
private:
- friend class CORBA_Object;
+ friend class TAO_Dynamic_Adapter_Impl;
- // following are not allowed
+ // The following are not allowed except when called from the friend class.
CORBA_Request (CORBA::Object_ptr obj,
CORBA::ORB_ptr orb,
@@ -165,28 +166,28 @@ private:
~CORBA_Request (void);
CORBA::Object_ptr target_;
- // target object
+ // Target object.
CORBA::ORB_var orb_;
// Pointer to our ORB.
const CORBA::Char *opname_;
- // operation name
+ // Operation name.
CORBA::NVList_ptr args_;
- // parameter list
+ // Parameter list.
CORBA::NamedValue_ptr result_;
- // result of the operation
+ // Result of the operation.
CORBA::Flags flags_;
- // invocation flags
+ // Invocation flags.
CORBA::Environment env_;
- // holds exceptions
+ // Holds exceptions.
- CORBA::ExceptionList_var exceptions_;
- // list of exceptions raised by the operation
+ CORBA_ExceptionList_var exceptions_;
+ // List of exceptions raised by the operation.
CORBA::ContextList_ptr contexts_;
// List of the request's result's contexts.
@@ -195,13 +196,13 @@ private:
// Context associated with this request.
CORBA::ULong refcount_;
- // reference counting
+ // Reference counting.
ACE_SYNCH_MUTEX lock_;
- // protect the refcount_ and response_receieved_.
+ // Protect the refcount_ and response_receieved_.
int lazy_evaluation_;
- // If not zero then the NVList is not evaluated by default
+ // If not zero then the NVList is not evaluated by default.
CORBA::Boolean response_received_;
// Set to TRUE upon completion of invoke() or
@@ -210,19 +211,19 @@ private:
typedef CORBA_Request* CORBA_Request_ptr;
-class TAO_Export CORBA_Request_var
+class TAO_DynamicInterface_Export CORBA_Request_var
{
// = TITLE
- // The T_var class for Request
+ // The T_var class for Request.
//
// = DESCRIPTION
- // As any other pseudo object Request must have a T_var class,
- // the interface an semantics are specified in the CORBA spec.
+ // As any other pseudo object Request must have a T_var class,
+ // the interface an semantics are specified in the CORBA spec.
//
// = NOTE
- // We use CORBA_Request_ptr as the _ptr type instead of
- // CORBA::Request_ptr, this is an attempt to reduced the cyclic
- // dependencies in TAO.
+ // We use CORBA_Request_ptr as the _ptr type instead of
+ // CORBA::Request_ptr, this is an attempt to reduced the cyclic
+ // dependencies in TAO.
//
public:
CORBA_Request_var (void);
@@ -236,7 +237,8 @@ public:
operator const CORBA_Request_ptr &() const;
operator CORBA_Request_ptr &();
- // in, inout, out, _retn
+
+ // in, inout, out, _retn.
CORBA_Request_ptr in (void) const;
CORBA_Request_ptr &inout (void);
CORBA_Request_ptr &out (void);
@@ -247,19 +249,19 @@ private:
CORBA_Request_ptr ptr_;
};
-class TAO_Export CORBA_Request_out
+class TAO_DynamicInterface_Export CORBA_Request_out
{
// = TITLE
- // The T_out class for Request
+ // The T_out class for Request
//
// = DESCRIPTION
- // As any other pseudo object Request must have a T_out class,
- // the interface an semantics are specified in the CORBA spec.
+ // As any other pseudo object Request must have a T_out class,
+ // the interface an semantics are specified in the CORBA spec.
//
// = NOTE
- // We use CORBA_Request_ptr as the _ptr type instead of
- // CORBA::Request_ptr, this is an attempt to reduced the cyclic
- // dependencies in TAO.
+ // We use CORBA_Request_ptr as the _ptr type instead of
+ // CORBA::Request_ptr, this is an attempt to reduced the cyclic
+ // dependencies in TAO.
//
public:
CORBA_Request_out (CORBA_Request_ptr &);
@@ -281,7 +283,8 @@ private:
#endif /* __ACE_INLINE__ */
// Make sure you instantiate this in Request.cpp
-class CORBA_ORB_RequestSeq : public TAO_Unbounded_Pseudo_Sequence<CORBA_Request,CORBA_Request_var>
+class TAO_DynamicInterface_Export CORBA_ORB_RequestSeq
+ : public TAO_Unbounded_Pseudo_Sequence<CORBA_Request, CORBA_Request_var>
{
public:
// Helpful with template programming.
@@ -294,7 +297,7 @@ public:
// Simply delegate on the template for the implementation...
CORBA_ORB_RequestSeq (void);
- // default ctor
+ // Default constructor.
CORBA_ORB_RequestSeq (CORBA::ULong max);
// Constructor with a "hint" for the maximum capacity.
@@ -309,13 +312,19 @@ public:
// Copy ctor, deep copies.
};
-class CORBA_ORB_RequestSeq_var
+class TAO_DynamicInterface_Export CORBA_ORB_RequestSeq_var
{
public:
- CORBA_ORB_RequestSeq_var (void); // default constructor
+ CORBA_ORB_RequestSeq_var (void);
+ // Default constructor.
+
CORBA_ORB_RequestSeq_var (CORBA_ORB_RequestSeq *);
- CORBA_ORB_RequestSeq_var (const CORBA_ORB_RequestSeq_var &); // copy constructor
- ~CORBA_ORB_RequestSeq_var (void); // destructor
+
+ CORBA_ORB_RequestSeq_var (const CORBA_ORB_RequestSeq_var &);
+ // Copy constructor.
+
+ ~CORBA_ORB_RequestSeq_var (void);
+ // Destructor.
CORBA_ORB_RequestSeq_var &operator= (CORBA_ORB_RequestSeq *);
CORBA_ORB_RequestSeq_var &operator= (const CORBA_ORB_RequestSeq_var &);
@@ -326,7 +335,8 @@ public:
operator CORBA_ORB_RequestSeq &();
operator CORBA_ORB_RequestSeq &() const;
CORBA::Octet &operator[] (CORBA::ULong slot);
- // in, inout, out, _retn
+
+ // in, inout, out, _retn.
const CORBA_ORB_RequestSeq &in (void) const;
CORBA_ORB_RequestSeq &inout (void);
CORBA_ORB_RequestSeq *&out (void);
@@ -337,7 +347,7 @@ private:
CORBA_ORB_RequestSeq *ptr_;
};
-class CORBA_ORB_RequestSeq_out
+class TAO_DynamicInterface_Export CORBA_ORB_RequestSeq_out
{
public:
CORBA_ORB_RequestSeq_out (CORBA_ORB_RequestSeq *&);
@@ -352,11 +362,14 @@ public:
private:
CORBA_ORB_RequestSeq *&ptr_;
- // assignment from T_var not allowed
+
+ // Assignment from T_var not allowed.
void operator= (const CORBA_ORB_RequestSeq_var &);
};
-#endif /* TAO_HAS_MINIMUM_CORBA */
+#if defined (__ACE_INLINE__)
+# include "Request.inl"
+#endif /* __ACE_INLINE__ */
#include "ace/post.h"
#endif /* TAO_REQUEST_H */
diff --git a/TAO/tao/Request.i b/TAO/tao/DynamicInterface/Request.inl
index e3f66bd6247..13ba1f53583 100644
--- a/TAO/tao/Request.i
+++ b/TAO/tao/DynamicInterface/Request.inl
@@ -2,29 +2,23 @@
// This may look like C, but it's really -*- C++ -*-
-ACE_INLINE CORBA::Boolean
-CORBA::is_nil (CORBA::Request_ptr req)
+ACE_INLINE CORBA_Request_ptr
+CORBA_Request::_duplicate (CORBA_Request_ptr x)
{
- return (CORBA::Boolean) (req == 0);
-}
+ if (x != 0)
+ {
+ x->_incr_refcnt ();
+ }
-ACE_INLINE void
-CORBA::release (CORBA::Request_ptr req)
-{
- if (req)
- req->_decr_refcnt ();
+ return x;
}
-// Return the target of this request.
-ACE_INLINE CORBA_Request*
-CORBA_Request::_duplicate (CORBA_Request* x)
+ACE_INLINE CORBA_Request_ptr
+CORBA_Request::_nil (void)
{
- if (x != 0)
- x->_incr_refcnt ();
- return x;
+ return (CORBA_Request_ptr)0;
}
-
ACE_INLINE CORBA::Object_ptr
CORBA_Request::target (void) const
{
diff --git a/TAO/tao/Server_Request.cpp b/TAO/tao/DynamicInterface/Server_Request.cpp
index 8b6d8b25018..00153434621 100644
--- a/TAO/tao/Server_Request.cpp
+++ b/TAO/tao/DynamicInterface/Server_Request.cpp
@@ -2,19 +2,50 @@
// Implementation of the Dynamic Server Skeleton Interface.
-#include "tao/Server_Request.h"
-
-#if (TAO_HAS_MINIMUM_CORBA == 0)
-
+#include "Server_Request.h"
#include "tao/NVList.h"
#include "tao/GIOP_Utils.h"
#include "tao/Marshal.h"
#if !defined (__ACE_INLINE__)
-# include "tao/Server_Request.i"
+# include "Server_Request.inl"
#endif /* ! __ACE_INLINE__ */
-ACE_RCSID(tao, Server_Request, "$Id$")
+ACE_RCSID(DynamicInterface, Server_Request, "$Id$")
+
+// Reference counting for DSI ServerRequest object.
+
+CORBA::ULong
+CORBA_ServerRequest::_incr_refcnt (void)
+{
+ ACE_GUARD_RETURN (ACE_SYNCH_MUTEX,
+ ace_mon,
+ this->lock_,
+ 0);
+
+ return this->refcount_++;
+}
+
+CORBA::ULong
+CORBA_ServerRequest::_decr_refcnt (void)
+{
+ {
+ ACE_GUARD_RETURN (ACE_SYNCH_MUTEX,
+ ace_mon,
+ this->lock_,
+ 0);
+
+ this->refcount_--;
+
+ if (this->refcount_ != 0)
+ {
+ return this->refcount_;
+ }
+ }
+
+ delete this;
+ return 0;
+}
CORBA_ServerRequest::CORBA_ServerRequest (
TAO_ServerRequest &orb_server_request
@@ -24,6 +55,7 @@ CORBA_ServerRequest::CORBA_ServerRequest (
params_ (CORBA::NVList::_nil ()),
retval_ (0),
exception_ (0),
+ refcount_ (1),
orb_server_request_ (orb_server_request)
{
this->orb_server_request_.is_dsi ();
@@ -172,5 +204,3 @@ CORBA_ServerRequest::dsi_marshal (CORBA::Environment &ACE_TRY_ENV)
}
}
-#endif /* TAO_HAS_MINIMUM_CORBA */
-
diff --git a/TAO/tao/Server_Request.h b/TAO/tao/DynamicInterface/Server_Request.h
index 844ace035a5..3efb9a7d1aa 100644
--- a/TAO/tao/Server_Request.h
+++ b/TAO/tao/DynamicInterface/Server_Request.h
@@ -28,12 +28,10 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#if (TAO_HAS_MINIMUM_CORBA == 0)
-
+#include "Context.h"
#include "tao/TAO_Server_Request.h"
-#include "tao/Context.h"
-class TAO_Export CORBA_ServerRequest
+class TAO_DynamicInterface_Export CORBA_ServerRequest
{
// = TITLE
// Class representing the CORBA ServerRequest pseudo-object.
@@ -50,12 +48,6 @@ public:
~CORBA_ServerRequest (void);
// Destructor.
- static CORBA_ServerRequest *_duplicate (CORBA_ServerRequest *req);
- // The duplicate method for Pseudo Objects.
-
- static CORBA_ServerRequest *_nil (void);
- // The standard _nil method on pseudo objects.
-
void arguments (CORBA::NVList_ptr &list,
CORBA_Environment &ACE_TRY_ENV =
TAO_default_environment ());
@@ -103,6 +95,14 @@ public:
const char *operation (void) const;
// Get the operation name.
+ // Pseudo object methods.
+ static CORBA_ServerRequest_ptr _duplicate (CORBA_ServerRequest_ptr);
+ static CORBA_ServerRequest_ptr _nil (void);
+
+ // = Reference counting.
+ CORBA::ULong _incr_refcnt (void);
+ CORBA::ULong _decr_refcnt (void);
+
void _tao_lazy_evaluation (int lazy_evaluation);
// Set the lazy evaluation flag.
@@ -127,15 +127,19 @@ private:
CORBA::Any_ptr exception_;
// Any exception which might be raised.
+ CORBA::ULong refcount_;
+ // Reference counting.
+
+ ACE_SYNCH_MUTEX lock_;
+ // Protect the refcount_ and response_receieved_.
+
TAO_ServerRequest &orb_server_request_;
// Request from the ORB.
};
#if defined (__ACE_INLINE__)
-# include "tao/Server_Request.i"
+# include "Server_Request.inl"
#endif /* __ACE_INLINE__ */
-#endif /* TAO_HAS_MINIMUM_CORBA */
-
#include "ace/post.h"
#endif /* TAO_CORBA_SERVER_REQUEST_H */
diff --git a/TAO/tao/DynamicInterface/Server_Request.inl b/TAO/tao/DynamicInterface/Server_Request.inl
new file mode 100644
index 00000000000..e79890ee8cf
--- /dev/null
+++ b/TAO/tao/DynamicInterface/Server_Request.inl
@@ -0,0 +1,44 @@
+// -*- C++ -*-
+// $Id$
+
+ACE_INLINE CORBA_ServerRequest_ptr
+CORBA_ServerRequest::_duplicate (CORBA_ServerRequest_ptr x)
+{
+ if (x != 0)
+ {
+ x->_incr_refcnt ();
+ }
+
+ return x;
+}
+
+ACE_INLINE CORBA_ServerRequest_ptr
+CORBA_ServerRequest::_nil (void)
+{
+ return (CORBA_ServerRequest_ptr)0;
+}
+
+ACE_INLINE CORBA::Context_ptr
+CORBA_ServerRequest::ctx (void) const
+{
+ return this->ctx_;
+}
+
+ACE_INLINE void
+CORBA_ServerRequest::ctx (CORBA::Context_ptr ctx)
+{
+ this->ctx_ = ctx;
+}
+
+ACE_INLINE const char *
+CORBA_ServerRequest::operation (void) const
+{
+ return this->orb_server_request_.operation ();
+}
+
+ACE_INLINE void
+CORBA_ServerRequest::_tao_lazy_evaluation (int lazy_evaluation)
+{
+ this->lazy_evaluation_ = lazy_evaluation;
+}
+
diff --git a/TAO/tao/DynamicInterface/TAO_DynamicInterface.dsp b/TAO/tao/DynamicInterface/TAO_DynamicInterface.dsp
new file mode 100644
index 00000000000..025c59c04ec
--- /dev/null
+++ b/TAO/tao/DynamicInterface/TAO_DynamicInterface.dsp
@@ -0,0 +1,259 @@
+# Microsoft Developer Studio Project File - Name="DynamicInterface" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=DynamicInterface - Win32 MFC Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "TAO_DynamicInterface.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "TAO_DynamicInterface.mak" CFG="DynamicInterface - Win32 MFC Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "DynamicInterface - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "DynamicInterface - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "DynamicInterface - Win32 MFC Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "DynamicInterface - Win32 MFC Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "DynamicInterface - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "DLL\Release\DynamicInterface"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DynamicInterface_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../" /I "../../" /I "../../../" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "TAO_DYNAMICANY_BUILD_DLL" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
+# ADD LINK32 ace.lib TAO.lib /nologo /dll /machine:I386 /out:"..\..\..\bin\TAO_DynamicInterface.dll" /libpath:"..\..\tao" /libpath:"..\..\..\ace"
+
+!ELSEIF "$(CFG)" == "DynamicInterface - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "DLL\Debug\DynamicInterface"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DynamicInterface_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../" /I "../../" /I "../../../" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "TAO_DYNAMICINTERFACE_BUILD_DLL" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 TAOd.lib aced.lib /nologo /dll /debug /machine:I386 /out:"..\..\..\bin\TAO_DynamicInterfaced.dll" /pdbtype:sept /libpath:"..\..\tao" /libpath:"..\..\..\ace"
+
+!ELSEIF "$(CFG)" == "DynamicInterface - Win32 MFC Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "DynamicInterface___Win32_MFC_Debug"
+# PROP BASE Intermediate_Dir "DynamicInterface___Win32_MFC_Debug"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "DLL\Debug\DynamicInterfaceMFC"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../" /I "../../" /I "../../../" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "TAO_EVENT_BUILD_DLL" /FD /c
+# SUBTRACT BASE CPP /YX
+# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "../" /I "../../" /I "../../../" /D "_DEBUG" /D ACE_HAS_MFC=1 /D "WIN32" /D "_WINDOWS" /D "TAO_DYNAMICANY_BUILD_DLL" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 TAOd.lib aced.lib TAO_Svc_Utilsd.lib TAO_RTEventd.lib TAO_RTSchedd.lib /nologo /dll /debug /machine:I386 /out:"..\..\..\bin\TAO_DynamicInterfaced.dll" /pdbtype:sept /libpath:"..\..\tao" /libpath:"..\..\..\ace"
+# ADD LINK32 TAOmfcd.lib acemfcd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"..\..\..\bin\TAO_DynamicInterfacemfcd.dll" /pdbtype:sept /libpath:"..\..\tao" /libpath:"..\..\..\ace"
+
+!ELSEIF "$(CFG)" == "DynamicInterface - Win32 MFC Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "DynamicInterface___Win32_MFC_Release"
+# PROP BASE Intermediate_Dir "DynamicInterface___Win32_MFC_Release"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "DLL\Release\DynamicInterfaceMFC"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "../" /I "../../" /I "../../../" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "TAO_EVENT_BUILD_DLL" /FD /c
+# SUBTRACT BASE CPP /YX
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../" /I "../../" /I "../../../" /D "NDEBUG" /D "TAO_DYNAMICANY_BUILD_DLL" /D ACE_HAS_MFC=1 /D "WIN32" /D "_WINDOWS" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 ace.lib TAO.lib TAO_Svc_Utils.lib TAO_RTEvent.lib TAO_RTSched.lib /nologo /dll /machine:I386 /out:"..\..\..\bin\TAO_DynamicInterface.dll" /libpath:"..\..\tao" /libpath:"..\..\..\ace"
+# ADD LINK32 ace.lib TAO.lib /nologo /dll /machine:I386 /out:"..\..\..\bin\TAO_DynamicInterfacemfc.dll" /libpath:"..\..\tao" /libpath:"..\..\..\ace"
+
+!ENDIF
+
+# Begin Target
+
+# Name "DynamicInterface - Win32 Release"
+# Name "DynamicInterface - Win32 Debug"
+# Name "DynamicInterface - Win32 MFC Debug"
+# Name "DynamicInterface - Win32 MFC Release"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\Context.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\DII_Invocation.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\DII_Reply_Dispatcher.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Dynamic_Adapter_Impl.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Dynamic_Implementation.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\ExceptionList.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Request.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Server_Request.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h"
+# Begin Source File
+
+SOURCE=.\Context.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\DII_Invocation.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\DII_Reply_Dispatcher.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Dynamic_Adapter_Impl.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Dynamic_Implementation.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\dynamicinterface_export.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\ExceptionList.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Request.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Server_Request.h
+# End Source File
+# End Group
+# Begin Group "Inline Files"
+
+# PROP Default_Filter "i"
+# Begin Source File
+
+SOURCE=.\Context.i
+# End Source File
+# Begin Source File
+
+SOURCE=.\DII_Invocation.i
+# End Source File
+# Begin Source File
+
+SOURCE=.\DII_Reply_Dispatcher.i
+# End Source File
+# Begin Source File
+
+SOURCE=.\ExceptionList.i
+# End Source File
+# Begin Source File
+
+SOURCE=.\Request.i
+# End Source File
+# Begin Source File
+
+SOURCE=.\Server_Request.i
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/TAO/tao/DynamicInterface/dynamicinterface_export.h b/TAO/tao/DynamicInterface/dynamicinterface_export.h
new file mode 100644
index 00000000000..ed6cd9c5682
--- /dev/null
+++ b/TAO/tao/DynamicInterface/dynamicinterface_export.h
@@ -0,0 +1,40 @@
+// -*- C++ -*-
+// $Id$
+// Definition for Win32 Export directives.
+// This file is generated automatically by
+// generate_export_file.pl
+// ------------------------------
+#ifndef TAO_DYNAMICINTERFACE_EXPORT_H
+#define TAO_DYNAMICINTERFACE_EXPORT_H
+
+#include "ace/config-all.h"
+
+#if !defined (TAO_DYNAMICINTERFACE_HAS_DLL)
+#define TAO_DYNAMICINTERFACE_HAS_DLL 1
+#endif /* ! TAO_DYNAMICINTERFACE_HAS_DLL */
+
+#if defined (TAO_DYNAMICINTERFACE_HAS_DLL)
+# if (TAO_DYNAMICINTERFACE_HAS_DLL == 1)
+# if defined (TAO_DYNAMICINTERFACE_BUILD_DLL)
+# define TAO_DynamicInterface_Export ACE_Proper_Export_Flag
+# define TAO_DYNAMICINTERFACE_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
+# define TAO_DYNAMICINTERFACE_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# else
+# define TAO_DynamicInterface_Export ACE_Proper_Import_Flag
+# define TAO_DYNAMICINTERFACE_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
+# define TAO_DYNAMICINTERFACE_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# endif /* TAO_DYNAMICINTERFACE_BUILD_DLL */
+# else
+# define TAO_DynamicInterface_Export
+# define TAO_DYNAMICINTERFACE_SINGLETON_DECLARATION(T)
+# define TAO_DYNAMICINTERFACE_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# endif /* ! TAO_DYNAMICINTERFACE_HAS_DLL == 1 */
+#else
+# define TAO_DynamicInterface_Export
+# define TAO_DYNAMICINTERFACE_SINGLETON_DECLARATION(T)
+# define TAO_DYNAMICINTERFACE_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+#endif /* TAO_DYNAMICINTERFACE_HAS_DLL */
+
+#endif /* TAO_DYNAMICINTERFACE_EXPORT_H */
+
+// End of auto generated file.
diff --git a/TAO/tao/Dynamic_Adapter.cpp b/TAO/tao/Dynamic_Adapter.cpp
new file mode 100644
index 00000000000..f434f327c23
--- /dev/null
+++ b/TAO/tao/Dynamic_Adapter.cpp
@@ -0,0 +1,150 @@
+// @(#) $Id$
+
+#include "tao/Dynamic_Adapter.h"
+
+#if (TAO_HAS_MINIMUM_CORBA == 0)
+
+#include "ace/Dynamic_Service.h"
+
+ACE_RCSID(tao, Dynamic_Adapter, "$Id$")
+
+TAO_Dynamic_Adapter::~TAO_Dynamic_Adapter (void)
+{
+}
+
+// Methods to be overridden.
+
+void
+TAO_Dynamic_Adapter::create_request (
+ CORBA::Object_ptr /* obj */,
+ CORBA::ORB_ptr /* orb */,
+ const char * /* operation */,
+ CORBA::NVList_ptr /* arg_list */,
+ CORBA::NamedValue_ptr /* result */,
+ CORBA::ExceptionList_ptr /* exceptions */,
+ CORBA::Request_ptr & /* request */,
+ CORBA::Flags /* req_flags */,
+ CORBA_Environment & /* ACE_TRY_ENV */
+ )
+{
+}
+
+CORBA::Request_ptr
+TAO_Dynamic_Adapter::request (CORBA::Object_ptr /* obj */,
+ CORBA::ORB_ptr /* orb */,
+ const char * /* op */,
+ CORBA::Environment & /* ACE_TRY_ENV */)
+{
+ return 0;
+}
+
+CORBA::Boolean
+TAO_Dynamic_Adapter::context_is_nil (CORBA::Context_ptr ctx)
+{
+ return 0;
+}
+
+CORBA::Boolean
+TAO_Dynamic_Adapter::request_is_nil (CORBA::Request_ptr req)
+{
+ return 0;
+}
+
+CORBA::Boolean
+TAO_Dynamic_Adapter::server_request_is_nil (CORBA::ServerRequest_ptr req)
+{
+ return 0;
+}
+
+void
+TAO_Dynamic_Adapter::context_release (CORBA::Context_ptr ctx)
+{
+}
+
+void
+TAO_Dynamic_Adapter::request_release (CORBA::Request_ptr req)
+{
+}
+
+void
+TAO_Dynamic_Adapter::server_request_release (CORBA::ServerRequest_ptr req)
+{
+}
+
+void
+TAO_Dynamic_Adapter::create_exception_list (CORBA::ExceptionList_ptr &,
+ CORBA_Environment &)
+{
+}
+
+CORBA::Exception *
+TAO_Dynamic_Adapter::decode_user_exception (
+ CORBA::ExceptionList_ptr,
+ TAO_GIOP_Twoway_Invocation *,
+ const char *,
+ CORBA::Environment &
+ )
+{
+ return 0;
+}
+
+// ***********************************************************************
+
+// Implementation of the CORBA::is_nil and CORBA::release methods for
+// Context, Request, and ServerRequest.
+
+CORBA::Boolean
+CORBA::is_nil (CORBA::Context_ptr ctx)
+{
+ TAO_Dynamic_Adapter *dynamic_adapter =
+ ACE_Dynamic_Service<TAO_Dynamic_Adapter>::instance ("Dynamic_Adapter");
+
+ return dynamic_adapter->context_is_nil (ctx);
+}
+
+CORBA::Boolean
+CORBA::is_nil (CORBA::Request_ptr req)
+{
+ TAO_Dynamic_Adapter *dynamic_adapter =
+ ACE_Dynamic_Service<TAO_Dynamic_Adapter>::instance ("Dynamic_Adapter");
+
+ return dynamic_adapter->request_is_nil (req);
+}
+
+CORBA::Boolean
+CORBA::is_nil (CORBA::ServerRequest_ptr req)
+{
+ TAO_Dynamic_Adapter *dynamic_adapter =
+ ACE_Dynamic_Service<TAO_Dynamic_Adapter>::instance ("Dynamic_Adapter");
+
+ return dynamic_adapter->server_request_is_nil (req);
+}
+
+void
+CORBA::release (CORBA::Context_ptr ctx)
+{
+ TAO_Dynamic_Adapter *dynamic_adapter =
+ ACE_Dynamic_Service<TAO_Dynamic_Adapter>::instance ("Dynamic_Adapter");
+
+ dynamic_adapter->context_release (ctx);
+}
+
+void
+CORBA::release (CORBA::Request_ptr req)
+{
+ TAO_Dynamic_Adapter *dynamic_adapter =
+ ACE_Dynamic_Service<TAO_Dynamic_Adapter>::instance ("Dynamic_Adapter");
+
+ dynamic_adapter->request_release (req);
+}
+
+void
+CORBA::release (CORBA::ServerRequest_ptr req)
+{
+ TAO_Dynamic_Adapter *dynamic_adapter =
+ ACE_Dynamic_Service<TAO_Dynamic_Adapter>::instance ("Dynamic_Adapter");
+
+ dynamic_adapter->server_request_release (req);
+}
+
+#endif /* TAO_HAS_MINIMUM_CORBA */
diff --git a/TAO/tao/Dynamic_Adapter.h b/TAO/tao/Dynamic_Adapter.h
new file mode 100644
index 00000000000..7a3de6f7b5d
--- /dev/null
+++ b/TAO/tao/Dynamic_Adapter.h
@@ -0,0 +1,99 @@
+// This may look like C, but it's really -*- C++ -*-
+// $Id$
+
+// ============================================================================
+//
+// = LIBRARY
+// TAO
+//
+// = FILENAME
+// Dynamic_Adapter.h
+//
+// = AUTHOR
+// Jeff Parsons <parsons@cs.wustl.edu>
+//
+// ============================================================================
+
+#ifndef TAO_DYNAMIC_ADAPTER_H
+#define TAO_DYNAMIC_ADAPTER_H
+#include "ace/pre.h"
+
+#include "tao/corbafwd.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#if (TAO_HAS_MINIMUM_CORBA == 0)
+
+#include "ace/Service_Object.h"
+
+class TAO_GIOP_Twoway_Invocation;
+
+class TAO_Export TAO_Dynamic_Adapter : public ACE_Service_Object
+{
+ // = TITLE
+ // TAO_Dynamic_Adapter.
+ //
+ // = DESCRIPTION
+ // Class that adapts various functions in the CORBA namespace
+ // related to DII/DSI, which is no longer found in the TAO library.
+ // This is a base for the actual implementation in the DynamicInterface
+ // library.
+ //
+public:
+ virtual ~TAO_Dynamic_Adapter (void);
+
+ // CORBA::Object::_create_request and CORBA::Object::_request.
+
+ virtual void create_request (CORBA::Object_ptr obj,
+ CORBA::ORB_ptr orb,
+ const char *operation,
+ CORBA::NVList_ptr arg_list,
+ CORBA::NamedValue_ptr result,
+ CORBA::ExceptionList_ptr exceptions,
+ CORBA::Request_ptr &request,
+ CORBA::Flags req_flags,
+ CORBA_Environment &ACE_TRY_ENV =
+ TAO_default_environment ());
+
+ virtual CORBA::Request_ptr request (CORBA::Object_ptr obj,
+ CORBA::ORB_ptr orb,
+ const char *op,
+ CORBA::Environment &ACE_TRY_ENV =
+ TAO_default_environment ());
+
+ // CORBA::is_nil and CORBA::release for Context, Request, and ServerRequest.
+
+ virtual CORBA::Boolean context_is_nil (CORBA::Context_ptr ctx);
+
+ virtual CORBA::Boolean request_is_nil (CORBA::Request_ptr req);
+
+ virtual CORBA::Boolean server_request_is_nil (CORBA::ServerRequest_ptr req);
+
+ virtual void context_release (CORBA::Context_ptr ctx);
+
+ virtual void request_release (CORBA::Request_ptr req);
+
+ virtual void server_request_release (CORBA::ServerRequest_ptr req);
+
+ // CORBA::ORB::create_exception_list.
+
+ virtual void create_exception_list (CORBA::ExceptionList_ptr &,
+ CORBA_Environment &);
+
+ // Decoding the user exception in the DII version of
+ // TAO_GIOP_Twoway_Invocation::invoke().
+
+ virtual CORBA::Exception *decode_user_exception (
+ CORBA::ExceptionList_ptr exceptions,
+ TAO_GIOP_Twoway_Invocation *invocation,
+ const char *buf,
+ CORBA::Environment &ACE_TRY_ENV =
+ TAO_default_environment ()
+ );
+};
+
+#endif /* TAO_HAS_MINIMUM_CORBA */
+#include "ace/post.h"
+#endif /* TAO_DYNAMIC_ADAPTER_H */
diff --git a/TAO/tao/Exception.cpp b/TAO/tao/Exception.cpp
index a3e5c55bfb0..8c0717d04f0 100644
--- a/TAO/tao/Exception.cpp
+++ b/TAO/tao/Exception.cpp
@@ -23,14 +23,14 @@ ACE_RCSID(tao, Exception, "$Id$")
// Static initializers.
-CORBA::ExceptionList *TAO_Exceptions::system_exceptions;
+ACE_Unbounded_Queue<CORBA::TypeCode_ptr> *TAO_Exceptions::system_exceptions;
ACE_Allocator *TAO_Exceptions::global_allocator_;
// Flag that denotes that the TAO TypeCode constants have been
// initialized.
int TAO_Exceptions::initialized_ = 0;
-// TAO specific typecode
+// TAO specific typecode.
extern CORBA::TypeCode_ptr TC_completion_status;
// ****************************************************************
@@ -816,7 +816,7 @@ TAO_Exceptions::make_standard_typecode (CORBA::TypeCode_ptr &tcp,
CORBA_INITIALIZE ());
ACE_CHECK;
- TAO_Exceptions::system_exceptions->add (tcp);
+ TAO_Exceptions::system_exceptions->enqueue_tail (tcp);
ACE_ASSERT (tcp->length_ <= buflen);
return;
@@ -904,7 +904,7 @@ TAO_Exceptions::init (CORBA::Environment &ACE_TRY_ENV)
// Initialize the list of system exceptions, used when unmarshaling.
ACE_NEW (TAO_Exceptions::system_exceptions,
- CORBA::ExceptionList);
+ ACE_Unbounded_Queue<CORBA::TypeCode_ptr>);
#define TAO_SYSTEM_EXCEPTION(name) \
TAO_Exceptions::make_standard_typecode (CORBA::_tc_ ## name, \
@@ -941,7 +941,7 @@ TAO_Exceptions::fini (void)
{
if (TAO_Exceptions::system_exceptions != 0)
{
- TAO_Exceptions::system_exceptions->_destroy ();
+ delete TAO_Exceptions::system_exceptions;
TAO_Exceptions::system_exceptions = 0;
}
@@ -1189,90 +1189,6 @@ STANDARD_EXCEPTION_LIST
#undef STANDARD_EXCEPTION_LIST
-CORBA_ExceptionList::CORBA_ExceptionList (CORBA::ULong len,
- CORBA::TypeCode_ptr *tc_list)
- : ref_count_ (1)
-{
- for (CORBA::ULong i = 0;
- i < len;
- i++)
- this->add (tc_list [i]);
-}
-
-CORBA_ExceptionList::~CORBA_ExceptionList (void)
-{
- for (CORBA::ULong i = 0;
- i < this->count ();
- ++i)
- {
- CORBA::TypeCode_ptr *tc;
-
- if (this->tc_list_.get (tc, i) == -1)
- return;
-
- CORBA::release (*tc);
- }
-}
-
-void
-CORBA_ExceptionList::add (CORBA::TypeCode_ptr tc)
-{
- this->tc_list_.enqueue_tail (CORBA::TypeCode::_duplicate (tc));
-}
-
-void
-CORBA_ExceptionList::add_consume (CORBA::TypeCode_ptr tc)
-{
- this->tc_list_.enqueue_tail (tc);
-}
-
-CORBA::TypeCode_ptr
-CORBA_ExceptionList::item (CORBA::ULong slot,
- CORBA::Environment &ACE_TRY_ENV)
-{
- CORBA::TypeCode_ptr *tc;
-
- if (this->tc_list_.get (tc,
- slot) == -1)
- ACE_THROW_RETURN (CORBA::TypeCode::Bounds (), CORBA::TypeCode::_nil ());
- else
- return CORBA::TypeCode::_duplicate (*tc);
-}
-
-void
-CORBA_ExceptionList::remove (CORBA::ULong, CORBA::Environment &ACE_TRY_ENV)
-{
- ACE_THROW (CORBA::NO_IMPLEMENT ());
-}
-
-CORBA_ExceptionList_ptr
-CORBA_ExceptionList::_duplicate (void)
-{
- this->_incr_refcnt ();
- return this;
-}
-
-void
-CORBA_ExceptionList::_destroy (void)
-{
- this->_decr_refcnt ();
-}
-
-void
-CORBA_ExceptionList::_incr_refcnt (void)
-{
- this->ref_count_++;
-}
-
-void
-CORBA_ExceptionList::_decr_refcnt (void)
-{
- this->ref_count_--;
- if (this->ref_count_ == 0)
- delete this;
-
-}
-
#if defined (TAO_DONT_CATCH_DOT_DOT_DOT)
TAO_DONT_CATCH::TAO_DONT_CATCH (void)
{}
@@ -1283,13 +1199,11 @@ TAO_DONT_CATCH::TAO_DONT_CATCH (void)
template class ACE_Node<CORBA::TypeCode_ptr>;
template class ACE_Unbounded_Queue<CORBA::TypeCode_ptr>;
template class ACE_Unbounded_Queue_Iterator<CORBA::TypeCode_ptr>;
-template class ACE_Atomic_Op<ACE_SYNCH_MUTEX, CORBA::ULong>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#pragma instantiate ACE_Node<CORBA::TypeCode_ptr>
#pragma instantiate ACE_Unbounded_Queue<CORBA::TypeCode_ptr>
#pragma instantiate ACE_Unbounded_Queue_Iterator<CORBA::TypeCode_ptr>
-#pragma instantiate ACE_Atomic_Op<ACE_SYNCH_MUTEX, CORBA::ULong>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/tao/Exception.h b/TAO/tao/Exception.h
index f9013dbc8f9..b11fc1d92b4 100644
--- a/TAO/tao/Exception.h
+++ b/TAO/tao/Exception.h
@@ -45,16 +45,17 @@ class TAO_InputCDR;
class TAO_Export CORBA_Exception
{
// = TITLE
- // CORBA_Exception
+ // CORBA_Exception
//
// = DESCRIPTION
- // CORBA2-specified exception hierarchy. All exceptions have a
- // type (represented by a TypeCode) and a widely scoped type ID
- // (in the TypeCode) that generated by any OMG-IDL compiler and
- // available through the Interface Repositories. Think of it as a
- // "globally scoped" name distinguishing each exception.
+ // CORBA2-specified exception hierarchy. All exceptions have a
+ // type (represented by a TypeCode) and a widely scoped type ID
+ // (in the TypeCode) that generated by any OMG-IDL compiler and
+ // available through the Interface Repositories. Think of it as a
+ // "globally scoped" name distinguishing each exception.
public:
// = Initialization and termination methods.
+
CORBA_Exception (const CORBA_Exception &src);
// Copy constructor.
@@ -134,13 +135,13 @@ TAO_Export ostream& operator<< (ostream &os,
class TAO_Export CORBA_UserException : public CORBA_Exception
{
// = TITLE
- // User exceptions are those defined by application developers
- // using OMG-IDL.
+ // User exceptions are those defined by application developers
+ // using OMG-IDL.
public:
// = Initialization and termination methods.
CORBA_UserException (const CORBA_UserException &src);
- // Copy ctor.
+ // Copy constructor.
~CORBA_UserException (void);
// Destructor.
@@ -157,6 +158,7 @@ public:
// Constructor from a repository id.
virtual int _is_a (const char *interface_id) const;
+
// Used for narrowing
virtual ACE_CString _info (void) const;
@@ -171,19 +173,19 @@ public:
class TAO_Export CORBA_SystemException : public CORBA_Exception
{
// = TITLE
- // CORBA_SystemException
+ // CORBA_SystemException
//
// = DESCRIPTION
- // System exceptions are those defined in the CORBA spec; OMG-IDL
- // defines these.
+ // System exceptions are those defined in the CORBA spec; OMG-IDL
+ // defines these.
public:
// = Initialization and termination methods.
CORBA_SystemException (void);
- // Default Ctor
+ // Default constructtor
CORBA_SystemException (const CORBA_SystemException &src);
- // Copy ctor.
+ // Copy constructor.
~CORBA_SystemException (void);
// Destructor.
@@ -236,7 +238,7 @@ protected:
CORBA_SystemException (const char *repository_id,
CORBA::ULong code,
CORBA::CompletionStatus completed);
- // Ctor using a repository id.
+ // Constructor using a repository id.
private:
CORBA::ULong minor_;
@@ -312,27 +314,28 @@ TAO_SYSTEM_EXCEPTION(INVALID_TRANSACTION); // invalid TP context passed
class TAO_Export CORBA_UnknownUserException : public CORBA_UserException
{
// = TITLE
- // CORBA_UnknownUserException
+ // CORBA_UnknownUserException
//
// = DESCRIPTION
- // When user exceptions are received by a DII invocation the ORB
- // is unable to create the exception with the right dynamic type;
- // to workaround this problem it throws a
- // <CORBA::UnknownUserException> that contains the exception inside
- // an Any.
+ // When user exceptions are received by a DII invocation the ORB
+ // is unable to create the exception with the right dynamic type;
+ // to workaround this problem it throws a
+ // <CORBA::UnknownUserException> that contains the exception inside
+ // an Any.
public:
// = Initialization and termination methods.
+
CORBA_UnknownUserException (void);
// Constructor.
CORBA_UnknownUserException (CORBA_Any& exception);
- // Destructor.
+ // Constructor.
CORBA_UnknownUserException (const CORBA_UnknownUserException& e);
- // Copy constructor
+ // Copy constructor.
virtual ~CORBA_UnknownUserException (void);
- // Constructor.
+ // Destructor.
CORBA_Any& exception (void);
// Return the any containing the user exception.
@@ -346,7 +349,7 @@ public:
CORBA::Environment &);
static CORBA_UnknownUserException *_downcast (CORBA_Exception *ex);
- // Narrow to an UnknowUserException
+ // Narrow to an UnknowUserException.
// = TAO specific extension.
@@ -364,41 +367,41 @@ private:
class TAO_Export TAO_Exceptions
{
// = TITLE
- // This class is a namespace for exception-related static data and
- // methods.
+ // This class is a namespace for exception-related static data and
+ // methods.
public:
static void make_standard_typecode (CORBA::TypeCode_ptr &tcp,
const char *name,
char *buf,
size_t buflen,
CORBA_Environment &ACE_TRY_ENV =
- TAO_default_environment ());
+ TAO_default_environment ());
// Make the TypeCode for a standard exception. When used correctly,
// initializing system exceptions is only an exercise in CPU time;
// it allocates no new memory.
static void make_unknown_user_typecode (CORBA::TypeCode_ptr &tcp,
CORBA_Environment &ACE_TRY_ENV =
- TAO_default_environment ());
+ TAO_default_environment ());
// Make the TypeCode for the CORBA::UnknownUserException standard
// exception.
static void init (CORBA_Environment &ACE_TRY_ENV =
- TAO_default_environment ());
+ TAO_default_environment ());
// Runtime initialization of all standard exception typecodes.
// Called from <CORBA::ORB_init>.
static void fini (void);
// Runtime finalization of all standard exception typecodes.
- static CORBA_SystemException *
- create_system_exception (const char *id,
- CORBA_Environment &ACE_TRY_ENV =
- TAO_default_environment ());
- // Create a CORBA::SystemException given the interface repository
- // ID.
+ static CORBA_SystemException *create_system_exception (
+ const char *id,
+ CORBA_Environment &ACE_TRY_ENV =
+ TAO_default_environment ()
+ );
+ // Create a CORBA::SystemException given the interface repository ID.
- static CORBA::ExceptionList *system_exceptions;
+ static ACE_Unbounded_Queue<CORBA::TypeCode_ptr> *system_exceptions;
// List of system exceptions.
private:
@@ -411,123 +414,14 @@ private:
static int initialized_;
// Flag that denotes that the TAO's CORBA exceptions have been
// initialized.
-
-};
-
-class CORBA_ExceptionList;
-typedef CORBA_ExceptionList *CORBA_ExceptionList_ptr;
-
-class TAO_Export CORBA_ExceptionList
-{
- // = TITLE
- // ExceptionList definition taken from CORBA v2.2 Feb 1998
- //
- // = DESCRIPTION
- // Maintains a list of TypeCodes for Exceptions.
-public:
- // = Intialization and termination methods.
-
- CORBA_ExceptionList (void);
- // constructor
-
- CORBA_ExceptionList (CORBA::ULong len,
- CORBA::TypeCode_ptr *tc_list);
- // Constructor - initialize given a length and an array of
- // TypeCodes.
-
- ~CORBA_ExceptionList (void);
- // Destructor.
-
- CORBA::ULong count ();
- // Return the number of elements.
-
- CORBA_ExceptionList_ptr _duplicate (void);
- // Increase the reference count.
-
- static CORBA_ExceptionList_ptr _duplicate (CORBA_ExceptionList *);
- // Increase the reference count in the spec defined manner.
-
- void _destroy (void);
-
- static CORBA_ExceptionList_ptr _nil (void);
-
- void add (CORBA::TypeCode_ptr tc);
- // Add a TypeCode to the list
-
- void add_consume (CORBA::TypeCode_ptr tc);
- // Add and consume a TypeCode to the list
-
- CORBA::TypeCode_ptr item (CORBA::ULong slot,
- CORBA_Environment &ACE_TRY_ENV =
- TAO_default_environment ());
- // Return the typecode at slot i. Raises the "Bounds" exception.
-
- void remove (CORBA::ULong slot,
- CORBA_Environment &ACE_TRY_ENV =
- TAO_default_environment ());
- // Remove the typecode at slot i. Raises the "Bounds" exception.
-
- void _incr_refcnt (void);
- void _decr_refcnt (void);
- // Increment and decrement ref counts
-
-#if !defined(__GNUC__) || __GNUC__ > 2 || __GNUC_MINOR__ >= 8
- typedef CORBA::ExceptionList_ptr _ptr_type;
- typedef CORBA::ExceptionList_var _var_type;
-#endif /* __GNUC__ */
- // Useful for template programming.
-
-private:
- // = Not allowed.
- CORBA_ExceptionList (const CORBA_ExceptionList &);
- CORBA_ExceptionList &operator= (const CORBA_ExceptionList &);
-
- ACE_Atomic_Op<ACE_SYNCH_MUTEX, CORBA::ULong> ref_count_;
- // Reference counter.
-
- ACE_Unbounded_Queue<CORBA::TypeCode_ptr> tc_list_;
- // internal list of typecodes
-};
-
-class TAO_Export CORBA_ExceptionList_var
-{
- // = TITLE
- // CORBA_ExceptionList_var
- //
- // = DESCRIPTION
- // Lifecycle management helper class for ExceptionList objects.
-public:
- CORBA_ExceptionList_var (void);
- // default constructor
- CORBA_ExceptionList_var (CORBA_ExceptionList_ptr);
- CORBA_ExceptionList_var (const CORBA_ExceptionList_var &);
- // copy constructor
- ~CORBA_ExceptionList_var (void);
- // destructor
-
- CORBA_ExceptionList_var &operator= (CORBA_ExceptionList_ptr);
- CORBA_ExceptionList_var &operator= (const CORBA_ExceptionList_var &);
- CORBA_ExceptionList_ptr operator-> (void) const;
-
- operator const CORBA_ExceptionList_ptr &() const;
- operator CORBA_ExceptionList_ptr &();
- // in, inout, out, _retn
- CORBA_ExceptionList_ptr in (void) const;
- CORBA_ExceptionList_ptr &inout (void);
- CORBA_ExceptionList_ptr &out (void);
- CORBA_ExceptionList_ptr _retn (void);
- CORBA_ExceptionList_ptr ptr (void) const;
-
-private:
- CORBA_ExceptionList_ptr ptr_;
};
#if defined (TAO_DONT_CATCH_DOT_DOT_DOT)
class TAO_Export TAO_DONT_CATCH
{
// = TITLE
- // This class is only used internally in TAO as an exception
- // that never gets thrown. Never use this class anywhere.
+ // This class is only used internally in TAO as an exception
+ // that never gets thrown. Never use this class anywhere.
public:
TAO_DONT_CATCH (void);
};
diff --git a/TAO/tao/Exception.i b/TAO/tao/Exception.i
index 39fa3886f47..16ac2878227 100644
--- a/TAO/tao/Exception.i
+++ b/TAO/tao/Exception.i
@@ -37,126 +37,3 @@ CORBA_SystemException::completed (CORBA::CompletionStatus c)
this->completed_ = c;
}
-ACE_INLINE
-CORBA_ExceptionList::CORBA_ExceptionList (void)
- : ref_count_ (1)
-{
-}
-
-ACE_INLINE CORBA::ULong
-CORBA_ExceptionList::count (void)
-{
- return (CORBA::ULong) this->tc_list_.size ();
-}
-
-ACE_INLINE CORBA_ExceptionList_ptr
-CORBA_ExceptionList::_nil (void)
-{
- return (CORBA_ExceptionList_ptr)0;
-}
-
-ACE_INLINE CORBA_ExceptionList *
-CORBA_ExceptionList::_duplicate (CORBA_ExceptionList* x)
-{
- if (x != 0)
- x->_incr_refcnt ();
- return x;
-}
-
-ACE_INLINE
-CORBA_ExceptionList_var::CORBA_ExceptionList_var (void) // default constructor
- : ptr_ (CORBA_ExceptionList::_nil ())
-{}
-
-ACE_INLINE
-CORBA_ExceptionList_var::CORBA_ExceptionList_var (CORBA_ExceptionList_ptr p)
- : ptr_ (p)
-{}
-
-ACE_INLINE CORBA_ExceptionList_ptr
-CORBA_ExceptionList_var::ptr (void) const
-{
- return this->ptr_;
-}
-
-ACE_INLINE
-CORBA_ExceptionList_var::CORBA_ExceptionList_var (const CORBA_ExceptionList_var &p) // copy constructor
- : ptr_ (CORBA_ExceptionList::_duplicate (p.ptr_))
-{
-}
-
-ACE_INLINE
-CORBA_ExceptionList_var::~CORBA_ExceptionList_var (void) // destructor
-{
- if (this->ptr_ != 0)
- this->ptr_->_destroy ();
-}
-
-ACE_INLINE CORBA_ExceptionList_var &
-CORBA_ExceptionList_var::operator= (CORBA_ExceptionList_ptr p)
-{
- if (this->ptr_ != 0)
- this->ptr_->_destroy ();
- this->ptr_ = p;
- return *this;
-}
-
-ACE_INLINE CORBA_ExceptionList_var &
-CORBA_ExceptionList_var::operator= (const CORBA_ExceptionList_var &p)
-{
- if (this != &p)
- {
- if (this->ptr_ != 0)
- this->ptr_->_destroy ();
- this->ptr_ = CORBA_ExceptionList::_duplicate (p.ptr_);
- }
- return *this;
-}
-
-ACE_INLINE
-CORBA_ExceptionList_var::operator const CORBA_ExceptionList_ptr &() const // cast
-{
- return this->ptr_;
-}
-
-ACE_INLINE
-CORBA_ExceptionList_var::operator CORBA_ExceptionList_ptr &() // cast
-{
- return this->ptr_;
-}
-
-ACE_INLINE CORBA_ExceptionList_ptr
-CORBA_ExceptionList_var::operator-> (void) const
-{
- return this->ptr_;
-}
-
-ACE_INLINE CORBA_ExceptionList_ptr
-CORBA_ExceptionList_var::in (void) const
-{
- return this->ptr_;
-}
-
-ACE_INLINE CORBA_ExceptionList_ptr &
-CORBA_ExceptionList_var::inout (void)
-{
- return this->ptr_;
-}
-
-ACE_INLINE CORBA_ExceptionList_ptr &
-CORBA_ExceptionList_var::out (void)
-{
- if (this->ptr_ != 0)
- this->ptr_->_destroy ();
- this->ptr_ = CORBA_ExceptionList::_nil ();
- return this->ptr_;
-}
-
-ACE_INLINE CORBA_ExceptionList_ptr
-CORBA_ExceptionList_var::_retn (void)
-{
- // yield ownership of managed obj reference
- CORBA_ExceptionList_ptr val = this->ptr_;
- this->ptr_ = CORBA_ExceptionList::_nil ();
- return val;
-}
diff --git a/TAO/tao/GIOP_Message_Acceptors.cpp b/TAO/tao/GIOP_Message_Acceptors.cpp
index 8296710f240..dcf916038f2 100644
--- a/TAO/tao/GIOP_Message_Acceptors.cpp
+++ b/TAO/tao/GIOP_Message_Acceptors.cpp
@@ -238,10 +238,13 @@ TAO_GIOP_Message_Acceptors::process_client_request (
if (response_required)
{
- CORBA::UNKNOWN exception
- (CORBA::SystemException::_tao_minor_code
- (TAO_UNHANDLED_SERVER_CXX_EXCEPTION, 0),
- CORBA::COMPLETED_MAYBE);
+ CORBA::UNKNOWN exception (
+ CORBA::SystemException::_tao_minor_code (
+ TAO_UNHANDLED_SERVER_CXX_EXCEPTION,
+ 0
+ ),
+ CORBA::COMPLETED_MAYBE
+ );
result = this->send_reply_exception (transport,
orb_core,
diff --git a/TAO/tao/InterfaceC.cpp b/TAO/tao/InterfaceC.cpp
index ab0c8db39bb..13b692d5113 100644
--- a/TAO/tao/InterfaceC.cpp
+++ b/TAO/tao/InterfaceC.cpp
@@ -13,7 +13,6 @@
#include "tao/Stub.h"
#include "tao/Invocation.h"
-#include "tao/NVList.h"
#if !defined (__ACE_INLINE__)
#include "InterfaceC.i"
diff --git a/TAO/tao/Invocation.cpp b/TAO/tao/Invocation.cpp
index a4e84bc60b1..c32e97dc1e6 100644
--- a/TAO/tao/Invocation.cpp
+++ b/TAO/tao/Invocation.cpp
@@ -5,6 +5,7 @@
#include "tao/Stub.h"
#include "tao/Timeprobe.h"
+#include "tao/Dynamic_Adapter.h"
#include "tao/Object_KeyC.h"
#include "tao/debug.h"
#include "tao/Pluggable.h"
@@ -19,6 +20,8 @@
#include "tao/GIOP_Utils.h"
#include "tao/ORB_Core.h"
+#include "ace/Dynamic_Service.h"
+
#if !defined (__ACE_INLINE__)
# include "tao/Invocation.i"
#endif /* ! __ACE_INLINE__ */
@@ -571,7 +574,7 @@ TAO_GIOP_Twoway_Invocation::start (CORBA::Environment &ACE_TRY_ENV)
int
TAO_GIOP_Twoway_Invocation::invoke (CORBA::ExceptionList_ptr exceptions,
CORBA::Environment &ACE_TRY_ENV)
- ACE_THROW_SPEC ((CORBA::SystemException,CORBA::UnknownUserException))
+ ACE_THROW_SPEC ((CORBA::SystemException, CORBA::UnknownUserException))
{
TAO_FUNCTION_PP_TIMEPROBE (TAO_GIOP_INVOCATION_INVOKE_START);
@@ -601,55 +604,37 @@ TAO_GIOP_Twoway_Invocation::invoke (CORBA::ExceptionList_ptr exceptions,
TAO_INVOKE_EXCEPTION);
}
- for (CORBA::ULong i = 0;
- exceptions != 0 && i < exceptions->count ();
- i++)
- {
- CORBA::TypeCode_ptr tcp =
- exceptions->item (i, ACE_TRY_ENV);
- ACE_CHECK_RETURN (TAO_INVOKE_EXCEPTION);
+ TAO_Dynamic_Adapter *dynamic_adapter =
+ ACE_Dynamic_Service<TAO_Dynamic_Adapter>::instance ("Dynamic_Adapter");
- const char *xid = tcp->id (ACE_TRY_ENV);
- ACE_CHECK_RETURN (TAO_INVOKE_EXCEPTION);
-
- if (ACE_OS::strcmp (buf.in (), xid) != 0)
- continue;
-
- // @@ In the old days the exceptions where catched and the
- // connection was closed, that doesn't make any sense:
- // this is a client side problem, for one particular
- // request.
- // this->transport_->close_connection ();
- // ACE_RE_THROW;
-
- const ACE_Message_Block* cdr =
- this->inp_stream ().start ();
- CORBA_Any any (tcp, 0,
- this->inp_stream ().byte_order (),
- cdr);
- CORBA_Exception *exception;
-
- ACE_NEW_THROW_EX (exception,
- CORBA_UnknownUserException (any),
- CORBA::NO_MEMORY (TAO_DEFAULT_MINOR_CODE,
- CORBA::COMPLETED_YES));
- ACE_CHECK_RETURN (TAO_INVOKE_EXCEPTION);
+ CORBA_Exception *decoded_exception =
+ dynamic_adapter->decode_user_exception (exceptions,
+ this,
+ buf.in (),
+ ACE_TRY_ENV);
+ ACE_CHECK_RETURN (TAO_INVOKE_EXCEPTION);
+ if (decoded_exception != 0)
+ {
// @@ Think about a better way to raise the exception here,
// maybe we need some more macros?
- ACE_TRY_ENV.exception (exception); // We can not use ACE_THROW here.
+
+ // We can not use ACE_THROW here.
+ ACE_TRY_ENV.exception (decoded_exception);
return TAO_INVOKE_EXCEPTION;
}
+ else
+ {
+ // If we couldn't find the right exception, report it as
+ // CORBA::UNKNOWN.
- // If we couldn't find the right exception, report it as
- // CORBA::UNKNOWN.
-
- // @@ It would seem like if the remote exception is a
- // UserException we can assume that the request was
- // completed.
- ACE_THROW_RETURN (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE,
- CORBA::COMPLETED_YES),
- TAO_INVOKE_EXCEPTION);
+ // @@ It would seem like if the remote exception is a
+ // UserException we can assume that the request was
+ // completed.
+ ACE_THROW_RETURN (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE,
+ CORBA::COMPLETED_YES),
+ TAO_INVOKE_EXCEPTION);
+ }
}
return retval;
diff --git a/TAO/tao/Invocation.h b/TAO/tao/Invocation.h
index ed00041955d..c8cbcc7f86d 100644
--- a/TAO/tao/Invocation.h
+++ b/TAO/tao/Invocation.h
@@ -63,14 +63,14 @@ enum TAO_Invoke_Status
class TAO_Export TAO_GIOP_Invocation
{
// = TITLE
- // Encapsulates common behavior for both oneway and twoway
- // invocations.
+ // Encapsulates common behavior for both oneway and twoway
+ // invocations.
//
// = DESCRIPTION
- // This class connects (or lookups a connection from the cache)
- // to the remote server, builds the CDR stream for the Request,
- // send the CDR stream and expects the response and interprets
- // the incoming CDR stream.
+ // This class connects (or lookups a connection from the cache)
+ // to the remote server, builds the CDR stream for the Request,
+ // send the CDR stream and expects the response and interprets
+ // the incoming CDR stream.
friend class TAO_Endpoint_Selector_Factory;
friend class TAO_Default_Endpoint_Selector;
@@ -233,13 +233,13 @@ protected:
class TAO_Export TAO_GIOP_Twoway_Invocation : public TAO_GIOP_Invocation
{
// = TITLE
- // Sends a two-way request, and expects the reply.
+ // Sends a two-way request, and expects the reply.
//
// = DESCRIPTION
- // This class connects (or lookups a connection from the cache) to
- // the remote server, builds the CDR stream for the Request, send
- // the CDR stream and expects the response and interprets the
- // incoming CDR stream.
+ // This class connects (or lookups a connection from the cache) to
+ // the remote server, builds the CDR stream for the Request, send
+ // the CDR stream and expects the response and interprets the
+ // incoming CDR stream.
//
public:
TAO_GIOP_Twoway_Invocation (TAO_Stub *data,
diff --git a/TAO/tao/LocalObject.cpp b/TAO/tao/LocalObject.cpp
index 9186cee2922..ef92b95124a 100644
--- a/TAO/tao/LocalObject.cpp
+++ b/TAO/tao/LocalObject.cpp
@@ -4,7 +4,6 @@
#include "tao/LocalObject.h"
#include "tao/Stub.h"
-#include "tao/Request.h"
#include "tao/debug.h"
#if (TAO_HAS_INTERFACE_REPOSITORY == 1)
@@ -132,7 +131,7 @@ CORBA::Request_ptr
CORBA_LocalObject::_request (const CORBA::Char *,
CORBA_Environment &ACE_TRY_ENV)
{
- ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), CORBA::Request::_nil ());
+ ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0);
}
#if (TAO_HAS_INTERFACE_REPOSITORY == 1)
diff --git a/TAO/tao/Makefile b/TAO/tao/Makefile
index 65562d69e64..f6259168864 100644
--- a/TAO/tao/Makefile
+++ b/TAO/tao/Makefile
@@ -12,6 +12,7 @@ SHLIB = $(LIBNAME).$(SOEXT)
DIRS = \
PortableServer \
DynamicAny \
+ DynamicInterface \
IORManipulation \
IORTable
@@ -44,7 +45,6 @@ PUB_HDRS = \
operation_details \
Invocation \
Asynch_Invocation \
- DII_Invocation \
Params \
Marshal \
Debug \
@@ -67,7 +67,6 @@ PUB_HDRS = \
Reply_Dispatcher \
Synch_Reply_Dispatcher \
Asynch_Reply_Dispatcher \
- DII_Reply_Dispatcher \
BoundC \
GIOPC \
TAO_Export \
@@ -186,7 +185,6 @@ ORB_CORE_FILES = \
Invocation \
Invocation_Endpoint_Selectors \
Asynch_Invocation \
- DII_Invocation \
operation_details \
PortableInterceptor \
ClientRequestInfo \
@@ -218,7 +216,6 @@ ORB_CORE_FILES = \
Reply_Dispatcher \
Synch_Reply_Dispatcher \
Asynch_Reply_Dispatcher \
- DII_Reply_Dispatcher \
IOPC \
IOPS \
PollableC \
@@ -273,11 +270,9 @@ include $(TAO_ROOT)/rules.tao.GNU
ifeq ($(minimum_corba),0)
ORB_CORE_FILES += \
- Context \
- Request \
Services \
- Server_Request \
- NVList
+ NVList \
+ Dynamic_Adapter
INTERFACE_REPO_FILES += \
InterfaceC
diff --git a/TAO/tao/Makefile.am b/TAO/tao/Makefile.am
index 08a266e4f83..eb3140c9bc4 100644
--- a/TAO/tao/Makefile.am
+++ b/TAO/tao/Makefile.am
@@ -104,7 +104,6 @@ ORB_CORE_FILES = \
TimeBaseS.cpp \
Principal.cpp \
Sequence.cpp \
- Server_Request.cpp \
MProfile.cpp \
Stub.cpp \
Typecode.cpp \
@@ -119,7 +118,6 @@ ORB_CORE_FILES = \
Interceptor.cpp \
InterceptorC.cpp \
Asynch_Invocation.cpp \
- DII_Invocation.cpp \
operation_details.cpp \
PortableInterceptor.cpp \
Request_Info.cpp \
@@ -152,7 +150,7 @@ ORB_CORE_FILES = \
Reply_Dispatcher.cpp \
Synch_Reply_Dispatcher.cpp \
Asynch_Reply_Dispatcher.cpp \
- DII_Reply_Dispatcher.cpp \
+ Dynamic_Adapter.cpp \
IOPC.cpp \
IOPS.cpp \
PollableC.cpp \
@@ -160,8 +158,6 @@ ORB_CORE_FILES = \
CONV_FRAMEC.cpp \
CONV_FRAMES.cpp \
Tagged_Components.cpp \
- Context.cpp \
- Request.cpp \
Services.cpp \
NVList.cpp \
MessagingC.cpp \
@@ -260,7 +256,6 @@ HEADER_FILES = \
Active_Object_Map.h \
Any.h \
Asynch_Invocation.h \
- DII_Invocation.h \
BoundsC.h \
Buffering_Constraint_Policy.h \
CDR.h \
@@ -271,7 +266,6 @@ HEADER_FILES = \
Client_Priority_Policy.h \
Client_Strategy_Factory.h \
Connector_Registry.h \
- Context.h \
CurrentC.h \
DLL_ORB.h
Direct_Priority_Mapping.h \
@@ -356,12 +350,10 @@ HEADER_FILES = \
RT_Current.h \
Reactor_Per_Priority.h \
Reactor_Registry.h \
- Request.h \
Resource_Factory.h \
Sequence.h \
Sequence_T.h \
Servant_Base.h \
- Server_Request.h \
Server_Strategy_Factory.h \
Services.h \
Single_Reactor.h \
@@ -399,8 +391,8 @@ HEADER_FILES = \
Reply_Dispatcher.h \
Synch_Reply_Dispatcher.h \
Asynch_Reply_Dispatcher.h \
- DII_Reply_Dispatcher.h \
WrongTransactionC.h \
+ Dynamic_Adapter.h \
corba.h \
corbafwd.h \
debug.h \
@@ -421,7 +413,6 @@ INLINE_FILES = \
Active_Object_Map.i \
Any.i \
Asynch_Invocation.i \
- DII_Invocation.i \
BoundsC.i \
Buffering_Constraint_Policy.i \
CDR.i \
@@ -431,7 +422,6 @@ INLINE_FILES = \
CORBA_String.inl \
Client_Priority_Policy.i \
Connector_Registry.i \
- Context.i \
CurrentC.i \
DLL_ORB.inl \
Direct_Priority_Mapping.i \
@@ -500,12 +490,9 @@ INLINE_FILES = \
Reply_Dispatcher.i \
Synch_Reply_Dispatcher.i \
Asynch_Reply_Dispatcher.i \
- DII_Reply_Dispatcher.i \
- Request.i \
Sequence.i \
Sequence_T.i \
Servant_Base.i \
- Server_Request.i \
Services.i \
Single_Reactor.i \
Stub.i \
diff --git a/TAO/tao/Makefile.bor b/TAO/tao/Makefile.bor
index f744ec6a00f..55eefac9260 100644
--- a/TAO/tao/Makefile.bor
+++ b/TAO/tao/Makefile.bor
@@ -4,7 +4,7 @@
NAME = TAO
-DIRS = DynamicAny PortableServer IORTable IORManipulation
+DIRS = DynamicAny DynamicInterface PortableServer IORTable IORManipulation
OBJFILES = \
$(OBJDIR)\Abstract_Servant_Base.obj \
@@ -23,7 +23,6 @@ OBJFILES = \
$(OBJDIR)\Client_Strategy_Factory.obj \
$(OBJDIR)\ClientRequestInfo.obj \
$(OBJDIR)\Connector_Registry.obj \
- $(OBJDIR)\Context.obj \
$(OBJDIR)\CONV_FRAMEC.obj \
$(OBJDIR)\CONV_FRAMES.obj \
$(OBJDIR)\corbafwd.obj \
@@ -35,12 +34,11 @@ OBJFILES = \
$(OBJDIR)\default_client.obj \
$(OBJDIR)\default_resource.obj \
$(OBJDIR)\default_server.obj \
- $(OBJDIR)\DII_Invocation.obj \
- $(OBJDIR)\DII_Reply_Dispatcher.obj \
$(OBJDIR)\Direct_Priority_Mapping.obj \
$(OBJDIR)\DLL_ORB.obj \
$(OBJDIR)\DLL_Parser.obj \
$(OBJDIR)\DomainC.obj \
+ $(OBJDIR)\Dynamic_Adapter.obj \
$(OBJDIR)\DynamicC.obj \
$(OBJDIR)\Encodable.obj \
$(OBJDIR)\Endpoint.obj \
@@ -130,7 +128,6 @@ OBJFILES = \
$(OBJDIR)\Remote_Object_Proxy_Broker.obj \
$(OBJDIR)\Remote_Object_Proxy_Impl.obj \
$(OBJDIR)\Reply_Dispatcher.obj \
- $(OBJDIR)\Request.obj \
$(OBJDIR)\Resource_Factory.obj \
$(OBJDIR)\RT_Current.obj \
$(OBJDIR)\RT_Mutex.obj \
@@ -141,7 +138,6 @@ OBJFILES = \
$(OBJDIR)\RTCORBAC.obj \
$(OBJDIR)\RTCORBAS.obj \
$(OBJDIR)\Sequence.obj \
- $(OBJDIR)\Server_Request.obj \
$(OBJDIR)\Server_Strategy_Factory.obj \
$(OBJDIR)\Services.obj \
$(OBJDIR)\SHMIOP_Acceptor.obj \
diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp
index a680f259b81..274e410cdb5 100644
--- a/TAO/tao/ORB.cpp
+++ b/TAO/tao/ORB.cpp
@@ -17,14 +17,14 @@
#include "tao/Object.h"
#include "tao/Typecode.h"
-#include "tao/NVList.h"
#include "tao/Stub.h"
#include "tao/ORB_Core.h"
#include "tao/Server_Strategy_Factory.h"
#include "tao/debug.h"
#include "tao/TAO_Internal.h"
+#include "tao/NVList.h"
+#include "tao/Dynamic_Adapter.h"
#include "tao/CDR.h"
-#include "tao/Request.h"
#include "tao/MProfile.h"
#include "tao/RT_ORB.h"
@@ -326,14 +326,22 @@ CORBA_ORB::create_list (CORBA::Long count,
}
}
-// The following functions are not implemented - they just throw
-// CORBA::NO_IMPLEMENT.
-
void
CORBA_ORB::create_exception_list (CORBA::ExceptionList_ptr &list,
CORBA_Environment &ACE_TRY_ENV)
{
- ACE_NEW_THROW_EX (list, CORBA::ExceptionList (),
+ TAO_Dynamic_Adapter *dynamic_adapter =
+ ACE_Dynamic_Service<TAO_Dynamic_Adapter>::instance ("Dynamic_Adapter");
+
+ dynamic_adapter->create_exception_list (list,
+ ACE_TRY_ENV);
+}
+
+void
+CORBA_ORB::create_environment (CORBA::Environment_ptr &environment,
+ CORBA_Environment &ACE_TRY_ENV)
+{
+ ACE_NEW_THROW_EX (environment, CORBA::Environment (),
CORBA::NO_MEMORY (
CORBA_SystemException::_tao_minor_code (
TAO_DEFAULT_MINOR_CODE,
@@ -342,10 +350,11 @@ CORBA_ORB::create_exception_list (CORBA::ExceptionList_ptr &list,
}
void
-CORBA_ORB::create_environment (CORBA::Environment_ptr &environment,
+CORBA_ORB::create_named_value (CORBA::NamedValue_ptr &nv,
CORBA_Environment &ACE_TRY_ENV)
{
- ACE_NEW_THROW_EX (environment, CORBA::Environment (),
+ ACE_NEW_THROW_EX (nv,
+ CORBA::NamedValue,
CORBA::NO_MEMORY (
CORBA_SystemException::_tao_minor_code (
TAO_DEFAULT_MINOR_CODE,
@@ -353,6 +362,9 @@ CORBA_ORB::create_environment (CORBA::Environment_ptr &environment,
CORBA::COMPLETED_NO));
}
+// The following functions are not implemented - they just throw
+// CORBA::NO_IMPLEMENT.
+
CORBA::Boolean
CORBA_ORB::get_service_information (CORBA::ServiceType /* service_type */,
CORBA::ServiceInformation_out /* service_information */,
@@ -367,19 +379,6 @@ CORBA_ORB::get_service_information (CORBA::ServiceType /* service_type */,
}
void
-CORBA_ORB::create_named_value (CORBA::NamedValue_ptr &nv,
- CORBA_Environment &ACE_TRY_ENV)
-{
- ACE_NEW_THROW_EX (nv,
- CORBA::NamedValue,
- CORBA::NO_MEMORY (
- CORBA_SystemException::_tao_minor_code (
- TAO_DEFAULT_MINOR_CODE,
- ENOMEM),
- CORBA::COMPLETED_NO));
-}
-
-void
CORBA_ORB::create_context_list (CORBA::ContextList_ptr &,
CORBA_Environment &ACE_TRY_ENV)
{
@@ -402,7 +401,7 @@ CORBA_ORB::get_default_context (CORBA::Context_ptr &,
}
void
-CORBA_ORB::send_multiple_requests_oneway (const CORBA_ORB_RequestSeq,
+CORBA_ORB::send_multiple_requests_oneway (const CORBA_ORB_RequestSeq &,
CORBA_Environment &ACE_TRY_ENV)
{
ACE_THROW (CORBA::NO_IMPLEMENT (
@@ -413,7 +412,7 @@ CORBA_ORB::send_multiple_requests_oneway (const CORBA_ORB_RequestSeq,
}
void
-CORBA_ORB::send_multiple_requests_deferred (const CORBA_ORB_RequestSeq,
+CORBA_ORB::send_multiple_requests_deferred (const CORBA_ORB_RequestSeq &,
CORBA_Environment &ACE_TRY_ENV)
{
ACE_THROW (CORBA::NO_IMPLEMENT (
@@ -1216,9 +1215,6 @@ CORBA::ORB_init (int &argc,
PortableInterceptor::register_orb_initializer (orb_initializer.in (),
ACE_TRY_ENV);
ACE_CHECK_RETURN (CORBA::ORB::_nil ());
-
- /// Transfer ownership to the ORBInitializer registry.
- (void) orb_initializer._retn ();
#endif /* TAO_HAS_RT_CORBA == 1 */
#if TAO_HAS_CORBA_MESSAGING == 1
@@ -1236,10 +1232,7 @@ CORBA::ORB_init (int &argc,
PortableInterceptor::register_orb_initializer (orb_initializer.in (),
ACE_TRY_ENV);
ACE_CHECK_RETURN (CORBA::ORB::_nil ());
-
- /// Transfer ownership to the ORBInitializer registry.
- (void) orb_initializer._retn ();
- #endif /* TAO_HAS_CORBA_MESSAGING == 1 */
+#endif /* TAO_HAS_CORBA_MESSAGING == 1 */
// -------------------------------------------------------------
PortableInterceptor::ORBInitInfo_ptr orb_init_info_temp;
diff --git a/TAO/tao/ORB.h b/TAO/tao/ORB.h
index 3e67d90fc7f..7e4d6a9c755 100644
--- a/TAO/tao/ORB.h
+++ b/TAO/tao/ORB.h
@@ -171,13 +171,17 @@ public:
CORBA_Environment &ACE_TRY_ENV =
TAO_default_environment ());
- // The following are not implemented and just throw
- // CORBA::NO_IMPLEMENT.
-
void create_exception_list (CORBA::ExceptionList_ptr &exclist,
CORBA_Environment &ACE_TRY_ENV =
TAO_default_environment ());
+ void create_environment (CORBA::Environment_ptr &new_env,
+ CORBA_Environment &ACE_TRY_ENV =
+ TAO_default_environment ());
+
+ // The following are not implemented and just throw
+ // CORBA::NO_IMPLEMENT.
+
void create_context_list (CORBA::ContextList_ptr &ctxtlist,
CORBA_Environment &ACE_TRY_ENV =
TAO_default_environment ());
@@ -186,20 +190,16 @@ public:
CORBA_Environment &ACE_TRY_ENV =
TAO_default_environment ());
- void create_environment (CORBA::Environment_ptr &new_env,
- CORBA_Environment &ACE_TRY_ENV =
- TAO_default_environment ());
-
CORBA::Boolean get_service_information (CORBA::ServiceType service_type,
CORBA::ServiceInformation_out service_information,
CORBA::Environment &ACE_TRY_ENV =
TAO_default_environment ());
- void send_multiple_requests_oneway (const CORBA_ORB_RequestSeq req,
+ void send_multiple_requests_oneway (const CORBA_ORB_RequestSeq &req ,
CORBA_Environment &ACE_TRY_ENV =
TAO_default_environment ());
- void send_multiple_requests_deferred (const CORBA_ORB_RequestSeq req,
+ void send_multiple_requests_deferred (const CORBA_ORB_RequestSeq &req,
CORBA_Environment &ACE_TRY_ENV =
TAO_default_environment ());
diff --git a/TAO/tao/Object.cpp b/TAO/tao/Object.cpp
index 2bad42b2d10..bcd6106db67 100644
--- a/TAO/tao/Object.cpp
+++ b/TAO/tao/Object.cpp
@@ -5,14 +5,15 @@
//
// ORB: CORBA_Object operations
+#include "ace/Dynamic_Service.h"
#include "tao/Object.h"
#include "tao/Stub.h"
-#include "tao/Request.h"
#include "tao/ORB_Core.h"
#include "tao/Invocation.h"
#include "tao/Connector_Registry.h"
#include "tao/debug.h"
#include "tao/Remote_Object_Proxy_Broker.h"
+#include "tao/Dynamic_Adapter.h"
#if (TAO_HAS_INTERFACE_REPOSITORY == 1)
#include "tao/InterfaceC.h"
@@ -228,16 +229,6 @@ CORBA::Object::_proxy_broker (void)
return this->proxy_broker_;
}
-// @@ This doesn't seemed to be used anyplace! It should go away!! FRED
-void
-CORBA::Object::_use_locate_requests (CORBA::Boolean use_it)
-{
- if ( this->_stubobj () )
- this->_stubobj ()->use_locate_requests (use_it);
-
- return;
-}
-
CORBA::Boolean
CORBA::is_nil (CORBA::Object_ptr obj)
{
@@ -285,26 +276,28 @@ CORBA_Object::_create_request (CORBA::Context_ptr ctx,
CORBA::Environment &ACE_TRY_ENV)
{
// Since we don't really support Context, anything but a null pointer
- // is a no-no. - Jeff
- // Neither can we create a request object from locality constraint
+ // is a no-no.
+ // Neither can we create a request object from locality constrained
// object references.
- if (ctx || this->protocol_proxy_ == 0)
- ACE_THROW (CORBA::NO_IMPLEMENT ());
-
- ACE_NEW_THROW_EX (request,
- CORBA::Request (this,
- this->protocol_proxy_->orb_core ()-> orb (),
- operation,
- arg_list,
- result,
- req_flags,
- CORBA::ExceptionList::_nil (),
- ACE_TRY_ENV),
- CORBA::NO_MEMORY (
- CORBA_SystemException::_tao_minor_code (
- TAO_DEFAULT_MINOR_CODE,
- ENOMEM),
- CORBA::COMPLETED_MAYBE));
+ if (ctx != 0 || this->protocol_proxy_ == 0)
+ {
+ ACE_THROW (CORBA::NO_IMPLEMENT ());
+ }
+
+ TAO_Dynamic_Adapter *dynamic_adapter =
+ ACE_Dynamic_Service<TAO_Dynamic_Adapter>::instance ("Dynamic_Adapter");
+
+ dynamic_adapter->create_request (
+ this,
+ this->protocol_proxy_->orb_core ()-> orb (),
+ operation,
+ arg_list,
+ result,
+ 0,
+ request,
+ req_flags,
+ ACE_TRY_ENV
+ );
}
void
@@ -320,51 +313,50 @@ CORBA_Object::_create_request (CORBA::Context_ptr ctx,
{
// Since we don't really support Context, anything but a null pointer
// is a no-no.
- // Neither can we create a request object from locality constraint
+ // Neither can we create a request object from locality constrained
// object references.
- if (ctx || this->protocol_proxy_ == 0)
+ if (ctx != 0 || this->protocol_proxy_ == 0)
+ {
ACE_THROW (CORBA::NO_IMPLEMENT ());
+ }
- ACE_NEW_THROW_EX (request,
- CORBA::Request (this,
- this->protocol_proxy_->orb_core ()->orb (),
- operation,
- arg_list,
- result,
- req_flags,
- exceptions,
- ACE_TRY_ENV),
- CORBA::NO_MEMORY (
- CORBA_SystemException::_tao_minor_code (
- TAO_DEFAULT_MINOR_CODE,
- ENOMEM),
- CORBA::COMPLETED_MAYBE));
+ TAO_Dynamic_Adapter *dynamic_adapter =
+ ACE_Dynamic_Service<TAO_Dynamic_Adapter>::instance ("Dynamic_Adapter");
+
+ dynamic_adapter->create_request (
+ this,
+ this->protocol_proxy_->orb_core ()-> orb (),
+ operation,
+ arg_list,
+ result,
+ exceptions,
+ request,
+ req_flags,
+ ACE_TRY_ENV
+ );
}
CORBA::Request_ptr
CORBA_Object::_request (const char *operation,
CORBA::Environment &ACE_TRY_ENV)
{
- // ACE_TRY_ENV.clear ();
if (this->protocol_proxy_)
{
- CORBA::Request_ptr req = CORBA::Request::_nil ();
- ACE_NEW_THROW_EX (req,
- CORBA::Request (this,
- this->protocol_proxy_->orb_core ()->orb (),
- operation,
- ACE_TRY_ENV),
- CORBA::NO_MEMORY (
- CORBA_SystemException::_tao_minor_code (
- TAO_DEFAULT_MINOR_CODE,
- ENOMEM),
- CORBA::COMPLETED_MAYBE));
- ACE_CHECK_RETURN (CORBA::Request::_nil ());
-
- return req;
+ TAO_Dynamic_Adapter *dynamic_adapter =
+ ACE_Dynamic_Service<TAO_Dynamic_Adapter>::instance ("Dynamic_Adapter");
+
+ return dynamic_adapter->request (
+ this,
+ this->protocol_proxy_->orb_core ()->orb (),
+ operation,
+ ACE_TRY_ENV
+ );
}
else
- ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), CORBA::Request::_nil ());
+ {
+ ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (),
+ 0);
+ }
}
#if (TAO_HAS_INTERFACE_REPOSITORY == 1)
@@ -667,9 +659,11 @@ TAO_Object_Proxy_Broker * (*_TAO_collocation_Object_Proxy_Broker_Factory_functio
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
template class TAO_Object_Manager<CORBA_Object,CORBA_Object_var>;
+template class ACE_Dynamic_Service<TAO_Request_Factory_Base>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#pragma instantiate TAO_Object_Manager<CORBA_Object,CORBA_Object_var>
+#pragma instantiate ACE_Dynamic_Service<TAO_Request_Factory_Base>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/tao/Object.h b/TAO/tao/Object.h
index 600c8a433cd..2e4c2a60316 100644
--- a/TAO/tao/Object.h
+++ b/TAO/tao/Object.h
@@ -236,10 +236,6 @@ public:
virtual TAO_Object_Proxy_Broker *_proxy_broker (void);
// Gets the proxy broker.
- virtual void _use_locate_requests (CORBA::Boolean use_it);
- // the the object to use a locate request for the first call to
- // the object
-
protected:
CORBA_Object (int dummy);
// Initializing a local object.
diff --git a/TAO/tao/PolicyC.cpp b/TAO/tao/PolicyC.cpp
index 6fc3aee5399..b042108953e 100644
--- a/TAO/tao/PolicyC.cpp
+++ b/TAO/tao/PolicyC.cpp
@@ -10,7 +10,6 @@
#include "tao/PolicyC.h"
#include "tao/Stub.h"
#include "tao/Invocation.h"
-#include "tao/NVList.h"
#if !defined (__ACE_INLINE__)
#include "tao/PolicyC.i"
diff --git a/TAO/tao/PortableServer/POA.cpp b/TAO/tao/PortableServer/POA.cpp
index 38601ba8cbe..07d7e60b7e5 100644
--- a/TAO/tao/PortableServer/POA.cpp
+++ b/TAO/tao/PortableServer/POA.cpp
@@ -2156,6 +2156,7 @@ TAO_POA::validate_policies (CORBA::Environment &ACE_TRY_ENV)
#endif /* TAO_HAS_RT_CORBA */
+
TAO_SERVANT_LOCATION
TAO_POA::locate_servant_i (const PortableServer::ObjectId &system_id,
PortableServer::Servant &servant,
diff --git a/TAO/tao/PortableServer/POA.h b/TAO/tao/PortableServer/POA.h
index 5b14ede0265..44611824c51 100644
--- a/TAO/tao/PortableServer/POA.h
+++ b/TAO/tao/PortableServer/POA.h
@@ -634,6 +634,7 @@ public:
// This method gives the policies that are exposed to the client.
// These policies are shipped within the IOR.
+
// Utility functions for the other
static char* ObjectId_to_string (const PortableServer::ObjectId &id);
diff --git a/TAO/tao/PortableServer/POA.i b/TAO/tao/PortableServer/POA.i
index 65116b01eed..41d806db119 100644
--- a/TAO/tao/PortableServer/POA.i
+++ b/TAO/tao/PortableServer/POA.i
@@ -614,6 +614,7 @@ TAO_POA::activate_object_with_id_and_priority (const PortableServer::ObjectId &
#endif /* TAO_HAS_RT_CORBA */
+
ACE_INLINE PortableServer::POA_ptr
TAO_POA::the_parent (CORBA::Environment &)
ACE_THROW_SPEC ((CORBA::SystemException))
diff --git a/TAO/tao/PortableServer/Servant_Base.cpp b/TAO/tao/PortableServer/Servant_Base.cpp
index 6112e0323b5..67223876261 100644
--- a/TAO/tao/PortableServer/Servant_Base.cpp
+++ b/TAO/tao/PortableServer/Servant_Base.cpp
@@ -10,7 +10,6 @@
#include "tao/Stub.h"
#include "tao/Environment.h"
#include "tao/TAO_Server_Request.h"
-#include "tao/Server_Request.h"
ACE_RCSID(tao, Servant_Base, "$Id$")
@@ -394,133 +393,6 @@ TAO_Local_ServantBase::_dispatch (TAO_ServerRequest &,
ACE_THROW (CORBA::BAD_OPERATION ());
}
-#if (TAO_HAS_MINIMUM_CORBA == 0)
-
-CORBA::Object_ptr
-TAO_DynamicImplementation::_this (CORBA::Environment &ACE_TRY_ENV)
-{
- // The _this() function returns a CORBA::Object_ptr for the target
- // object. Unlike _this() for static skeletons, its return type is
- // not interface-specific because a DSI servant may very well
- // incarnate multiple CORBA objects of different types.
- TAO_Stub *stub = this->_create_stub (ACE_TRY_ENV);
- ACE_CHECK_RETURN (CORBA::Object::_nil ());
-
- // Create a object.
- TAO_Collocated_Object *retval = 0;
- ACE_NEW_RETURN (retval,
- TAO_Collocated_Object (stub,
- 1,
- this),
- CORBA::Object::_nil ());
-
- return retval;
-}
-
-const char *
-TAO_DynamicImplementation::_interface_repository_id (void) const
-{
- // This should never be called.
- return 0;
-}
-
-void *
-TAO_DynamicImplementation::_downcast (const char *repository_id)
-{
- ACE_UNUSED_ARG (repository_id);
-
- // Don't know enough to do better.
- return this;
-}
-
-TAO_Stub *
-TAO_DynamicImplementation::_create_stub (CORBA::Environment &ACE_TRY_ENV)
-{
- // If DynamicImplementation::_this() is invoked outside of the
- // context of a request invocation on a target object being served
- // by the DSI servant, it raises the PortableServer::WrongPolicy
- // exception.
- TAO_POA_Current_Impl *poa_current_impl =
- ACE_static_cast(TAO_POA_Current_Impl *,
- TAO_TSS_RESOURCES::instance ()->poa_current_impl_);
-
- if (poa_current_impl == 0
- || this != poa_current_impl->servant ())
- {
- ACE_THROW_RETURN (PortableServer::POA::WrongPolicy (),
- 0);
- }
-
- PortableServer::POA_var poa = poa_current_impl->get_POA (ACE_TRY_ENV);
- ACE_CHECK_RETURN (0);
-
- CORBA::RepositoryId interface =
- this->_primary_interface (poa_current_impl->object_id (),
- poa.in (),
- ACE_TRY_ENV);
- ACE_CHECK_RETURN (0);
-
- CORBA::PolicyList_var client_exposed_policies =
- poa_current_impl->poa ()->client_exposed_policies (
- poa_current_impl->priority (),
- ACE_TRY_ENV
- );
- ACE_CHECK_RETURN (0);
-
- // @@ PPOA
- // @@ return orb->create_stub_object (
- // @@ client_exposed_policies._retn (),
- // @@ poa_current_impl->poa (),
- // @@ ACE_TRY_ENV);
- return poa_current_impl->poa ()->key_to_stub (
- poa_current_impl->object_key (),
- interface,
- poa_current_impl->priority (),
- ACE_TRY_ENV
- );
-}
-
-void
-TAO_DynamicImplementation::_dispatch (TAO_ServerRequest &request,
- void *context,
- CORBA::Environment &ACE_TRY_ENV)
-{
- ACE_UNUSED_ARG (context);
-
- // Create DSI request object.
- CORBA::ServerRequest dsi_request (request);
-
- // Delegate to user.
- this->invoke (&dsi_request,
- ACE_TRY_ENV);
- ACE_CHECK;
-
- if (request.response_expected ())
- {
- request.init_reply (ACE_TRY_ENV);
- ACE_CHECK;
-
- dsi_request.dsi_marshal (ACE_TRY_ENV);
- ACE_CHECK;
- }
-
- ACE_TRY
- {
- if ((!request.sync_with_server () && request.response_expected ()))
- {
- request.tao_send_reply ();
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCH(CORBA::Exception,ex)
- {
- request.tao_send_reply_exception(ex);
- }
- ACE_ENDTRY;
-}
-
-#endif /* TAO_HAS_MINIMUM_CORBA */
-
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
template class ACE_Atomic_Op<ACE_SYNCH_MUTEX, long>;
diff --git a/TAO/tao/PortableServer/Servant_Base.h b/TAO/tao/PortableServer/Servant_Base.h
index 078a77bc81c..13e4cb4d6d3 100644
--- a/TAO/tao/PortableServer/Servant_Base.h
+++ b/TAO/tao/PortableServer/Servant_Base.h
@@ -263,62 +263,6 @@ protected:
// Throws CORBA::BAD_OPERATION exception.
};
-#if (TAO_HAS_MINIMUM_CORBA == 0)
-
-class TAO_PortableServer_Export TAO_DynamicImplementation
- : public virtual TAO_ServantBase
-{
- // = TITLE
- // Base class for DSI.
- //
- // = DESCRIPTION
- // It is expected that the <invoke> and <_primary_interface>
- // methods will be only invoked by the POA in the context of
- // serving a CORBA request. Invoking this method in other
- // circumstances may lead to unpredictable results.
-public:
- virtual void invoke (CORBA::ServerRequest_ptr request,
- CORBA_Environment &ACE_TRY_ENV =
- TAO_default_environment ()) = 0;
- // The invoke() method receives requests issued to any CORBA object
- // incarnated by the DSI servant and performs the processing
- // necessary to execute the request.
-
- virtual CORBA::RepositoryId _primary_interface (
- const PortableServer::ObjectId &oid,
- PortableServer::POA_ptr poa,
- CORBA_Environment &ACE_TRY_ENV =
- TAO_default_environment ()
- ) = 0;
- // The _primary_interface() method receives an ObjectId value and a
- // POA_ptr as input parameters and returns a valid RepositoryId
- // representing the most-derived interface for that oid.
-
- CORBA::Object_ptr _this (CORBA_Environment &ACE_TRY_ENV =
- TAO_default_environment ());
- // Returns a CORBA::Object_ptr for the target object.
-
-protected:
-
- virtual const char *_interface_repository_id (void) const;
- // Return 0. Should never be used.
-
- virtual void *_downcast (const char *repository_id);
- // Simply returns "this"
-
- virtual TAO_Stub *_create_stub (CORBA_Environment &ACE_TRY_ENV =
- TAO_default_environment ());
- // This is an auxiliar method for _this() and _narrow().
-
- virtual void _dispatch (TAO_ServerRequest &request,
- void *context,
- CORBA_Environment &ACE_TRY_ENV =
- TAO_default_environment ());
- // Turns around and calls invoke.
-};
-
-#endif /* TAO_HAS_MINIMUM_CORBA */
-
#if defined (__ACE_INLINE__)
# include "Servant_Base.i"
#endif /* __ACE_INLINE__ */
diff --git a/TAO/tao/PortableServer/TAO_PortableServer.dsp b/TAO/tao/PortableServer/TAO_PortableServer.dsp
index 5affe4c2edb..e8d1ffad5b9 100644
--- a/TAO/tao/PortableServer/TAO_PortableServer.dsp
+++ b/TAO/tao/PortableServer/TAO_PortableServer.dsp
@@ -176,10 +176,6 @@ SOURCE=.\DomainS.cpp
# End Source File
# Begin Source File
-SOURCE=.\Forwarding_Servant.cpp
-# End Source File
-# Begin Source File
-
SOURCE=.\ImplRepoC.cpp
# End Source File
# Begin Source File
@@ -276,10 +272,6 @@ SOURCE=.\DomainS.h
# End Source File
# Begin Source File
-SOURCE=.\Forwarding_Servant.h
-# End Source File
-# Begin Source File
-
SOURCE=.\ImplRepoC.h
# End Source File
# Begin Source File
diff --git a/TAO/tao/Request.cpp b/TAO/tao/Request.cpp
deleted file mode 100644
index dd7c2e8e023..00000000000
--- a/TAO/tao/Request.cpp
+++ /dev/null
@@ -1,275 +0,0 @@
-// $Id$
-
-#include "tao/Request.h"
-
-#if (TAO_HAS_MINIMUM_CORBA == 0)
-
-#include "tao/Object.h"
-#include "tao/Stub.h"
-#include "tao/Pluggable_Messaging_Utils.h"
-
-
-#if !defined (__ACE_INLINE__)
-# include "tao/Request.i"
-#endif /* ! __ACE_INLINE__ */
-
-ACE_RCSID(tao, Request, "$Id$")
-
-CORBA::ULong
-CORBA_Request::_incr_refcnt (void)
-{
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX,
- ace_mon,
- this->lock_,
- 0);
- return refcount_++;
-}
-
-CORBA::ULong
-CORBA_Request::_decr_refcnt (void)
-{
- {
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX,
- ace_mon,
- this->lock_,
- 0);
- this->refcount_--;
- if (this->refcount_ != 0)
- return this->refcount_;
- }
-
- delete this;
- return 0;
-}
-
-CORBA_Request*
-CORBA_Request::_nil (void)
-{
- return 0;
-}
-
-// Reference counting for DII Request object
-
-// DII Request class implementation
-
-CORBA_Request::CORBA_Request (CORBA::Object_ptr obj,
- CORBA::ORB_ptr orb,
- const CORBA::Char *op,
- CORBA::NVList_ptr args,
- CORBA::NamedValue_ptr result,
- CORBA::Flags flags,
- CORBA::ExceptionList_ptr exceptions,
- CORBA::Environment &ACE_TRY_ENV)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- args_ (CORBA::NVList::_duplicate (args)),
- result_ (CORBA::NamedValue::_duplicate (result)),
- flags_ (flags),
- env_ (ACE_TRY_ENV),
- exceptions_ (CORBA::ExceptionList::_duplicate (exceptions)),
- contexts_ (0),
- ctx_ (0),
- refcount_ (1),
- lazy_evaluation_ (0),
- response_received_ (0)
-{
- this->target_ = CORBA::Object::_duplicate (obj);
- this->opname_ = CORBA::string_dup (op);
- if (this->exceptions_.in () == 0)
- {
- this->exceptions_ = new CORBA::ExceptionList;
- }
-}
-
-CORBA_Request::CORBA_Request (CORBA::Object_ptr obj,
- CORBA::ORB_ptr orb,
- const CORBA::Char *op,
- CORBA::Environment &ACE_TRY_ENV)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- flags_ (0),
- env_ (ACE_TRY_ENV),
- contexts_ (0),
- ctx_ (0),
- refcount_ (1),
- lazy_evaluation_ (0),
- response_received_ (0)
-{
- this->target_ = CORBA::Object::_duplicate (obj);
- this->opname_ = CORBA::string_dup (op);
- this->exceptions_ = new CORBA::ExceptionList;
-
- ACE_NEW (args_, CORBA::NVList);
- ACE_NEW (result_, CORBA::NamedValue);
-}
-
-CORBA_Request::~CORBA_Request (void)
-{
- ACE_ASSERT (refcount_ == 0);
-
- CORBA::release (this->target_);
- CORBA::string_free ((char*) this->opname_);
- this->opname_ = 0;
- CORBA::release (this->args_);
- CORBA::release (this->result_);
-}
-
-// The public DII interfaces: normal and oneway calls.
-//
-// NOTE that using DII, programmers can get the special behaviour of
-// discarding the response for normal calls. This doesn't change the
-// semantics of any OMG-IDL interface, it just streamlines control
-// flow in some exotic situations.
-
-void
-CORBA_Request::invoke (CORBA::Environment &ACE_TRY_ENV)
-{
- TAO_Stub *stub = this->target_->_stubobj ();
-
- stub->do_dynamic_call ((char *) this->opname_,
- 1,
- this->args_,
- this->result_,
- this->flags_,
- this->exceptions_.in (),
- this->lazy_evaluation_,
- ACE_TRY_ENV);
-}
-
-void
-CORBA_Request::send_oneway (CORBA::Environment &ACE_TRY_ENV)
-{
- TAO_Stub *stub = this->target_->_stubobj ();
-
- stub->do_dynamic_call ((char *) opname_,
- 0,
- this->args_,
- this->result_,
- this->flags_,
- this->exceptions_.in (),
- this->lazy_evaluation_,
- ACE_TRY_ENV);
-}
-
-void
-CORBA_Request::send_deferred (CORBA::Environment &ACE_TRY_ENV)
-{
- {
- ACE_GUARD (ACE_SYNCH_MUTEX,
- ace_mon,
- this->lock_);
-
- this->response_received_ = 0;
- }
-
- TAO_Stub *stub = this->target_->_stubobj ();
-
- stub->do_deferred_call (this,
- ACE_TRY_ENV);
-}
-
-void
-CORBA_Request::get_response (CORBA::Environment &ACE_TRY_ENV)
-{
- while (!this->response_received_)
- {
- (void) this->orb_->perform_work ();
- }
-
- if (this->lazy_evaluation_)
- {
- this->args_->evaluate (ACE_TRY_ENV);
- ACE_CHECK;
- }
-}
-
-CORBA::Boolean
-CORBA_Request::poll_response (CORBA::Environment &)
-{
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX,
- ace_mon,
- this->lock_,
- 0);
-
- return this->response_received_;
-}
-
-void
-CORBA_Request::handle_response (TAO_InputCDR &incoming,
- CORBA::ULong reply_status,
- CORBA::Environment &ACE_TRY_ENV)
-{
- switch (reply_status)
- {
- case TAO_PLUGGABLE_MESSAGE_NO_EXCEPTION:
- if (this->result_ != 0)
- {
- this->result_->value ()->_tao_decode (incoming,
- ACE_TRY_ENV);
- ACE_CHECK;
- }
-
- this->args_->_tao_incoming_cdr (incoming,
- CORBA::ARG_OUT | CORBA::ARG_INOUT,
- this->lazy_evaluation_,
- ACE_TRY_ENV);
- ACE_CHECK;
-
- {
- ACE_GUARD (ACE_SYNCH_MUTEX,
- ace_mon,
- this->lock_);
-
- this->response_received_ = 1;
- }
-
- break;
- case TAO_PLUGGABLE_MESSAGE_USER_EXCEPTION:
- case TAO_PLUGGABLE_MESSAGE_SYSTEM_EXCEPTION:
- case TAO_PLUGGABLE_MESSAGE_LOCATION_FORWARD:
- default:
- // @@ (JP) Don't know what to do about any of these yet.
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("(%P|%t) unhandled reply status\n")));
- }
-}
-
-// constructor.
-CORBA_ORB_RequestSeq::CORBA_ORB_RequestSeq (CORBA::ULong max)
- : TAO_Unbounded_Pseudo_Sequence <CORBA_Request,CORBA_Request_var> (max)
-{
- // no-op
-}
-
-CORBA_ORB_RequestSeq::CORBA_ORB_RequestSeq (const CORBA_ORB_RequestSeq &rhs)
- : TAO_Unbounded_Pseudo_Sequence <CORBA_Request,CORBA_Request_var> (rhs)
-{
- // no-op
-}
-
-CORBA_ORB_RequestSeq::CORBA_ORB_RequestSeq (CORBA::ULong max,
- CORBA::ULong length,
- CORBA_Request **data,
- CORBA::Boolean release)
- : TAO_Unbounded_Pseudo_Sequence <CORBA_Request,CORBA_Request_var> (max,
- length,
- data,
- release)
-{
- // no-op
-}
-
-
-CORBA_ORB_RequestSeq::CORBA_ORB_RequestSeq (void)
-{
- // no-op
-}
-
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class TAO_Unbounded_Pseudo_Sequence<CORBA_Request,CORBA_Request_var>;
-template class TAO_Pseudo_Object_Manager<CORBA_Request,CORBA_Request_var>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate TAO_Unbounded_Pseudo_Sequence<CORBA_Request,CORBA_Request_var>
-#pragma instantiate TAO_Pseudo_Object_Manager<CORBA_Request,CORBA_Request_var>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
-#endif /* TAO_HAS_MINIMUM_CORBA */
diff --git a/TAO/tao/Server_Request.i b/TAO/tao/Server_Request.i
deleted file mode 100644
index 8010fa5ce4e..00000000000
--- a/TAO/tao/Server_Request.i
+++ /dev/null
@@ -1,64 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-// @@ TODO TAO allocates its ServerRequest objects from the stack,
-// using reference counting wouldn't help much. Using a _clone()
-// method would make the following methods really easy to implement,
-// but that's hard to implement for the extremely optimized
-// IIOP_ServerRequest.
-// Another solution would be to modify the class hierarchy, make
-// ServerRequest the "slow" version (with copies for each field) and
-// IIOP_ServerRequest the "fast" version (with no copies at all). The
-// first would be use for DII and the later for SII.
-
-ACE_INLINE CORBA::Boolean
-CORBA::is_nil (CORBA_ServerRequest *x)
-{
- return x != 0;
-}
-
-ACE_INLINE void
-CORBA::release (CORBA_ServerRequest *)
-{
-}
-
-ACE_INLINE CORBA_ServerRequest *
-CORBA_ServerRequest::_duplicate (CORBA_ServerRequest *)
-{
- return 0;
-}
-
-ACE_INLINE CORBA_ServerRequest *
-CORBA_ServerRequest::_nil (void)
-{
- return 0;
-}
-
-#if (TAO_HAS_MINIMUM_CORBA == 0)
-
-ACE_INLINE CORBA::Context_ptr
-CORBA_ServerRequest::ctx (void) const
-{
- return this->ctx_;
-}
-
-ACE_INLINE void
-CORBA_ServerRequest::ctx (CORBA::Context_ptr ctx)
-{
- this->ctx_ = ctx;
-}
-
-#endif /* TAO_HAS_MINIMUM_CORBA */
-
-ACE_INLINE const char *
-CORBA_ServerRequest::operation (void) const
-{
- return this->orb_server_request_.operation ();
-}
-
-ACE_INLINE void
-CORBA_ServerRequest::_tao_lazy_evaluation (int lazy_evaluation)
-{
- this->lazy_evaluation_ = lazy_evaluation;
-}
-
diff --git a/TAO/tao/Stub.cpp b/TAO/tao/Stub.cpp
index 04d410babd9..d66c3dba7a8 100644
--- a/TAO/tao/Stub.cpp
+++ b/TAO/tao/Stub.cpp
@@ -14,10 +14,8 @@
#include "tao/Stub.h"
#include "tao/Sequence.h"
#include "tao/Object.h"
-#include "tao/NVList.h"
#include "tao/Invocation.h"
#include "tao/Asynch_Invocation.h"
-#include "tao/DII_Invocation.h"
#include "tao/ORB_Core.h"
#include "tao/Client_Strategy_Factory.h"
#include "tao/Sync_Strategies.h"
@@ -40,7 +38,7 @@ ACE_RCSID(tao, TAO_Stub, "$Id$")
TAO_Stub::TAO_Stub (char *repository_id,
const TAO_MProfile &profiles,
- TAO_ORB_Core* orb_core)
+ TAO_ORB_Core *orb_core)
: type_id (repository_id),
#if (TAO_HAS_RT_CORBA == 1)
@@ -58,8 +56,6 @@ ACE_RCSID(tao, TAO_Stub, "$Id$")
profile_success_ (0),
refcount_lock_ (),
refcount_ (1),
- use_locate_request_ (0),
- first_locate_request_ (0),
orb_core_ (orb_core),
orb_ (),
servant_orb_ (),
@@ -135,6 +131,7 @@ TAO_Stub::~TAO_Stub (void)
this->orb_core_->_decr_refcnt ();
+
#if (TAO_HAS_RT_CORBA == 1)
if (this->priority_model_policy_)
@@ -326,249 +323,6 @@ private:
int old_type_;
};
-#if (TAO_HAS_MINIMUM_CORBA == 0)
-
-// DII analogue of the above.
-
-void
-TAO_Stub::do_dynamic_call (const char *opname,
- CORBA::Boolean is_roundtrip,
- CORBA::NVList_ptr args,
- CORBA::NamedValue_ptr result,
- CORBA::Flags,
- CORBA::ExceptionList_ptr exceptions,
- int lazy_evaluation,
- CORBA::Environment &ACE_TRY_ENV)
-{
- // @@ TOCCST: why do we keep using this function when ACE+TAO code
- // is clearly not cancel safe anymore? Furthermore, all the
- // generated code using the Invocation classes is probably not
- // cancel safe!
- TAO_Synchronous_Cancellation_Required NOT_USED;
-
- // Do a locate_request if necessary/wanted.
- // Suspect that you will be forwarded, so be proactive!
- // strategy for reducing overhead when you think a request will
- // be forwarded. No standard way now to know.
- if (this->use_locate_request_ && this->first_locate_request_)
- {
- // @@ TOCCST: notice how the locate request is only sent for
- // dynamic and deferred (!!) calls, nothing is done for static
- // calls, the far more common case. IMHO this should just go
- // away, after all we have _validate_connection to do the same
- // thing!
- TAO_GIOP_Locate_Request_Invocation call (this,
- this->orb_core_);
-
- // Simply let these exceptions propagate up
- // (if any of them occurs.)
- call.start (ACE_TRY_ENV);
- ACE_CHECK;
-
- call.invoke (ACE_TRY_ENV);
- ACE_CHECK;
-
- this->first_locate_request_ = 0;
- }
-
- if (is_roundtrip)
- {
- TAO_GIOP_Twoway_Invocation call (this,
- opname,
- ACE_OS::strlen (opname),
- this->orb_core_);
-
- // Loop as needed for forwarding; see above.
-
- for (;;)
- {
- call.start (ACE_TRY_ENV);
- ACE_CHECK;
-
- CORBA::Short flag = TAO_TWOWAY_RESPONSE_FLAG;
-
- call.prepare_header (ACE_static_cast (CORBA::Octet, flag),
- ACE_TRY_ENV);
- ACE_CHECK;
-
- this->put_params (call,
- args,
- ACE_TRY_ENV);
- ACE_CHECK;
-
- // Make the call ... blocking for the response.
- int status =
- call.invoke (exceptions, ACE_TRY_ENV);
- ACE_CHECK;
-
- if (status == TAO_INVOKE_RESTART)
- continue;
-
- if (status == TAO_INVOKE_EXCEPTION)
- return; // Shouldn't happen
-
- if (status != TAO_INVOKE_OK)
- ACE_THROW (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE,
- CORBA::COMPLETED_MAYBE));
-
- // The only case left is status == TAO_INVOKE_OK, exit the
- // loop. We cannot retry because at this point we either
- // got a reply or something with an status of
- // COMPLETED_MAYBE, thus we cannot reissue the request if we
- // are to satisfy the "at most once" semantics.
- break;
- }
-
- // Now, get all the "return", "out", and "inout" parameters
- // from the response message body ... return parameter is
- // first, the rest are in the order defined in the IDL spec
- // (which is also the order that DII users are required to
- // use).
-
- if (result != 0)
- {
- result->value ()->_tao_decode (call.inp_stream (),
- ACE_TRY_ENV);
- ACE_CHECK;
- }
-
- args->_tao_incoming_cdr (call.inp_stream (),
- CORBA::ARG_OUT | CORBA::ARG_INOUT,
- lazy_evaluation,
- ACE_TRY_ENV);
- }
- else
- {
- TAO_GIOP_Oneway_Invocation call (this,
- opname,
- ACE_OS::strlen (opname),
- this->orb_core_);
-
- for (;;)
- {
- call.start (ACE_TRY_ENV);
- ACE_CHECK;
-
- CORBA::Octet response_flag = ACE_static_cast (CORBA::Octet,
- call.sync_scope ());
-
- call.prepare_header (response_flag,
- ACE_TRY_ENV);
- ACE_CHECK;
-
- this->put_params (call,
- args,
- ACE_TRY_ENV);
- ACE_CHECK;
-
- int status = call.invoke (ACE_TRY_ENV);
- ACE_CHECK;
-
- if (status == TAO_INVOKE_RESTART)
- continue;
-
- if (status == TAO_INVOKE_EXCEPTION)
- return; // Shouldn't happen
-
- if (status != TAO_INVOKE_OK)
- ACE_THROW (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE,
- CORBA::COMPLETED_MAYBE));
-
- break;
- }
- }
-}
-
-void
-TAO_Stub::do_deferred_call (const CORBA::Request_ptr req,
- CORBA::Environment &ACE_TRY_ENV)
-{
- // @@ TOCCST: why do we keep using this function when ACE+TAO code
- // is clearly not cancel safe anymore? Furthermore, all the
- // generated code using the Invocation classes is probably not
- // cancel safe!
- TAO_Synchronous_Cancellation_Required NOT_USED;
-
- // Do a locate_request if necessary/wanted.
- // Suspect that you will be forwarded, so be proactive!
- // strategy for reducing overhead when you think a request will
- // be forwarded. No standard way now to know.
- if (this->use_locate_request_ && this->first_locate_request_)
- {
- // @@ TOCCST: notice how the locate request is only sent for
- // dynamic and deferred (!!) calls, nothing is done for static
- // calls, the far more common case. IMHO this should just go
- // away, after all we have _validate_connection to do the same
- // thing!
- TAO_GIOP_Locate_Request_Invocation call (this,
- this->orb_core_);
-
- // Simply let these exceptions propagate up
- // (if any of them occurs.)
- call.start (ACE_TRY_ENV);
- ACE_CHECK;
-
- call.invoke (ACE_TRY_ENV);
- ACE_CHECK;
-
- this->first_locate_request_ = 0;
- }
-
- TAO_GIOP_DII_Deferred_Invocation call (this,
- this->orb_core_,
- req);
-
- // Loop as needed for forwarding; see above.
-
- for (;;)
- {
- call.start (ACE_TRY_ENV);
- ACE_CHECK;
-
- CORBA::Short flag = TAO_TWOWAY_RESPONSE_FLAG;
-
- call.prepare_header (ACE_static_cast (CORBA::Octet, flag),
- ACE_TRY_ENV);
- ACE_CHECK;
-
- this->put_params (call,
- req->arguments (),
- ACE_TRY_ENV);
- ACE_CHECK;
-
- // Make the call without blocking.
- CORBA::ULong status = call.invoke (ACE_TRY_ENV);
- ACE_CHECK;
-
- if (status == TAO_INVOKE_RESTART)
- continue;
-
- if (status != TAO_INVOKE_OK)
- ACE_THROW (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE,
- CORBA::COMPLETED_MAYBE));
-
- // The only case left is status == TAO_INVOKE_OK, exit the
- // loop. We cannot retry because at this point we either
- // got a reply or something with an status of
- // COMPLETED_MAYBE, thus we cannot reissue the request if we
- // are to satisfy the "at most once" semantics.
- break;
- }
-}
-
-void
-TAO_Stub::put_params (TAO_GIOP_Invocation &call,
- CORBA::NVList_ptr args,
- CORBA::Environment &ACE_TRY_ENV)
-{
- args->_tao_encode (call.out_stream (),
- this->orb_core_,
- CORBA::ARG_IN | CORBA::ARG_INOUT,
- ACE_TRY_ENV);
-}
-
-#endif /* TAO_HAS_MINIMUM_CORBA */
-
// ****************************************************************
#if (TAO_HAS_CORBA_MESSAGING == 1)
@@ -959,7 +713,6 @@ TAO_Stub::validate_connection (CORBA::PolicyList_out inconsistent_policies,
TAO_Sync_Strategy &
TAO_Stub::sync_strategy (void)
{
-
#if (TAO_HAS_BUFFERING_CONSTRAINT_POLICY == 1)
int has_synchronization;
@@ -1054,6 +807,7 @@ TAO_Stub::client_priority (void)
#endif /* TAO_HAS_CLIENT_PRIORITY_POLICY == 1 */
+
CORBA::Policy *
TAO_Stub::sync_scope (void)
{
diff --git a/TAO/tao/Stub.h b/TAO/tao/Stub.h
index d1faaeaf947..f044aea694b 100644
--- a/TAO/tao/Stub.h
+++ b/TAO/tao/Stub.h
@@ -67,10 +67,10 @@ class TAO_PrivateConnectionPolicy;
enum TAO_Param_Type
{
// = TITLE
- // TAO_Param_Type
+ // TAO_Param_Type
//
// = DESCRIPTION
- // Parameter mode of a given parameter.
+ // Parameter mode of a given parameter.
PARAM_IN,
PARAM_OUT,
PARAM_INOUT,
@@ -87,77 +87,41 @@ typedef CORBA::Exception* (*TAO_Exception_Alloc) (void);
struct TAO_Exception_Data
{
// = TITLE
- // TAO_Exception_Data
+ // TAO_Exception_Data
//
// = DESCRIPTION
- // Description of a single exception
+ // Description of a single exception.
//
- // The interpreter needs a way to allocate memory to hold the exception
- // that was raised by the stub. This data structure provides the typecode
- // for the exception as well as a static function pointer that does the job
- // of memory allocation.
+ // The interpreter needs a way to allocate memory to hold the exception
+ // that was raised by the stub. This data structure provides the typecode
+ // for the exception as well as a static function pointer that
+ // does the job of memory allocation.
CORBA::TypeCode_ptr tc;
- // typecode describing the exception
+ // Typecode describing the exception.
TAO_Exception_Alloc alloc;
- // the allocator for this exception
+ // The allocator for this exception.
};
class TAO_Export TAO_Stub
{
// = TITLE
- // TAO_Stub
+ // TAO_Stub
//
// = DESCRIPTION
- // Per-objref data includes the (protocol-specific) Profile, which
- // is handled by placing it into a subclass of this type along
- // with data that may be used in protocol-specific caching
- // schemes.
+ // Per-objref data includes the (protocol-specific) Profile, which
+ // is handled by placing it into a subclass of this type along
+ // with data that may be used in protocol-specific caching
+ // schemes.
//
- // The type ID (the data specified by CORBA 2.0 that gets exposed
- // "on the wire", and in stringified objrefs) is held by this
- // module.
+ // The type ID (the data specified by CORBA 2.0 that gets exposed
+ // "on the wire", and in stringified objrefs) is held by this
+ // module.
//
- // The stub and DII interpreter APIs are member functions of this
- // type.
+ // The stub APIs are member functions of this
+ // type.
public:
-#if (TAO_HAS_MINIMUM_CORBA == 0)
-
- void do_dynamic_call (const char *opname,
- CORBA::Boolean is_roundtrip,
- CORBA::NVList_ptr args,
- CORBA::NamedValue_ptr result,
- CORBA::Flags flags,
- CORBA::ExceptionList_ptr exceptions,
- int lazy_evaluation,
- CORBA_Environment &ACE_TRY_ENV =
- TAO_default_environment ());
- // Dynamic invocations use a more costly "varargs" calling
- // convention; it's got the same input data as the (static)
- // stub-oriented one, but the data is represented somewhat
- // differently.
- //
- // Operation-specific data isn't collected in a stack frame and into
- // a static/readonly "calldata" structure, but instead is collected
- // into these parameters, the majority of which are heap-allocated:
- //
- // - opname ... the name of the operation
- // - is_roundtrip ... true except for oneway operations, or ones where
- // the client doesn't care about responses
- // - args ... call parameters and their descriptions
- // - result ... result and its description
- // - flags ... only one DII flag is legal
- // - exceptions ... list of legal user-defined exceptions
- // - ACE_TRY_ENV ... used for exception reporting.
-
- // Used with DII deferred synchronous requests.
- void do_deferred_call (const CORBA::Request_ptr req,
- CORBA_Environment &ACE_TRY_ENV =
- TAO_default_environment ());
-
-#endif /* TAO_HAS_MINIMUM_CORBA */
-
#if (TAO_HAS_CORBA_MESSAGING == 1)
CORBA::Policy_ptr get_policy (CORBA::PolicyType type,
@@ -301,7 +265,7 @@ public:
TAO_MProfile& base_profiles (void);
// Obtain a reference to the basic profile set.
- // manage forward and base profiles.
+ // Manage forward and base profiles.
TAO_Profile *next_profile (void);
// THREAD SAFE. If forward_profiles is null then this will
// get the next profile in the base_profiles list. If forward is not null
@@ -326,15 +290,11 @@ public:
// Returns 1 if a forward profile has successfully been used.
// profile_success_ && forward_profiles_
- // Just forward profiles.
- void use_locate_requests (CORBA::Boolean use_it);
- // set the flags to use locate_requests.
-
void set_valid_profile (void);
// NON-THREAD-SAFE. Will set profile_success_ to 0.
CORBA::Boolean valid_profile (void);
- // returns TRUE if a connection was successful with at least
+ // Returns TRUE if a connection was successful with at least
// one profile.
TAO_Profile *base_profiles (const TAO_MProfile& mprofiles);
@@ -343,16 +303,16 @@ public:
void add_forward_profiles (const TAO_MProfile &mprofiles);
// THREAD SAFE.
- // set the forward_profiles. This object will assume ownership of
+ // Set the forward_profiles. This object will assume ownership of
// this TAO_MProfile object!!
CORBA::Boolean next_profile_retry (void);
// THREAD SAFE
- // used to get the next profile after the one being used has
+ // Used to get the next profile after the one being used has
// failed during the initial connect or send of the message!
TAO_ORB_Core* orb_core (void) const;
- // Accessor
+ // Accessor.
CORBA::ORB_ptr servant_orb_ptr (void);
// This returns a duplicated ORB pointer.
@@ -367,50 +327,34 @@ public:
// temporary.
void addressing_mode (CORBA::Short addr_mode);
- // Set the addressing mode
+ // Set the addressing mode.
CORBA::Short addressing_mode (void);
- // Return the Addressing mode
+ // Return the Addressing mode.
CORBA::Boolean service_profile_selection (void);
// Make a call on to services to see whether they have some
// preferences on selecting the right profiles.
-protected:
-#if (TAO_HAS_MINIMUM_CORBA == 0)
-
- void put_params (TAO_GIOP_Invocation &call,
- CORBA::NVList_ptr args,
- CORBA_Environment &ACE_TRY_ENV =
- TAO_default_environment ());
- // Helper method to factor out common code in dynamic oneway
- // vs. twoway invocations.
-
-#endif /* TAO_HAS_MINIMUM_CORBA */
-
private:
TAO_Profile *set_profile_in_use_i (TAO_Profile *pfile);
// Makes a copy of the profile and frees the existing profile_in_use.
// NOT THREAD SAFE
- void reset_first_locate_request (void);
- // NON-THREAD-SAFE.
- // reset the flag telling that the locate request should be used
-
void reset_base ();
- // NON-THREAD-SAFE. utility method which resets or initializes
+ // NON-THREAD-SAFE. Utility method which resets or initializes
// the base_profile list and forward flags.
void forward_back_one (void);
- // NON-THREAD-SAFE. utility method which unrolls (removes or pops)
+ // NON-THREAD-SAFE. Utility method which unrolls (removes or pops)
// the top most forwarding profile list.
void reset_forward ();
- // NOT THREAD-SAFE. utility method which pops all forward profile
+ // NOT THREAD-SAFE. Utility method which pops all forward profile
// lists and resets the forward_profiles_ pointer.
~TAO_Stub (void);
- // Destructor is to be called only through _decr_refcnt()
+ // Destructor is to be called only through _decr_refcnt().
TAO_Profile *next_forward_profile (void);
// NON-THREAD-SAFE. utility method for next_profile.
@@ -447,35 +391,29 @@ private:
private:
TAO_MProfile base_profiles_;
- // ordered list of profiles for this object.
+ // Ordered list of profiles for this object.
TAO_MProfile *forward_profiles_;
// The list of forwarding profiles. This is actually implemented as a
// linked list of TAO_MProfile objects.
TAO_Profile *profile_in_use_;
- // this is the profile that we are currently sending/receiving with
+ // This is the profile that we are currently sending/receiving with.
ACE_Lock* profile_lock_ptr_;
- // Mutex to protect access to the forwarding profile
+ // Mutex to protect access to the forwarding profile.
size_t profile_success_;
// Have we successfully talked to the forward profile yet?
ACE_SYNCH_MUTEX refcount_lock_;
- // Mutex to protect reference count
+ // Mutex to protect reference count.
CORBA::ULong refcount_;
// Number of outstanding references to this object.
- CORBA::Boolean use_locate_request_;
- // set if locate request should be used
-
- CORBA::Boolean first_locate_request_;
- // distinguishes the first from following calls
-
TAO_ORB_Core* orb_core_;
- // The ORB
+ // The ORB.
CORBA::ORB_var orb_;
// ORB required for reference counting. This will help us keep the
@@ -497,9 +435,9 @@ private:
#endif /* TAO_HAS_CORBA_MESSAGING == 1 */
CORBA::Short addressing_mode_;
- // The addressing mode
+ // The addressing mode.
- // = Disallow copy constructor and assignment operator
+ // = Disallow copy constructor and assignment operator.
ACE_UNIMPLEMENTED_FUNC (TAO_Stub (const TAO_Stub &))
ACE_UNIMPLEMENTED_FUNC (TAO_Stub &operator = (const TAO_Stub &))
@@ -510,14 +448,14 @@ private:
#endif /* __GNUG__ */
};
-// Define a TAO_Stub auto_ptr class
+// Define a TAO_Stub auto_ptr class.
class TAO_Export TAO_Stub_Auto_Ptr
{
// = TITLE
// Implements the draft C++ standard auto_ptr abstraction.
// This class allows one to work Stub Objects *Only*!
public:
- // = Initialization and termination methods
+ // = Initialization and termination methods.
/* explicit */ TAO_Stub_Auto_Ptr (TAO_Stub *p = 0);
TAO_Stub_Auto_Ptr (TAO_Stub_Auto_Ptr &ap);
TAO_Stub_Auto_Ptr &operator= (TAO_Stub_Auto_Ptr &rhs);
diff --git a/TAO/tao/Stub.i b/TAO/tao/Stub.i
index 78c653dfb12..e9e4c5be6ec 100644
--- a/TAO/tao/Stub.i
+++ b/TAO/tao/Stub.i
@@ -25,17 +25,9 @@ TAO_Stub::set_profile_in_use_i (TAO_Profile *pfile)
}
ACE_INLINE void
-TAO_Stub::reset_first_locate_request (void)
-{
- this->first_locate_request_ = 1;
-}
-
-
-ACE_INLINE void
TAO_Stub::reset_base (void)
{
this->base_profiles_.rewind ();
- this->reset_first_locate_request ();
this->profile_success_ = 0;
this->set_profile_in_use_i (base_profiles_.get_next ());
@@ -109,22 +101,6 @@ TAO_Stub::profile_in_use (void)
return this->profile_in_use_;
}
-ACE_INLINE void
-TAO_Stub::use_locate_requests (CORBA::Boolean use_it)
-{
- if (use_it)
- {
- this->first_locate_request_ = 1;
- this->use_locate_request_ = 1;
- }
- else
- {
- // Don't use it.
- this->first_locate_request_ = 0;
- this->use_locate_request_ = 0;
- }
-}
-
ACE_INLINE TAO_MProfile *
TAO_Stub::make_profiles (void)
{
diff --git a/TAO/tao/TAO.dsp b/TAO/tao/TAO.dsp
index 50bbca55a47..ba6fa26731d 100644
--- a/TAO/tao/TAO.dsp
+++ b/TAO/tao/TAO.dsp
@@ -537,25 +537,6 @@ SOURCE=.\Connector_Registry.cpp
# End Source File
# Begin Source File
-SOURCE=.\Context.cpp
-
-!IF "$(CFG)" == "TAO DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "TAO DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "TAO DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "TAO DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "TAO DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "TAO DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
SOURCE=.\CONV_FRAMEC.cpp
!IF "$(CFG)" == "TAO DLL - Win32 Alpha Release"
@@ -765,26 +746,7 @@ SOURCE=.\default_server.cpp
# End Source File
# Begin Source File
-SOURCE=.\DII_Invocation.cpp
-
-!IF "$(CFG)" == "TAO DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "TAO DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "TAO DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "TAO DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "TAO DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "TAO DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\DII_Reply_Dispatcher.cpp
+SOURCE=.\Direct_Priority_Mapping.cpp
!IF "$(CFG)" == "TAO DLL - Win32 Alpha Release"
@@ -803,7 +765,7 @@ SOURCE=.\DII_Reply_Dispatcher.cpp
# End Source File
# Begin Source File
-SOURCE=.\Direct_Priority_Mapping.cpp
+SOURCE=.\DLL_ORB.cpp
!IF "$(CFG)" == "TAO DLL - Win32 Alpha Release"
@@ -822,7 +784,7 @@ SOURCE=.\Direct_Priority_Mapping.cpp
# End Source File
# Begin Source File
-SOURCE=.\DLL_ORB.cpp
+SOURCE=.\DLL_Parser.cpp
!IF "$(CFG)" == "TAO DLL - Win32 Alpha Release"
@@ -841,7 +803,7 @@ SOURCE=.\DLL_ORB.cpp
# End Source File
# Begin Source File
-SOURCE=.\DLL_Parser.cpp
+SOURCE=.\DomainC.cpp
!IF "$(CFG)" == "TAO DLL - Win32 Alpha Release"
@@ -860,7 +822,7 @@ SOURCE=.\DLL_Parser.cpp
# End Source File
# Begin Source File
-SOURCE=.\DomainC.cpp
+SOURCE=.\Dynamic_Adapter.cpp
!IF "$(CFG)" == "TAO DLL - Win32 Alpha Release"
@@ -2418,25 +2380,6 @@ SOURCE=.\Reply_Dispatcher.cpp
# End Source File
# Begin Source File
-SOURCE=.\Request.cpp
-
-!IF "$(CFG)" == "TAO DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "TAO DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "TAO DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "TAO DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "TAO DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "TAO DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
SOURCE=.\Resource_Factory.cpp
!IF "$(CFG)" == "TAO DLL - Win32 Alpha Release"
@@ -2646,25 +2589,6 @@ SOURCE=.\Sequence.cpp
# End Source File
# Begin Source File
-SOURCE=.\Server_Request.cpp
-
-!IF "$(CFG)" == "TAO DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "TAO DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "TAO DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "TAO DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "TAO DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "TAO DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
SOURCE=.\Server_Strategy_Factory.cpp
!IF "$(CFG)" == "TAO DLL - Win32 Alpha Release"
@@ -3645,10 +3569,6 @@ SOURCE=.\Connector_Registry.h
# End Source File
# Begin Source File
-SOURCE=.\Context.h
-# End Source File
-# Begin Source File
-
SOURCE=.\CONV_FRAMEC.h
# End Source File
# Begin Source File
@@ -3697,14 +3617,6 @@ SOURCE=.\default_server.h
# End Source File
# Begin Source File
-SOURCE=.\DII_Invocation.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\DII_Reply_Dispatcher.h
-# End Source File
-# Begin Source File
-
SOURCE=.\Direct_Priority_Mapping.h
# End Source File
# Begin Source File
@@ -3721,6 +3633,10 @@ SOURCE=.\DomainC.h
# End Source File
# Begin Source File
+SOURCE=.\Dynamic_Adapter.h
+# End Source File
+# Begin Source File
+
SOURCE=.\DynamicC.h
# End Source File
# Begin Source File
@@ -3769,6 +3685,10 @@ SOURCE=.\GIOP_Message_Base.h
# End Source File
# Begin Source File
+SOURCE=.\GIOP_Message_Connectors.h
+# End Source File
+# Begin Source File
+
SOURCE=.\GIOP_Message_Headers.h
# End Source File
# Begin Source File
@@ -3817,19 +3737,19 @@ SOURCE=.\IIOP_Factory.h
# End Source File
# Begin Source File
-SOURCE=.\IIOP_Profile.h
+SOURCE=.\IIOP_Lite_Factory.h
# End Source File
# Begin Source File
-SOURCE=.\IIOP_Transport.h
+SOURCE=.\IIOP_Profile.h
# End Source File
# Begin Source File
-SOURCE=.\Interceptor_List.h
+SOURCE=.\IIOP_Transport.h
# End Source File
# Begin Source File
-SOURCE=.\Interceptor_List.inl
+SOURCE=.\Interceptor_List.h
# End Source File
# Begin Source File
@@ -3961,10 +3881,6 @@ SOURCE=.\ORBInitializer_Registry.h
# End Source File
# Begin Source File
-SOURCE=.\ORBInitializer_Registry.inl
-# End Source File
-# Begin Source File
-
SOURCE=.\ORBInitInfo.h
# End Source File
# Begin Source File
@@ -3981,6 +3897,14 @@ SOURCE=.\Pluggable.h
# End Source File
# Begin Source File
+SOURCE=.\Pluggable_Messaging.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Pluggable_Messaging_Utils.h
+# End Source File
+# Begin Source File
+
SOURCE=.\Policy_Manager.h
# End Source File
# Begin Source File
@@ -4053,10 +3977,6 @@ SOURCE=.\Reply_Dispatcher.h
# End Source File
# Begin Source File
-SOURCE=.\request.h
-# End Source File
-# Begin Source File
-
SOURCE=.\Resource_Factory.h
# End Source File
# Begin Source File
@@ -4105,10 +4025,6 @@ SOURCE=.\Sequence_T.h
# End Source File
# Begin Source File
-SOURCE=.\Server_Request.h
-# End Source File
-# Begin Source File
-
SOURCE=.\Server_Strategy_Factory.h
# End Source File
# Begin Source File
@@ -4353,10 +4269,6 @@ SOURCE=.\Client_Priority_Policy.i
# End Source File
# Begin Source File
-SOURCE=.\Context.i
-# End Source File
-# Begin Source File
-
SOURCE=.\CONV_FRAMEC.i
# End Source File
# Begin Source File
@@ -4497,6 +4409,10 @@ SOURCE=.\IIOP_ORB.i
# End Source File
# Begin Source File
+SOURCE=.\Interceptor_List.inl
+# End Source File
+# Begin Source File
+
SOURCE=.\InterfaceC.i
# End Source File
# Begin Source File
@@ -4593,6 +4509,10 @@ SOURCE=.\ORB_Table.inl
# End Source File
# Begin Source File
+SOURCE=.\ORBInitializer_Registry.inl
+# End Source File
+# Begin Source File
+
SOURCE=.\params.i
# End Source File
# Begin Source File
@@ -4657,10 +4577,6 @@ SOURCE=.\Reply_Dispatcher.i
# End Source File
# Begin Source File
-SOURCE=.\Request.i
-# End Source File
-# Begin Source File
-
SOURCE=.\RT_Current.i
# End Source File
# Begin Source File
@@ -4697,10 +4613,6 @@ SOURCE=.\Sequence_T.i
# End Source File
# Begin Source File
-SOURCE=.\Server_Request.i
-# End Source File
-# Begin Source File
-
SOURCE=.\Service_Callbacks.i
# End Source File
# Begin Source File
diff --git a/TAO/tao/TAO_Server_Request.cpp b/TAO/tao/TAO_Server_Request.cpp
index e48bbcca1bd..a993d9046b1 100644
--- a/TAO/tao/TAO_Server_Request.cpp
+++ b/TAO/tao/TAO_Server_Request.cpp
@@ -10,7 +10,6 @@
#include "tao/ORB_Core.h"
#include "tao/ORB.h"
#include "tao/Timeprobe.h"
-#include "tao/Any.h"
#include "tao/debug.h"
#include "tao/GIOP_Utils.h"
@@ -30,7 +29,7 @@ static const char *TAO_Server_Request_Timeprobe_Description[] =
enum
{
- // Timeprobe description table start key
+ // Timeprobe description table start key.
TAO_SERVER_REQUEST_START = 400,
TAO_SERVER_REQUEST_END
};
@@ -197,9 +196,11 @@ TAO_ServerRequest::send_no_exception_reply (void)
{
// No exception but some kind of error, yet a response
// is required.
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("TAO: (%P|%t) %p: cannot send NO_EXCEPTION reply\n"),
- ACE_TEXT ("TAO_GIOP_ServerRequest::send_no_exception_reply")));
+ ACE_ERROR ((
+ LM_ERROR,
+ ACE_TEXT ("TAO: (%P|%t) %p: cannot send NO_EXCEPTION reply\n"),
+ ACE_TEXT ("TAO_GIOP_ServerRequest::send_no_exception_reply")
+ ));
}
}
}
@@ -207,8 +208,8 @@ TAO_ServerRequest::send_no_exception_reply (void)
void
TAO_ServerRequest::tao_send_reply (void)
{
- int result = mesg_base_->send_message(transport_,
- *outgoing_);
+ int result = mesg_base_->send_message (transport_,
+ *outgoing_);
if (result == -1)
{
if (TAO_debug_level > 0)
@@ -243,7 +244,8 @@ TAO_ServerRequest::tao_send_reply_exception (CORBA::Exception &ex)
if (TAO_debug_level > 0)
{
ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("TAO: (%P|%t|%N|%l) %p: cannot send exception reply\n"),
+ ACE_TEXT ("TAO: (%P|%t|%N|%l) %p: cannot ")
+ ACE_TEXT ("send exception reply\n"),
ACE_TEXT ("tao_send_reply_exception()")));
}
}
diff --git a/TAO/tao/TAO_Server_Request.h b/TAO/tao/TAO_Server_Request.h
index 6e060c0e85d..72707fbd01b 100644
--- a/TAO/tao/TAO_Server_Request.h
+++ b/TAO/tao/TAO_Server_Request.h
@@ -40,9 +40,9 @@ class TAO_Export TAO_ServerRequest
// = TITLE
// Class representing a ServerRequest object.
//
- // @@ This class should go away, there is no reason to provide a
- // per-protocol server request class.
- //
+ // DESCRIPTION
+ // Encapsulates CDR, transport and pluggable messaging
+ // components on the server side.
public:
// Constructors.
diff --git a/TAO/tao/corba.h b/TAO/tao/corba.h
index 18f0dae238e..2d7a5097d4f 100644
--- a/TAO/tao/corba.h
+++ b/TAO/tao/corba.h
@@ -41,11 +41,9 @@
#include "tao/Any.h"
#include "tao/NVList.h"
#include "tao/Principal.h"
-#include "tao/Request.h"
#include "tao/TAO_Server_Request.h"
#include "tao/Object.h"
#include "tao/LocalObject.h"
-#include "tao/Context.h"
#include "tao/Typecode.h"
#include "tao/CDR.h"
diff --git a/TAO/tao/corbafwd.cpp b/TAO/tao/corbafwd.cpp
index de4f368602e..426e29710a3 100644
--- a/TAO/tao/corbafwd.cpp
+++ b/TAO/tao/corbafwd.cpp
@@ -58,3 +58,4 @@ TAO_NAMESPACE_TYPE (const CORBA::ServiceType)
TAO_NAMESPACE_BEGIN (CORBA)
TAO_NAMESPACE_DEFINE (const CORBA::ServiceType, Security, 1)
TAO_NAMESPACE_END
+
diff --git a/TAO/tao/operation_details.h b/TAO/tao/operation_details.h
index fe9c5cf85bc..471261c94b8 100644
--- a/TAO/tao/operation_details.h
+++ b/TAO/tao/operation_details.h
@@ -21,7 +21,7 @@
#include "tao/target_specification.h"
// @@ Bala: Why is this not part of the RequestHeader?!
-class TAO_Operation_Details
+class TAO_Export TAO_Operation_Details
{
// = TITLE
// Class with operation details
diff --git a/TAO/tao/target_specification.h b/TAO/tao/target_specification.h
index e78a0374ce6..907b0d184e5 100644
--- a/TAO/tao/target_specification.h
+++ b/TAO/tao/target_specification.h
@@ -25,7 +25,7 @@
#include "tao/IOPC.h"
-class TAO_Target_Specification
+class TAO_Export TAO_Target_Specification
{
// = TITLE
// A class to encapsulate all the ways of specifying targets.
diff --git a/TAO/tests/DSI_Gateway/test_dsi.cpp b/TAO/tests/DSI_Gateway/test_dsi.cpp
index ba49b4b8722..cd9d1596a06 100644
--- a/TAO/tests/DSI_Gateway/test_dsi.cpp
+++ b/TAO/tests/DSI_Gateway/test_dsi.cpp
@@ -2,6 +2,7 @@
#include "test_dsi.h"
#include "tao/debug.h"
+#include "tao/DynamicInterface/Request.h"
#if !defined(__ACE_INLINE__)
#include "test_dsi.i"
diff --git a/TAO/tests/DSI_Gateway/test_dsi.h b/TAO/tests/DSI_Gateway/test_dsi.h
index 3a6fd7210a6..3c550ff6c25 100644
--- a/TAO/tests/DSI_Gateway/test_dsi.h
+++ b/TAO/tests/DSI_Gateway/test_dsi.h
@@ -17,9 +17,10 @@
#define TAO_DSI_GATEWAY_TEST_DSI_H
#include "testS.h"
-#include "tao/Server_Request.h"
+#include "tao/DynamicInterface/Server_Request.h"
+#include "tao/DynamicInterface/Dynamic_Implementation.h"
-class DSI_Simple_Server : public PortableServer::DynamicImplementation
+class DSI_Simple_Server : public TAO_DynamicImplementation
{
// = TITLE
// Simpler Server implementation
diff --git a/TAO/tests/Param_Test/client.dsp b/TAO/tests/Param_Test/client.dsp
index 4b1cc540c85..dfff22d64ef 100644
--- a/TAO/tests/Param_Test/client.dsp
+++ b/TAO/tests/Param_Test/client.dsp
@@ -51,7 +51,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ace.lib tao.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\tao" /libpath:"..\..\..\ace"
+# ADD LINK32 TAO_DynamicInterface.lib TAO.lib ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\tao\DynaminInterface" /libpath:"..\..\tao" /libpath:"..\..\..\ace"
!ELSEIF "$(CFG)" == "Param_Test Client - Win32 Debug"
@@ -76,7 +76,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 TAOd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\tao" /libpath:"..\..\..\ace"
+# ADD LINK32 TAO_DynamicInterfaced.lib TAOd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\tao\DynamicInterface" /libpath:"..\..\tao" /libpath:"..\..\..\ace"
!ENDIF
diff --git a/TAO/tests/Param_Test/helper.h b/TAO/tests/Param_Test/helper.h
index 77fb899acfa..40f34ebc344 100644
--- a/TAO/tests/Param_Test/helper.h
+++ b/TAO/tests/Param_Test/helper.h
@@ -21,6 +21,7 @@
#define HELPER_H
#include "param_testCli.h"
+#include "tao/DynamicInterface/Request.h"
class Generator
{