private static function updateNamingTable() { if (!WebtopNaming::isServerMode()) { if (WebtopNaming::$namingServiceURL == null) { WebtopNaming::initializeNamingService(); } // Try for the primary server first, if it fails and then // for the second server. We get connection refused error // if it doesn't succeed. WebtopNaming::$namingTable = null; $tempNamingURL = null; for ($i = 0; WebtopNaming::$namingTable == null && $i < count(WebtopNaming::$namingServiceURL); $i++) { $tempNamingURL = WebtopNaming::$namingServiceURL[$i]; WebtopNaming::$namingTable = WebtopNaming::getNamingTable($tempNamingURL); } if (WebtopNaming::$namingTable == null) { // debug.error("updateNamingTable : " // + NamingBundle.getString("noNamingServiceAvailable")); throw new Exception("No naming service available"); } WebtopNaming::updateServerProperties($tempNamingURL); } // else // WebtopNaming :: $namingTable = NamingService->getNamingTable(); $servers = WebtopNaming::$namingTable[Constants::PLATFORM_LIST]; if ($servers != null) { $st = explode($servers, ","); WebtopNaming::$platformServers = array(); foreach ($st as $token) { WebtopNaming::$platformServers[] = strtolower($token); } } WebtopNaming::updateServerIdMappings(); WebtopNaming::updateSiteIdMappings(); // if (debug.messageEnabled()) { // debug.message("Naming table -> " + namingTable.toString()); // debug.message("Platform Servers -> " + platformServers.toString()); // } }