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.13 by tdb, Wed Mar 14 01:43:47 2001 UTC vs.
Revision 1.16 by tdb, Thu Mar 15 22:12:22 2001 UTC

# Line 1 | Line 1
1   //---PACKAGE DECLARATION---
2 < package uk.ac.ukc.iscream.client;
2 > package uk.org.iscream.client;
3  
4   //---IMPORTS---
5 < import uk.ac.ukc.iscream.clientinterface.*;
6 < import uk.ac.ukc.iscream.componentmanager.*;
7 < import uk.ac.ukc.iscream.core.*;
8 < import uk.ac.ukc.iscream.util.*;
5 > import uk.org.iscream.clientinterface.*;
6 > import uk.org.iscream.componentmanager.*;
7 > import uk.org.iscream.core.*;
8 > import uk.org.iscream.util.*;
9  
10   /**
11   * A startup component for the Local Clients.
# Line 42 | Line 42 | public class ClientMain implements Component {
42          _logger = _refman.getLogger();
43  
44          _logger.write(toString(), Logger.SYSINIT, "coming up");
45            
46        // configuration variables we require
47        int queueMonitorInterval = 0;
45          
49        Configuration config = _refman.getCM().getConfiguration("LocalClient");
50        if (config == null) {
51            throw new ComponentStartException("Unable to obtain configuration for component");
52        }
53        else {
54            try {
55                // get the configuration properties we need
56                queueMonitorInterval = Integer.parseInt(config.getProperty("Queue.MonitorInterval"));
57            } catch (org.omg.CORBA.MARSHAL e) {
58                throw new ComponentStartException("Unable to obtain requried configuration property for component");
59            }
60        }
61              
62        _logger.write(toString(), Logger.SYSINIT, "configured");
63        
46          // setup the queues, this must be done before both managers are setup
65        String queueName;
47          // setup a Queue for the servant -> monitor manager
48          _monitorQueue = new Queue();
68        
49          // setup a Queue for the monitors -> alert manager
50          _alerterQueue = new Queue();
51          
72        
73        
52          // setup the servant and connect
53          _logger.write(toString(), Logger.SYSINIT, "starting servant and connecting");          
54          try {
# Line 122 | Line 100 | public class ClientMain implements Component {
100              // finally check the CLI is alive
101              obj = _refman.getCORBARef("iscream.ClientInterface." + cli);
102          } catch(ComponentCORBAException e) {
103 <            _logger.write(toString(), Logger.WARNING, "Dependency Failure: "+e);
103 >            System.err.println(toString() + ": Dependency Failure: "+e);
104              return false;
105          } catch(PropertyNotFoundException e) {
106 <            _logger.write(toString(), Logger.WARNING, "Unable to obtain configuration: "+e);
106 >            System.err.println(toString() + ": Unable to obtain configuration: "+e);
107              return false;
108          }
109          // dependency check suceeded
# Line 136 | Line 114 | public class ClientMain implements Component {
114       * Overrides the {@link java.lang.Object#toString() Object.toString()}
115       * method to provide clean logging (every class should have this).
116       *
117 <     * This uses the uk.ac.ukc.iscream.util.FormatName class
117 >     * This uses the uk.org.iscream.util.FormatName class
118       * to format the toString()
119       *
120       * @return the name of this class and its CVS revision

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines