Changeset 2130 for trunk/java-client/org


Ignore:
Timestamp:
2001-03-08T01:41:37+13:00 (23 years ago)
Author:
say1
Message:

fixed teh error where bad or old IORs would cause a crash

Location:
trunk/java-client/org/nzdl/gsdl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/java-client/org/nzdl/gsdl/SimpleClient.java

    r2128 r2130  
    9393  String IORFromCommandLine = null;
    9494  /** The collection to query */
    95   String collectionNameToQuery = "demo";
     95  String collectionNameToQuery = "";
    9696  /** The query to use */
    9797  String queryToQuery = "the";
     
    138138      System.err.println("Error reading properties file:" + i);
    139139    }
    140 
    141     Enumeration e = knownIORs.keys();
    142     while (e.hasMoreElements() && nzdl == null) {
    143       String IOR = (String) e.nextElement();
    144       attemptToInitialise(args, null, IOR);
    145      
    146     }
     140   
     141    if (IORFromCommandLine != null)
     142      attemptToInitialise(args, null, IORFromCommandLine);
    147143   
    148144    if (nzdl == null) {
     
    151147      System.err.println("after IOR");
    152148      attemptToInitialise(args, null, IOR);
    153       knownIORs.put(IOR,"");
    154     }
    155 
     149    }
     150   
     151    Enumeration e = knownIORs.keys();
     152    while (e.hasMoreElements() && nzdl == null) {
     153      String IOR = (String) e.nextElement();
     154      attemptToInitialise(args, null, IOR);
     155     
     156    }
     157   
     158    knownIORs.put(IOR,"");
    156159  }
    157160
     
    202205    catch (java.io.IOException e) {
    203206      System.err.println("Error reading IOR key:\n" + e);
    204       System.err.println("Aborting service...");
    205       System.exit(1);
    206207    }
    207208    return ior;
  • trunk/java-client/org/nzdl/gsdl/service/NzdlServiceClient.java

    r2128 r2130  
    3838    System.err.println("Nzdl init ... NO");
    3939    System.err.println("CORBA error:" + error.value.value());
    40     System.err.println("Aborting service ...");
    41     System.exit(1);
     40    throw new Error("Initialisation failed ...");
    4241      }
    4342     
     
    4544      System.err.println("Error in service init:\n" + e) ;
    4645      System.err.println("CORBA error:" + error.value.value());
    47       System.err.println("Aborting service ...");
    48       System.exit(1);
     46      throw new Error("Initialisation failed ...");
    4947    }
    5048    if (error.value.value() != corbaComError._corbaNoError) {
Note: See TracChangeset for help on using the changeset viewer.