summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TAO/ChangeLog-98c26
-rw-r--r--TAO/docs/releasenotes/orbcore.html73
-rw-r--r--TAO/tao/Makefile10
-rw-r--r--TAO/tao/boa.cpp470
-rw-r--r--TAO/tao/boa.h297
-rw-r--r--TAO/tao/boa.i20
-rw-r--r--TAO/tao/corba.h8
-rw-r--r--TAO/tao/default_client.cpp2
8 files changed, 76 insertions, 830 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c
index 554803f71db..075e778b61f 100644
--- a/TAO/ChangeLog-98c
+++ b/TAO/ChangeLog-98c
@@ -1,3 +1,29 @@
+Tue Oct 21 17:21:51 1997 Chris Cleeland <cleeland@cs.wustl.edu>
+
+ * docs/releasenotes/orbcore.html: Updated to reflect daily
+ progress.
+
+ * tests/Cubit/TAO/Makefile: Updated dependencies.
+
+ * tests/Cubit/TAO/svc.conf: Updated to eliminate empty quotes at
+ the end that tickled a deficiency in the Service Configurator's
+ grammar.
+
+ * tests/multiCubit/svr.cpp: Updated to reflect POA_init change.
+
+ * tests/Thruput_test/Makefile: Modified to reflect filename
+ changes.
+
+ * tests/Thruput_test/server.cpp: Changed type of argv so that it
+ matched properly.
+
+ * tao/boa.*: Renamed to tao/poa.*.
+
+ * tao/Orb_Core.*: Renamed to tao/orb_core.*.
+
+ * tao/{Makefile,corba.h,default_client.cpp,default_server.cpp,orb.h,orbobj.cpp,params.h}:
+ Modified to reflect filename changes.
+
Tue Oct 21 13:23:48 1997 Brian Mendel <brian.r.mendel@boeing.com>
* tao/connect.i: Moved hash_i and compare_i template
diff --git a/TAO/docs/releasenotes/orbcore.html b/TAO/docs/releasenotes/orbcore.html
index da18e91def3..a6a8cae3aa9 100644
--- a/TAO/docs/releasenotes/orbcore.html
+++ b/TAO/docs/releasenotes/orbcore.html
@@ -27,18 +27,17 @@
Recently Completed Work:
<BLOCKQUOTE>
- <LI>Remove BOA and ROA names from the ORB.</LI>
-
- <LI>Change CORBA_ORB::open() to return an error status (first
- cut at this already there--needs to be checked out).</LI>
-
- <LI>Put README file in multiCubit test.</li>
+ <LI>Rename following files:&nbsp;Orb_Core.*&nbsp;->orb_core.*
+ &amp;&nbsp;orbobj.* -> corba_orb.*.</LI>
- <li>Clean up build under g++. All 'function used before
- declared inline' warnings have been eliminated. Also, all
- other warnings (except for one that is nearly unavoidable)
- have been eliminated.
- </li>
+ <LI>The lock used in <code>giop.cpp:626</code> originally
+ appeared in the IIOP-1.4 code base. Its purpose was to
+ protect access to the <code>fwd_profile</code> data member.
+ The original features are available, but they are currently
+ not used because none of our concurrency models present a
+ thread-unsafe condition. The <a
+ href="../../ChangeLog">ChangeLog</a> presents more details on
+ the subject.</li>
<li>Fixed problems seen by <a
href="mailto:brian.r.mendel@boeing.com">Brian Mendel</a> of
@@ -54,21 +53,25 @@
special code in that area which was not tested until Boeing
got hold of the code.</li>
- <LI>The lock used in <code>giop.cpp:626</code> originally
- appeared in the IIOP-1.4 code base. Its purpose was to
- protect access to the <code>fwd_profile</code> data member.
- The original features are available, but they are currently
- not used because none of our concurrency models present a
- thread-unsafe condition. The <a
- href="../../ChangeLog">ChangeLog</a> presents more details on
- the subject.</li>
+ <li>Clean up build under g++. All 'function used before
+ declared inline' warnings have been eliminated. Also, all
+ other warnings (except for one that is nearly unavoidable)
+ have been eliminated.
+ </li>
+
+ <LI>Remove BOA and ROA names from the ORB.</LI>
+
+ <LI>Change CORBA_ORB::open() to return an error status (first
+ cut at this already there--needs to be checked out).</LI>
+
+ <LI>Put README file in multiCubit test.</li>
</BLOCKQUOTE>
Ongoing Work:
<BLOCKQUOTE>
- <LI>Verify ACE_ & TAO on Linux.</LI>
+ <LI>Verify ACE & TAO on Linux.</LI>
<LI>Use Purify to eliminate straggling problems.</LI>
@@ -77,6 +80,23 @@
Critical Work:
<BLOCKQUOTE>
+ <li>Use <code>truss</code> to verify for <a
+ href="mailto:PAUL.G.WEHLAGE@cdev.com">Paul Wehlage</a> that
+ TAO really uses <code>select</code> vs. <code>recv</code> for
+ <b>-R</b> vs. <b>-T</b>.</li>
+
+ <li>Rename <code>boa.*</code> to <code>poa.*</code>.</li>
+
+ <LI>Implement <code>CORBA_ORB::shutdown()</code> as a manner
+ in which a thread of control can request that
+ <code>CORBA_ORB::run()</code> should return and no longer
+ service requests.</li>
+
+ <LI>Add pre-cached connection on client side. Clients will
+ pass in a comma-separated list of <em>host:port</em>
+ destinations using the <code>CORBA::ORB_init()</code>
+ interface.</LI>
+
<LI>
Verify that, in the ORB-per-thread concurrency model, it's
possible to have a factory in each thread that creates a
@@ -91,19 +111,6 @@
weary) should reduce development time to a couple of hours.
</LI>
- <LI>Implement <code>CORBA_ORB::shutdown()</code> as a manner
- in which a thread of control can request that
- <code>CORBA_ORB::run()</code> should return and no longer
- service requests.</li>
-
- <LI>Rename following files:&nbsp;Orb_Core.*&nbsp;->orb_core.*
- &amp;&nbsp;orbobj.* -> corba_orb.*.</LI>
-
- <LI>Add pre-cached connection on client side. Clients will
- pass in a comma-separated list of <em>host:port</em>
- destinations using the <code>CORBA::ORB_init()</code>
- interface.</LI>
-
<LI>Validate movement of Strategy Connector into ORB&nbsp;Core.</LI>
</BLOCKQUOTE>
diff --git a/TAO/tao/Makefile b/TAO/tao/Makefile
index 09e765da1ff..2460c4c084e 100644
--- a/TAO/tao/Makefile
+++ b/TAO/tao/Makefile
@@ -14,13 +14,13 @@ SHLIB = $(LIBNAME).so
# These are components that are only headers and must be installed
CORBA_HDRS = orb sequence stub orbconf objtable optable $(CORBA_SRCS)
CORBA_SRCS = any corbacom except nvlist object orbobj principa \
- request svrrqst boa typecode
+ request svrrqst poa typecode
# These are components that are only headers and must be installed
OTHERS_HDRS = align cdr giop iiopobj iioporb xdr connect params marshal debug \
- default_client default_server server_factory client_factory Orb_Core
-OTHERS_INLN = any boa cdr connect iiopobj iioporb object orbobj params svrrqst typecode marshal \
- default_client default_server server_factory client_factory Orb_Core
+ default_client default_server server_factory client_factory orb_core
+OTHERS_INLN = any poa cdr connect iiopobj iioporb object orbobj params svrrqst typecode marshal \
+ default_client default_server server_factory client_factory orb_core
# These are components that are either header & source or source-only
OTHERS_SRCS = \
giop \
@@ -32,7 +32,7 @@ OTHERS_SRCS = \
default_server \
server_factory \
client_factory \
- Orb_Core \
+ orb_core \
objtable \
optable \
connect \
diff --git a/TAO/tao/boa.cpp b/TAO/tao/boa.cpp
deleted file mode 100644
index bdf621b895b..00000000000
--- a/TAO/tao/boa.cpp
+++ /dev/null
@@ -1,470 +0,0 @@
-// @(#) $Id$
-//
-// Copyright 1994-1995 by Sun Microsystems Inc.
-// All Rights Reserved
-//
-// POA initialisation -- both anonymous and (for system bootstrapping)
-// named BOAs.
-//
-// XXX at this time, there's a strong linkage between this code and
-// the modules knowing about IIOP. In the future, a looser coupling
-// between OA initialiszation and protocol components is desired.
-
-#if 0
-#include "ace/OS.h" // WARNING! This MUST come before objbase.h on WIN32!
-#include <objbase.h>
-#include <initguid.h>
-
-#include "tao/orb.h"
-#include "tao/boa.h"
-
-// XXX this should not know implementation or other details of any
-// protocol modules! This is an implementation shortcut only.
-
-#include "tao/iioporb.h"
-#endif /* 0 */
-
-#include "tao/corba.h"
-
-// {A201E4C8-F258-11ce-9598-0000C07CA898}
-DEFINE_GUID (IID_BOA,
-0xa201e4c8, 0xf258, 0x11ce, 0x95, 0x98, 0x0, 0x0, 0xc0, 0x7c, 0xa8, 0x98) ;
-
-#if !defined (__ACE_INLINE__)
-# include "boa.i"
-#endif
-
-// CORBA_POA::init() is used in get_boa() and get_named_boa() in order
-// to initialize the OA. It was originally part of ROA, and may no
-// longer be useful.
-CORBA::POA_ptr
-CORBA_POA::init (CORBA::ORB_ptr parent,
- ACE_INET_Addr &,
- CORBA::Environment &env)
-{
- env.clear ();
- TAO_ORB_Core *p = TAO_ORB_Core_instance ();
-
- if (p->root_poa ())
- {
- env.exception (new CORBA_INITIALIZE (CORBA::COMPLETED_NO));
- return 0;
- }
-
- CORBA::POA_ptr rp;
- ACE_NEW_RETURN (rp, CORBA_POA (parent, env), 0);
- p->root_poa (rp);
-
- return rp;
-}
-
-CORBA_POA::CORBA_POA (CORBA::ORB_ptr owning_orb,
- CORBA::Environment &)
- : do_exit_ (CORBA::B_FALSE),
- orb_ (owning_orb),
- call_count_ (0),
- skeleton_ (0)
-{
- TAO_Server_Strategy_Factory *f = orb_->server_factory ();
- TAO_ORB_Core* p = TAO_ORB_Core_instance ();
-
- this->objtable_ = f->create_object_table ();
-
- // @@ What is this doing here? Why is it setting the root poa based
- // on whether objtable_ is non-zero? (cjc)
- if (this->objtable_ != 0)
- p->root_poa (this);
-}
-
-CORBA_POA::~CORBA_POA (void)
-{
-}
-
-// Create an objref
-
-CORBA::Object_ptr
-CORBA_POA::create (CORBA::OctetSeq &key,
- CORBA::String type_id,
- CORBA::Environment &env)
-{
- CORBA::String id;
- IIOP_Object *data;
-
- if (type_id)
- id = CORBA::string_copy (type_id);
- else
- id = 0;
-
- IIOP::Version ver (IIOP::MY_MAJOR, IIOP::MY_MINOR);
- // Cast below de-warns on Sun's C++
- const ACE_INET_Addr& addr = orb_->params ()->addr ();
- CORBA::String h = (char*)addr.get_host_name ();
-
- data = new IIOP_Object (id, IIOP::ProfileBody (ver,
- h,
- addr.get_port_number (),
- key));
- if (data != 0)
- env.clear ();
- else
- {
- env.exception (new CORBA_NO_MEMORY (CORBA::COMPLETED_NO));
- return 0;
- }
-
- // Return the CORBA::Object_ptr interface to this objref.
- CORBA::Object_ptr new_obj;
-
- if (data->QueryInterface (IID_CORBA_Object,
- (void**)&new_obj) != NOERROR)
- env.exception (new CORBA::INTERNAL (CORBA::COMPLETED_NO));
-
- data->Release ();
- return new_obj;
-}
-
-// Return the key fed into an object at creation time.
-
-CORBA::OctetSeq *
-CORBA_POA::get_key (CORBA::Object_ptr,
- CORBA::Environment &env)
-{
- // XXX implement me ! ... must have been created by this OA.
- env.exception (new CORBA_IMP_LIMIT (CORBA::COMPLETED_NO));
- return 0;
-}
-
-// Used by method code to ask the OA to shut down.
-void
-CORBA_POA::please_shutdown (CORBA::Environment &env)
-{
- ACE_MT (ACE_GUARD (ACE_Thread_Mutex, boa_mon, lock_));
-
- env.clear ();
- do_exit_ = CORBA::B_TRUE;
-}
-
-// Used by non-method code to tell the OA to shut down.
-void
-CORBA_POA::clean_shutdown (CORBA::Environment &env)
-{
- ACE_MT (ACE_GUARD (ACE_Thread_Mutex, boa_mon, lock_));
-
- env.clear ();
-
- if (call_count_ != 0)
- {
- dmsg ("called clean_shutdown with requests outstanding");
- env.exception (new CORBA::BAD_INV_ORDER (CORBA::COMPLETED_NO));
- return;
- }
-
- // Here we need to tell all the endpoints to shut down...
-}
-
-// For POA -- POA operations for which we provide the vtable entry
-void
-CORBA_POA::register_dir (dsi_handler handler,
- void *ctx,
- CORBA::Environment &env)
-{
- if (handler == 0)
- {
- env.exception (new CORBA::BAD_PARAM (CORBA::COMPLETED_NO));
- return;
- }
-
- skeleton_ = handler;
- context_ = ctx;
-
- env.clear ();
-}
-
-// A "Named POA" is used in bootstrapping some part of the ORB since
-// it's name-to-address binding is managed by the OS. Examples of
-// such bindings are /etc/services (for TCP) and /etc/rpc (for ONC
-// RPC) . The name of a POA is only guaranteed to be unique within
-// the domain of a single system, as a rule; two hosts would have
-// distinct "king" BOAs.
-//
-// For network endpoints, most such names are manually administered.
-// Some other namespaces (AF_UNIX filesystem names for example) have a
-// more formal underlying name service that can be dynamically updated
-// while not compromising system security.
-//
-// The address family used by the POA is found from the ORB passed in.
-//
-// XXX the coupling could stand to be looser here, so this module did
-// not know specifically about the Internet ORB !!
-
-CORBA::POA_ptr
-CORBA_POA::get_named_boa (CORBA::ORB_ptr orb,
- CORBA::String name,
- CORBA::Environment &env)
-{
- env.clear ();
-
- // If the ORB is an Internet ORB, we know this must be a TCP OA.
- {
- IIOP_ORB *internet;
-
- if (orb->QueryInterface (IID_IIOP_ORB, (void **) &internet) == NOERROR)
- {
- CORBA::POA_ptr tcp_oa;
-
- internet->Release ();
-
- // POA initialization with name specified; it'll come from
- // /etc/services if it's not a port number.
-
- ACE_INET_Addr boa_name (name, (ACE_UINT32) INADDR_ANY);
-
- tcp_oa = CORBA::POA::init (orb, boa_name, env);
-
- if (env.exception () != 0)
- return 0;
- else
- return tcp_oa; // derives from POA
- }
- }
-
- // We don't know how to deal with this kind of ORB. Report error.
-
- env.exception (new CORBA::BAD_PARAM (CORBA::COMPLETED_NO) );
- return 0;
-}
-
-// An "Anonymous" POA is used more routinely. The name used doesn't
-// matter to anyone; it is only used to create object references with
-// a short lifespan, namely that of the process acquiring this POA.
-
-CORBA::POA_ptr
-CORBA_POA::get_boa (CORBA::ORB_ptr orb,
- CORBA::Environment &env)
-{
- env.clear ();
-
- // If the ORB is an Internet ORB, we know this must be a TCP OA.
- {
- IIOP_ORB *internet;
-
- if (orb->QueryInterface (IID_IIOP_ORB, (void **) &internet) == NOERROR)
- {
- CORBA::POA_ptr tcp_oa;
-
- internet->Release ();
-
- // ROA initialization with null name means anonymous OA
-
- ACE_INET_Addr anonymous ((u_short) 0, (ACE_UINT32) INADDR_ANY);
-
- tcp_oa = CORBA::POA::init (orb, anonymous, env);
-
- if (env.exception () != 0)
- return 0;
- else
- return tcp_oa; // derives from POA
- }
- }
-
- // We don't know how to deal with this kind of ORB. Report error.
-
- env.exception (new CORBA::BAD_PARAM (CORBA::COMPLETED_NO) );
- return 0;
-}
-
-void CORBA_POA::dispatch (CORBA::OctetSeq &key,
- CORBA::ServerRequest &req,
- void *context,
- CORBA::Environment &env)
-{
- ACE_UNUSED_ARG(context);
-
- TAO_Skeleton skel; // pointer to function pointer for the operation
- CORBA::Object_ptr obj; // object that will be looked up based on the key
- CORBA::String opname;
-
- // Get the skeleton
-
- // Find the object based on the key
- if (this->find (key, obj) != -1)
- {
- opname = req.op_name ();
-
- // Find the skeleton "glue" function based on the operation name
- if (obj->find (opname, skel) != -1)
- // Schedule the upcall. This is the degenerate case of scheduling...
- // using a "do it now!" scheduler
- skel (req, obj, env);
- else
- {
- // this may fail in which case, we must try out the default
- // operations such as "_is_a", "non_existent", "hash",
- // ... At this time, we try the "is_a" method
- }
- }
-
- // We need to pass this skel and associated information to the
- // scheduler. How do we do it??
-}
-
-int
-CORBA_POA::find (const CORBA::OctetSeq &key,
- CORBA::Object_ptr &obj)
-{
- return objtable_->find (key, obj);
-}
-
-int
-CORBA_POA::bind (const CORBA::OctetSeq &key,
- CORBA::Object_ptr obj)
-{
- return objtable_->bind (key, obj);
-}
-
-void
-CORBA_POA::handle_request (TAO_GIOP_RequestHeader hdr,
- CDR &request_body,
- CDR &response,
- TAO_Dispatch_Context *some_info,
- CORBA::Environment &env)
-{
- ACE_UNUSED_ARG (some_info);
-
- IIOP_ServerRequest svr_req (&request_body, this->orb (), this);
-
- svr_req.opname_ = hdr.operation; // why are we copying this when we can just pass in
- // a handle to the hdr?
-
- this->dispatch (hdr.object_key, svr_req, 0 /* this is IIOP residue */, env);
-
- // FIXME! I don't think this should happen yet!
- svr_req.release ();
-
- // If no reply is necessary (i.e., oneway), then return!
- if (! hdr.response_expected)
- return;
-
- // Otherwise check for correct parameter handling, and reply as
- // appropriate.
- //
- // NOTE: if "env" is set, it takes precedence over exceptions
- // reported using the mechanism of the ServerRequest. Only system
- // exceptions are reported that way ...
- //
- // XXX Exception reporting is ambiguous; it can be cleaner than
- // this. With both language-mapped and dynamic/explicit reporting
- // mechanisms, one of must be tested "first" ... so an exception
- // reported using the other mechanism could be "lost". Perhaps only
- // the language mapped one should be used for system exceptions.
-
- TAO_GIOP::start_message (TAO_GIOP_Reply, response);
- TAO_GIOP_ServiceContextList resp_ctx;
- resp_ctx.length = 0;
- response.encode (&TC_ServiceContextList, &resp_ctx, 0, env);
- response.put_ulong (hdr.request_id);
-
- CORBA::TypeCode_ptr tc;
- const void *value;
-
- if (!svr_req.params_ && env.exception () == 0)
- {
- dmsg ("DSI user error, didn't supply params");
- env.exception (new CORBA::BAD_INV_ORDER (CORBA::COMPLETED_NO));
- }
-
- if (env.exception () != 0)
- { // standard exceptions only
- CORBA::Environment env2;
- CORBA::Exception *x = env.exception ();
- CORBA::TypeCode_ptr except_tc = x->type ();
-
- response.put_ulong (TAO_GIOP_SYSTEM_EXCEPTION);
- (void) response.encode (except_tc, x, 0, env2);
- }
- else if (svr_req.exception_)
- { // any exception at all
- CORBA::Exception *x;
- CORBA::TypeCode_ptr except_tc;
-
- x = (CORBA::Exception *) svr_req.exception_->value ();
- except_tc = svr_req.exception_->type ();
-
- // Finish the GIOP Reply header, then marshal the exception.
- //
- // XXX x->type () someday ...
- if (svr_req.ex_type_ == CORBA::SYSTEM_EXCEPTION)
- response.put_ulong (TAO_GIOP_SYSTEM_EXCEPTION);
- else
- response.put_ulong (TAO_GIOP_USER_EXCEPTION);
-
- (void) response.encode (except_tc, x, 0, env);
- }
- else
- { // normal reply
- // First finish the GIOP header ...
- response.put_ulong (TAO_GIOP_NO_EXCEPTION);
-
- // ... then send any return value ...
- if (svr_req.retval_)
- {
- tc = svr_req.retval_->type ();
- value = svr_req.retval_->value ();
- (void) response.encode (tc, value, 0, env);
- }
-
- // ... followed by "inout" and "out" parameters, left to right
- for (u_int i = 0; i < svr_req.params_->count (); i++)
- {
- CORBA::NamedValue_ptr nv = svr_req.params_->item (i);
- CORBA::Any_ptr any;
-
- if (!(nv->flags () & (CORBA::ARG_INOUT|CORBA::ARG_OUT)))
- continue;
-
- any = nv->value ();
- tc = any->type ();
- value = any->value ();
- (void) response.encode (tc, value, 0, env);
- }
- }
-}
-
-// IUnknown calls
-ULONG __stdcall
-CORBA_POA::AddRef (void)
-{
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, boa_mon, com_lock_, 0));
- return ++refcount_;
-}
-
-ULONG __stdcall
-CORBA_POA::Release (void)
-{
- {
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, boa_mon, com_lock_, 0));
-
- if (--refcount_ != 0)
- return refcount_;
- }
-
- delete this;
- return 0;
-}
-
-HRESULT __stdcall
-CORBA_POA::QueryInterface (REFIID riid,
- void **ppv)
-{
- *ppv = 0;
-
- if (IID_BOA == riid
- || IID_IUnknown == riid)
- *ppv = this;
-
- if (*ppv == 0)
- return ResultFromScode (E_NOINTERFACE);
-
- (void) AddRef ();
- return NOERROR;
-}
diff --git a/TAO/tao/boa.h b/TAO/tao/boa.h
deleted file mode 100644
index 4558494aeb5..00000000000
--- a/TAO/tao/boa.h
+++ /dev/null
@@ -1,297 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO
-//
-// = FILENAME
-// boa.h
-//
-// = DESCRIPTION
-// (Early) POA
-//
-// POA is a stripped down, lean, mean, portable OA. The work
-// involved in managing objects is all handled by "higher level"
-// code, including skeletons, generated either by an IDL compiler
-// by hand. POA itself maintains no object-level state.
-//
-// = AUTHOR
-// Copyright 1994-1995 by Sun Microsystems, Inc.
-//
-// ============================================================================
-
-#if !defined (TAO_BOA_H)
-#define TAO_BOA_H
-
-#if 0
-#include "ace/OS.h" // WARNING! This MUST come before objbase.h on WIN32!
-#include <objbase.h>
-#include "ace/SOCK_Stream.h"
-#include "tao/orb.h"
-#include "tao/sequence.h"
-#include "tao/svrrqst.h"
-#endif /* 0 */
-
-#include "tao/corba.h"
-
-class TAO_GIOP_RequestHeader;
-
-// @@ Why does this inherit from IUnknown?
-class CORBA_POA : public IUnknown
-{
- // = TITLE
- // The <{TAO}> Basic Object Adapter.
-public:
- CORBA_POA (CORBA::ORB_ptr orb_arg,
- CORBA::Environment &env);
- virtual ~CORBA_POA (void);
-
- static CORBA::POA_ptr init (CORBA::ORB_ptr which_orb,
- ACE_INET_Addr &addr,
- CORBA::Environment &env);
- // NON-STANDARD CALL. According to CORBA V2.0, this functionality
- // should really be <POA_ptr ORB::POA_init (argc,argv,ident)>.
- //
- // The current signature is residue from when this code was part of
- // the SunSoft IIOP reference implementation.
- //
- // @@ Hum, does this still make sense now that it's in POA?
-
- /* virtual */
- CORBA::Object_ptr create (CORBA::OctetSeq& obj_id,
- CORBA::String type_id,
- CORBA::Environment& env);
- // Create a reference to an object, using identifying information
- // that is fully exposed to applications. (An ORB may use additional
- // data internally, of course.)
- //
- // Object IDs are assigned and used by servers to identify objects.
- //
- // Type IDs are repository IDs, assigned as part of OMG-IDL
- // interface definition to identify specific interfaces and their
- // relationships to other OMG-IDL interfaces. It's OK to provide a
- // null type ID.
- //
- // Clients which invoke operations using one of these references
- // when the server is not active (or after the last reference to the
- // POA is released) will normally see an OBJECT_NOT_EXIST exception
- // reported by the ORB. If the POA is a "Named POA" the client's
- // ORB will not normally return OBJECT_NOT_EXIST unless the POA
- // reports that fault.
- //
- // NOTE: Since any given POA may have been used in the past, servers
- // may need to place some data (such as a timestamp) into the object
- // ID to help distinguish different incarnations of the POA. "Named
- // POA" objects won't want those semantics as much as "Anonymous"
- // ones.
-
- virtual void handle_request (TAO_GIOP_RequestHeader hdr,
- CDR &request_body,
- CDR &response,
- TAO_Dispatch_Context *some_info,
- CORBA::Environment &env);
- // Entry point for the ORB Core to hand off a request for processing
- // and eventual dispatch. Derived classes can override this to
- // perform their own processing.
-
- typedef void (CORBA_POA::*dsi_handler) (CORBA::OctetSeq &obj_id,
- CORBA::ServerRequest &request,
- void *context,
- CORBA::Environment &env);
- // @@ Please add a comment. BTW, weren't we planning to rename this
- // typedef?
-
- /* virtual */
- void register_dir (dsi_handler handler,
- void *context,
- CORBA::Environment &env);
- // All invocations are handled using DSI ... slightly enhanced from
- // the original CORBA 2.0 specs, to improve performance by getting
- // rid of all mallocation for calls with fixed-size parameter lists.
- //
- // A single skeleton, also called "Dynamic Implementation Routine",
- // is provided to the ORB; it is called on all requests, along with
- // a pointer to context that was provided by the server.
- //
- // One could imagine that the DIR would recognize that the context
- // is a hashtable for per-object state, keyed by the object ID.
- //
- // Note that in addition to the operations defined by an object's
- // IDL interface specification, four operations must be supported by
- // code layered above the POA. There are many ways in which these
- // operations can be hidden from "application" programs, and some
- // solutions are noted below.
- //
- // * "_is_a" is readily handled by skeletons,
- //
- // * "_get_interface" similarly, though with more work to allow the
- // IFR data structures to be extracted from skeletons.
- //
- // * "_get_implementation" is implementation-specific, a facility
- // through which administrative and other information may be
- // acquired. Not all systems provide consistent ways to utilize
- // this facility.
- //
- // * "_non_existent" asks if the referred-to object still exists.
- // This enables solving many "distributed garbage" problems,
- // such as maintaining persistent tables keyed by references to
- // objects that may no longer exist.
-
- // @@ virtual
- void please_shutdown (CORBA::Environment &env);
- // Please Shutdown -- reject all further incoming requests, and
- // allow all currently active calls (e.g. "this one") to complete.
- // This ensures that OS resources associated with this OA can be
- // reclaimed even if some buggy applications code mismanages
- // refcounting on this POA.
-
- void run (struct timeval *tvp,
- CORBA::Environment &env);
- // Run -- call get_request () in a loop until shutdown completes.
- // Uses as much concurrency as is provided in this environment.
- // Initiate shutdown if we've been idle for the specified time.
- //
- // This uses only the public APIs defined above; the function is
- // defined here purely for convenience, to help some applications
- // avoid writing that loop.
-
- static CORBA::POA_ptr get_boa (CORBA::ORB_ptr orb,
- CORBA::Environment &env);
- // Get an "anonymous" POA pseudo-objref ... this is the API that
- // most applications will use. It returns a POA which is not
- // otherwise in use (though it may have been used in the past).
- //
- // Any given POA (named or otherwise) will create equivalent object
- // references when POA::create () is called with the same object and
- // type IDs. This is not true for two different BOAs.
-
- static CORBA::POA_ptr get_named_boa (CORBA::ORB_ptr orb,
- CORBA::String name,
- CORBA::Environment &env);
- // Get a "named" POA ... most applications don't use/need this API.
- //
- // POA names are for ORB/system bootstrapping purposes, and need not
- // be shared between different systems. The scope of the name isn't
- // guaranteed to include more than one system. The names themselves
- // are administered using system-specific mechanisms and policies.
-
- CORBA::OctetSeq *get_key (CORBA::Object_ptr obj,
- CORBA::Environment &env);
- // NON-STANDARD CALL. When dispatching a request to an object, you
- // need to be able to get the object key you used to create the
- // reference. It's the main way servers distinguish two object
- // references from each other.
-
- /* virtual */
- void clean_shutdown (CORBA::Environment &env);
- // NON-STANDARD CALL. OA user asks for a clean shutdown of the OA
- // after currently active calls complete. OA "requester" (calls
- // <get_request>) asks if we're shutting down, and if so closes down
- // transport cleanly.
- // @@ This used to be virtual...does it really need to be any more?
-
- /* virtual */
- CORBA::Boolean shutting_down (void);
- // NON-STANDARD CALL. Returns <TRUE> if we're in the process of
- // shutting down.
-
- void dispatch (CORBA::OctetSeq &key,
- CORBA::ServerRequest &req,
- void *context,
- CORBA::Environment &env);
- // Find the object for the request and pass it up the chain. Errors
- // are returned in <env>.
-
- virtual int bind (const CORBA::OctetSeq &key,
- CORBA::Object_ptr obj);
- // Registers a CORBA::Object into the object table and associates the
- // key with it. Returns -1 on failure, 0 on success, 1 on
- // duplicate.
-
- virtual int find (const CORBA::OctetSeq &key,
- CORBA::Object_ptr &obj);
- // Looks up an object in the object table using <{key}>. Returns
- // non-negative integer on success, or -1 on failure.
-
- virtual CORBA::ORB_ptr orb (void) const;
- // Returns pointer to the ORB with which this OA is associated.
-
- // = COM IUnknown Support
- ULONG __stdcall AddRef (void);
- ULONG __stdcall Release (void);
- HRESULT __stdcall QueryInterface (REFIID riid, void** ppv);
-
-protected:
- // @@ Do we really need protected anymore?
- TAO_Object_Table *objtable_;
- // Table of objects registered with this Object Adapter.
-
-private:
- CORBA::Boolean do_exit_;
- // Flag set by <clean_shutdown ()>.
-
- CORBA::ORB_ptr orb_;
- // Pointer to our ORB.
-
- u_int call_count_;
- // Used by COM stuff
-
- u_int refcount_;
- // Used by COM stuff
-
- CORBA::POA::dsi_handler skeleton_;
- // Skeleton function
-
- void *context_;
- // Who knows!?!
-
- ACE_SYNCH_MUTEX lock_;
- // Locks critical sections within ROA code methods (was
- // tcpoa_mutex).
-
- ACE_SYNCH_MUTEX com_lock_;
- // Locks critical sections in COM-related code (was tcpoa_lock).
-
- // = Copy and assignment: just say no
- CORBA_POA (const CORBA_POA &src);
- CORBA_POA &operator= (const CORBA_POA &src);
-};
-
-struct TAO_Dispatch_Context
-{
- // = TITLE
- // Structure holding information necessary for GIOP functionality.
- //
- // = DESCRIPTION
- // Data structure passed as "context" to the GIOP code, which then
- // calls back one of the two helper routines as part of handling any
- // particular incoming request.
-
- CORBA::POA::dsi_handler skeleton_;
- // Function pointer to skeleton glue function.
-
- void (*check_forward_) (CORBA::OctetSeq& key,
- CORBA::Object_ptr& fwd_ref,
- void* context,
- CORBA::Environment& env);
- // Function to check if the request should be forwarded (whatever
- // that means).
-
- void *context_;
- // Who knows...another overloading of the word "context".
- // @@ Can we please try to remove this?
-
- CORBA::POA_ptr oa_;
- // This should really be a POA_ptr, but currently it doesn't support
- // the one call we need to make through here: <handle_message ()>.
-
- ACE_SOCK_Stream endpoint_;
- // The communication endpoint from which the data needs to be read.
- // NOTE!!! This type MUST match that used for ROA_Handler!
-};
-
-#endif /* TAO_BOA_H */
-
-
-
diff --git a/TAO/tao/boa.i b/TAO/tao/boa.i
deleted file mode 100644
index 369d0c1f388..00000000000
--- a/TAO/tao/boa.i
+++ /dev/null
@@ -1,20 +0,0 @@
-// CORBA dup/release build on top of COM's (why not).
-
-ACE_INLINE void
-CORBA::release (CORBA::POA_ptr obj)
-{
- if (obj)
- obj->Release ();
-}
-
-ACE_INLINE CORBA::Boolean
-CORBA_POA::shutting_down (void)
-{
- return do_exit_;
-}
-
-ACE_INLINE CORBA::ORB_ptr
-CORBA_POA::orb (void) const
-{
- return orb_;
-}
diff --git a/TAO/tao/corba.h b/TAO/tao/corba.h
index 67fa8bee078..4d35cc469bf 100644
--- a/TAO/tao/corba.h
+++ b/TAO/tao/corba.h
@@ -67,7 +67,7 @@
#include "tao/sequence.h"
#include "tao/varout.h"
#include "tao/any.h"
-#include "tao/boa.h"
+#include "tao/poa.h"
#include "tao/params.h"
#include "tao/client_factory.h"
@@ -97,7 +97,7 @@
#include "tao/giop.h"
// TAO specific includes
-#include "tao/Orb_Core.h"
+#include "tao/orb_core.h"
#include "tao/connect.h"
#include "tao/objtable.h"
#include "tao/optable.h"
@@ -112,7 +112,7 @@
# define do_undef_on_ACE_INLINE
# endif
-#include "tao/Orb_Core.i"
+#include "tao/orb_core.i"
#include "tao/corbacom.i"
#include "tao/sequence.i"
#include "tao/typecode.i"
@@ -132,7 +132,7 @@
// the following *.i files are conditionally included here
#if defined (__ACE_INLINE__)
-#include "tao/boa.i"
+#include "tao/poa.i"
#include "tao/giop.i"
#include "tao/svrrqst.i"
#include "tao/params.i"
diff --git a/TAO/tao/default_client.cpp b/TAO/tao/default_client.cpp
index da548156cbc..ea095abdd40 100644
--- a/TAO/tao/default_client.cpp
+++ b/TAO/tao/default_client.cpp
@@ -14,7 +14,7 @@
// ============================================================================
#include "tao/default_client.h"
-#include "tao/Orb_Core.h"
+#include "tao/orb_core.h"
TAO_Default_Client_Strategy_Factory::TAO_Default_Client_Strategy_Factory (void)
{