1 26 27 package org.objectweb.openccm.corba; 28 29 38 39 public abstract class Application 40 { 41 47 53 56 public 57 Application() 58 { 59 } 60 61 67 72 protected void 73 report_exception(Exception exception) 74 { 75 System.err.print("Please report the following exception trace"); 76 System.err.println(" to openccm@objectweb.org"); 77 78 System.err.println(", including your ORB name and version\n"); 80 System.err.println("Operating System = " 81 + System.getProperty("os.name") 82 + System.getProperty("os.version") 83 +"\n"); 84 System.err.println("JDK version = " 85 + System.getProperty("java.version") 86 +"\n"); 87 88 exception.printStackTrace(); 89 } 90 91 97 105 public int 106 start(String [] args) 107 { 108 try 109 { 110 args = TheORB.initialize(args); 112 113 int status = run(args); 115 116 TheORB.destroy(); 118 119 return status; 120 } 121 catch(UserExceptionWrapper exc) 122 { 123 report_exception(exc.getUserException()); 124 } 125 catch(Exception exc) 126 { 127 report_exception(exc); 128 } 129 return -1; 130 } 131 132 139 public abstract int 140 run(String [] args); 141 } 142 | Popular Tags |