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

Comparing projects/cms/source/server/uk/org/iscream/cms/server/componentmanager/ReferenceManager.java (file contents):
Revision 1.11 by ajm, Fri Feb 23 16:26:14 2001 UTC vs.
Revision 1.13 by tdb, Wed Mar 14 23:25:29 2001 UTC

# Line 1 | Line 1
1   //---PACKAGE DECLARATION---
2 < package uk.ac.ukc.iscream.componentmanager;
2 > package uk.org.iscream.componentmanager;
3  
4   //---IMPORTS---
5   import org.omg.CORBA.ORB;
6   import org.omg.CosNaming.*;
7   import org.omg.PortableServer.*;
8 < import uk.ac.ukc.iscream.core.*;
9 < import uk.ac.ukc.iscream.util.*;
8 > import uk.org.iscream.core.*;
9 > import uk.org.iscream.util.*;
10  
11   /**
12   * This class returns references for global system objects.
# Line 81 | Line 81 | public class ReferenceManager {
81              dieWithError("\nCRITICAL:Invalid Name - when resolving reference to " + name + "!\n" +
82                                "         Please check with your CORBA naming service provider.");
83          } catch (org.omg.CosNaming.NamingContextPackage.NotFound e) {
84 <            dieWithError("\nCRITICAL:Not Found - when resolving reference to " + name + "!\n" +
84 >            recoverWithError("\nCRITICAL:Not Found - when resolving reference to " + name + "!\n" +
85                                "         Please check that this component is running.");
86          }
87          return objRef;
# Line 111 | Line 111 | public class ReferenceManager {
111              dieWithError("\nCRITICAL:Naming Service Cannot Proceed - when binding " + name + "!\n" +
112                                "         Please check with your CORBA naming service provider.");
113          } catch (org.omg.CosNaming.NamingContextPackage.NotFound e) {
114 <            dieWithError("\nCRITICAL:Naming Service Not Found - when binding " + name + "!\n" +
114 >            recoverWithError("\nCRITICAL:Naming Service Not Found - when binding " + name + "!\n" +
115                                "         Please check with your CORBA naming service provider.");
116          } catch (org.omg.CosNaming.NamingContextPackage.AlreadyBound e) {
117              dieWithError("\nCRITICAL:Already Bound - when binding " + name + "!\n" +
# Line 136 | Line 136 | public class ReferenceManager {
136       * Overrides the {@link java.lang.Object#toString() Object.toString()}
137       * method to provide clean logging (every class should have this).
138       *
139 <     * This uses the uk.ac.ukc.iscream.util.NameFormat class
139 >     * This uses the uk.org.iscream.util.NameFormat class
140       * to format the toString()
141       *
142       * @return the name of this class and its CVS revision
# Line 164 | Line 164 | public class ReferenceManager {
164       *
165       * @param message the error message to die with
166       */
167 <    private void dieWithError(String message) throws ComponentCORBAException {
167 >    private void recoverWithError(String message) throws ComponentCORBAException {
168          if (_logger != null) {
169              _logger.write(toString(), Logger.WARNING, "component CORBA error - " + message);
170          }
171          throw new ComponentCORBAException(message);
172      }
173 +
174 +
175 +    /**
176 +     * If there are any CORBA errors this method is called with the
177 +     * error message.
178 +     *
179 +     * Currently this prints the error, on the local err stream.  Will
180 +     * print to the logger if one is available.
181 +     *
182 +     * ANY CALLS TO THIS METHOD CAUSE
183 +     * THE SYSTEM TO EXIT WITH A NON
184 +     * ZERO CODE!
185 +     *
186 +     * @param message the error message to die with
187 +     */
188 +    private void dieWithError(String message) {
189 +        System.err.println(message);
190 +        if (_logger != null) {
191 +            _logger.write(toString(), Logger.FATAL, message);
192 +        }
193 +        System.exit(1);
194 +    }
195 +
196 +
197  
198   //---ACCESSOR/MUTATOR METHODS---
199  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines