1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 package org.coach.actor; 26 27 import java.io.*; 28 29 30 31 37 public class Main { 38 41 public Main(File contextPropertyFile, File[] browserPropertyFile) { 42 System.out.println("Actor started"); 43 try { 45 org.omg.CORBA.Object o = org.objectweb.openccm.corba.TheORB.getORB().resolve_initial_references("InterfaceRepository"); 46 } catch (org.omg.CORBA.ORBPackage.InvalidName e1) { 47 } 49 50 org.objectweb.openccm.corba.TheORB.register_value_factory(org.omg.Components.ComponentPortDescriptionHelper.id(), 52 new org.objectweb.openccm.Components.ComponentPortDescriptionFactory()); 53 54 org.objectweb.openccm.corba.TheORB.register_value_factory(org.omg.Components.ConfigValueHelper.id(), 55 new org.objectweb.openccm.Components.ConfigValueFactory()); 56 57 org.objectweb.openccm.corba.TheORB.register_value_factory(org.omg.Components.ConnectionDescriptionHelper.id(), 58 new org.objectweb.openccm.Components.ConnectionDescriptionFactory()); 59 60 org.objectweb.openccm.corba.TheORB.register_value_factory(org.omg.Components.ConsumerDescriptionHelper.id(), 61 new org.objectweb.openccm.Components.ConsumerDescriptionFactory()); 62 63 org.objectweb.openccm.corba.TheORB.register_value_factory(org.omg.Components.CookieHelper.id(), 64 new org.objectweb.openccm.Components.CookieFactory()); 65 66 org.objectweb.openccm.corba.TheORB.register_value_factory(org.omg.Components.EmitterDescriptionHelper.id(), 67 new org.objectweb.openccm.Components.EmitterDescriptionFactory()); 68 69 org.objectweb.openccm.corba.TheORB.register_value_factory(org.omg.Components.FacetDescriptionHelper.id(), 70 new org.objectweb.openccm.Components.FacetDescriptionFactory()); 71 72 org.objectweb.openccm.corba.TheORB.register_value_factory(org.omg.Components.FacetDescriptionHelper.id(), 73 new org.objectweb.openccm.Components.FacetDescriptionFactory()); 74 75 org.objectweb.openccm.corba.TheORB.register_value_factory(org.omg.Components.PublisherDescriptionHelper.id(), 76 new org.objectweb.openccm.Components.PublisherDescriptionFactory()); 77 78 org.objectweb.openccm.corba.TheORB.register_value_factory(org.omg.Components.ReceptacleDescriptionHelper.id(), 79 new org.objectweb.openccm.Components.ReceptacleDescriptionFactory()); 80 81 org.objectweb.openccm.corba.TheORB.register_value_factory(org.omg.Components.SubscriberDescriptionHelper.id(), 82 new org.objectweb.openccm.Components.SubscriberDescriptionFactory()); 83 84 org.omg.CORBA.ORB orb = org.objectweb.openccm.corba.TheORB.getORB(); 86 org.coach.idltree.IdlNode.setOrb(orb); 87 88 System.err.println("Actor: Obtaining the Name Service..."); 90 try { 91 org.omg.CORBA.Object obj = orb.resolve_initial_references("NameService"); 92 org.omg.CosNaming.NamingContext nc = org.omg.CosNaming.NamingContextHelper.narrow(obj); 93 } catch (org.omg.CORBA.ORBPackage.InvalidName e1) { 94 } 96 97 try { 98 org.coach.actor.namingBrowser.NameModel model = new org.coach.actor.namingBrowser.NameModel(orb); 99 org.coach.actor.namingBrowser.NameTree tree = new org.coach.actor.namingBrowser.NameTree(orb, model); 100 tree.setTitle("COACH NameServer Browser"); 101 } catch (Throwable e) { 102 e.printStackTrace(); 103 } 104 } 105 } 106 | Popular Tags |