1 26 27 package org.objectweb.openccm.Deployment; 28 35 36 public class ComponentInstallationMain extends org.objectweb.openccm.corba.ApplicationServer 37 { 38 39 45 48 protected String name_ ="ComponentInstallation"; 49 50 56 59 public 60 ComponentInstallationMain() 61 { 62 } 63 64 65 71 76 public static void 77 main(String args[]) 78 { 79 ComponentInstallationMain server = new ComponentInstallationMain(); 80 int status = server.start(args); 81 System.exit(status); 82 } 83 84 90 97 public int 98 before_run(String [] args) 99 { 100 org.objectweb.openccm.Components.Runtime.init(); 102 103 ComponentInstallationImpl afi = new ComponentInstallationImpl(args[0]+name_+args[1]); 105 106 org.omg.CORBA.Object ref = 108 afi._this_object(org.objectweb.openccm.corba.TheORB.getORB()); 109 110 org.omg.Components.Deployment.ComponentInstallation serverRef = 111 org.omg.Components.Deployment.ComponentInstallationHelper.narrow(ref); 112 113 116 org.objectweb.openccm.corba.NamingContext ns = 118 org.objectweb.openccm.corba.TheNameService.getNamingContext(); 119 120 ns.rebind(name_+args[1], serverRef); 122 123 126 TheComponentInstallation.setComponentInstallation(serverRef); 128 System.out.println("The OpenCCM Component Instantiation is ready."); 129 return 0; 130 } 131 132 135 public void 136 after_run() 137 { 138 org.objectweb.openccm.corba.NamingContext ns = 140 org.objectweb.openccm.corba.TheNameService.getNamingContext(); 141 142 ns.unbind(name_); 144 } 145 146 } 147 | Popular Tags |