47 |
|
|
48 |
|
Configuration config = _refman.getCM().getConfiguration("RootFilter"); |
49 |
|
if (config == null) { |
50 |
< |
System.err.println("CRITICAL:Unable to obtain configuration" + |
51 |
< |
"\n Advise you check the i-scream log for more information."); |
52 |
< |
_logger.write(toString(), Logger.FATAL, "ERROR - unable to obtain configuration"); |
53 |
< |
System.exit(1); |
54 |
< |
} else { |
50 |
> |
throw new ComponentStartException("Unable to obtain configuration for component"); |
51 |
> |
} |
52 |
> |
else { |
53 |
|
try { |
54 |
+ |
// get the configuration properties we need |
55 |
|
ourName = config.getProperty("RootFilter.name"); |
56 |
|
realInterface = config.getProperty("RootFilter.realtimeInterfaceName"); |
57 |
|
dbInterface = config.getProperty("RootFilter.dbInterfaceName"); |
58 |
|
} catch (org.omg.CORBA.MARSHAL e) { |
59 |
< |
System.err.println ("CRITICAL:Unable to obtain required configuration property" + |
61 |
< |
"\n Advise you check the i-scream log for more information."); |
62 |
< |
_logger.write(toString(), Logger.FATAL, "ERROR - required configuration property not present"); |
63 |
< |
System.exit(1); |
59 |
> |
throw new ComponentStartException("Unable to obtain requried configuration property for component"); |
60 |
|
} |
61 |
|
} |
62 |
+ |
|
63 |
|
// now we have the name of the Root Filter we set it |
64 |
|
NAME = ourName; |
65 |
|
|
101 |
|
|
102 |
|
_logger.write(toString(), Logger.SYSINIT, "started"); |
103 |
|
|
107 |
– |
// !!!! TEMPORARY CODE !!!! |
108 |
– |
// Monitor the queue's status (queue 0 and 1 - big assumption!) |
109 |
– |
while(true) { |
110 |
– |
// wait 30 seconds |
111 |
– |
try { Thread.sleep(30000); } catch(Exception e) {} |
112 |
– |
int q0 = _queue.queueSize(0); |
113 |
– |
int q1 = _queue.queueSize(1); |
114 |
– |
int tot = _queue.elementCount(); |
115 |
– |
String message = "Queue status - queue1: "+q1+" queue2: "+q2+" total: "+tot; |
116 |
– |
_logger.write(toString(), Logger.DEBUG, message); |
117 |
– |
} |
104 |
|
} |
105 |
|
|
106 |
|
/** |