TAO_CosNaming  Snapshot(2023/04/28-19:34)
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
TAO_Naming_Server Class Reference

Defines a wrapper class that holds the root Naming Context. More...

#include <Naming_Server.h>

Collaboration diagram for TAO_Naming_Server:
Collaboration graph
[legend]

Classes

struct  IOR_Bundle
 

Public Member Functions

 TAO_Naming_Server (size_t bsize=1)
 Default constructor. More...
 
 TAO_Naming_Server (CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, size_t context_size=ACE_DEFAULT_MAP_SIZE, ACE_Time_Value *timeout=0, bool resolve_for_existing_naming_service=true, const ACE_TCHAR *persistence_location=0, void *base_addr=TAO_NAMING_BASE_ADDR, int enable_multicast=1, int use_storable_context=0, int round_trip_timeout=0, int use_round_trip_timeout=0, size_t bsize=1)
 
int init (CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, size_t context_size=ACE_DEFAULT_MAP_SIZE, ACE_Time_Value *timeout=0, bool resolve_for_existing_naming_service=true, const ACE_TCHAR *persistence_location=0, void *base_addr=TAO_NAMING_BASE_ADDR, int enable_multicast=1, int use_storable_context=0, int round_trip_timeout=0, int use_round_trip_timeout=0)
 
virtual int init_with_orb (int argc, ACE_TCHAR *argv [], CORBA::ORB_ptr orb)
 
virtual int fini (void)
 Destroy the child POA created in init_with_orb. More...
 
virtual ~TAO_Naming_Server (void)
 Destructor. More...
 
char * naming_service_ior (void)
 Returns the IOR of the naming service. More...
 
CosNaming::NamingContext_ptr operator-> (void) const
 Returns a <NamingContext_ptr> for the root Naming Context. More...
 

Protected Types

enum  Base_IOR_Indexes { ROOT = 0 }
 

Protected Member Functions

void assign (size_t ndx, bool take, CORBA::Object_ptr obj)
 
int write (size_t ndx) const
 
virtual int init_new_naming (CORBA::ORB_ptr orb, PortableServer::POA_ptr root_poa, const ACE_TCHAR *persistence_location, void *base_addr, size_t context_size, int enable_multicast, int use_storable_context, int round_trip_timeout=0, int use_round_trip_timeout=0)
 
virtual int parse_args (int argc, ACE_TCHAR *argv[])
 parses the arguments. More...
 
int write_ior_to_file (const char *ior_string, const char *file_name)
 Write the provided ior_string to the file. Return 0 if success. More...
 
virtual TAO_Storable_Naming_Context_Factorystorable_naming_context_factory (size_t context_size)
 
virtual TAO_Persistent_Naming_Context_Factorypersistent_naming_context_factory (void)
 
IOR_Bundlebundle_at (size_t ndx)
 
const IOR_Bundlebundle_at (size_t ndx) const
 

Protected Attributes

TAO_IOR_Multicast * ior_multicast_
 The ior_multicast event handler. More...
 
CORBA::ORB_var orb_
 The ORB. More...
 
PortableServer::POA_var root_poa_
 The Root POA. More...
 
PortableServer::POA_var ns_poa_
 The Naming Service POA. More...
 
const ACE_TCHARpid_file_name_
 File to output the process id. More...
 
IOR_Bundleiors_
 
size_t bundle_size_
 
size_t context_size_
 
int multicast_
 If not zero multicast is enabled. More...
 
TAO_Persistent_Context_Indexcontext_index_
 
const ACE_TCHARpersistence_dir_
 
void * base_address_
 
int use_storable_context_
 If not zero use flat file persistence. More...
 
int use_servant_activator_
 
TAO_Storable_Naming_Context_Activatorservant_activator_
 
int use_redundancy_
 
int round_trip_timeout_
 If not zero use round trip timeout policy set to value specified. More...
 
int use_round_trip_timeout_
 

Detailed Description

Defines a wrapper class that holds the root Naming Context.

This class either finds an existing Naming Service (if the <resolve_for_existing_naming_service> flag is set) or creates one (if resolve_for_existing_naming_service flag isn't set or Naming Service was not found). This class also defines the operator-> so that <NamingContext> functions like <bind>, <unbind> .. can be called directly on a <TAO_Naming_Server> object, and be forwareded to the root Naming Context. This class is intended to simplify programs that want to play the role of a Naming Service server. To simplify programs that want to play the role of Naming Service clients, use <TAO_Naming_Client>. If a Naming Service is created locally, a TAO_IOR_Multicast event handler is created and installed on the ORB's reactor. This event handler allows other clients on the network to discover and use this Naming Service. Event handler listens on a multicast port for messages from clients looking for a Naming Service, and sends back the ior of the root Naming Context. For more information on how this bootstraping through a multicast process works, check out orbsvcs/orbsvcs/TAO_IOR_Multicast.*, implementation of <resolve_initial_references>, and orbsvcs/Naming/README.

Definition at line 64 of file Naming_Server.h.

Member Enumeration Documentation

◆ Base_IOR_Indexes

Enumerator
ROOT 

Definition at line 149 of file Naming_Server.h.

149  {
150  ROOT = 0
151  };

Constructor & Destructor Documentation

◆ TAO_Naming_Server() [1/2]

TAO_Naming_Server::TAO_Naming_Server ( size_t  bsize = 1)

Default constructor.

Definition at line 41 of file Naming_Server.cpp.

42  : ior_multicast_ (0),
43  pid_file_name_ (0),
44  iors_ (0),
45  bundle_size_ (bsize),
46  context_size_ (ACE_DEFAULT_MAP_SIZE),
47  multicast_ (0),
48 #if !defined (CORBA_E_MICRO)
49  context_index_ (0),
50  persistence_dir_ (0),
53  use_servant_activator_ (false),
55 #endif /* CORBA_E_MICRO */
56  use_redundancy_(0),
59 {
60  ACE_NEW (iors_, IOR_Bundle[bsize]);
61 }
int round_trip_timeout_
If not zero use round trip timeout policy set to value specified.
#define ACE_NEW(POINTER, CONSTRUCTOR)
int multicast_
If not zero multicast is enabled.
int use_storable_context_
If not zero use flat file persistence.
TAO_IOR_Multicast * ior_multicast_
The ior_multicast event handler.
const ACE_TCHAR * pid_file_name_
File to output the process id.
IOR_Bundle * iors_
TAO_Persistent_Context_Index * context_index_
#define TAO_NAMING_BASE_ADDR
Definition: nsconf.h:26
const ACE_TCHAR * persistence_dir_
TAO_Storable_Naming_Context_Activator * servant_activator_

◆ TAO_Naming_Server() [2/2]

TAO_Naming_Server::TAO_Naming_Server ( CORBA::ORB_ptr  orb,
PortableServer::POA_ptr  poa,
size_t  context_size = ACE_DEFAULT_MAP_SIZE,
ACE_Time_Value timeout = 0,
bool  resolve_for_existing_naming_service = true,
const ACE_TCHAR persistence_location = 0,
void *  base_addr = TAO_NAMING_BASE_ADDR,
int  enable_multicast = 1,
int  use_storable_context = 0,
int  round_trip_timeout = 0,
int  use_round_trip_timeout = 0,
size_t  bsize = 1 
)

Constructor. Attempts to find an existing Naming Service if resolve_for_existing_naming_service is set to true. If it is false, or no Naming Service was found during a timeout period, create the Naming Service in this process. If creating the Naming Service locally, make the root context of size <context_size>, register it under the <poa>, and make the Naming Service persistent if <persistence_location> is not 0. (<persistence_location> specifies name of the file to use for persistent storage, <base_addr> specifies the address used for memory mapping <persistent_location> file). If <enable_multicast> is not zero then the service will respond to multicast location queries.

Definition at line 63 of file Naming_Server.cpp.

75  : ior_multicast_ (0),
76  pid_file_name_ (0),
77  iors_ (0),
78  bundle_size_ (bsize),
79  context_size_ (ACE_DEFAULT_MAP_SIZE),
80  multicast_ (0),
81 #if !defined (CORBA_E_MICRO)
82  context_index_ (0),
83  persistence_dir_ (0),
85  use_storable_context_ (use_storable_context),
86  use_servant_activator_ (false),
88 #endif /* CORBA_E_MICRO */
89  use_redundancy_(0),
92 {
93  ACE_NEW (iors_, IOR_Bundle[bsize]);
94  if (this->init (orb,
95  poa,
96  context_size,
97  timeout,
98  resolve_for_existing_naming_service,
99  persistence_location,
100  base_addr,
101  enable_multicast,
102  use_storable_context,
103  round_trip_timeout,
104  use_round_trip_timeout) == -1)
105  ORBSVCS_ERROR ((LM_ERROR,
106  "(%P|%t) %p\n",
107  "TAO_Naming_Server::init"));
108 }
int round_trip_timeout_
If not zero use round trip timeout policy set to value specified.
#define ACE_NEW(POINTER, CONSTRUCTOR)
int multicast_
If not zero multicast is enabled.
int use_storable_context_
If not zero use flat file persistence.
TAO_IOR_Multicast * ior_multicast_
The ior_multicast event handler.
const ACE_TCHAR * pid_file_name_
File to output the process id.
IOR_Bundle * iors_
TAO_Persistent_Context_Index * context_index_
#define TAO_NAMING_BASE_ADDR
Definition: nsconf.h:26
const ACE_TCHAR * persistence_dir_
TAO_Storable_Naming_Context_Activator * servant_activator_
int init(CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, size_t context_size=ACE_DEFAULT_MAP_SIZE, ACE_Time_Value *timeout=0, bool resolve_for_existing_naming_service=true, const ACE_TCHAR *persistence_location=0, void *base_addr=TAO_NAMING_BASE_ADDR, int enable_multicast=1, int use_storable_context=0, int round_trip_timeout=0, int use_round_trip_timeout=0)

◆ ~TAO_Naming_Server()

TAO_Naming_Server::~TAO_Naming_Server ( void  )
virtual

Destructor.

Definition at line 875 of file Naming_Server.cpp.

876 {
877  delete [] this->iors_;
878 
879 #if (TAO_HAS_MINIMUM_POA == 0) && \
880  !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO)
881  if (this->use_servant_activator_ &&
882  this->servant_activator_)
883  {
884  // Activator is reference counted. Don't delete it directly.
885  this->servant_activator_->_remove_ref ();
886  }
887 #endif /* TAO_HAS_MINIMUM_POA */
888 }
IOR_Bundle * iors_
TAO_Storable_Naming_Context_Activator * servant_activator_

Member Function Documentation

◆ assign()

void TAO_Naming_Server::assign ( size_t  ndx,
bool  take,
CORBA::Object_ptr  obj 
)
protected

Definition at line 968 of file Naming_Server.cpp.

969 {
970  IOR_Bundle *b = this->bundle_at(ndx);
971  if (b == 0)
972  return;
973 
974  b->ref_ = take ? obj : CORBA::Object::_duplicate (obj);
975  CORBA::String_var ior = this->orb_->object_to_string (b->ref_.in());
976  b->ior_ = ior.in();
977 }
static CORBA::Object_ptr _duplicate(CORBA::Object_ptr obj)
IOR_Bundle * bundle_at(size_t ndx)
CORBA::ORB_var orb_
The ORB.
const character_type * in(void) const

◆ bundle_at() [1/2]

TAO_Naming_Server::IOR_Bundle * TAO_Naming_Server::bundle_at ( size_t  ndx)
protected

Definition at line 892 of file Naming_Server.cpp.

893  {
894  if (ndx >= this->bundle_size_)
895  {
896  if (TAO_debug_level)
897  {
898  ORBSVCS_ERROR((LM_ERROR,
899  ACE_TEXT("(%P|%t) TAO_naming_Server::bundle_at, ")
900  ACE_TEXT("index %d out of range\n"),
901  ndx));
902  }
903  return 0;
904  }
905  return &iors_[ndx];
906  }
#define ACE_TEXT(STRING)
IOR_Bundle * iors_

◆ bundle_at() [2/2]

const TAO_Naming_Server::IOR_Bundle * TAO_Naming_Server::bundle_at ( size_t  ndx) const
protected

Definition at line 909 of file Naming_Server.cpp.

910  {
911  if (ndx >= this->bundle_size_)
912  {
913  if (TAO_debug_level)
914  {
915  ORBSVCS_ERROR((LM_ERROR,
916  ACE_TEXT("(%P|%t) const TAO_naming_Server::bundle_at, ")
917  ACE_TEXT("index %d out of range\n"),
918  ndx));
919  }
920  return 0;
921  }
922  return &iors_[ndx];
923  }
#define ACE_TEXT(STRING)
IOR_Bundle * iors_

◆ fini()

int TAO_Naming_Server::fini ( void  )
virtual

Destroy the child POA created in init_with_orb.

Definition at line 783 of file Naming_Server.cpp.

784 {
785  // First get rid of the multi cast handler
786  if (this->ior_multicast_)
787  {
788  orb_->orb_core()->reactor ()->remove_handler (this->ior_multicast_,
790  delete this->ior_multicast_;
791  this->ior_multicast_ = 0;
792  }
793 
794  for (size_t i = 0; i < bundle_size_; i++ )
795  {
796  this->iors_[i].ref_ = CORBA::Object::_nil();
797  }
798 
799  // Destroy the child POA ns_poa that is created when initializing
800  // the Naming Service
801  try
802  {
803  if (!CORBA::is_nil (this->ns_poa_.in ()))
804  this->ns_poa_->destroy (1, 1);
805 
806  }
807  catch (const CORBA::Exception&)
808  {
809  // Ignore
810  }
811  try
812  {
813  CORBA::Object_var table_object =
814  this->orb_->resolve_initial_references ("IORTable");
815 
816  IORTable::Table_var ior_table =
817  IORTable::Table::_narrow (table_object.in ());
818 
819  if (!CORBA::is_nil (ior_table.in ()))
820  {
821  ior_table->unbind ("NameService");
822  }
823 
824  }
825  catch (const CORBA::Exception&)
826  {
827  // Ignore
828  }
829 
830  try
831  {
832 #if !defined (CORBA_E_MICRO)
833  CORBA::Object_var svc =
834  this->orb_->unregister_initial_reference ("NameService");
835 #endif /* CORBA_E_MICRO */
836 
837  }
838  catch (const CORBA::Exception&)
839  {
840  // Ignore
841  }
842 
843  ns_poa_ = PortableServer::POA::_nil ();
844  root_poa_ = PortableServer::POA::_nil ();
845  orb_ = CORBA::ORB::_nil ();
846 
847 #if !defined (CORBA_E_MICRO)
848  delete this->context_index_;
849 #endif /* CORBA_E_MICRO */
850 
851  return 0;
852 }
static CORBA::Object_ptr _nil(void)
PortableServer::POA_var ns_poa_
The Naming Service POA.
TAO_IOR_Multicast * ior_multicast_
The ior_multicast event handler.
IOR_Bundle * iors_
TAO_Persistent_Context_Index * context_index_
_in_type in(void) const
PortableServer::POA_var root_poa_
The Root POA.
CORBA::ORB_var orb_
The ORB.
static CORBA::ORB_ptr _nil(void)
Boolean is_nil(T x)

◆ init()

int TAO_Naming_Server::init ( CORBA::ORB_ptr  orb,
PortableServer::POA_ptr  poa,
size_t  context_size = ACE_DEFAULT_MAP_SIZE,
ACE_Time_Value timeout = 0,
bool  resolve_for_existing_naming_service = true,
const ACE_TCHAR persistence_location = 0,
void *  base_addr = TAO_NAMING_BASE_ADDR,
int  enable_multicast = 1,
int  use_storable_context = 0,
int  round_trip_timeout = 0,
int  use_round_trip_timeout = 0 
)

Initializer. Attempts to find an existing Naming Service if resolve_for_existing_naming_service is set to true. If it is false, or no Naming Service was found during a <timeout> period, create the Naming Service in this process. If creating the Naming Service locally, make the root context of size <context_size>, register it under the <poa>, and make the Naming Service persistent if <persistence_location> is not 0. (<persistence_location> specifies name of the file to use for persistent storage, <base_addr> specifies the address used for memory mapping <persistent_location> file). If <enable_multicast> is not zero then the service will respond to multicast location queries.

Definition at line 111 of file Naming_Server.cpp.

122 {
123  if (CORBA::is_nil (this->orb_.in ()))
124  {
125  this->orb_ = CORBA::ORB::_duplicate (orb);
126  }
127  for (size_t i = 0; i < bundle_size_; i++ )
128  {
129  this->iors_[i].ref_ = CORBA::Object::_nil();
130  }
131 
132  if (resolve_for_existing_naming_service)
133  {
134  try
135  {
136  // Try to find an existing Naming Service.
137  CORBA::Object_var naming_obj =
138  orb->resolve_initial_references ("NameService", timeout);
139 
140  if (!CORBA::is_nil (naming_obj.in ()))
141  {
142  //
143  // Success in finding a Naming Service.
144  //
145  if (TAO_debug_level > 0)
146  ORBSVCS_DEBUG ((LM_DEBUG,
147  "\nNameService found!\n"));
148 
149  this->assign (size_t(ROOT), false, naming_obj);
150  return 0;
151  }
152  }
153  catch (const CORBA::Exception& ex)
154  {
155  ex._tao_print_exception ("TAO_Naming_Server::init");
156  }
157  }
158 
159  if (TAO_debug_level > 0)
160  ORBSVCS_DEBUG ((LM_DEBUG,
161  "\nWe'll become a NameService\n"));
162 
163  // Become a Naming Service.
164  return this->init_new_naming (orb,
165  poa,
166  persistence_location,
167  base_addr,
168  context_size,
169  enable_multicast,
170  use_storable_context,
171  round_trip_timeout,
172  use_round_trip_timeout);
173 }
CORBA::Object_ptr resolve_initial_references(const char *name, ACE_Time_Value *timeout=0)
static CORBA::Object_ptr _nil(void)
virtual int init_new_naming(CORBA::ORB_ptr orb, PortableServer::POA_ptr root_poa, const ACE_TCHAR *persistence_location, void *base_addr, size_t context_size, int enable_multicast, int use_storable_context, int round_trip_timeout=0, int use_round_trip_timeout=0)
static CORBA::ORB_ptr _duplicate(CORBA::ORB_ptr orb)
IOR_Bundle * iors_
_in_type in(void) const
CORBA::ORB_var orb_
The ORB.
void _tao_print_exception(const char *info, FILE *f=stdout) const
Boolean is_nil(T x)
void assign(size_t ndx, bool take, CORBA::Object_ptr obj)

◆ init_new_naming()

int TAO_Naming_Server::init_new_naming ( CORBA::ORB_ptr  orb,
PortableServer::POA_ptr  root_poa,
const ACE_TCHAR persistence_location,
void *  base_addr,
size_t  context_size,
int  enable_multicast,
int  use_storable_context,
int  round_trip_timeout = 0,
int  use_round_trip_timeout = 0 
)
protectedvirtual

Helper method: create Naming Service locally. Can be specialized to refine how Naming Service components are created and initialized Make the root context of size context_size, register it under the root_poa, and make the Naming Service persistent if <persistence_location> is not 0. (<persistence_location> specifies name of the file to use for persistent storage). If <enable_multicast> is not zero then the service will respond to multicast location queries.

Definition at line 456 of file Naming_Server.cpp.

465 {
466  try
467  {
468  if (CORBA::is_nil (this->orb_.in ()))
469  {
470  this->orb_ = CORBA::ORB::_duplicate (orb);
471  }
472 
473 #if defined (CORBA_E_MICRO)
474  ACE_UNUSED_ARG (persistence_location);
475  ACE_UNUSED_ARG (base_addr);
476  ACE_UNUSED_ARG (use_storable_context);
477 #else
478  if (use_storable_context)
479  {
480  // In lieu of a fully implemented service configurator version
481  // of this Reader and Writer, let's just take something off the
482  // command line for now.
483  TAO::Storable_Factory* pf = 0;
484  ACE_CString directory (ACE_TEXT_ALWAYS_CHAR (persistence_location));
485  ACE_NEW_RETURN (pf, TAO::Storable_FlatFileFactory (directory), -1);
486 #if defined (ACE_HAS_CPP11)
487  std::unique_ptr<TAO::Storable_Factory> persFactory(pf);
488 #else
489  auto_ptr<TAO::Storable_Factory> persFactory(pf);
490 #endif /* ACE_HAS_CPP11 */
491 
492  // Use an auto_ptr to ensure that we clean up the factory in the case
493  // of a failure in creating and registering the Activator.
495  this->storable_naming_context_factory (context_size);
496  // Make sure we got a factory
497  if (cf == 0) return -1;
498 #if defined (ACE_HAS_CPP11)
499  std::unique_ptr<TAO_Storable_Naming_Context_Factory> contextFactory (cf);
500 #else
502 #endif /* ACE_HAS_CPP11 */
503 
504  // This instance will either get deleted after recreate all or,
505  // in the case of a servant activator's use, on destruction of the
506  // activator.
507 
508  // Was a location specified?
509  if (persistence_location == 0)
510  {
511  // No, assign the default location "NameService"
512  persistence_location = ACE_TEXT ("NameService");
513  }
514 
515  // Now make sure this directory exists
516  if (ACE_OS::access (persistence_location, W_OK|X_OK))
517  {
518  ORBSVCS_ERROR_RETURN ((LM_ERROR,
519  "Invalid persistence directory %C %p\n",
520  persistence_location, "access"), -1);
521  }
522 
523 #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT)
524  if (this->use_servant_activator_)
525  {
528  persFactory.get(),
529  contextFactory.get (),
530  persistence_location),
531  CORBA::NO_MEMORY ());
532  this->ns_poa_->set_servant_manager(this->servant_activator_);
533  }
534 #endif /* TAO_HAS_MINIMUM_POA */
535  try { // The following might throw an exception.
536  this->assign (size_t(ROOT), false, TAO_Storable_Naming_Context::
537  recreate_all (orb,
538  poa,
540  context_size,
541  0,
542  contextFactory.get (),
543  persFactory.get (),
544  use_redundancy_));
545  }
546  catch (const CORBA::Exception& ex)
547  {
548  // The activator already took over the factories so we need to release the auto_ptr
549  if (this->use_servant_activator_)
550  {
551  // The context factory is now owned by the activator
552  // so we should release it
553  contextFactory.release ();
554  // If using a servant activator, the activator now owns the
555  // factory, so we should release it
556  persFactory.release ();
557  }
558  // Print out the exception and return failure
560  "TAO_Naming_Server::init_new_naming");
561  return -1;
562  }
563 
564  // Kind of a duplicate of the above here, but we must also release the
565  // factory autoptrs in the good case as well.
566  if (this->use_servant_activator_)
567  {
568  // The context factory is now owned by the activator
569  // so we should release it
570  contextFactory.release ();
571  // If using a servant activator, the activator now owns the
572  // factory, so we should release it
573  persFactory.release ();
574  }
575 
576  }
577  else if (persistence_location != 0)
578  //
579  // Initialize Persistent Naming Service.
580  //
581  {
582 
583  // Create Naming Context Implementation Factory to be used for the creation of
584  // naming contexts by the TAO_Persistent_Context_Index
585  TAO_Persistent_Naming_Context_Factory *naming_context_factory =
587  // Make sure we got a factory.
588  if (naming_context_factory == 0) return -1;
589 
590  // Allocate and initialize Persistent Context Index.
592  TAO_Persistent_Context_Index (orb, poa, naming_context_factory),
593  -1);
594 
595  if (this->context_index_->open (persistence_location,
596  base_addr) == -1
597  || this->context_index_->init (context_size) == -1)
598  {
599  if (TAO_debug_level >0)
600  ORBSVCS_DEBUG ((LM_DEBUG,
601  "TAO_Naming_Server: context_index initialization failed\n"));
602  return -1;
603  }
604 
605  // Set the root Naming Context reference.
606  this->assign (size_t(ROOT), false, this->context_index_->root_context ());
607  }
608  else
609 #endif /* CORBA_E_MICRO */
610  {
611  //
612  // Initialize Transient Naming Service.
613  //
614  CosNaming::NamingContext_var new_context = TAO_Transient_Naming_Context::make_new_context (poa,
616  context_size);
617  this->assign (size_t(ROOT), false, new_context.in());
618 
619  }
620 
621 #if !defined (CORBA_E_MICRO)
622  // Register with the ORB's resolve_initial_references()
623  // mechanism. Primarily useful for dynamically loaded Name
624  // Services.
625  orb->register_initial_reference ("NameService",
626  this->iors_[ROOT].ref_.in ());
627 #endif /* CORBA_E_MICRO */
628 
629  CORBA::Object_var table_object =
630  orb->resolve_initial_references ("IORTable");
631 
632  IORTable::Table_var ior_table =
633  IORTable::Table::_narrow (table_object.in ());
634  if (CORBA::is_nil (ior_table.in ()))
635  {
636  ORBSVCS_ERROR ((LM_ERROR, "Nil IORTable\n"));
637  }
638  else
639  {
640  ior_table->bind ("NameService",
641  this->iors_[ROOT].ior_.c_str());
642  }
643 
644 #if defined (ACE_HAS_IP_MULTICAST)
645  if (enable_multicast)
646  {
647  // @@ Marina: is there anyway to implement this stuff
648  // without using ORB_Core_instance()? For example can you
649  // pass the ORB as an argument?
650 
651  //
652  // Install ior multicast handler.
653  //
654  // Get reactor instance from TAO.
655  ACE_Reactor *reactor = orb->orb_core()->reactor ();
656 
657  // See if the -ORBMulticastDiscoveryEndpoint option was specified.
659 
660  // First, see if the user has given us a multicast port number
661  // on the command-line;
662  u_short port =
664 
665  if (port == 0)
666  {
667  // Check environment var. for multicast port.
668  const char *port_number =
669  ACE_OS::getenv ("NameServicePort");
670 
671  if (port_number != 0)
672  port = static_cast<u_short> (ACE_OS::atoi (port_number));
673  }
674 
675  // Port wasn't specified on the command-line or in environment -
676  // use the default.
677  if (port == 0)
679 
680  // Instantiate a handler which will handle client requests for
681  // the root Naming Context ior, received on the multicast port.
683  TAO_IOR_Multicast (),
684  -1);
685 
686  if (mde.length () != 0)
687  {
688  if (this->ior_multicast_->init (this->iors_[ROOT].ior_.c_str (),
689  mde.c_str (),
691  return -1;
692  }
693  else
694  {
695  if (this->ior_multicast_->init (this->iors_[ROOT].ior_.c_str (),
696  port,
697 #if defined (ACE_HAS_IPV6)
699 #else
701 #endif /* ACE_HAS_IPV6 */
703  return -1;
704  }
705 
706  // Register event handler for the ior multicast.
707  if (reactor->register_handler (this->ior_multicast_,
709  {
710  if (TAO_debug_level > 0)
711  ORBSVCS_DEBUG ((LM_DEBUG,
712  ACE_TEXT ("TAO_Naming_Server: cannot register Event handler\n")));
713  return -1;
714  }
715 
716  if (TAO_debug_level > 0)
717  ORBSVCS_DEBUG ((LM_DEBUG,
718  ACE_TEXT ("TAO_Naming_Server: The multicast server setup is done.\n")));
719  }
720 #else
721  ACE_UNUSED_ARG (enable_multicast);
722 #endif /* ACE_HAS_IP_MULTICAST */
723 
724 #if defined (TAO_HAS_CORBA_MESSAGING) && TAO_HAS_CORBA_MESSAGING != 0
725  if (use_round_trip_timeout == 1)
726  {
727  TimeBase::TimeT roundTripTimeoutVal = round_trip_timeout;
728  CORBA::Any anyObjectVal;
729  anyObjectVal <<= roundTripTimeoutVal;
730  CORBA::PolicyList polList (1);
731  polList.length (1);
732  polList[0] = orb->create_policy (Messaging::RELATIVE_RT_TIMEOUT_POLICY_TYPE,
733  anyObjectVal);
734 
735  // set a timeout on the orb
736  //
737  CORBA::Object_var orbPolicyManagerObj =
738  orb->resolve_initial_references ("ORBPolicyManager");
739 
740  CORBA::PolicyManager_var orbPolicyManager =
741  CORBA::PolicyManager::_narrow (orbPolicyManagerObj.in ());
742  orbPolicyManager->set_policy_overrides (polList, CORBA::SET_OVERRIDE);
743 
744  polList[0]->destroy ();
745  polList[0] = CORBA::Policy::_nil ();
746  }
747 #else
748  ACE_UNUSED_ARG (use_round_trip_timeout);
749  ACE_UNUSED_ARG (round_trip_timeout);
750 #endif /* TAO_HAS_CORBA_MESSAGING */
751  }
752  catch (const CORBA::Exception& ex)
753  {
755  "TAO_Naming_Server::init_new_naming");
756  return -1;
757  }
758 
759  return 0;
760 }
CORBA::Object_ptr resolve_initial_references(const char *name, ACE_Time_Value *timeout=0)
virtual TAO_Storable_Naming_Context_Factory * storable_naming_context_factory(size_t context_size)
void register_initial_reference(const char *id, CORBA::Object_ptr obj)
CORBA::Policy_ptr create_policy(CORBA::PolicyType type, const CORBA::Any &val)
int access(const char *path, int amode)
virtual TAO_Persistent_Naming_Context_Factory * persistent_naming_context_factory(void)
TAO_ORB_Core * orb_core(void) const
This class facilitates implementation of Persistent Naming Service. It keeps track, centrally, of several pieces of info for each Persistent Naming Context, allowing to perform the initialization necessary for each Naming Context to restore the state of the Naming Service from persistent storage on server start-up.
This class plays a role of a &#39;ConcreteImplementor&#39; in the Bridge pattern architecture of the CosNamin...
char * getenv(const char *symbol)
CORBA::UShort service_port(TAO::MCAST_SERVICEID service_id) const
CosNaming::NamingContext_ptr root_context(void)
TAO_SERVICEID_NAMESERVICE
unsigned long long TimeT
int register_handler(ACE_Event_Handler *event_handler, ACE_Reactor_Mask mask)
PortableServer::POA_var ns_poa_
The Naming Service POA.
#define TAO_DEFAULT_NAME_SERVER_REQUEST_PORT
static CosNaming::NamingContext_ptr make_new_context(PortableServer::POA_ptr poa, const char *poa_id, size_t context_size)
#define TAO_ROOT_NAMING_CONTEXT
Definition: nsconf.h:31
#define ACE_NEW_THROW_EX(POINTER, CONSTRUCTOR, EXCEPTION)
TAO_IOR_Multicast * ior_multicast_
The ior_multicast event handler.
#define ACE_TEXT(STRING)
sequence< Policy > PolicyList
const char * mcast_discovery_endpoint(void) const
int open(const ACE_TCHAR *file_name, void *base_address=TAO_NAMING_BASE_ADDR)
static CORBA::ORB_ptr _duplicate(CORBA::ORB_ptr orb)
IOR_Bundle * iors_
TAO_Persistent_Context_Index * context_index_
_in_type in(void) const
int atoi(const char *s)
#define ACE_DEFAULT_MULTICASTV6_ADDR
TAO_ORB_Parameters * orb_params(void)
CORBA::ORB_var orb_
The ORB.
ACE_Reactor * reactor(void)
#define ACE_NEW_RETURN(POINTER, CONSTRUCTOR, RET_VAL)
#define ACE_DEFAULT_MULTICAST_ADDR
A factory that creates TAO_Persistent_Naming_Context objects to implement the COS Naming Service Nami...
void _tao_print_exception(const char *info, FILE *f=stdout) const
TAO_Storable_Naming_Context_Activator * servant_activator_
MCAST_NAMESERVICE
Boolean is_nil(T x)
void assign(size_t ndx, bool take, CORBA::Object_ptr obj)

◆ init_with_orb()

int TAO_Naming_Server::init_with_orb ( int  argc,
ACE_TCHAR argv[],
CORBA::ORB_ptr  orb 
)
virtual

Initialize the Naming Service with the command line arguments and the ORB.

Definition at line 302 of file Naming_Server.cpp.

305 {
306  int result;
307 
308  try
309  {
310  // Duplicate the ORB
311  this->orb_ = CORBA::ORB::_duplicate (orb);
312 
313  // Get the POA from the ORB.
314  CORBA::Object_var poa_object =
315  orb->resolve_initial_references ("RootPOA");
316 
317  if (CORBA::is_nil (poa_object.in ()))
318  {
319  ORBSVCS_ERROR_RETURN ((LM_ERROR,
320  ACE_TEXT(" (%P|%t) Unable to initialize the POA.\n")),
321  -1);
322  }
323 
324  // Check the non-ORB arguments. this needs to come before we
325  // initialize my_naming_server so that we can pass on some of
326  // the command-line arguments.
327  result = this->parse_args (argc, argv);
328 
329  if (result < 0)
330  return result;
331 
332  // Get the POA object.
333  this->root_poa_ = PortableServer::POA::_narrow (poa_object.in ());
334 
335  // Get the POA_Manager.
336  PortableServer::POAManager_var poa_manager =
337  this->root_poa_->the_POAManager ();
338 
339 #if defined (CORBA_E_MICRO)
340  this->ns_poa_ = PortableServer::POA::_duplicate (this->root_poa_);
341 #else
342  int numPolicies = 2;
343 # if (TAO_HAS_MINIMUM_POA == 0)
344  if (this->use_storable_context_)
345  {
346  this->use_servant_activator_ = true;
347  }
348 
349  if (this->use_servant_activator_) {
350  numPolicies += 2;
351  }
352 # endif /* TAO_HAS_MINIMUM_POA */
353 
354  CORBA::PolicyList policies (numPolicies);
355  policies.length (numPolicies);
356 
357  // Id Assignment policy
358  policies[0] =
359  this->root_poa_->create_id_assignment_policy (PortableServer::USER_ID);
360 
361  // Lifespan policy
362  policies[1] =
363  this->root_poa_->create_lifespan_policy (PortableServer::PERSISTENT);
364 
365 # if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT)
366  if (this->use_servant_activator_)
367  {
368  // Request Processing Policy
369  policies[2] =
370  this->root_poa_->create_request_processing_policy (PortableServer::USE_SERVANT_MANAGER);
371 
372  // Servant Retention Policy
373  policies[3] =
374  this->root_poa_->create_servant_retention_policy (PortableServer::RETAIN);
375  }
376 # endif /* TAO_HAS_MINIMUM_POA */
377 
378  // We use a different POA, otherwise the user would have to change
379  // the object key each time it invokes the server.
380  this->ns_poa_ = this->root_poa_->create_POA ("NameService",
381  poa_manager.in (),
382  policies);
383  // Warning! If create_POA fails, then the policies won't be
384  // destroyed and there will be hell to pay in memory leaks!
385 
386  // Creation of the new POAs over, so destroy the Policy_ptr's.
387  for (CORBA::ULong i = 0;
388  i < policies.length ();
389  ++i)
390  {
391  CORBA::Policy_ptr policy = policies[i];
392  policy->destroy ();
393  }
394 #endif /* CORBA_E_MICRO */
395 
396  poa_manager->activate ();
397 
398 #if defined (CORBA_E_MICRO)
399  result = this->init (orb,
400  this->ns_poa_.in (),
401  this->context_size_,
402  0,
403  0,
404  0,
405  0,
406  this->multicast_,
407  false,
408  this->round_trip_timeout_,
410 #else
411  result = this->init (orb,
412  this->ns_poa_.in (),
413  this->context_size_,
414  0,
415  0,
416  this->persistence_dir_,
417  this->base_address_,
418  this->multicast_,
419  this->use_storable_context_,
420  this->round_trip_timeout_,
422 #endif /* CORBA_E_MICRO */
423 
424  if (result == -1)
425  return result;
426  }
427  catch (const CORBA::Exception& ex)
428  {
430  "TAO_Naming_Server::init_with_orb");
431  return -1;
432  }
433 
434  // If an ior file name was provided on command line
435  if (this->write (size_t(ROOT)) != 0)
436  {
437  return -1;
438  }
439 
440  if (this->pid_file_name_ != 0)
441  {
442  FILE *pidf = ACE_OS::fopen (this->pid_file_name_, ACE_TEXT("w"));
443  if (pidf != 0)
444  {
445  ACE_OS::fprintf (pidf,
446  "%ld\n",
447  static_cast<long> (ACE_OS::getpid ()));
448  ACE_OS::fclose (pidf);
449  }
450  }
451 
452  return 0;
453 }
CORBA::Object_ptr resolve_initial_references(const char *name, ACE_Time_Value *timeout=0)
int fclose(FILE *fp)
int round_trip_timeout_
If not zero use round trip timeout policy set to value specified.
virtual int parse_args(int argc, ACE_TCHAR *argv[])
parses the arguments.
FILE * fopen(const char *filename, const char *mode)
int multicast_
If not zero multicast is enabled.
PortableServer::POA_var ns_poa_
The Naming Service POA.
ACE_CDR::ULong ULong
int write(size_t ndx) const
int use_storable_context_
If not zero use flat file persistence.
#define ACE_TEXT(STRING)
sequence< Policy > PolicyList
const ACE_TCHAR * pid_file_name_
File to output the process id.
static CORBA::ORB_ptr _duplicate(CORBA::ORB_ptr orb)
_in_type in(void) const
PortableServer::POA_var root_poa_
The Root POA.
const ACE_TCHAR * persistence_dir_
CORBA::ORB_var orb_
The ORB.
int fprintf(FILE *fp, const char *format,...) ACE_GCC_FORMAT_ATTRIBUTE(printf
pid_t getpid(void)
void _tao_print_exception(const char *info, FILE *f=stdout) const
Boolean is_nil(T x)
int init(CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, size_t context_size=ACE_DEFAULT_MAP_SIZE, ACE_Time_Value *timeout=0, bool resolve_for_existing_naming_service=true, const ACE_TCHAR *persistence_location=0, void *base_addr=TAO_NAMING_BASE_ADDR, int enable_multicast=1, int use_storable_context=0, int round_trip_timeout=0, int use_round_trip_timeout=0)

◆ naming_service_ior()

char * TAO_Naming_Server::naming_service_ior ( void  )

Returns the IOR of the naming service.

Definition at line 855 of file Naming_Server.cpp.

856 {
857  return CORBA::string_dup (this->iors_[ROOT].ior_.c_str());
858 }
char * string_dup(const char *)
IOR_Bundle * iors_

◆ operator->()

CosNaming::NamingContext_ptr TAO_Naming_Server::operator-> ( void  ) const

Returns a <NamingContext_ptr> for the root Naming Context.

Definition at line 861 of file Naming_Server.cpp.

862 {
863  if (CORBA::is_nil (this->iors_[ROOT].ref_))
864  {
865  return CosNaming::NamingContext::_nil ();
866  }
867 
868  CosNaming::NamingContext_ptr ret =
869  CosNaming::NamingContext::_narrow (this->iors_[ROOT].ref_);
870 
871  return ret;
872 }
IOR_Bundle * iors_
Boolean is_nil(T x)

◆ parse_args()

int TAO_Naming_Server::parse_args ( int  argc,
ACE_TCHAR argv[] 
)
protectedvirtual

parses the arguments.

Definition at line 176 of file Naming_Server.cpp.

178 {
179 #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT)
180  ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("b:do:p:s:f:m:u:r:z:"));
181 #else
182  ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("b:do:p:s:f:m:z:"));
183 #endif /* TAO_HAS_MINIMUM_POA */
184 
185  int c;
186  int size;
187 #if !defined (CORBA_E_MICRO)
188  int result;
189 
190  // This is declared this way to avoid warnings from
191  // some compilers that complain about mismatching types
192  // in the sscanf.
193 #if ACE_SIZEOF_VOID_P == ACE_SIZEOF_LONG_LONG
194  ptrdiff_t address;
195 #else
196  long int address;
197 #endif /* ACE_SIZEOF_VOID_P */
198 #endif /* CORBA_E_MICRO */
199 
200  // Make sure only one persistence option is specified
201  int f_opt_used = 0;
202  int u_opt_used = 0;
203  int r_opt_used = 0;
204 
205  while ((c = get_opts ()) != -1)
206  switch (c)
207  {
208  case 'd': // debug flag.
209  ++TAO_debug_level;
210  break;
211  case 'o': // outputs the naming service ior to a file.
212  this->iors_[ROOT].filename_ = get_opts.opt_arg ();
213  break;
214  case 'p':
215  this->pid_file_name_ = get_opts.opt_arg ();
216  break;
217  case 's':
218  size = ACE_OS::atoi (get_opts.opt_arg ());
219  if (size >= 0)
220  this->context_size_ = size;
221  break;
222  case 'm':
223  this->multicast_ = ACE_OS::atoi(get_opts.opt_arg ());
224  break;
225 #if !defined (CORBA_E_MICRO)
226  case 'b':
227  result = ::sscanf (ACE_TEXT_ALWAYS_CHAR (get_opts.opt_arg ()),
228 #if ACE_SIZEOF_VOID_P == ACE_SIZEOF_LONG_LONG
229  ACE_INT64_FORMAT_SPECIFIER_ASCII,
230 #else
231  "%ld",
232 #endif /* ACE_SIZEOF_VOID_P */
233  &address);
234  if (result == 0 || result == EOF)
235  ORBSVCS_ERROR_RETURN ((LM_ERROR,
236  "Unable to process <-b> option"),
237  -1);
238  this->base_address_ = (void *) address;
239  break;
240  case 'f':
241  this->persistence_dir_ = get_opts.opt_arg ();
242  f_opt_used = 1;
243  break;
244 #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT)
245  case 'r':
246  this->use_redundancy_ = 1;
247  this->use_storable_context_ = 1;
248  this->persistence_dir_ = get_opts.opt_arg ();
249  r_opt_used = 1;
250  break;
251  case 'u':
252  this->use_storable_context_ = 1;
253  this->persistence_dir_ = get_opts.opt_arg ();
254  u_opt_used = 1;
255  break;
256 #endif /* TAO_HAS_MINIMUM_POA == 0 */
257 #endif /* !CORBA_E_MICRO */
258  case 'z':
259  this->use_round_trip_timeout_ = 1;
260  this->round_trip_timeout_ = (int)1.0e7 * ACE_OS::atoi (get_opts.opt_arg ());
261  break;
262  case '?':
263  default:
264 #if !defined (ACE_NLOGGING)
265  const ACE_TCHAR *reqNonMinCorba=
266 #if !defined (CORBA_E_MICRO)
267  ACE_TEXT ("-f <persistence_file_name> ")
268 #endif /* CORBA_E_MICRO */
269 #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_MICRO)
270  ACE_TEXT ("-u <storable_persistence_directory (not used with -f)> ")
271  ACE_TEXT ("-r <redundant_persistence_directory> ");
272 #else
273  ACE_TEXT ("");
274 #endif /* TAO_HAS_MINIMUM_POA && !CORBA_E_MICRO */
275 #endif /* !ACE_NLOGGING */
276  ORBSVCS_ERROR_RETURN ((LM_ERROR,
277  ACE_TEXT ("usage: %s ")
278  ACE_TEXT ("-d ")
279  ACE_TEXT ("-o <ior_output_file> ")
280  ACE_TEXT ("-p <pid_file_name> ")
281  ACE_TEXT ("-s <context_size> ")
282  ACE_TEXT ("-b <base_address> ")
283  ACE_TEXT ("-u <persistence dir name> ")
284  ACE_TEXT ("-m <1=enable multicast, 0=disable multicast(default) ")
285  ACE_TEXT ("%s")
286  ACE_TEXT ("-z <relative round trip timeout> ")
287  ACE_TEXT ("\n"),
288  argv [0], reqNonMinCorba),
289  -1);
290  }
291 
292  if (f_opt_used + u_opt_used + r_opt_used > 1)
293  ORBSVCS_ERROR_RETURN ((LM_ERROR,
294  ACE_TEXT ("Only one persistence option can be passed")
295  ACE_TEXT ("\n")),
296  -1);
297 
298  return 0;
299 }
int round_trip_timeout_
If not zero use round trip timeout policy set to value specified.
int multicast_
If not zero multicast is enabled.
int use_storable_context_
If not zero use flat file persistence.
char ACE_TCHAR
#define ACE_TEXT(STRING)
const ACE_TCHAR * pid_file_name_
File to output the process id.
IOR_Bundle * iors_
int atoi(const char *s)
const ACE_TCHAR * persistence_dir_
unsigned int TAO_debug_level

◆ persistent_naming_context_factory()

TAO_Persistent_Naming_Context_Factory * TAO_Naming_Server::persistent_naming_context_factory ( void  )
protectedvirtual

Definition at line 773 of file Naming_Server.cpp.

774 {
775 #if defined (ACE_HAS_NEW_NOTHROW)
776  return new (ACE_nothrow) TAO_Persistent_Naming_Context_Factory;
777 #else
779 #endif /* ACE_HAS_NEW_NOTHROW */
780 }
A factory that creates TAO_Persistent_Naming_Context objects to implement the COS Naming Service Nami...

◆ storable_naming_context_factory()

TAO_Storable_Naming_Context_Factory * TAO_Naming_Server::storable_naming_context_factory ( size_t  context_size)
protectedvirtual

Definition at line 763 of file Naming_Server.cpp.

764 {
765 #if defined (ACE_HAS_NEW_NOTHROW)
766  return new (ACE_nothrow) TAO_Storable_Naming_Context_Factory (context_size);
767 #else
768  return new TAO_Storable_Naming_Context_Factory (context_size);
769 #endif /* ACE_HAS_NEW_NOTHROW */
770 }

◆ write()

int TAO_Naming_Server::write ( size_t  ndx) const
protected

Definition at line 928 of file Naming_Server.cpp.

929 {
930  const IOR_Bundle *b = bundle_at(ndx);
931  if (b == 0)
932  return -1;
933 
934  if (b->filename_.length() == 0)
935  return 0;
936 
937  if (b->ior_.length() == 0)
938  {
939  if (TAO_debug_level > 0)
940  {
941  ORBSVCS_ERROR ((LM_ERROR,
942  ACE_TEXT ("IOR_Bundle::write called with ")
943  ACE_TEXT ("empty IOR \n")));
944  }
945  return -1;
946  }
947 
948  FILE *iorf = ACE_OS::fopen (b->filename_.c_str(), ACE_TEXT("w"));
949  if (iorf == 0)
950  {
951  if (TAO_debug_level > 0)
952  {
953  ORBSVCS_ERROR ((LM_ERROR,
954  ACE_TEXT("Unable to open %C for writing:(%u) %p\n"),
955  b->filename_.c_str(),
957  ACE_TEXT("IOR_Bundle::write")));
958  }
959  return -1;
960  }
961  ACE_OS::fprintf (iorf, "%s\n", b->ior_.c_str());
962  ACE_OS::fclose (iorf);
963 
964  return 0;
965 }
int fclose(FILE *fp)
#define ACE_ERRNO_GET
FILE * fopen(const char *filename, const char *mode)
IOR_Bundle * bundle_at(size_t ndx)
#define ACE_TEXT(STRING)
int fprintf(FILE *fp, const char *format,...) ACE_GCC_FORMAT_ATTRIBUTE(printf

◆ write_ior_to_file()

int TAO_Naming_Server::write_ior_to_file ( const char *  ior_string,
const char *  file_name 
)
protected

Write the provided ior_string to the file. Return 0 if success.

Member Data Documentation

◆ base_address_

void* TAO_Naming_Server::base_address_
protected

Address to be used for memory mapping Naming Service state file, identified by the <persistence_file_name_>.

Definition at line 241 of file Naming_Server.h.

◆ bundle_size_

size_t TAO_Naming_Server::bundle_size_
protected

Definition at line 212 of file Naming_Server.h.

◆ context_index_

TAO_Persistent_Context_Index* TAO_Naming_Server::context_index_
protected

Pointer to the object used to create/initialize the Naming Service when local persistent Naming Service is desired.

Definition at line 233 of file Naming_Server.h.

◆ context_size_

size_t TAO_Naming_Server::context_size_
protected

Size of the hash_table allocated upon the creation of the Naming Service context (if one is created). Note: all the contexts created under the given context will use the same size for their initial hash table allocations.

Definition at line 222 of file Naming_Server.h.

◆ ior_multicast_

TAO_IOR_Multicast* TAO_Naming_Server::ior_multicast_
protected

The ior_multicast event handler.

Definition at line 194 of file Naming_Server.h.

◆ iors_

IOR_Bundle* TAO_Naming_Server::iors_
protected

Although this class only manages the root context info the FT class adds primary/backup IORs for the root context as well as IORs for LB groups as well.

Definition at line 211 of file Naming_Server.h.

◆ multicast_

int TAO_Naming_Server::multicast_
protected

If not zero multicast is enabled.

Definition at line 225 of file Naming_Server.h.

◆ ns_poa_

PortableServer::POA_var TAO_Naming_Server::ns_poa_
protected

The Naming Service POA.

Definition at line 203 of file Naming_Server.h.

◆ orb_

CORBA::ORB_var TAO_Naming_Server::orb_
protected

The ORB.

Definition at line 197 of file Naming_Server.h.

◆ persistence_dir_

const ACE_TCHAR* TAO_Naming_Server::persistence_dir_
protected

Path to the file to be used to store/read in Naming Service persistent state.

Definition at line 237 of file Naming_Server.h.

◆ pid_file_name_

const ACE_TCHAR* TAO_Naming_Server::pid_file_name_
protected

File to output the process id.

Definition at line 206 of file Naming_Server.h.

◆ root_poa_

PortableServer::POA_var TAO_Naming_Server::root_poa_
protected

The Root POA.

Definition at line 200 of file Naming_Server.h.

◆ round_trip_timeout_

int TAO_Naming_Server::round_trip_timeout_
protected

If not zero use round trip timeout policy set to value specified.

Definition at line 264 of file Naming_Server.h.

◆ servant_activator_

TAO_Storable_Naming_Context_Activator* TAO_Naming_Server::servant_activator_
protected

Need to retain the servant activator between calls to init_with_orb() and init_new_naming().

Definition at line 255 of file Naming_Server.h.

◆ use_redundancy_

int TAO_Naming_Server::use_redundancy_
protected

If not zero support redundant naming servers.

Definition at line 261 of file Naming_Server.h.

◆ use_round_trip_timeout_

int TAO_Naming_Server::use_round_trip_timeout_
protected

Definition at line 265 of file Naming_Server.h.

◆ use_servant_activator_

int TAO_Naming_Server::use_servant_activator_
protected

If not zero use servant activator that uses flat file persistence.

Definition at line 249 of file Naming_Server.h.

◆ use_storable_context_

int TAO_Naming_Server::use_storable_context_
protected

If not zero use flat file persistence.

Definition at line 244 of file Naming_Server.h.


The documentation for this class was generated from the following files: