ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/server/uk/org/iscream/cms/server/rootfilter/RootFilter.java
(Generate patch)

Comparing projects/cms/source/server/uk/org/iscream/cms/server/rootfilter/RootFilter.java (file contents):
Revision 1.15 by tdb, Tue Jan 2 03:19:37 2001 UTC vs.
Revision 1.24 by tdb, Mon Feb 12 02:22:19 2001 UTC

# Line 4 | Line 4 | package uk.ac.ukc.iscream.rootfilter;
4   //---IMPORTS---
5   import uk.ac.ukc.iscream.util.*;
6   import uk.ac.ukc.iscream.core.*;
7 + import uk.ac.ukc.iscream.componentmanager.*;
8   import uk.ac.ukc.iscream.clientinterface.*;
9  
10   /**
# Line 17 | Line 18 | import uk.ac.ukc.iscream.clientinterface.*;
18   * @author  $Author$
19   * @version $Id$
20   */
21 < public class RootFilter implements uk.ac.ukc.iscream.util.Component {
21 > public class RootFilter implements Component {
22  
23   //---FINAL ATTRIBUTES---
24  
# Line 46 | Line 47 | public class RootFilter implements uk.ac.ukc.iscream.u
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");
52 <            System.exit(1);
53 <        } 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" +
60 <                                    "\n         Advise you check the i-scream log for more information.");
61 <                _logger.write(toString(), Logger.FATAL, "ERROR - required configuration property not present");
62 <                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          
# Line 78 | Line 76 | public class RootFilter implements uk.ac.ukc.iscream.u
76          }
77          
78          Queue queue = new Queue();
79 +        // startup a monitor on this queue, every minute
80 +        queue.startMonitor(60*1000, NAME);
81          
82          if (realInterface == null) {        
83              _logger.write(toString(), Logger.DEBUG, "hooked to interfaces - " + dbInterface);
# Line 102 | Line 102 | public class RootFilter implements uk.ac.ukc.iscream.u
102          _refman.bindToOrb(filterServant, "iscream.Filter." + RootFilter.NAME);
103          
104          _logger.write(toString(), Logger.SYSINIT, "started");
105 +        
106      }
107      
108      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines