1 26 27 package org.objectweb.openccm.Deployment; 28 29 public class AssemblyFactoryMain extends org.objectweb.openccm.corba.ApplicationServer 30 { 31 32 38 41 protected String name_ ="AssemblyFactory"; 42 43 49 52 public 53 AssemblyFactoryMain() 54 { 55 org.objectweb.ccm.descriptor.EntityResolver.setCCMResolver(); 57 } 58 59 65 71 76 public static void 77 main(String args[]) 78 { 79 AssemblyFactoryMain server = new AssemblyFactoryMain(); 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 AssemblyFactoryImpl afi = new AssemblyFactoryImpl(); 105 106 org.omg.CORBA.Object ref = 108 afi._this_object(org.objectweb.openccm.corba.TheORB.getORB()); 109 110 org.omg.Components.Deployment.AssemblyFactory serverRef = 111 org.omg.Components.Deployment.AssemblyFactoryHelper.narrow(ref); 112 113 114 115 org.objectweb.openccm.corba.NamingContext ns = 117 org.objectweb.openccm.corba.TheNameService.getNamingContext(); 118 119 ns.rebind(name_, serverRef); 121 122 org.objectweb.openccm.corba.TheORB.save_IOR(serverRef, args[0]); 124 125 127 System.out.println("The OpenCCM Assembly Factory is ready."); 128 return 0; 129 } 130 131 134 public void 135 after_run() 136 { 137 org.objectweb.openccm.corba.NamingContext ns = 139 org.objectweb.openccm.corba.TheNameService.getNamingContext(); 140 141 ns.unbind(name_); 143 } 144 145 } 146 | Popular Tags |