jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r384515 - /incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/config/RepositoryConfig.java
Date Thu, 09 Mar 2006 14:32:09 GMT
Author: tripod
Date: Thu Mar  9 06:32:07 2006
New Revision: 384515

URL: http://svn.apache.org/viewcvs?rev=384515&view=rev
Log:
- force creation of default workspace, even if workspace directory already exists

Modified:
    incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/config/RepositoryConfig.java

Modified: incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/config/RepositoryConfig.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/config/RepositoryConfig.java?rev=384515&r1=384514&r2=384515&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/config/RepositoryConfig.java
(original)
+++ incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/config/RepositoryConfig.java
Thu Mar  9 06:32:07 2006
@@ -16,36 +16,36 @@
  */
 package org.apache.jackrabbit.core.config;
 
+import org.apache.jackrabbit.core.fs.FileSystem;
+import org.apache.jackrabbit.core.fs.FileSystemException;
+import org.apache.jackrabbit.core.fs.FileSystemPathUtil;
+import org.apache.log4j.Logger;
+import org.w3c.dom.Element;
+import org.xml.sax.InputSource;
+
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.FileReader;
-import java.io.InputStream;
-import java.io.Reader;
+import java.io.FileWriter;
 import java.io.IOException;
+import java.io.InputStream;
 import java.io.InputStreamReader;
-import java.io.Writer;
 import java.io.OutputStreamWriter;
-import java.io.FileWriter;
+import java.io.Reader;
+import java.io.Writer;
 import java.net.URI;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Properties;
 
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-
-import org.apache.jackrabbit.core.fs.FileSystem;
-import org.apache.jackrabbit.core.fs.FileSystemException;
-import org.apache.jackrabbit.core.fs.FileSystemPathUtil;
-import org.w3c.dom.Element;
-import org.xml.sax.InputSource;
-
 /**
  * Repository configuration. This configuration class is used to
  * create configured repository objects.
@@ -59,6 +59,9 @@
  */
 public class RepositoryConfig {
 
+    /** the default logger */
+    private static Logger log = Logger.getLogger(RepositoryConfig.class);
+
     /** Name of the workspace configuration file. */
     private static final String WORKSPACE_XML = "workspace.xml";
 
@@ -320,14 +323,13 @@
                 }
             }
         }
-
-        if (workspaces.isEmpty()) {
+        if (!workspaces.containsKey(defaultWorkspace)) {
+            if (!workspaces.isEmpty()) {
+                log.warn("Potential missconfiguration. No configuration found " +
+                        "for default workspace: " + defaultWorkspace);
+            }
             // create initial default workspace
             createWorkspaceConfig(defaultWorkspace);
-        } else if (!workspaces.containsKey(defaultWorkspace)) {
-            throw new ConfigurationException(
-                    "no configuration found for default workspace: "
-                    + defaultWorkspace);
         }
     }
 



Mime
View raw message