00001
00002
00003 #include "ace/Get_Opt.h"
00004 #include "ace/Naming_Context.h"
00005 #include "ace/Remote_Name_Space.h"
00006 #include "ace/Local_Name_Space_T.h"
00007 #include "ace/Registry_Name_Space.h"
00008 #include "ace/MMAP_Memory_Pool.h"
00009 #include "ace/RW_Process_Mutex.h"
00010 #include "ace/OS_NS_string.h"
00011 #include "ace/OS_NS_unistd.h"
00012 #if defined (ACE_HAS_TRACE)
00013 # include "ace/OS_NS_strings.h"
00014 # include "ace/Trace.h"
00015 #endif
00016
00017 ACE_RCSID(ace, Naming_Context, "Naming_Context.cpp,v 4.80 2006/04/19 19:13:09 jwillemsen Exp")
00018
00019 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00020
00021
00022
00023 typedef ACE_Local_Name_Space <ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> LOCAL_NAME_SPACE;
00024 typedef ACE_Local_Name_Space <ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> LITE_LOCAL_NAME_SPACE;
00025
00026
00027
00028
00029 int
00030 ACE_Naming_Context::info (ACE_TCHAR **strp,
00031 size_t length) const
00032 {
00033 ACE_TRACE ("ACE_Naming_Context::info");
00034
00035 ACE_TCHAR buf[BUFSIZ];
00036
00037 ACE_OS::sprintf (buf,
00038 ACE_LIB_TEXT ("%s\t#%s\n"),
00039 ACE_LIB_TEXT ("ACE_Naming_Context"),
00040 ACE_LIB_TEXT ("Proxy for making calls to a Name Server"));
00041
00042 if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0)
00043 return -1;
00044 else
00045 ACE_OS::strsncpy (*strp, buf, length);
00046 return static_cast<int> (ACE_OS::strlen (buf));
00047 }
00048
00049 int
00050 ACE_Naming_Context::local (void)
00051 {
00052 ACE_TRACE ("ACE_Naming_Context::local");
00053 return ACE_OS::strcmp (this->netnameserver_host_,
00054 ACE_LIB_TEXT ("localhost")) == 0
00055 || ACE_OS::strcmp (this->netnameserver_host_,
00056 this->hostname_) == 0;
00057 }
00058
00059 int
00060 ACE_Naming_Context::open (Context_Scope_Type scope_in, int lite)
00061 {
00062 ACE_TRACE ("ACE_Naming_Context::open");
00063 ACE_OS::hostname (this->hostname_,
00064 (sizeof this->hostname_ / sizeof (ACE_TCHAR)));
00065
00066 this->netnameserver_host_ =
00067 this->name_options_->nameserver_host ();
00068 this->netnameserver_port_ =
00069 this->name_options_->nameserver_port ();
00070
00071
00072
00073
00074 #if (defined (ACE_WIN32) && defined (UNICODE))
00075
00076
00077 if (this->name_options_->use_registry ())
00078
00079 ACE_NEW_RETURN (this->name_space_,
00080 ACE_Registry_Name_Space (this->name_options_),
00081 -1);
00082 #endif
00083 if (!this->name_options_->use_registry ())
00084 if (scope_in == ACE_Naming_Context::NET_LOCAL && this->local () == 0)
00085 {
00086
00087 ACE_NEW_RETURN (this->name_space_,
00088 ACE_Remote_Name_Space (this->netnameserver_host_,
00089 (u_short) this->netnameserver_port_),
00090 -1);
00091 }
00092 else
00093 {
00094 if (lite)
00095 ACE_NEW_RETURN (this->name_space_,
00096 LITE_LOCAL_NAME_SPACE (scope_in,
00097 this->name_options_),
00098 -1);
00099 else
00100 ACE_NEW_RETURN (this->name_space_,
00101 LOCAL_NAME_SPACE (scope_in,
00102 this->name_options_),
00103 -1);
00104 }
00105
00106 if (ACE_LOG_MSG->op_status () != 0 || this->name_space_ == 0)
00107 ACE_ERROR_RETURN ((LM_ERROR,
00108 ACE_LIB_TEXT ("NAME_SPACE::NAME_SPACE\n")),
00109 -1);
00110 return 0;
00111 }
00112
00113 int
00114 ACE_Naming_Context::close_down (void)
00115 {
00116 ACE_TRACE ("ACE_Naming_Context::close_down");
00117
00118 delete this->name_options_;
00119 this->name_options_ = 0;
00120
00121 return this->close ();
00122 }
00123
00124 int
00125 ACE_Naming_Context::close (void)
00126 {
00127 ACE_TRACE ("ACE_Naming_Context::close");
00128
00129 delete this->name_space_;
00130 this->name_space_ = 0;
00131
00132 return 0;
00133 }
00134
00135 ACE_Naming_Context::ACE_Naming_Context (void)
00136 : name_options_ (0),
00137 name_space_ (0)
00138 {
00139 ACE_TRACE ("ACE_Naming_Context::ACE_Naming_Context");
00140
00141 ACE_NEW (this->name_options_,
00142 ACE_Name_Options);
00143 }
00144
00145 ACE_Naming_Context::ACE_Naming_Context (Context_Scope_Type scope_in,
00146 int lite)
00147 : name_options_ (0),
00148 name_space_ (0),
00149 netnameserver_host_ (0)
00150 {
00151 ACE_TRACE ("ACE_Naming_Context::ACE_Naming_Context");
00152
00153 ACE_NEW (this->name_options_,
00154 ACE_Name_Options);
00155
00156
00157 if (this->open (scope_in, lite) == -1)
00158 ACE_ERROR ((LM_ERROR,
00159 ACE_LIB_TEXT ("%p\n"),
00160 ACE_LIB_TEXT ("ACE_Naming_Context::ACE_Naming_Context")));
00161 }
00162
00163 ACE_Name_Options *
00164 ACE_Naming_Context::name_options (void)
00165 {
00166 return this->name_options_;
00167 }
00168
00169 int
00170 ACE_Naming_Context::bind (const ACE_NS_WString &name_in,
00171 const ACE_NS_WString &value_in,
00172 const char *type_in)
00173 {
00174 ACE_TRACE ("ACE_Naming_Context::bind");
00175 return this->name_space_->bind (name_in, value_in, type_in);
00176 }
00177
00178 int
00179 ACE_Naming_Context::bind (const char *name_in,
00180 const char *value_in,
00181 const char *type_in)
00182 {
00183 ACE_TRACE ("ACE_Naming_Context::bind");
00184 return this->bind (ACE_NS_WString (name_in),
00185 ACE_NS_WString (value_in),
00186 type_in);
00187 }
00188
00189 int
00190 ACE_Naming_Context::rebind (const ACE_NS_WString &name_in,
00191 const ACE_NS_WString &value_in,
00192 const char *type_in)
00193 {
00194 ACE_TRACE ("ACE_Naming_Context::rebind");
00195 return this->name_space_->rebind (name_in,
00196 value_in,
00197 type_in);
00198 }
00199
00200 int
00201 ACE_Naming_Context::rebind (const char *name_in,
00202 const char *value_in,
00203 const char *type_in)
00204 {
00205 ACE_TRACE ("ACE_Naming_Context::rebind");
00206 return rebind (ACE_NS_WString (name_in),
00207 ACE_NS_WString (value_in),
00208 type_in);
00209 }
00210
00211 int
00212 ACE_Naming_Context::resolve (const ACE_NS_WString &name_in,
00213 ACE_NS_WString &value_out,
00214 char *&type_out)
00215 {
00216 ACE_TRACE ("ACE_Naming_Context::resolve");
00217 return this->name_space_->resolve (name_in,
00218 value_out,
00219 type_out);
00220 }
00221
00222 int
00223 ACE_Naming_Context::resolve (const char *name_in,
00224 ACE_NS_WString &value_out,
00225 char *&type_out)
00226 {
00227 ACE_TRACE ("ACE_Naming_Context::resolve");
00228 return this->resolve (ACE_NS_WString (name_in),
00229 value_out,
00230 type_out);
00231 }
00232
00233 int
00234 ACE_Naming_Context::resolve (const char *name_in,
00235 char *&value_out,
00236 char *&type_out)
00237 {
00238 ACE_TRACE ("ACE_Naming_Context::resolve");
00239 ACE_NS_WString val_str;
00240
00241 if (this->resolve (ACE_NS_WString (name_in),
00242 val_str,
00243 type_out) == -1)
00244 return -1;
00245
00246
00247
00248 value_out = val_str.char_rep ();
00249
00250 return value_out == 0 ? -1 : 0;
00251 }
00252
00253 int
00254 ACE_Naming_Context::unbind (const ACE_NS_WString &name_in)
00255 {
00256 ACE_TRACE ("ACE_Naming_Context::unbind");
00257 return this->name_space_->unbind (name_in);
00258 }
00259
00260 int
00261 ACE_Naming_Context::unbind (const char *name_in)
00262 {
00263 ACE_TRACE ("ACE_Naming_Context::unbind");
00264 return this->unbind (ACE_NS_WString (name_in));
00265 }
00266
00267 int
00268 ACE_Naming_Context::list_names (ACE_PWSTRING_SET &set_out,
00269 const ACE_NS_WString &pattern_in)
00270 {
00271 ACE_TRACE ("ACE_Naming_Context::list_names");
00272 return this->name_space_->list_names (set_out,
00273 pattern_in);
00274 }
00275
00276 int
00277 ACE_Naming_Context::list_names (ACE_PWSTRING_SET &set_out,
00278 const char *pattern_in)
00279 {
00280 ACE_TRACE ("ACE_Naming_Context::list_names");
00281 return this->list_names (set_out,
00282 ACE_NS_WString (pattern_in));
00283 }
00284
00285 int
00286 ACE_Naming_Context::list_values (ACE_PWSTRING_SET &set_out,
00287 const ACE_NS_WString &pattern_in)
00288 {
00289 ACE_TRACE ("ACE_Naming_Context::list_values");
00290 return this->name_space_->list_values (set_out,
00291 pattern_in);
00292 }
00293
00294 int
00295 ACE_Naming_Context::list_values (ACE_PWSTRING_SET &set_out,
00296 const char *pattern_in)
00297 {
00298 ACE_TRACE ("ACE_Naming_Context::list_values");
00299 return this->list_values (set_out,
00300 ACE_NS_WString (pattern_in));
00301 }
00302
00303 int
00304 ACE_Naming_Context::list_types (ACE_PWSTRING_SET &set_out,
00305 const ACE_NS_WString &pattern_in)
00306 {
00307 ACE_TRACE ("ACE_Naming_Context::list_types");
00308 return this->name_space_->list_types (set_out,
00309 pattern_in);
00310 }
00311
00312 int
00313 ACE_Naming_Context::list_types (ACE_PWSTRING_SET &set_out,
00314 const char *pattern_in)
00315 {
00316 ACE_TRACE ("ACE_Naming_Context::list_types");
00317 return this->list_types (set_out,
00318 ACE_NS_WString (pattern_in));
00319 }
00320
00321 int
00322 ACE_Naming_Context::list_name_entries (ACE_BINDING_SET &set_out,
00323 const ACE_NS_WString &pattern_in)
00324 {
00325 ACE_TRACE ("ACE_Naming_Context::list_name_entries");
00326 return this->name_space_->list_name_entries (set_out,
00327 pattern_in);
00328 }
00329
00330 int
00331 ACE_Naming_Context::list_name_entries (ACE_BINDING_SET &set_out,
00332 const char *pattern_in)
00333 {
00334 ACE_TRACE ("ACE_Naming_Context::list_name_entries");
00335 return this->list_name_entries (set_out,
00336 ACE_NS_WString (pattern_in));
00337 }
00338
00339 int
00340 ACE_Naming_Context::list_value_entries (ACE_BINDING_SET &set_out,
00341 const ACE_NS_WString &pattern_in)
00342 {
00343 ACE_TRACE ("ACE_Naming_Context::list_value_entries");
00344 return this->name_space_->list_value_entries (set_out,
00345 pattern_in);
00346 }
00347
00348 int
00349 ACE_Naming_Context::list_value_entries (ACE_BINDING_SET &set_out,
00350 const char *pattern_in)
00351 {
00352 ACE_TRACE ("ACE_Naming_Context::list_value_entries");
00353 return this->list_value_entries (set_out,
00354 ACE_NS_WString (pattern_in));
00355 }
00356
00357 int
00358 ACE_Naming_Context::list_type_entries (ACE_BINDING_SET &set_out,
00359 const ACE_NS_WString &pattern_in)
00360 {
00361 ACE_TRACE ("ACE_Naming_Context::list_type_entries");
00362 return this->name_space_->list_type_entries (set_out,
00363 pattern_in);
00364 }
00365
00366 int
00367 ACE_Naming_Context::list_type_entries (ACE_BINDING_SET &set_out,
00368 const char *pattern_in)
00369 {
00370 ACE_TRACE ("ACE_Naming_Context::list_type_entries");
00371 return this->list_type_entries (set_out,
00372 ACE_NS_WString (pattern_in));
00373 }
00374
00375 ACE_Naming_Context::~ACE_Naming_Context (void)
00376 {
00377 ACE_TRACE ("ACE_Naming_Context::~ACE_Naming_Context");
00378
00379 this->close_down ();
00380 }
00381
00382 void
00383 ACE_Naming_Context::dump ()
00384 {
00385 #if defined (ACE_HAS_DUMP)
00386 ACE_TRACE ("ACE_Naming_Context::dump");
00387 this->name_space_->dump();
00388 #endif
00389 }
00390
00391 int
00392 ACE_Naming_Context::init (int argc, ACE_TCHAR *argv[])
00393 {
00394 if (ACE::debug ())
00395 ACE_DEBUG ((LM_DEBUG,
00396 ACE_LIB_TEXT ("ACE_Naming_Context::init\n")));
00397 this->name_options_->parse_args (argc, argv);
00398 return this->open (this->name_options_->context ());
00399 }
00400
00401 int
00402 ACE_Naming_Context::fini (void)
00403 {
00404 if (ACE::debug ())
00405 ACE_DEBUG ((LM_DEBUG,
00406 ACE_LIB_TEXT ("ACE_Naming_Context::fini\n")));
00407 this->close_down ();
00408 return 0;
00409 }
00410
00411 ACE_Name_Options::ACE_Name_Options (void)
00412 : debugging_ (0),
00413 verbosity_ (0),
00414 use_registry_ (0),
00415 nameserver_port_ (ACE_DEFAULT_SERVER_PORT),
00416 nameserver_host_ (ACE_OS::strdup (ACE_DEFAULT_SERVER_HOST)),
00417 process_name_ (0),
00418 database_ (ACE_OS::strdup (ACE_DEFAULT_LOCALNAME)),
00419 base_address_ (ACE_DEFAULT_BASE_ADDR)
00420 {
00421 ACE_TRACE ("ACE_Name_Options::ACE_Name_Options");
00422
00423 #if defined (ACE_DEFAULT_NAMESPACE_DIR)
00424 this->namespace_dir_ = ACE_OS::strdup (ACE_DEFAULT_NAMESPACE_DIR);
00425 #else
00426 size_t pathsize = (MAXPATHLEN + 1) * sizeof (ACE_TCHAR);
00427 this->namespace_dir_ = static_cast <ACE_TCHAR *> (ACE_OS::malloc (pathsize));
00428
00429 if (ACE::get_temp_dir (this->namespace_dir_, MAXPATHLEN) == -1)
00430 {
00431 ACE_ERROR ((LM_ERROR,
00432 ACE_LIB_TEXT ("Temporary path too long, ")
00433 ACE_LIB_TEXT ("defaulting to current directory\n")));
00434 ACE_OS::strcpy (this->namespace_dir_, ACE_LIB_TEXT ("."));
00435 ACE_OS::strcat (this->namespace_dir_, ACE_DIRECTORY_SEPARATOR_STR);
00436 }
00437 #endif
00438 }
00439
00440 ACE_Name_Options::~ACE_Name_Options (void)
00441 {
00442 ACE_TRACE ("ACE_Name_Options::~ACE_Name_Options");
00443
00444 ACE_OS::free ((void *) this->nameserver_host_);
00445 ACE_OS::free ((void *) this->namespace_dir_ );
00446 ACE_OS::free ((void *) this->process_name_ );
00447 ACE_OS::free ((void *) this->database_ );
00448 }
00449
00450 void
00451 ACE_Name_Options::nameserver_port (int port)
00452 {
00453 ACE_TRACE ("ACE_Name_Options::nameserver_port");
00454 this->nameserver_port_ = port;
00455 }
00456
00457 int
00458 ACE_Name_Options::nameserver_port (void)
00459 {
00460 ACE_TRACE ("ACE_Name_Options::nameserver_port");
00461 return this->nameserver_port_;
00462 }
00463
00464 void
00465 ACE_Name_Options::namespace_dir (const ACE_TCHAR *dir)
00466 {
00467 ACE_TRACE ("ACE_Name_Options::namespace_dir");
00468 ACE_OS::free ((void *) this->namespace_dir_ );
00469 this->namespace_dir_ = ACE_OS::strdup (dir);
00470 }
00471
00472 void
00473 ACE_Name_Options::process_name (const ACE_TCHAR *pname)
00474 {
00475 ACE_TRACE ("ACE_Name_Options::process_name");
00476 const ACE_TCHAR *t = ACE::basename (pname, ACE_DIRECTORY_SEPARATOR_CHAR);
00477 ACE_OS::free ((void *) this->process_name_ );
00478 this->process_name_ = ACE_OS::strdup (t);
00479 }
00480
00481 void
00482 ACE_Name_Options::nameserver_host (const ACE_TCHAR *host)
00483 {
00484 ACE_TRACE ("ACE_Name_Options::nameserver_host");
00485 ACE_OS::free ((void *) this->nameserver_host_);
00486 this->nameserver_host_ = ACE_OS::strdup (host);
00487 }
00488
00489 const ACE_TCHAR *
00490 ACE_Name_Options::nameserver_host (void)
00491 {
00492 ACE_TRACE ("ACE_Name_Options::nameserver_host");
00493 return this->nameserver_host_;
00494 }
00495
00496 const ACE_TCHAR *
00497 ACE_Name_Options::database (void)
00498 {
00499 ACE_TRACE ("ACE_Name_Options::database");
00500 return this->database_;
00501 }
00502
00503 void
00504 ACE_Name_Options::database (const ACE_TCHAR *db)
00505 {
00506 ACE_TRACE ("ACE_Name_Options::database");
00507 ACE_OS::free ((void *) this->database_);
00508 this->database_ = ACE_OS::strdup (db);
00509 }
00510
00511 char *
00512 ACE_Name_Options::base_address (void)
00513 {
00514 ACE_TRACE ("ACE_Name_Options::base_address");
00515 return this->base_address_;
00516 }
00517
00518 void
00519 ACE_Name_Options::base_address (char *base_address)
00520 {
00521 ACE_TRACE ("ACE_Name_Options::base_address");
00522 this->base_address_ = base_address;
00523 }
00524
00525 ACE_Naming_Context::Context_Scope_Type
00526 ACE_Name_Options::context (void)
00527 {
00528 ACE_TRACE ("ACE_Name_Options::context");
00529 return this->context_;
00530 }
00531
00532 void
00533 ACE_Name_Options::context (ACE_Naming_Context::Context_Scope_Type context)
00534 {
00535 ACE_TRACE ("ACE_Name_Options::context");
00536 this->context_ = context;
00537 }
00538
00539 const ACE_TCHAR *
00540 ACE_Name_Options::process_name (void)
00541 {
00542 ACE_TRACE ("ACE_Name_Options::process_name");
00543 return this->process_name_;
00544 }
00545
00546 const ACE_TCHAR *
00547 ACE_Name_Options::namespace_dir (void)
00548 {
00549 ACE_TRACE ("ACE_Name_Options::namespace_dir");
00550 return this->namespace_dir_;
00551 }
00552
00553 int
00554 ACE_Name_Options::debug (void)
00555 {
00556 ACE_TRACE ("ACE_Name_Options::debug");
00557 return this->debugging_;
00558 }
00559
00560 int
00561 ACE_Name_Options::use_registry (void)
00562 {
00563 ACE_TRACE ("ACE_Name_Options::use_registry");
00564 return this->use_registry_;
00565 }
00566
00567 void
00568 ACE_Name_Options::use_registry (int x)
00569 {
00570 ACE_TRACE ("ACE_Name_Options::use_registry");
00571 this->use_registry_ = x;
00572 }
00573
00574 int
00575 ACE_Name_Options::verbose (void)
00576 {
00577 ACE_TRACE ("ACE_Name_Options::verbose");
00578 return this->verbosity_;
00579 }
00580
00581 void
00582 ACE_Name_Options::parse_args (int argc, ACE_TCHAR *argv[])
00583 {
00584 ACE_TRACE ("ACE_Name_Options::parse_args");
00585
00586 const ACE_TCHAR* program_name = 0;
00587
00588
00589 if (argc > 0)
00590 program_name = argv[0];
00591
00592 ACE_LOG_MSG->open (program_name);
00593 this->process_name (program_name);
00594
00595
00596 this->context (ACE_Naming_Context::PROC_LOCAL);
00597
00598
00599
00600
00601 this->database (this->process_name ());
00602
00603 ACE_Get_Opt get_opt (argc, argv, ACE_LIB_TEXT ("b:c:dh:l:P:p:s:T:vr"));
00604
00605 for (int c; (c = get_opt ()) != -1; )
00606 switch (c)
00607 {
00608 case 'c':
00609 {
00610 if (ACE_OS::strcmp (get_opt.opt_arg (), ACE_LIB_TEXT ("PROC_LOCAL")) == 0)
00611 this->context (ACE_Naming_Context::PROC_LOCAL);
00612 else if (ACE_OS::strcmp (get_opt.opt_arg (), ACE_LIB_TEXT ("NODE_LOCAL")) == 0)
00613 this->context (ACE_Naming_Context::NODE_LOCAL);
00614 else if (ACE_OS::strcmp (get_opt.opt_arg (), ACE_LIB_TEXT ("NET_LOCAL")) == 0)
00615 this->context (ACE_Naming_Context::NET_LOCAL);
00616 }
00617 break;
00618 case 'd':
00619 this->debugging_ = 1;
00620 break;
00621 case 'r':
00622 this->use_registry_ = 1;
00623 break;
00624 case 'h':
00625 this->nameserver_host (get_opt.opt_arg ());
00626 break;
00627 case 'l':
00628 this->namespace_dir (get_opt.opt_arg ());
00629 break;
00630 case 'P':
00631 this->process_name (get_opt.opt_arg ());
00632 break;
00633 case 'p':
00634 this->nameserver_port (ACE_OS::atoi (get_opt.opt_arg ()));
00635 break;
00636 case 's':
00637 this->database (get_opt.opt_arg ());
00638 break;
00639 case 'b':
00640 this->base_address
00641 (static_cast<char *> (ACE_OS::atop (get_opt.opt_arg ())));
00642 break;
00643 case 'T':
00644 #if defined (ACE_HAS_TRACE)
00645 if (ACE_OS::strcasecmp (get_opt.opt_arg (), ACE_LIB_TEXT ("ON")) == 0)
00646 ACE_Trace::start_tracing ();
00647 else if (ACE_OS::strcasecmp (get_opt.opt_arg (), ACE_LIB_TEXT ("OFF")) == 0)
00648 ACE_Trace::stop_tracing ();
00649 #endif
00650 break;
00651 case 'v':
00652 this->verbosity_ = 1;
00653 break;
00654 default:
00655 ACE_OS::fprintf (stderr, "%s\n"
00656 "\t[-d] (enable debugging)\n"
00657 "\t[-h nameserver host]\n"
00658 "\t[-l namespace directory]\n"
00659 "\t[-P processname]\n"
00660 "\t[-p nameserver port]\n"
00661 "\t[-s database name]\n"
00662 "\t[-b base address]\n"
00663 "\t[-v] (verbose) \n"
00664 "\t[-r] (use Win32 Registry) \n",
00665 argv[0]);
00666
00667 break;
00668 }
00669 }
00670
00671 ACE_END_VERSIONED_NAMESPACE_DECL
00672
00673
00674
00675
00676
00677 ACE_FACTORY_DEFINE (ACE, ACE_Naming_Context)
00678 ACE_STATIC_SVC_DEFINE (ACE_Naming_Context,
00679 ACE_LIB_TEXT ("ACE_Naming_Context"),
00680 ACE_SVC_OBJ_T,
00681 &ACE_SVC_NAME (ACE_Naming_Context),
00682 ACE_Service_Type::DELETE_THIS |
00683 ACE_Service_Type::DELETE_OBJ,
00684 0)
00685 ACE_STATIC_SVC_REQUIRE (ACE_Naming_Context)