private static void updateNamingTable() throws SMSException {
  Hashtable updatedNamingTable=updateNamingTable(false);
  if (namingTable != null) {
synchronized (namingTable) {
      namingTable.clear();
      namingTable.putAll(updatedNamingTable);
    }
  }
 else {
    namingTable=updatedNamingTable;
  }
}

private static void updateNamingTable ( ) throws SMSException { Hashtable updatedNamingTable = updateNamingTable ( false ) ; if ( namingTable != null ) { synchronized ( namingTable ) { namingTable . clear ( ) ; namingTable . putAll ( updatedNamingTable ) ; } } else { namingTable = updatedNamingTable ; } }
this method updates the naming table especially whenever a new server added / deleted into platform server list . note that webtopnaming maintains a reference to the namingtable hashtable in this class , and thus state in this hash must be updated in - place , or else the reference in webtopnaming will point to hashtables with stale state . note also that this update should preclude concurrent references to this hashtable - thus the update will synchronize on the hashtable reference itself , as this will exclude concurrent get operations on the hashtable while state in the hashtable is being updated .
