question: private static void updateNamingTable ( ) throws SMSException { Hashtable updatedNamingTable = updateNamingTable ( false ) ; if ( namingTable != null ) { synchronized ( namingTable ) { namingTable . clear ( ) ; namingTable . putAll ( updatedNamingTable ) ; } } else { namingTable = updatedNamingTable ; } }
target:  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.