corba/src/share/classes/com/sun/corba/se/impl/naming/cosnaming/TransientNameServer.java
author ohair
Tue, 25 May 2010 15:52:11 -0700
changeset 5555 b2b5ed3f0d0d
parent 4 02bb8761fcce
permissions -rw-r--r--
6943119: Rebrand source copyright notices Reviewed-by: darcy
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4
02bb8761fcce Initial load
duke
parents:
diff changeset
     1
/*
5555
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 4
diff changeset
     2
 * Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved.
4
02bb8761fcce Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
02bb8761fcce Initial load
duke
parents:
diff changeset
     4
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
02bb8761fcce Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5555
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 4
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
4
02bb8761fcce Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5555
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 4
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
4
02bb8761fcce Initial load
duke
parents:
diff changeset
    10
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
02bb8761fcce Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
02bb8761fcce Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
02bb8761fcce Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
02bb8761fcce Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
02bb8761fcce Initial load
duke
parents:
diff changeset
    16
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
02bb8761fcce Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
02bb8761fcce Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
02bb8761fcce Initial load
duke
parents:
diff changeset
    20
 *
5555
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 4
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 4
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 4
diff changeset
    23
 * questions.
4
02bb8761fcce Initial load
duke
parents:
diff changeset
    24
 */
02bb8761fcce Initial load
duke
parents:
diff changeset
    25
02bb8761fcce Initial load
duke
parents:
diff changeset
    26
package com.sun.corba.se.impl.naming.cosnaming;
02bb8761fcce Initial load
duke
parents:
diff changeset
    27
02bb8761fcce Initial load
duke
parents:
diff changeset
    28
import java.util.Properties;
02bb8761fcce Initial load
duke
parents:
diff changeset
    29
import java.net.InetAddress;
02bb8761fcce Initial load
duke
parents:
diff changeset
    30
02bb8761fcce Initial load
duke
parents:
diff changeset
    31
import org.omg.CORBA.ORB;
02bb8761fcce Initial load
duke
parents:
diff changeset
    32
02bb8761fcce Initial load
duke
parents:
diff changeset
    33
import org.omg.CosNaming.NamingContext;
02bb8761fcce Initial load
duke
parents:
diff changeset
    34
02bb8761fcce Initial load
duke
parents:
diff changeset
    35
import com.sun.corba.se.spi.logging.CORBALogDomains;
02bb8761fcce Initial load
duke
parents:
diff changeset
    36
02bb8761fcce Initial load
duke
parents:
diff changeset
    37
import com.sun.corba.se.impl.naming.cosnaming.TransientNameService;
02bb8761fcce Initial load
duke
parents:
diff changeset
    38
02bb8761fcce Initial load
duke
parents:
diff changeset
    39
import com.sun.corba.se.impl.orbutil.ORBConstants;
02bb8761fcce Initial load
duke
parents:
diff changeset
    40
import com.sun.corba.se.impl.orbutil.CorbaResourceUtil;
02bb8761fcce Initial load
duke
parents:
diff changeset
    41
import com.sun.corba.se.impl.logging.NamingSystemException;
02bb8761fcce Initial load
duke
parents:
diff changeset
    42
02bb8761fcce Initial load
duke
parents:
diff changeset
    43
/**
02bb8761fcce Initial load
duke
parents:
diff changeset
    44
 * Class TransientNameServer is a standalone application which
02bb8761fcce Initial load
duke
parents:
diff changeset
    45
 * implements a transient name service. It uses the TransientNameService
02bb8761fcce Initial load
duke
parents:
diff changeset
    46
 * class for the name service implementation, and the BootstrapServer
02bb8761fcce Initial load
duke
parents:
diff changeset
    47
 * for implementing bootstrapping, i.e., to get the initial NamingContext.
02bb8761fcce Initial load
duke
parents:
diff changeset
    48
 * <p>
02bb8761fcce Initial load
duke
parents:
diff changeset
    49
 * The BootstrapServer uses a Properties object specify the initial service
02bb8761fcce Initial load
duke
parents:
diff changeset
    50
 * object references supported; such as Properties object is created containing
02bb8761fcce Initial load
duke
parents:
diff changeset
    51
 * only a "NameService" entry together with the stringified object reference
02bb8761fcce Initial load
duke
parents:
diff changeset
    52
 * for the initial NamingContext. The BootstrapServer's listening port
02bb8761fcce Initial load
duke
parents:
diff changeset
    53
 * is set by first checking the supplied arguments to the name server
02bb8761fcce Initial load
duke
parents:
diff changeset
    54
 * (-ORBInitialPort), and if not set, defaults to the standard port number.
02bb8761fcce Initial load
duke
parents:
diff changeset
    55
 * The BootstrapServer is created supplying the Properties object, using no
02bb8761fcce Initial load
duke
parents:
diff changeset
    56
 * external File object for storage, and the derived initial port number.
02bb8761fcce Initial load
duke
parents:
diff changeset
    57
 * @see TransientNameService
02bb8761fcce Initial load
duke
parents:
diff changeset
    58
 * @see BootstrapServer
02bb8761fcce Initial load
duke
parents:
diff changeset
    59
 */
02bb8761fcce Initial load
duke
parents:
diff changeset
    60
public class TransientNameServer
02bb8761fcce Initial load
duke
parents:
diff changeset
    61
{
02bb8761fcce Initial load
duke
parents:
diff changeset
    62
    static private boolean debug = false ;
02bb8761fcce Initial load
duke
parents:
diff changeset
    63
    static NamingSystemException wrapper = NamingSystemException.get(
02bb8761fcce Initial load
duke
parents:
diff changeset
    64
        CORBALogDomains.NAMING ) ;
02bb8761fcce Initial load
duke
parents:
diff changeset
    65
02bb8761fcce Initial load
duke
parents:
diff changeset
    66
    static public void trace( String msg ) {
02bb8761fcce Initial load
duke
parents:
diff changeset
    67
        if (debug)
02bb8761fcce Initial load
duke
parents:
diff changeset
    68
            System.out.println( msg ) ;
02bb8761fcce Initial load
duke
parents:
diff changeset
    69
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
    70
02bb8761fcce Initial load
duke
parents:
diff changeset
    71
    static public void initDebug( String[] args ) {
02bb8761fcce Initial load
duke
parents:
diff changeset
    72
        // If debug was compiled to be true for testing purposes,
02bb8761fcce Initial load
duke
parents:
diff changeset
    73
        // don't change it.
02bb8761fcce Initial load
duke
parents:
diff changeset
    74
        if (debug)
02bb8761fcce Initial load
duke
parents:
diff changeset
    75
            return ;
02bb8761fcce Initial load
duke
parents:
diff changeset
    76
02bb8761fcce Initial load
duke
parents:
diff changeset
    77
        for (int ctr=0; ctr<args.length; ctr++)
02bb8761fcce Initial load
duke
parents:
diff changeset
    78
            if (args[ctr].equalsIgnoreCase( "-debug" )) {
02bb8761fcce Initial load
duke
parents:
diff changeset
    79
                debug = true ;
02bb8761fcce Initial load
duke
parents:
diff changeset
    80
            return ;
02bb8761fcce Initial load
duke
parents:
diff changeset
    81
        }
02bb8761fcce Initial load
duke
parents:
diff changeset
    82
        debug = false ;
02bb8761fcce Initial load
duke
parents:
diff changeset
    83
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
    84
02bb8761fcce Initial load
duke
parents:
diff changeset
    85
    private static org.omg.CORBA.Object initializeRootNamingContext( ORB orb ) {
02bb8761fcce Initial load
duke
parents:
diff changeset
    86
        org.omg.CORBA.Object rootContext = null;
02bb8761fcce Initial load
duke
parents:
diff changeset
    87
        try {
02bb8761fcce Initial load
duke
parents:
diff changeset
    88
            com.sun.corba.se.spi.orb.ORB coreORB =
02bb8761fcce Initial load
duke
parents:
diff changeset
    89
                (com.sun.corba.se.spi.orb.ORB)orb ;
02bb8761fcce Initial load
duke
parents:
diff changeset
    90
02bb8761fcce Initial load
duke
parents:
diff changeset
    91
            TransientNameService tns = new TransientNameService(coreORB );
02bb8761fcce Initial load
duke
parents:
diff changeset
    92
            return tns.initialNamingContext();
02bb8761fcce Initial load
duke
parents:
diff changeset
    93
        } catch (org.omg.CORBA.SystemException e) {
02bb8761fcce Initial load
duke
parents:
diff changeset
    94
            throw wrapper.transNsCannotCreateInitialNcSys( e ) ;
02bb8761fcce Initial load
duke
parents:
diff changeset
    95
        } catch (Exception e) {
02bb8761fcce Initial load
duke
parents:
diff changeset
    96
            throw wrapper.transNsCannotCreateInitialNc( e ) ;
02bb8761fcce Initial load
duke
parents:
diff changeset
    97
        }
02bb8761fcce Initial load
duke
parents:
diff changeset
    98
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
    99
02bb8761fcce Initial load
duke
parents:
diff changeset
   100
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   101
     * Main startup routine. It instantiates a TransientNameService
02bb8761fcce Initial load
duke
parents:
diff changeset
   102
     * object and a BootstrapServer object, and then allows invocations to
02bb8761fcce Initial load
duke
parents:
diff changeset
   103
     * happen.
02bb8761fcce Initial load
duke
parents:
diff changeset
   104
     * @param args an array of strings representing the startup arguments.
02bb8761fcce Initial load
duke
parents:
diff changeset
   105
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   106
    public static void main(String args[]) {
02bb8761fcce Initial load
duke
parents:
diff changeset
   107
        initDebug( args ) ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   108
02bb8761fcce Initial load
duke
parents:
diff changeset
   109
        boolean invalidHostOption = false;
02bb8761fcce Initial load
duke
parents:
diff changeset
   110
        boolean orbInitialPort0 = false;
02bb8761fcce Initial load
duke
parents:
diff changeset
   111
02bb8761fcce Initial load
duke
parents:
diff changeset
   112
        // Determine the initial bootstrap port to use
02bb8761fcce Initial load
duke
parents:
diff changeset
   113
        int initialPort = 0;
02bb8761fcce Initial load
duke
parents:
diff changeset
   114
        try {
02bb8761fcce Initial load
duke
parents:
diff changeset
   115
            trace( "Transient name server started with args " + args ) ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   116
02bb8761fcce Initial load
duke
parents:
diff changeset
   117
            // Create an ORB object
02bb8761fcce Initial load
duke
parents:
diff changeset
   118
            Properties props = System.getProperties() ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   119
02bb8761fcce Initial load
duke
parents:
diff changeset
   120
            props.put( ORBConstants.SERVER_ID_PROPERTY, ORBConstants.NAME_SERVICE_SERVER_ID ) ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   121
            props.put( "org.omg.CORBA.ORBClass",
02bb8761fcce Initial load
duke
parents:
diff changeset
   122
                "com.sun.corba.se.impl.orb.ORBImpl" );
02bb8761fcce Initial load
duke
parents:
diff changeset
   123
02bb8761fcce Initial load
duke
parents:
diff changeset
   124
            try {
02bb8761fcce Initial load
duke
parents:
diff changeset
   125
                // Try environment
02bb8761fcce Initial load
duke
parents:
diff changeset
   126
                String ips = System.getProperty( ORBConstants.INITIAL_PORT_PROPERTY ) ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   127
                if (ips != null && ips.length() > 0 ) {
02bb8761fcce Initial load
duke
parents:
diff changeset
   128
                    initialPort = java.lang.Integer.parseInt(ips);
02bb8761fcce Initial load
duke
parents:
diff changeset
   129
                    // -Dorg.omg.CORBA.ORBInitialPort=0 is invalid
02bb8761fcce Initial load
duke
parents:
diff changeset
   130
                    if( initialPort == 0 ) {
02bb8761fcce Initial load
duke
parents:
diff changeset
   131
                        orbInitialPort0 = true;
02bb8761fcce Initial load
duke
parents:
diff changeset
   132
                        throw wrapper.transientNameServerBadPort() ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   133
                    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   134
                }
02bb8761fcce Initial load
duke
parents:
diff changeset
   135
                String hostName =
02bb8761fcce Initial load
duke
parents:
diff changeset
   136
                    System.getProperty( ORBConstants.INITIAL_HOST_PROPERTY ) ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   137
                if( hostName != null ) {
02bb8761fcce Initial load
duke
parents:
diff changeset
   138
                    invalidHostOption = true;
02bb8761fcce Initial load
duke
parents:
diff changeset
   139
                    throw wrapper.transientNameServerBadHost() ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   140
                }
02bb8761fcce Initial load
duke
parents:
diff changeset
   141
            } catch (java.lang.NumberFormatException e) {
02bb8761fcce Initial load
duke
parents:
diff changeset
   142
                // do nothing
02bb8761fcce Initial load
duke
parents:
diff changeset
   143
            }
02bb8761fcce Initial load
duke
parents:
diff changeset
   144
02bb8761fcce Initial load
duke
parents:
diff changeset
   145
            // Let arguments override
02bb8761fcce Initial load
duke
parents:
diff changeset
   146
            for (int i=0;i<args.length;i++) {
02bb8761fcce Initial load
duke
parents:
diff changeset
   147
                // Was the initial port specified?
02bb8761fcce Initial load
duke
parents:
diff changeset
   148
                if (args[i].equals("-ORBInitialPort") &&
02bb8761fcce Initial load
duke
parents:
diff changeset
   149
                    i < args.length-1) {
02bb8761fcce Initial load
duke
parents:
diff changeset
   150
                    initialPort = java.lang.Integer.parseInt(args[i+1]);
02bb8761fcce Initial load
duke
parents:
diff changeset
   151
                    // -ORBInitialPort 0 is invalid
02bb8761fcce Initial load
duke
parents:
diff changeset
   152
                    if( initialPort == 0 ) {
02bb8761fcce Initial load
duke
parents:
diff changeset
   153
                        orbInitialPort0 = true;
02bb8761fcce Initial load
duke
parents:
diff changeset
   154
                        throw wrapper.transientNameServerBadPort() ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   155
                    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   156
                }
02bb8761fcce Initial load
duke
parents:
diff changeset
   157
                if (args[i].equals("-ORBInitialHost" ) ) {
02bb8761fcce Initial load
duke
parents:
diff changeset
   158
                    invalidHostOption = true;
02bb8761fcce Initial load
duke
parents:
diff changeset
   159
                    throw wrapper.transientNameServerBadHost() ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   160
                }
02bb8761fcce Initial load
duke
parents:
diff changeset
   161
            }
02bb8761fcce Initial load
duke
parents:
diff changeset
   162
02bb8761fcce Initial load
duke
parents:
diff changeset
   163
            // If initialPort is not set, then we need to set the Default
02bb8761fcce Initial load
duke
parents:
diff changeset
   164
            // Initial Port Property for the ORB
02bb8761fcce Initial load
duke
parents:
diff changeset
   165
            if( initialPort == 0 ) {
02bb8761fcce Initial load
duke
parents:
diff changeset
   166
                initialPort = ORBConstants.DEFAULT_INITIAL_PORT;
02bb8761fcce Initial load
duke
parents:
diff changeset
   167
                props.put( ORBConstants.INITIAL_PORT_PROPERTY,
02bb8761fcce Initial load
duke
parents:
diff changeset
   168
                    java.lang.Integer.toString(initialPort) );
02bb8761fcce Initial load
duke
parents:
diff changeset
   169
            }
02bb8761fcce Initial load
duke
parents:
diff changeset
   170
02bb8761fcce Initial load
duke
parents:
diff changeset
   171
            // Set -ORBInitialPort = Persistent Server Port so that ORBImpl
02bb8761fcce Initial load
duke
parents:
diff changeset
   172
            // will start Boot Strap.
02bb8761fcce Initial load
duke
parents:
diff changeset
   173
            props.put( ORBConstants.PERSISTENT_SERVER_PORT_PROPERTY,
02bb8761fcce Initial load
duke
parents:
diff changeset
   174
               java.lang.Integer.toString(initialPort) );
02bb8761fcce Initial load
duke
parents:
diff changeset
   175
02bb8761fcce Initial load
duke
parents:
diff changeset
   176
            org.omg.CORBA.ORB corb = ORB.init( args, props ) ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   177
            trace( "ORB object returned from init: " + corb ) ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   178
02bb8761fcce Initial load
duke
parents:
diff changeset
   179
            org.omg.CORBA.Object ns = initializeRootNamingContext( corb ) ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   180
            ((com.sun.corba.se.org.omg.CORBA.ORB)corb).register_initial_reference(
02bb8761fcce Initial load
duke
parents:
diff changeset
   181
                "NamingService", ns ) ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   182
02bb8761fcce Initial load
duke
parents:
diff changeset
   183
            String stringifiedIOR = null;
02bb8761fcce Initial load
duke
parents:
diff changeset
   184
02bb8761fcce Initial load
duke
parents:
diff changeset
   185
            if( ns != null ) {
02bb8761fcce Initial load
duke
parents:
diff changeset
   186
                stringifiedIOR = corb.object_to_string(ns) ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   187
            } else {
02bb8761fcce Initial load
duke
parents:
diff changeset
   188
                 NamingUtils.errprint(CorbaResourceUtil.getText(
02bb8761fcce Initial load
duke
parents:
diff changeset
   189
                     "tnameserv.exception", initialPort));
02bb8761fcce Initial load
duke
parents:
diff changeset
   190
                 NamingUtils.errprint(CorbaResourceUtil.getText(
02bb8761fcce Initial load
duke
parents:
diff changeset
   191
                     "tnameserv.usage"));
02bb8761fcce Initial load
duke
parents:
diff changeset
   192
                System.exit( 1 );
02bb8761fcce Initial load
duke
parents:
diff changeset
   193
            }
02bb8761fcce Initial load
duke
parents:
diff changeset
   194
02bb8761fcce Initial load
duke
parents:
diff changeset
   195
            trace( "name service created" ) ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   196
02bb8761fcce Initial load
duke
parents:
diff changeset
   197
            // This is used for handshaking by the IBM test framework!
02bb8761fcce Initial load
duke
parents:
diff changeset
   198
            // Do not modify, unless another synchronization protocol is
02bb8761fcce Initial load
duke
parents:
diff changeset
   199
            // used to replace this hack!
02bb8761fcce Initial load
duke
parents:
diff changeset
   200
02bb8761fcce Initial load
duke
parents:
diff changeset
   201
            System.out.println(CorbaResourceUtil.getText(
02bb8761fcce Initial load
duke
parents:
diff changeset
   202
                "tnameserv.hs1", stringifiedIOR));
02bb8761fcce Initial load
duke
parents:
diff changeset
   203
            System.out.println(CorbaResourceUtil.getText(
02bb8761fcce Initial load
duke
parents:
diff changeset
   204
                "tnameserv.hs2", initialPort));
02bb8761fcce Initial load
duke
parents:
diff changeset
   205
            System.out.println(CorbaResourceUtil.getText("tnameserv.hs3"));
02bb8761fcce Initial load
duke
parents:
diff changeset
   206
02bb8761fcce Initial load
duke
parents:
diff changeset
   207
            // Serve objects.
02bb8761fcce Initial load
duke
parents:
diff changeset
   208
            java.lang.Object sync = new java.lang.Object();
02bb8761fcce Initial load
duke
parents:
diff changeset
   209
            synchronized (sync) {sync.wait();}
02bb8761fcce Initial load
duke
parents:
diff changeset
   210
        } catch (Exception e) {
02bb8761fcce Initial load
duke
parents:
diff changeset
   211
            if( invalidHostOption ) {
02bb8761fcce Initial load
duke
parents:
diff changeset
   212
                // Let the User Know that -ORBInitialHost is not valid for
02bb8761fcce Initial load
duke
parents:
diff changeset
   213
                // tnameserver
02bb8761fcce Initial load
duke
parents:
diff changeset
   214
                NamingUtils.errprint( CorbaResourceUtil.getText(
02bb8761fcce Initial load
duke
parents:
diff changeset
   215
                    "tnameserv.invalidhostoption" ) );
02bb8761fcce Initial load
duke
parents:
diff changeset
   216
            } else if( orbInitialPort0 ) {
02bb8761fcce Initial load
duke
parents:
diff changeset
   217
                // Let the User Know that -ORBInitialPort 0 is not valid for
02bb8761fcce Initial load
duke
parents:
diff changeset
   218
                // tnameserver
02bb8761fcce Initial load
duke
parents:
diff changeset
   219
                NamingUtils.errprint( CorbaResourceUtil.getText(
02bb8761fcce Initial load
duke
parents:
diff changeset
   220
                    "tnameserv.orbinitialport0" ));
02bb8761fcce Initial load
duke
parents:
diff changeset
   221
            } else {
02bb8761fcce Initial load
duke
parents:
diff changeset
   222
                NamingUtils.errprint(CorbaResourceUtil.getText(
02bb8761fcce Initial load
duke
parents:
diff changeset
   223
                    "tnameserv.exception", initialPort));
02bb8761fcce Initial load
duke
parents:
diff changeset
   224
                NamingUtils.errprint(CorbaResourceUtil.getText(
02bb8761fcce Initial load
duke
parents:
diff changeset
   225
                    "tnameserv.usage"));
02bb8761fcce Initial load
duke
parents:
diff changeset
   226
            }
02bb8761fcce Initial load
duke
parents:
diff changeset
   227
02bb8761fcce Initial load
duke
parents:
diff changeset
   228
            e.printStackTrace() ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   229
        }
02bb8761fcce Initial load
duke
parents:
diff changeset
   230
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   231
02bb8761fcce Initial load
duke
parents:
diff changeset
   232
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   233
     * Private constructor since no object of this type should be instantiated.
02bb8761fcce Initial load
duke
parents:
diff changeset
   234
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   235
    private TransientNameServer() {}
02bb8761fcce Initial load
duke
parents:
diff changeset
   236
}