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

Comparing projects/cms/source/server/uk/org/iscream/cms/server/client/ClientMain.java (file contents):
Revision 1.11 by ajm, Fri Mar 2 05:42:39 2001 UTC vs.
Revision 1.12 by tdb, Wed Mar 14 01:34:21 2001 UTC

# Line 104 | Line 104 | public class ClientMain implements Component {
104          _logger.write(toString(), Logger.SYSINIT, "started");
105          
106      }
107 <
107 >    
108 >    /**
109 >     * Does a dependency check. Used mainly at startup to
110 >     * see if the required dependencies (components) are up
111 >     * and running.
112 >     *
113 >     * @return a boolean value, true if the depdencies are satisfied
114 >     */
115 >    public boolean depCheck() {
116 >        try {
117 >            org.omg.CORBA.Object obj;
118 >            // first check the ConfigurationManager is alive
119 >            obj = _refman.getCORBARef("iscream.ConfigurationManager");
120 >            // then get some info on the CLI
121 >            ConfigurationProxy cp = ConfigurationProxy.getInstance();
122 >            String cli = cp.getProperty("RootFilter", "RootFilter.realtimeInterfaceName");
123 >            // finally check the CLI is alive
124 >            obj = _refman.getCORBARef("iscream.ClientInterface." + cli);
125 >        } catch(ComponentCORBAException e) {
126 >            _logger.write(toString(), Logger.WARNING, "Dependency Failure: "+e);
127 >            return false;
128 >        } catch(PropertyNotFoundException e) {
129 >            _logger.write(toString(), Logger.WARNING, "Unable to obtain configuration: "+e);
130 >            return false;
131 >        }
132 >        // dependency check suceeded
133 >        return true;
134 >    }
135 >    
136      /**
137       * Overrides the {@link java.lang.Object#toString() Object.toString()}
138       * method to provide clean logging (every class should have this).

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines