Author: norman
Date: Thu Dec 14 09:58:14 2006
New Revision: 487280

URL: http://svn.apache.org/viewvc?view=rev&rev=487280
Log:
Get sure a exception is thrown if virtualhosting is enabled and no 
defaultdomain is used

Modified:
    james/server/trunk/src/java/org/apache/james/James.java

Modified: james/server/trunk/src/java/org/apache/james/James.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/src/java/org/apache/james/James.java?view=diff&rev=487280&r1=487279&r2=487280
==============================================================================
--- james/server/trunk/src/java/org/apache/james/James.java (original)
+++ james/server/trunk/src/java/org/apache/james/James.java Thu Dec 14 09:58:14 
2006
@@ -268,6 +268,8 @@
         Configuration defaultDomainConfig = conf.getChild("defaultDomain");
         if (defaultDomainConfig != null ) {
             defaultDomain = defaultDomainConfig.getValue(null);
+        } else if (virtualHosting) {
+            throw new ConfigurationException("Please configure a defaultDomain 
if using VirtualHosting");
         }
         
         getLogger().info("Defaultdomain: " + defaultDomain);
@@ -282,7 +284,7 @@
                     helloName = "localhost";
                 }
             } else {
-             // Should we use the defaultdomain here ?
+                // Should we use the defaultdomain here ?
                 helloName = helloNameConfig.getValue(defaultDomain);
             }
             attributes.put(Constants.HELLO_NAME, helloName);



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to