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

Comparing projects/cms/source/corbaservices/uk/org/iscream/cms/corbaservices/CorbaServices.java (file contents):
Revision 1.2 by tdb, Mon Feb 26 21:53:01 2001 UTC vs.
Revision 1.3 by tdb, Mon Feb 26 22:13:39 2001 UTC

# Line 5 | Line 5 | package uk.ac.ukc.iscream.corbaservices;
5   import java.lang.reflect.*;
6   import java.util.*;
7   import java.io.*;
8 + import java.net.*;
9  
10   /**
11   * CORBA Services
# Line 30 | Line 31 | class CorbaServices {
31  
32      public static void main(String args[]) {
33          
34 <        System.setProperty("org.omg.CORBA.ORBClass","jacorb.orb.ORB");
35 <        System.setProperty("org.omg.CORBA.ORBSingletonClass","jacorb.orb.ORBSingleton");
34 >        System.setProperty("org.omg.CORBA.ORBClass","jacorb.orb.ORB");
35 >        System.setProperty("org.omg.CORBA.ORBSingletonClass","jacorb.orb.ORBSingleton");
36          
37 +        System.out.println("---  i-scream CORBA Services Manager  ---");
38 +        System.out.println("---          Starting System          ---");
39 +        
40          String okUrls = DEFAULTOKURLS;
41          String servicesConf = DEFAULTSERVICESCONF;
42          String webDir = DEFAULTWEBDIR;
# Line 58 | Line 62 | class CorbaServices {
62              }
63          }
64          
65 +        System.out.println("---       Reading Configuration       ---");
66 +        
67          LinkedList serviceList = getServicesList(servicesConf);
68          String[] svcList = new String[serviceList.size()];
69          LinkedList[] svcListParams = new LinkedList[serviceList.size()];
# Line 73 | Line 79 | class CorbaServices {
79              svcListParams[j] = l;
80              j++;
81          }
82 <
82 >        
83 >        System.out.println("---      Starting CORBA Services      ---");
84 >        
85          // start the services
86          try {
87  
# Line 89 | Line 97 | class CorbaServices {
97                  Class myClass = myClassLoader.loadClass(svcList[k]);
98                  // and we don't support passing of individual args, but we will ;-) so its just null
99                  String[] passedArgs = new String[svcListParams[k].size()];
100 +                String arglist = "";
101                  i = svcListParams[k].iterator();
102                  int p = 0;
103                  while(i.hasNext()) {
104                      passedArgs[p] = (String) i.next();
105 +                    arglist += " " + passedArgs[p];
106                      p++;
107                  }
108                                                          
# Line 109 | Line 119 | class CorbaServices {
119      
120                  // Finally we start it going
121                  anApp.start();
122 +                System.out.println(svcList[k]+arglist);
123                  
124                  // Now we go and start the rest of the Apps listed            
125              }
# Line 117 | Line 128 | class CorbaServices {
128              System.out.println(e);
129              e.printStackTrace();
130          }
131 <
131 >        
132 >        System.out.println("---      Starting Mini WebServer      ---");
133 >        
134 >        String host;
135 >        try {
136 >            host = InetAddress.getLocalHost().getHostName();
137 >        } catch(UnknownHostException e) {
138 >            host = "<unknown>";
139 >        }
140 >        System.out.println("Host:\t\t"+host);
141 >        System.out.println("Port:\t\t"+port);
142 >        System.out.println("URL List File:\t"+okUrls);
143 >        System.out.println("Web Directory:\t"+webDir);
144 >        
145          // start the mini-webserver
146          MiniWebServer mws = new MiniWebServer(port, okUrls, webDir);
147          mws.start();
148 +
149 +        System.out.println("---   i-scream CORBA Services Ready   ---");
150      }
151  
152      private static void usage() {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines