Added defaulting of domain/workgroup name to 'WORKGROUP' when the domain cannot

be resolved via network broadcast. Also outputs a message to indicate the domain
was defaulted and possible causes (firewall settings/broadcast mask).
Added hint message to check the broadcast mask when the host announcer fails
with an IOException.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2185 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gary Spencer
2006-01-24 13:51:00 +00:00
parent 12b52c471a
commit 29da65708a
2 changed files with 30 additions and 5 deletions

View File

@@ -590,7 +590,23 @@ public class ServerConfiguration
{
// Get the local domain/workgroup name
setDomainName(getLocalDomainName());
String localDomain = getLocalDomainName();
if ( localDomain == null && getPlatformType() != PlatformType.WINDOWS)
{
// Use a default domain/workgroup name
localDomain = "WORKGROUP";
// Output a warning
logger.error("Failed to get local domain/workgroup name, using default of " + localDomain);
logger.error("(This may be due to firewall settings or incorrect <broadcast> setting)");
}
// Set the local domain/workgroup that the CIFS server belongs to
setDomainName( localDomain);
}
// Check for a server comment
@@ -2251,12 +2267,9 @@ public class ServerConfiguration
if (nbName != null)
domainName = nbName.getName();
else
throw new AlfrescoRuntimeException("Failed to find local domain/workgroup name");
}
catch (IOException ex)
{
throw new AlfrescoRuntimeException("Failed to determine local domain/workgroup");
}
}