25 |
|
//---STATIC METHODS--- |
26 |
|
|
27 |
|
public static void main(String[] args) { |
28 |
+ |
System.setProperty("org.omg.CORBA.ORBClass","jacorb.orb.ORB"); |
29 |
+ |
System.setProperty("org.omg.CORBA.ORBSingletonClass","jacorb.orb.ORBSingleton"); |
30 |
|
|
31 |
|
// can't have a real toString() :) |
32 |
|
String toString = "FilterManager(" + REVISION.substring(11, REVISION.length() - 2) + ")"; |
46 |
|
NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef); |
47 |
|
|
48 |
|
// get a ref to the Configurator & the Logger |
49 |
< |
objRef = ncRef.resolve(ncRef.to_name("iscream.Configurator")); |
50 |
< |
Configurator configurator = ConfiguratorHelper.narrow(objRef); |
49 |
> |
objRef = ncRef.resolve(ncRef.to_name("iscream.ConfigurationManager")); |
50 |
> |
ConfigurationManager configManager = ConfigurationManagerHelper.narrow(objRef); |
51 |
|
objRef = ncRef.resolve(ncRef.to_name("iscream.Logger")); |
52 |
|
Logger logger = LoggerHelper.narrow(objRef); |
53 |
|
|
54 |
< |
logger.write(toString, "coming up"); |
54 |
> |
logger.write(toString, Logger.SYSINIT, "coming up"); |
55 |
|
|
56 |
|
// create the filterManagerRef to our servant |
57 |
|
//filterManagerRef = new FilterManagerServant; |
64 |
|
poa.the_POAManager().activate(); |
65 |
|
|
66 |
|
// get the config |
67 |
< |
Configuration myConfig = configurator.getConfiguration("filterManager"); |
67 |
> |
Configuration myConfig = configManager.getConfiguration("filterManager"); |
68 |
|
|
69 |
|
// some place holders for the configuration |
70 |
|
int port = 0; |
83 |
|
System.exit(1); |
84 |
|
} |
85 |
|
} |
86 |
< |
logger.write(toString, "configured"); |
87 |
< |
logger.write(toString, "starting listener"); |
86 |
> |
logger.write(toString, Logger.SYSINIT, "configured"); |
87 |
> |
logger.write(toString, Logger.SYSINIT, "starting listener"); |
88 |
|
|
89 |
< |
FilterManagerListener fml = new FilterManagerListener(logger, configurator, port); |
89 |
> |
FilterManagerListener fml = new FilterManagerListener(logger, configManager, port); |
90 |
|
fml.start(); |
91 |
|
|
92 |
< |
logger.write(toString, "started"); |
92 |
> |
logger.write(toString, Logger.SYSINIT, "started"); |
93 |
|
|
94 |
|
} catch (Exception e) { |
95 |
|
System.err.println("FILTER MANAGER ERROR: " + e); |