1 |
|
//---PACKAGE DECLARATION--- |
2 |
+ |
package uk.ac.ukc.iscream.core; |
3 |
|
|
4 |
|
//---IMPORTS--- |
4 |
– |
import uk.ac.ukc.iscream.core.*; |
5 |
|
import org.omg.CORBA.*; |
6 |
|
import org.omg.CosNaming.*; |
7 |
|
import org.omg.PortableServer.*; |
98 |
|
// start and bind each server in turn |
99 |
|
|
100 |
|
// work out which logger to use |
101 |
< |
String whichLogger = System.getProperty("uk.ac.ukc.iscream.LoggerClass", defaultLogger); |
101 |
> |
String whichLogger = System.getProperty("uk.ac.ukc.iscream.LoggerClass"); |
102 |
> |
String loggerPackage = System.getProperty("uk.ac.ukc.iscream.LoggerPackage"); |
103 |
|
|
104 |
|
// construct the relevant LoggerImpl |
105 |
< |
LoggerImpl loggerImplRef = (LoggerImpl) ClassLoader.getSystemClassLoader().loadClass(whichLogger).newInstance(); |
105 |
> |
LoggerImpl loggerImplRef = (LoggerImpl) ClassLoader.getSystemClassLoader().loadClass(loggerPackage + "." + whichLogger).newInstance(); |
106 |
|
|
107 |
|
// setup and bind the LoggerServant |
108 |
|
LoggerServant loggerRef = new LoggerServant(loggerImplRef); |
154 |
|
* properly. |
155 |
|
*/ |
156 |
|
public static void usage() { |
157 |
< |
System.out.println("USAGE: java Core.java <option>"); |
157 |
> |
System.out.println("USAGE: java Core <option>"); |
158 |
|
System.out.println("WHERE <option>:"); |
159 |
|
System.out.println(" -l <filename> - the location of initial system properties"); |
160 |
|
System.out.println(" -h - this help screen"); |
172 |
|
//---ATTRIBUTES--- |
173 |
|
|
174 |
|
//---STATIC ATTRIBUTES--- |
174 |
– |
|
175 |
– |
/** |
176 |
– |
* Default logger, to be used when one is not provided |
177 |
– |
* in the configuration. |
178 |
– |
*/ |
179 |
– |
private static final String defaultLogger = "ScreenLogger"; |
180 |
– |
|
181 |
– |
/** |
182 |
– |
* Default configPath, to be used when one is not provided |
183 |
– |
* in the configuration. |
184 |
– |
*/ |
185 |
– |
private static final String defaultConfigPath = "."; |
175 |
|
|
176 |
|
} |