1 package test.naming; 2 3 import org.omg.CosNaming.*; 4 5 public class RIRTest 6 { 7 8 public static void main(String args[]) 9 { 10 try 11 { 12 org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args,null); 13 14 org.omg.CORBA.Object obj; 15 16 try 17 { 18 obj = orb.string_to_object("corbaname:rir:"); 19 } 20 catch( Exception e ) 21 { 22 e.printStackTrace(); 23 } 24 25 try 26 { 27 obj = orb.string_to_object("corbaname:rir:#"); 28 } 29 catch( Exception e ) 30 { 31 e.printStackTrace(); 32 } 33 34 try 35 { 36 obj = orb.string_to_object("corbaname:rir:/"); 37 } 38 catch( Exception e ) 39 { 40 e.printStackTrace(); 41 } 42 43 try 44 { 45 obj = orb.string_to_object("corbaname:rir:NameService"); 46 } 47 catch( Exception e ) 48 { 49 e.printStackTrace(); 50 } 51 52 System.out.println("done. "); 53 System.exit(0); 54 } 55 catch (Exception e) 56 { 57 e.printStackTrace(); 58 System.exit(1); 59 } 60 } 61 } 62 63 64 65 66 67 68 69 70 | Popular Tags |