1 26 27 package org.objectweb.openccm.corba; 28 29 38 39 public abstract class ApplicationServer 40 extends Application 41 { 42 48 54 57 public 58 ApplicationServer() 59 { 60 } 61 62 68 74 86 public int 87 run(String [] args) 88 { 89 org.omg.PortableServer.POA rootPOA = TheRootPOA.getRootPOA(); 91 92 try 94 { 95 rootPOA.the_POAManager().activate(); 96 } 97 catch(org.omg.PortableServer.POAManagerPackage.AdapterInactive exc) 98 { 99 throw new UserExceptionWrapper(exc); 101 } 102 103 int status = before_run(args); 105 106 if(status != 0) 107 { 108 return status; 109 } 110 111 TheORB.run(); 113 114 System.err.println("The ApplicationServer shutdowns."); 115 116 try 117 { 118 after_run(); 120 } 121 catch(Exception exc) 122 { 123 } 124 125 return 0; 126 } 127 128 135 public abstract int 136 before_run(String [] args); 137 138 141 public abstract void 142 after_run(); 143 } 144 | Popular Tags |