summaryrefslogtreecommitdiff
path: root/TAO/tao
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1997-10-12 23:25:37 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1997-10-12 23:25:37 +0000
commitbd05e81b1ba53375975ba302115dad2569bea3d8 (patch)
tree985d7bc1b254128ca00f2e26a731c0efdce454bf /TAO/tao
parenta5871ecd93cff36516638a5a1e028bc134c54354 (diff)
downloadATCD-bd05e81b1ba53375975ba302115dad2569bea3d8.tar.gz
*** empty log message ***
Diffstat (limited to 'TAO/tao')
-rw-r--r--TAO/tao/client_factory.cpp50
-rw-r--r--TAO/tao/client_factory.h44
-rw-r--r--TAO/tao/client_factory.i37
-rw-r--r--TAO/tao/connect.h45
-rw-r--r--TAO/tao/connect.i35
-rw-r--r--TAO/tao/default_client.cpp42
-rw-r--r--TAO/tao/default_client.h28
-rw-r--r--TAO/tao/giop.cpp23
-rw-r--r--TAO/tao/orbobj.cpp46
-rw-r--r--TAO/tao/orbobj.h20
-rw-r--r--TAO/tao/orbobj.i5
11 files changed, 164 insertions, 211 deletions
diff --git a/TAO/tao/client_factory.cpp b/TAO/tao/client_factory.cpp
index c7f49cc82ff..ed5e4a49ed7 100644
--- a/TAO/tao/client_factory.cpp
+++ b/TAO/tao/client_factory.cpp
@@ -21,53 +21,3 @@
#include "tao/corba.h"
-int
-TAO_Client_Connection_Handler::open (void *)
-{
- // Here is where we could enable all sorts of things such as
- // nonblock I/O, sock buf sizes, TCP no-delay, etc.
-
- // @@ Chris, this should be changed to a macro that we put in the
- // ACE OS.h file.
-#if !defined (VXWORKS)
- const int MAX_SOCK_BUF_SIZE = 65536;
-
- if (this->peer ().set_option (SOL_SOCKET,
- SO_SNDBUF,
- (void *)&MAX_SOCK_BUF_SIZE,
- sizeof (MAX_SOCK_BUF_SIZE)) == -1)
- return -1;
-
- else if (this->peer ().set_option (SOL_SOCKET,
- SO_RCVBUF,
- (void *) &MAX_SOCK_BUF_SIZE,
- sizeof (MAX_SOCK_BUF_SIZE)) == -1)
- return -1;
- else
-#endif
- // For now, we just return success
- return 0;
-}
-
-#define TAO_SVC_TUPLE ACE_Svc_Tuple<TAO_Client_Connection_Handler>
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Hash_Addr<ACE_INET_Addr, TAO_Client_Connection_Handler>;
-template class ACE_Strategy_Connector<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR>;
-template class ACE_NOOP_Creation_Strategy<TAO_Client_Connection_Handler>;
-template class ACE_Concurrency_Strategy<TAO_Client_Connection_Handler>;
-template class ACE_Connector<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR>;
-template class TAO_SVC_TUPLE;
-template class ACE_Map_Manager<int, TAO_SVC_TUPLE*, ACE_SYNCH_RW_MUTEX>;
-template class ACE_Map_Iterator<int, TAO_SVC_TUPLE*, ACE_SYNCH_RW_MUTEX>;
-template class ACE_Map_Entry<int, TAO_SVC_TUPLE*>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Hash_Addr<ACE_INET_Addr, TAO_Client_Connection_Handler>
-#pragma instantiate ACE_Strategy_Connector<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR>
-#pragma instantiate ACE_NOOP_Creation_Strategy<TAO_Client_Connection_Handler>
-#pragma instantiate ACE_Concurrency_Strategy<TAO_Client_Connection_Handler>
-#pragma instantiate ACE_Connector<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR>
-#pragma instantiate TAO_SVC_TUPLE
-#pragma instantiate ACE_Map_Manager<int, TAO_SVC_TUPLE*, ACE_SYNCH_RW_MUTEX>
-#pragma instantiate ACE_Map_Iterator<int, TAO_SVC_TUPLE*, ACE_SYNCH_RW_MUTEX>
-#pragma instantiate ACE_Map_Entry<int, TAO_SVC_TUPLE*>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/tao/client_factory.h b/TAO/tao/client_factory.h
index ce00e786607..3b405bd23f8 100644
--- a/TAO/tao/client_factory.h
+++ b/TAO/tao/client_factory.h
@@ -29,36 +29,6 @@
# include "tao/params.h"
#endif /* 0 */
-class TAO_Client_Connection_Handler : public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>
- // = TITLE
- // <Svc_Handler> used on the client side and returned by the
- // <TAO_CONNECTOR>.
- // @@ Should this be in here or in the default_client.*?
-{
-public:
- // = Intialization method.
- TAO_Client_Connection_Handler (ACE_Thread_Manager * = 0);
- // Do-nothing constructor
-
- // = <Connector> hook.
- virtual int open (void *);
- // Initialization hook
-
- void in_use (CORBA::Boolean);
- // Set the in-use flag.
-
- CORBA::Boolean in_use (void);
- // Return state of the in-use flag.
-
-private:
- CORBA::Boolean in_use_;
- // True value indicates that something is using this handler.
-};
-
-// This is equivalent to the TAO_ACCEPTOR.
-typedef ACE_Strategy_Connector<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR>
- TAO_CONNECTOR;
-
class TAO_Client_Strategy_Factory : public ACE_Service_Object
// = TITLE
// Abstract factory used by the client to manufacture various
@@ -71,21 +41,11 @@ public:
virtual ~TAO_Client_Strategy_Factory (void);
// Destructor
-
- // = Client-side strategy types.
- typedef ACE_NOOP_Creation_Strategy<TAO_Client_Connection_Handler>
- NULL_CREATION_STRATEGY;
-
- // = Factory methods for ORB strategies.
-#if defined (TAO_HAS_CLIENT_CONCURRENCY)
- // @@ Chris, shouldn't this always be "potentially" the case, even
- // if a client didn't want to use it?
- virtual CONCURRENCY_STRATEGY *concurrency_strategy (void);
-#endif /* TAO_HAS_CLIENT_CONCURRENCY */
-
+#if 0
virtual TAO_CONNECTOR *connector (void);
// Return a pointer to a connector using appropriate strategies.
+#endif /* 0 */
};
#endif /* TAO_CLIENT_FACTORY_H */
diff --git a/TAO/tao/client_factory.i b/TAO/tao/client_factory.i
index 18024d7a668..a409756e7b8 100644
--- a/TAO/tao/client_factory.i
+++ b/TAO/tao/client_factory.i
@@ -1,25 +1,10 @@
-ACE_INLINE
-TAO_Client_Connection_Handler::TAO_Client_Connection_Handler (ACE_Thread_Manager *)
- : in_use_ (0)
-{}
-
-ACE_INLINE CORBA::Boolean
-TAO_Client_Connection_Handler::in_use (void)
-{
- return in_use_;
-}
-
-ACE_INLINE void
-TAO_Client_Connection_Handler::in_use (CORBA::Boolean flag)
-{
- in_use_ = flag;
-}
-
+#if 0
ACE_INLINE TAO_CONNECTOR *
TAO_Client_Strategy_Factory::connector (void)
{
return 0;
}
+#endif /* 0 */
ACE_INLINE
TAO_Client_Strategy_Factory::TAO_Client_Strategy_Factory (void)
@@ -29,21 +14,3 @@ ACE_INLINE
TAO_Client_Strategy_Factory::~TAO_Client_Strategy_Factory (void)
{}
-// @@ Chris, shouldn't we protect this stuff with some type of #ifdef
-// for platforms that lack template specialization?
-// Template specializations that allow the cached connection manager
-// to work better.
-
-ACE_INLINE size_t
-ACE_Hash_Addr<ACE_INET_Addr, TAO_Client_Connection_Handler>::hash_i (const ACE_INET_Addr &addr) const
-{
- return addr.get_ip_address () + addr.get_port_number ();
-}
-
-ACE_INLINE int
-ACE_Hash_Addr<ACE_INET_Addr, TAO_Client_Connection_Handler>::compare_i (const ACE_INET_Addr &a1,
- const ACE_INET_Addr &a2) const
-{
- return a1 != a2;
-}
-
diff --git a/TAO/tao/connect.h b/TAO/tao/connect.h
index 8a759641be5..5e67d77fd70 100644
--- a/TAO/tao/connect.h
+++ b/TAO/tao/connect.h
@@ -25,6 +25,51 @@
// Forward Decls
class TAO_OA_Parameters;
+class TAO_Client_Connection_Handler : public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>
+ // = TITLE
+ // <Svc_Handler> used on the client side and returned by the
+ // <TAO_CONNECTOR>.
+ // @@ Should this be in here or in the default_client.*?
+{
+public:
+ // = Intialization method.
+ TAO_Client_Connection_Handler (ACE_Thread_Manager * = 0);
+ // Do-nothing constructor
+
+ // = <Connector> hook.
+ virtual int open (void *);
+ // Initialization hook
+
+ void in_use (CORBA::Boolean);
+ // Set the in-use flag.
+
+ CORBA::Boolean in_use (void);
+ // Return state of the in-use flag.
+
+private:
+ CORBA::Boolean in_use_;
+ // True value indicates that something is using this handler.
+};
+
+// = Useful typedef.
+
+typedef ACE_Strategy_Connector<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR>
+ TAO_CONNECTOR;
+
+typedef ACE_Cached_Connect_Strategy<TAO_Client_Connection_Handler,
+ ACE_SOCK_CONNECTOR,
+ ACE_SYNCH_RW_MUTEX>
+ TAO_CACHED_CONNECT_STRATEGY;
+
+typedef ACE_NOOP_Creation_Strategy<TAO_Client_Connection_Handler>
+ TAO_NULL_CREATION_STRATEGY;
+
+#if defined (TAO_HAS_CLIENT_CONCURRENCY)
+ // @@ Chris, shouldn't this always be "potentially" the case, even
+ // if a client didn't want to use it?
+ virtual CONCURRENCY_STRATEGY *concurrency_strategy (void);
+#endif /* TAO_HAS_CLIENT_CONCURRENCY */
+
// @@ Is this really an *OA* connection handler anymore? Seems like
// connections are really associated with ORBs in the POA-based
// architecture.
diff --git a/TAO/tao/connect.i b/TAO/tao/connect.i
index 11ccd0b850a..aeccb65bbef 100644
--- a/TAO/tao/connect.i
+++ b/TAO/tao/connect.i
@@ -10,3 +10,38 @@ TAO_OA_Connection_Handler::params (TAO_OA_Parameters *p)
params_ = p;
}
+ACE_INLINE
+TAO_Client_Connection_Handler::TAO_Client_Connection_Handler (ACE_Thread_Manager *)
+ : in_use_ (0)
+{}
+
+ACE_INLINE CORBA::Boolean
+TAO_Client_Connection_Handler::in_use (void)
+{
+ return in_use_;
+}
+
+ACE_INLINE void
+TAO_Client_Connection_Handler::in_use (CORBA::Boolean flag)
+{
+ in_use_ = flag;
+}
+
+// @@ Chris, shouldn't we protect this stuff with some type of #ifdef
+// for platforms that lack template specialization?
+// Template specializations that allow the cached connection manager
+// to work better.
+
+ACE_INLINE size_t
+ACE_Hash_Addr<ACE_INET_Addr, TAO_Client_Connection_Handler>::hash_i (const ACE_INET_Addr &addr) const
+{
+ return addr.get_ip_address () + addr.get_port_number ();
+}
+
+ACE_INLINE int
+ACE_Hash_Addr<ACE_INET_Addr, TAO_Client_Connection_Handler>::compare_i (const ACE_INET_Addr &a1,
+ const ACE_INET_Addr &a2) const
+{
+ return a1 != a2;
+}
+
diff --git a/TAO/tao/default_client.cpp b/TAO/tao/default_client.cpp
index 5affd8ab1ca..da548156cbc 100644
--- a/TAO/tao/default_client.cpp
+++ b/TAO/tao/default_client.cpp
@@ -18,25 +18,6 @@
TAO_Default_Client_Strategy_Factory::TAO_Default_Client_Strategy_Factory (void)
{
- // When should I do this open ()? It seems like this is way too
- // early, but doing it in the accessor for connector () seems like
- // it would be too late as well.
- // @@ Chris, a couple of thoughts:
- // 1. What is wrong with doing it here, in general?
- // 2. We should make sure not to use ACE_Reactor::instance() since
- // it makes our ORB too tightly coupled to having just 1 reactor!
- // I think it's clear now that we'll have one Reactor "per-ORB"
- // and we may have multiple ORBs per process (e.g., consider the
- // "real-time rate-based ORB" we discussed the other day).
- connector_.open (TAO_ORB_Core_instance ()->reactor (),
- &null_creation_strategy_,
- &caching_connect_strategy_,
-#if defined (TAO_HAS_CLIENT_CONCURRENCY)
- concurrency_strategy_ ()
-#else
- 0
-#endif /* TAO_HAS_CLIENT_CONCURRENCY */
- );
}
TAO_Default_Client_Strategy_Factory::~TAO_Default_Client_Strategy_Factory (void)
@@ -48,12 +29,6 @@ TAO_Default_Client_Strategy_Factory::init (int argc, char *argv[])
return this->parse_args (argc, argv);
}
-TAO_CONNECTOR *
-TAO_Default_Client_Strategy_Factory::connector (void)
-{
- return &this->connector_;
-}
-
int
TAO_Default_Client_Strategy_Factory::parse_args (int /* argc */, char ** /* argv */)
{
@@ -61,21 +36,4 @@ TAO_Default_Client_Strategy_Factory::parse_args (int /* argc */, char ** /* argv
return 0;
}
-#define TAO_HASH_ADDR ACE_Hash_Addr<ACE_INET_Addr, TAO_Client_Connection_Handler>
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Cached_Connect_Strategy<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR, ACE_SYNCH_RW_MUTEX>;
-template class ACE_Creation_Strategy<TAO_Client_Connection_Handler>;
-template class ACE_Connect_Strategy<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR>;
-//template class TAO_HASH_ADDR;
-template class ACE_Hash_Map_Entry<TAO_HASH_ADDR, TAO_Client_Connection_Handler *>;
-template class ACE_Hash_Map_Manager<TAO_HASH_ADDR, TAO_Client_Connection_Handler *, ACE_SYNCH_RW_MUTEX>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Cached_Connect_Strategy<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR, ACE_SYNCH_RW_MUTEX>
-#pragma instantiate ACE_Creation_Strategy<TAO_Client_Connection_Handler>
-#pragma instantiate ACE_Connect_Strategy<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR>
-//#pragma instantiate TAO_HASH_ADDR
-#pragma instantiate ACE_Hash_Map_Entry<TAO_HASH_ADDR, TAO_Client_Connection_Handler *>
-#pragma instantiate ACE_Hash_Map_Manager<TAO_HASH_ADDR, TAO_Client_Connection_Handler *, ACE_SYNCH_RW_MUTEX>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
ACE_SVC_FACTORY_DEFINE (TAO_Default_Client_Strategy_Factory)
diff --git a/TAO/tao/default_client.h b/TAO/tao/default_client.h
index 6e8ec64c99f..510728b4b56 100644
--- a/TAO/tao/default_client.h
+++ b/TAO/tao/default_client.h
@@ -46,38 +46,12 @@ public:
virtual ~TAO_Default_Client_Strategy_Factory (void);
// Destructor.
- // = Useful typedef.
- typedef ACE_Cached_Connect_Strategy<TAO_Client_Connection_Handler,
- ACE_SOCK_CONNECTOR,
- ACE_SYNCH_RW_MUTEX>
- CACHED_CONNECT_STRATEGY;
-
- virtual TAO_CONNECTOR *connector (void);
- // Return a pointer to a connector using appropriate strategies.
-
// = Service Configurator hooks.
- virtual int init(int argc, char* argv[]);
+ virtual int init (int argc, char* argv[]);
// Dynamic linking hook
int parse_args(int argc, char* argv[]);
// Parse svc.conf arguments
-
-private:
-
-#if defined (TAO_HAS_CLIENT_CONCURRENCY)
- // @@ Chris, shouldn't this always be "potentially" the case, even
- // if a client didn't want to use it?
- // @@ Yes, but we don't support this right now...
- CONCURRENCY_STRATEGY *concurrency_strategy_;
-#endif /* TAO_HAS_CLIENT_CONCURRENCY */
-
- // @@ Chris, please add comments to these members.
-
- TAO_CONNECTOR connector_;
-
- NULL_CREATION_STRATEGY null_creation_strategy_;
-
- CACHED_CONNECT_STRATEGY caching_connect_strategy_;
};
ACE_SVC_FACTORY_DECLARE (TAO_Default_Client_Strategy_Factory)
diff --git a/TAO/tao/giop.cpp b/TAO/tao/giop.cpp
index a3bf37ca6f7..35c71e25e38 100644
--- a/TAO/tao/giop.cpp
+++ b/TAO/tao/giop.cpp
@@ -625,18 +625,25 @@ TAO_GIOP_Invocation::start (CORBA::Environment &env)
// we remove it?
ACE_MT (ACE_GUARD (ACE_Thread_Mutex, guard, lock_));
- // Get a CORBA::Object_ptr from _data using QueryInterface ()
CORBA::Object_ptr obj = 0;
- (void) data_->QueryInterface (IID_CORBA_Object, (void **)&obj);
+ // Get a CORBA::Object_ptr from _data using <QueryInterface>.
+ (void) this->data_->QueryInterface (IID_CORBA_Object, (void **) &obj);
// Get a pointer to the orb from the object
- CORBA::ORB_ptr orb = obj->orb ();
-
- // Get a reference to the client connector
- // TAO_Client_Factory::CONNECTOR* con = 0;
- TAO_CONNECTOR *con = 0;
- con = orb->client_factory ()->connector ();
+ CORBA::ORB_ptr orb;
+
+#if (TAO_HAS_TSS_ORBCORE)
+ // Get the connector from thread-specific storage.
+ orb = TAO_ORB_Core_instance ()->orb ();
+ assert (orb == obj->orb ());
+#else
+ orb = obj->orb ();
+ // con = orb->client_factory ()->connector ();
+#endif /* 0 */
+
+ // Get a pointer to the client connector.
+ TAO_CONNECTOR *con = orb->connector ();
// Determine the object key and the address to which we'll need a
// connection.
diff --git a/TAO/tao/orbobj.cpp b/TAO/tao/orbobj.cpp
index 10703aa7500..14f59076c75 100644
--- a/TAO/tao/orbobj.cpp
+++ b/TAO/tao/orbobj.cpp
@@ -229,6 +229,7 @@ CORBA::ORB_init (int &argc,
// XXXASG - compiler doesn't like this
char **svc_config_argv; // @@ Should this be a data member?
// Probably, but there's no object in which to scope it.
+
int svc_config_argc = 0;
ACE_NEW_RETURN (svc_config_argv, char *[argc + 1], 0);
@@ -313,8 +314,11 @@ CORBA::ORB_init (int &argc,
#endif /* DEBUG */
ACE_INET_Addr rendezvous;
+ // @@ Don't use magic #'s like 128. Final an appropriate symbolic
+ // constant.
char hbuf[128];
- // create a INET_Addr
+
+ // Create a INET_Addr.
if (ACE_OS::strlen (host) == 0)
{
// hostname not provided, so use the default
@@ -344,10 +348,9 @@ CORBA::ORB_init (int &argc,
// makes it always use URL-style stringified objrefs, where the
// hostname and TCP port number are explicit (and the whole objref
// is readable by mortals).
- CORBA::Boolean use_ior;
+ CORBA::Boolean use_ior;
- if (orb_name != 0
- && ACE_OS::strcmp (orb_name, "internet") == 0)
+ if (orb_name != 0 && ACE_OS::strcmp (orb_name, "internet") == 0)
use_ior = CORBA::B_FALSE;
else
use_ior = CORBA::B_TRUE;
@@ -365,6 +368,9 @@ CORBA::ORB_init (int &argc,
ACE_OS::socket_init (ACE_WSOCK_VERSION);
// Call various internal initialization routines.
+ // @@ Why are these names prefixed with "__"? Shouldn't they be in
+ // a class someplace, or at least have the word "TAO" in front of
+ // them?
__TC_init_table ();
TAO_Marshal::initialize ();
__TC_init_standard_exceptions (env);
@@ -375,16 +381,31 @@ CORBA::ORB_init (int &argc,
// Initialize the Service Configurator
TAO_Internal::open_services (svc_config_argc, svc_config_argv);
+ // Open the <Strategy_Connector>.
+ this->connector_.open (TAO_ORB_Core_instance ()->reactor (),
+ &this->null_creation_strategy_,
+ &this->caching_connect_strategy_,
+#if defined (TAO_HAS_CLIENT_CONCURRENCY)
+ this->concurrency_strategy_ ()
+#else
+ 0
+#endif /* TAO_HAS_CLIENT_CONCURRENCY */
+ );
+
// Inititalize the "ORB" pseudo-object now.
IIOP_ORB_ptr the_orb = 0;
ACE_NEW_RETURN (the_orb, IIOP_ORB, 0);
- TAO_ORB_Core_instance()->orb(the_orb);
+ // Install the ORB * into the ORB Core instance. Note that if we're
+ // running with a "thread-per-rate" concurrency model this ORB *
+ // will be located in thread-specific storage.
+ TAO_ORB_Core_instance ()->orb (the_orb);
+
// @@ Seems like the following should happen inside the ORB Core,
// not at this level. Do we really need this stuff? What is the
// alternative format (other than IOR)? --cjc
the_orb->use_omg_ior_format (CORBA::Boolean (use_ior));
- the_orb->params()->addr(rendezvous);
+ the_orb->params ()->addr (rendezvous);
return the_orb;
}
@@ -552,12 +573,25 @@ CORBA_ORB::run (ACE_Time_Value *tv)
return 0;
}
+#define TAO_HASH_ADDR ACE_Hash_Addr<ACE_INET_Addr, TAO_Client_Connection_Handler>
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
template class ACE_Dynamic_Service<TAO_Server_Strategy_Factory>;
template class ACE_Dynamic_Service<TAO_Client_Strategy_Factory>;
template class ACE_Strategy_Acceptor<TAO_OA_Connection_Handler, ACE_SOCK_ACCEPTOR>;
+template class ACE_Cached_Connect_Strategy<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR, ACE_SYNCH_RW_MUTEX>;
+template class ACE_Creation_Strategy<TAO_Client_Connection_Handler>;
+template class ACE_Connect_Strategy<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR>;
+//template class TAO_HASH_ADDR;
+template class ACE_Hash_Map_Entry<TAO_HASH_ADDR, TAO_Client_Connection_Handler *>;
+template class ACE_Hash_Map_Manager<TAO_HASH_ADDR, TAO_Client_Connection_Handler *, ACE_SYNCH_RW_MUTEX>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#pragma instantiate ACE_Dynamic_Service<TAO_Server_Strategy_Factory>
#pragma instantiate ACE_Dynamic_Service<TAO_Client_Strategy_Factory>
#pragma instantiate ACE_Strategy_Acceptor<TAO_OA_Connection_Handler, ACE_SOCK_ACCEPTOR>
+#pragma instantiate ACE_Cached_Connect_Strategy<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR, ACE_SYNCH_RW_MUTEX>
+#pragma instantiate ACE_Creation_Strategy<TAO_Client_Connection_Handler>
+#pragma instantiate ACE_Connect_Strategy<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR>
+//#pragma instantiate TAO_HASH_ADDR
+#pragma instantiate ACE_Hash_Map_Entry<TAO_HASH_ADDR, TAO_Client_Connection_Handler *>
+#pragma instantiate ACE_Hash_Map_Manager<TAO_HASH_ADDR, TAO_Client_Connection_Handler *, ACE_SYNCH_RW_MUTEX>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/tao/orbobj.h b/TAO/tao/orbobj.h
index 5556341ad22..0c4f2fdb156 100644
--- a/TAO/tao/orbobj.h
+++ b/TAO/tao/orbobj.h
@@ -124,6 +124,9 @@ public:
// previously-specified port for requests. Returns -1 on failure,
// else 0.
+ TAO_CONNECTOR *connector (void);
+ // Accessor that returns the connector.
+
protected:
CORBA_ORB (void);
virtual ~CORBA_ORB (void);
@@ -159,10 +162,25 @@ private:
TAO_CONNECTOR peer_connector_;
// The connector actively initiating connection requests.
+#if defined (TAO_HAS_CLIENT_CONCURRENCY)
+ // @@ Chris, shouldn't this always be "potentially" the case, even
+ // if a client didn't want to use it?
+ // @@ Yes, but we don't support this right now...
+ CONCURRENCY_STRATEGY *concurrency_strategy_;
+#endif /* TAO_HAS_CLIENT_CONCURRENCY */
+
+ TAO_NULL_CREATION_STRATEGY null_creation_strategy_;
+ // This no-op creation strategy is necessary for using the
+ // <Strategy_Connector> with the <Cached_Connect_Strategy>.
+
+ TAO_CACHED_CONNECT_STRATEGY caching_connect_strategy_;
+ // This connection strategy maintain a cache of preconnected
+ // <TAO_Client_Connection_Handler>s. The goal is to reduce latency
+ // and locking overhead.
+
// = NON-PROVIDED METHODS
CORBA_ORB (const CORBA_ORB &);
CORBA_ORB &operator= (const CORBA_ORB &);
};
#endif /* TAO_ORBOBJ_H */
-
diff --git a/TAO/tao/orbobj.i b/TAO/tao/orbobj.i
index aab7aacd478..00898fa47ed 100644
--- a/TAO/tao/orbobj.i
+++ b/TAO/tao/orbobj.i
@@ -62,4 +62,9 @@ CORBA_ORB::shutdown (CORBA::Boolean wait_for_completion)
return;
}
+ACE_INLINE TAO_CONNECTOR *
+CORBA_ORB::connector (void)
+{
+ return &this->peer_connector_;
+}