Changeset 2189


Ignore:
Timestamp:
2001-03-18T10:44:42+12:00 (23 years ago)
Author:
daven
Message:

fixed multiple sever bug (stuart from dave"s machine )

File:
1 edited

Legend:

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

    r2188 r2189  
    110110  public static String getFirstValid()  {
    111111    validate(); // implies checkLoaded();
    112     synchronized (knownIORs) {
    113      
    114       Enumeration e = knownIORs.keys();
    115       while (e.hasMoreElements()) {
    116     String IOR = (String) e.nextElement();
    117     if (attemptToInitialise(null, null, IOR) != null) {
    118       return IOR;
    119     }
    120       }
    121       return null;
    122     }
     112    try {
     113    synchronized (knownIORs) {
     114       
     115        Enumeration e = knownIORs.keys();
     116        while (e.hasMoreElements()) {
     117        String IOR = (String) e.nextElement();
     118        if (attemptToInitialise(null, null, IOR) != null) {
     119            return IOR;
     120        }
     121        }
     122    }
     123    } catch (Throwable t) {
     124    System.out.println("Throwable in NzdlServiceFactory::getFirstValid()");
     125    }
     126    return null;
    123127  }
    124128  /**
Note: See TracChangeset for help on using the changeset viewer.