1 7 8 package com.sun.corba.se.impl.activation; 9 10 11 import java.io.File ; 12 13 import org.omg.CosNaming.NamingContext ; 14 import com.sun.corba.se.spi.orb.ORB; 15 import com.sun.corba.se.impl.naming.pcosnaming.NameService; 16 import com.sun.corba.se.impl.orbutil.ORBConstants; 17 18 public class NameServiceStartThread extends java.lang.Thread 21 { 22 private ORB orb; 23 private File dbDir; 24 25 public NameServiceStartThread( ORB theOrb, File theDir ) 26 { 27 orb = theOrb; 28 dbDir = theDir; 29 } 30 31 public void run( ) 32 { 33 try { 34 NameService nameService = new NameService(orb, dbDir ); 36 NamingContext rootContext = nameService.initialNamingContext(); 37 orb.register_initial_reference( 38 ORBConstants.PERSISTENT_NAME_SERVICE_NAME, rootContext ); 39 } catch( Exception e ) { 40 System.err.println( 41 "NameService did not start successfully" ); 42 e.printStackTrace( ); 43 } 44 } 45 } 46 | Popular Tags |