nameservicestartthread.java
来自「java jdk 1.4的源码」· Java 代码 · 共 53 行
JAVA
53 行
/* * @(#)NameServiceStartThread.java 1.11 03/01/23 * * Copyright 2003 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */package com.sun.corba.se.internal.Activation;import java.io.File;import org.omg.CosNaming.NamingContext;import com.sun.corba.se.internal.POA.POAORB;import com.sun.corba.se.internal.PCosNaming.NameService;import com.sun.corba.se.internal.orbutil.ORBConstants;// REVISIT: After Merlin to see if we can get rid of this Thread and// make the registration of PNameService for INS and BootStrap neat.public class NameServiceStartThread extends java.lang.Thread{ private POAORB orb; private File dbDir; private InitialNamingImpl ins; public NameServiceStartThread( POAORB theOrb, File theDir, InitialNamingImpl theIns ) { orb = theOrb; dbDir = theDir; ins = theIns; } public void run( ) { // start Name Service try { NameService nameService = new NameService(orb, dbDir ); NamingContext rootContext = nameService.initialNamingContext(); ins.bind( ORBConstants.PERSISTENT_NAME_SERVICE_NAME, rootContext, false); orb.register_initial_reference( ORBConstants.PERSISTENT_NAME_SERVICE_NAME, rootContext ); } catch( Exception e ) { System.err.println( "NameService did not start successfully" ); e.printStackTrace( ); } }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?