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.28 by tdb, Tue Mar 13 16:37:31 2001 UTC vs.
Revision 1.29 by tdb, Wed Mar 14 01:34:34 2001 UTC

# Line 116 | Line 116 | public class RootFilter implements Component {
116      }
117      
118      /**
119 +     * Does a dependency check. Used mainly at startup to
120 +     * see if the required dependencies (components) are up
121 +     * and running.
122 +     *
123 +     * @return a boolean value, true if the depdencies are satisfied
124 +     */
125 +    public boolean depCheck() {
126 +        try {
127 +            org.omg.CORBA.Object obj;
128 +            // first check the ConfigurationManager is alive
129 +            obj = _refman.getCORBARef("iscream.ConfigurationManager");
130 +            // then get some info on the CLI and DBI
131 +            ConfigurationProxy cp = ConfigurationProxy.getInstance();
132 +            String cli = cp.getProperty("RootFilter", "RootFilter.realtimeInterfaceName");
133 +            String dbi = cp.getProperty("RootFilter", "RootFilter.dbInterfaceName");
134 +            // finally check the CLI and DBI are alive
135 +            obj = _refman.getCORBARef("iscream.ClientInterface." + cli);
136 +            obj = _refman.getCORBARef("iscream.ClientInterface." + dbi);
137 +        } catch(ComponentCORBAException e) {
138 +            _logger.write(toString(), Logger.WARNING, "Dependency Failure: "+e);
139 +            return false;
140 +        } catch(PropertyNotFoundException e) {
141 +            _logger.write(toString(), Logger.WARNING, "Unable to obtain configuration: "+e);
142 +            return false;
143 +        }
144 +        // dependency check suceeded
145 +        return true;
146 +    }
147 +    
148 +    /**
149       * Overrides the {@link java.lang.Object#toString() Object.toString()}
150       * method to provide clean logging (every class should have this).
151       *

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines