/* * Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package com.sun.corba.se.impl.naming.cosnaming; import java.util.Properties; import java.net.InetAddress; import org.omg.CORBA.ORB; import org.omg.CosNaming.NamingContext; import com.sun.corba.se.spi.logging.CORBALogDomains; import com.sun.corba.se.impl.naming.cosnaming.TransientNameService; import com.sun.corba.se.impl.orbutil.ORBConstants; import com.sun.corba.se.impl.orbutil.CorbaResourceUtil; import com.sun.corba.se.impl.logging.NamingSystemException; /** * Class TransientNameServer is a standalone application which * implements a transient name service. It uses the TransientNameService * class for the name service implementation, and the BootstrapServer * for implementing bootstrapping, i.e., to get the initial NamingContext. *
* The BootstrapServer uses a Properties object specify the initial service
* object references supported; such as Properties object is created containing
* only a "NameService" entry together with the stringified object reference
* for the initial NamingContext. The BootstrapServer's listening port
* is set by first checking the supplied arguments to the name server
* (-ORBInitialPort), and if not set, defaults to the standard port number.
* The BootstrapServer is created supplying the Properties object, using no
* external File object for storage, and the derived initial port number.
* @see TransientNameService
* @see BootstrapServer
*/
public class TransientNameServer
{
static private boolean debug = false ;
static NamingSystemException wrapper = NamingSystemException.get(
CORBALogDomains.NAMING ) ;
static public void trace( String msg ) {
if (debug)
System.out.println( msg ) ;
}
static public void initDebug( String[] args ) {
// If debug was compiled to be true for testing purposes,
// don't change it.
if (debug)
return ;
for (int ctr=0; ctr