jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r718203 - in /jackrabbit/branches/1.5: ./ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/config/ jackrabbi...
Date Mon, 17 Nov 2008 09:04:46 GMT
Author: jukka
Date: Mon Nov 17 01:04:45 2008
New Revision: 718203

URL: http://svn.apache.org/viewvc?rev=718203&view=rev
Log:
1.5: Merged revisions 710047 and 711238 (JCR-1775 and JCR-1677)

Added:
    jackrabbit/branches/1.5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/WorkspaceEventChannel.java
      - copied unchanged from r711238, jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/WorkspaceEventChannel.java
    jackrabbit/branches/1.5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/WorkspaceListener.java
      - copied unchanged from r711238, jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/WorkspaceListener.java
    jackrabbit/branches/1.5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/WorkspaceRecord.java
      - copied unchanged from r711238, jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/WorkspaceRecord.java
    jackrabbit/branches/1.5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/ClonedInputSource.java
      - copied unchanged from r711238, jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/ClonedInputSource.java
Modified:
    jackrabbit/branches/1.5/   (props changed)
    jackrabbit/branches/1.5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
    jackrabbit/branches/1.5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/XASessionImpl.java
    jackrabbit/branches/1.5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java
    jackrabbit/branches/1.5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterRecordDeserializer.java
    jackrabbit/branches/1.5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterRecordProcessor.java
    jackrabbit/branches/1.5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/config/RepositoryConfig.java
    jackrabbit/branches/1.5/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/config/RepositoryConfigTest.java

Propchange: jackrabbit/branches/1.5/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Nov 17 01:04:45 2008
@@ -1,2 +1,2 @@
 /jackrabbit/branches/1.3:631261
-/jackrabbit/trunk:703899-704158,704165,704167,704324,704358,704361,704864,704933,704939,705010,705033,705243,705496,705522,705579,705925,705932,705934,705937-705938,705961,706242,706273,706285-706286,706562,706606,706649,706655,706660,706697,706918,707303-707304,707307,707310,707630,708206,708598,708609,708613,708619,708634,708840,708863,708909,708929,708943,709115,709142,709207,709211
+/jackrabbit/trunk:703899-704158,704165,704167,704324,704358,704361,704864,704933,704939,705010,705033,705243,705496,705522,705579,705925,705932,705934,705937-705938,705961,706242,706273,706285-706286,706562,706606,706649,706655,706660,706697,706918,707303-707304,707307,707310,707630,708206,708598,708609,708613,708619,708634,708840,708863,708909,708929,708943,709115,709142,709207,709211,710047,711238

Modified: jackrabbit/branches/1.5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java?rev=718203&r1=718202&r2=718203&view=diff
==============================================================================
--- jackrabbit/branches/1.5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
(original)
+++ jackrabbit/branches/1.5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
Mon Nov 17 01:04:45 2008
@@ -27,6 +27,8 @@
 import org.apache.jackrabbit.core.cluster.ClusterContext;
 import org.apache.jackrabbit.core.cluster.ClusterException;
 import org.apache.jackrabbit.core.cluster.ClusterNode;
+import org.apache.jackrabbit.core.cluster.WorkspaceEventChannel;
+import org.apache.jackrabbit.core.cluster.WorkspaceListener;
 import org.apache.jackrabbit.core.cluster.LockEventChannel;
 import org.apache.jackrabbit.core.cluster.UpdateEventChannel;
 import org.apache.jackrabbit.core.cluster.UpdateEventListener;
@@ -64,6 +66,7 @@
 import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.jackrabbit.core.version.VersionManager;
 import org.apache.jackrabbit.core.version.VersionManagerImpl;
+import org.apache.jackrabbit.core.xml.ClonedInputSource;
 import org.apache.jackrabbit.spi.commons.name.NameConstants;
 import org.apache.jackrabbit.spi.commons.namespace.NamespaceResolver;
 import org.apache.jackrabbit.spi.commons.namespace.RegistryNamespaceResolver;
@@ -89,6 +92,7 @@
 import java.io.InputStreamReader;
 import java.io.OutputStream;
 import java.io.OutputStreamWriter;
+import java.io.StringReader;
 import java.security.AccessControlContext;
 import java.security.AccessController;
 import java.util.Arrays;
@@ -103,7 +107,7 @@
  * A <code>RepositoryImpl</code> ...
  */
 public class RepositoryImpl extends AbstractRepository
-        implements JackrabbitRepository, SessionListener, EventListener {
+        implements JackrabbitRepository, SessionListener, EventListener, WorkspaceListener
{
 
     private static Logger log = LoggerFactory.getLogger(RepositoryImpl.class);
 
@@ -230,6 +234,11 @@
     private final ItemStateCacheFactory cacheFactory = new ManagedMLRUItemStateCacheFactory(cacheMgr);
 
     /**
+     * Chanel for posting create workspace messages.
+     */
+    private WorkspaceEventChannel createWorkspaceEventChannel;
+
+    /**
      * private constructor
      *
      * @param repConfig
@@ -292,6 +301,9 @@
                 clusterNode = createClusterNode();
                 nsReg.setEventChannel(clusterNode);
                 ntReg.setEventChannel(clusterNode);
+                
+                createWorkspaceEventChannel = clusterNode;
+                clusterNode.setListener(this);
             }
 
             // init version manager
@@ -789,16 +801,35 @@
                         + workspaceName + "' already exists.");
             }
 
+            // needed to get newly created workspace config file content when runnin in clustered
environment
+            StringBuffer workspaceConfigContent = clusterNode != null ? new StringBuffer()
: null;
+
             // create the workspace configuration
-            WorkspaceConfig config = repConfig.createWorkspaceConfig(workspaceName);
+            WorkspaceConfig config = repConfig.createWorkspaceConfig(workspaceName, workspaceConfigContent);
             WorkspaceInfo info = createWorkspaceInfo(config);
             wspInfos.put(workspaceName, info);
+
+            if (workspaceConfigContent != null && createWorkspaceEventChannel !=
null) {
+                // notify other cluster node that workspace has been created
+                InputSource s = new InputSource(new StringReader(workspaceConfigContent.toString()));
+                createWorkspaceEventChannel.workspaceCreated(workspaceName, new ClonedInputSource(s));
+            }
         }
     }
 
+    public void externalWorkspaceCreated(String workspaceName,
+            InputSource configTemplate) throws RepositoryException {
+
+        createWorkspaceInternal(workspaceName, configTemplate);
+    }
+
     /**
      * Creates a workspace with the given name and given workspace configuration
      * template.
+     * 
+     * The difference between this method and {@link #createWorkspace(String, InputSource)}
+     * is that the later notifies the other cluster node that workspace has been created
+     * whereas this method only creates the workspace.
      *
      * @param workspaceName  name of the new workspace
      * @param configTemplate the workspace configuration template of the new
@@ -807,7 +838,7 @@
      *                             exists or if another error occurs
      * @see SessionImpl#createWorkspace(String,InputSource)
      */
-    protected void createWorkspace(String workspaceName,
+    private void createWorkspaceInternal(String workspaceName,
                                    InputSource configTemplate)
             throws RepositoryException {
         synchronized (wspInfos) {
@@ -822,6 +853,32 @@
             wspInfos.put(workspaceName, info);
         }
     }
+    
+    /**
+     * Creates a workspace with the given name and given workspace configuration
+     * template.
+     *
+     * @param workspaceName  name of the new workspace
+     * @param configTemplate the workspace configuration template of the new
+     *                       workspace
+     * @throws RepositoryException if a workspace with the given name already
+     *                             exists or if another error occurs
+     * @see SessionImpl#createWorkspace(String,InputSource)
+     */
+    protected void createWorkspace(String workspaceName,
+                                   InputSource configTemplate)
+            throws RepositoryException {
+
+        if (createWorkspaceEventChannel == null) {
+            createWorkspaceInternal(workspaceName, configTemplate);
+        }
+        else {
+        
+            ClonedInputSource template = new ClonedInputSource(configTemplate);
+            createWorkspaceInternal(workspaceName, template.cloneInputSource());
+            createWorkspaceEventChannel.workspaceCreated(workspaceName, template);
+        }
+    }
 
     SharedItemStateManager getWorkspaceStateManager(String workspaceName)
             throws NoSuchWorkspaceException, RepositoryException {

Modified: jackrabbit/branches/1.5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/XASessionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/XASessionImpl.java?rev=718203&r1=718202&r2=718203&view=diff
==============================================================================
--- jackrabbit/branches/1.5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/XASessionImpl.java
(original)
+++ jackrabbit/branches/1.5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/XASessionImpl.java
Mon Nov 17 01:04:45 2008
@@ -128,7 +128,7 @@
         XAVersionManager versionMgr = (XAVersionManager) getVersionManager();
 
         /**
-         * Create array that contains all resources that paricipate in this
+         * Create array that contains all resources that participate in this
          * transactions. Some resources depend on each other, therefore you
          * should only change the sequence if you know what you are doing!
          *
@@ -137,12 +137,12 @@
          * acquires the write lock on the version manager in its prepare method,
          * while the end resource releases the write lock in either commit or
          * rollback. Please note that the write lock is only acquired if there
-         * is someting to commit by the version manager.
+         * is something to commit by the version manager.
          * For further information see JCR-335 and JCR-962.
          */
         txResources = new InternalXAResource[] {
             versionMgr.getXAResourceBegin(),
-            stateMgr, lockMgr, versionMgr,
+            versionMgr, stateMgr, lockMgr,
             versionMgr.getXAResourceEnd()
         };
         stateMgr.setVirtualProvider(versionMgr);

Modified: jackrabbit/branches/1.5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java?rev=718203&r1=718202&r2=718203&view=diff
==============================================================================
--- jackrabbit/branches/1.5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java
(original)
+++ jackrabbit/branches/1.5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java
Mon Nov 17 01:04:45 2008
@@ -16,43 +16,45 @@
  */
 package org.apache.jackrabbit.core.cluster;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import java.io.File;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.jcr.RepositoryException;
+
 import org.apache.commons.io.FileUtils;
+import org.apache.jackrabbit.core.NodeId;
+import org.apache.jackrabbit.core.cluster.WorkspaceRecord.CreateWorkspaceAction;
 import org.apache.jackrabbit.core.config.ClusterConfig;
 import org.apache.jackrabbit.core.config.ConfigurationException;
 import org.apache.jackrabbit.core.config.JournalConfig;
-import org.apache.jackrabbit.core.NodeId;
 import org.apache.jackrabbit.core.journal.AbstractJournal;
+import org.apache.jackrabbit.core.journal.InstanceRevision;
 import org.apache.jackrabbit.core.journal.Journal;
-import org.apache.jackrabbit.core.journal.RecordConsumer;
-import org.apache.jackrabbit.core.journal.Record;
 import org.apache.jackrabbit.core.journal.JournalException;
-import org.apache.jackrabbit.core.journal.InstanceRevision;
+import org.apache.jackrabbit.core.journal.Record;
+import org.apache.jackrabbit.core.journal.RecordConsumer;
 import org.apache.jackrabbit.core.journal.RecordProducer;
 import org.apache.jackrabbit.core.nodetype.InvalidNodeTypeDefException;
 import org.apache.jackrabbit.core.nodetype.NodeTypeDef;
 import org.apache.jackrabbit.core.state.ChangeLog;
+import org.apache.jackrabbit.core.xml.ClonedInputSource;
 import org.apache.jackrabbit.uuid.UUID;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import EDU.oswego.cs.dl.util.concurrent.Latch;
 import EDU.oswego.cs.dl.util.concurrent.Mutex;
 
-import javax.jcr.RepositoryException;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Collection;
-
 /**
  * Default clustered node implementation.
  */
 public class ClusterNode implements Runnable,
         NamespaceEventChannel, NodeTypeEventChannel, RecordConsumer,
-        ClusterRecordProcessor  {
+        ClusterRecordProcessor, WorkspaceEventChannel  {
 
     /**
      * System property specifying a node id to use.
@@ -70,11 +72,6 @@
     private static final String PRODUCER_ID = "JR";
 
     /**
-     * Default stop delay.
-     */
-    private static final long DEFAULT_STOP_DELAY = 5000;
-
-    /**
      * Status constant.
      */
     private static final int NONE = 0;
@@ -160,6 +157,11 @@
     private NamespaceEventListener namespaceListener;
 
     /**
+     * Create workspace listener
+     */
+    private WorkspaceListener createWorkspaceListener;
+    
+    /**
      * Node type listener.
      */
     private NodeTypeEventListener nodeTypeListener;
@@ -939,6 +941,58 @@
         }
     }
 
+    public void process(WorkspaceRecord record) {
+        if (createWorkspaceListener == null) {
+            String msg = "Create Workspace listener unavailable.";
+            log.error(msg);
+            return;
+        }
+        try {
+            if (record.getActionType() == WorkspaceRecord.CREATE_WORKSPACE_ACTION_TYPE) {
+                CreateWorkspaceAction action = record.getCreateWorkspaceAction();
+                createWorkspaceListener.externalWorkspaceCreated(record.getWorkspace(), action.getInputSource());
+            }
+        } catch (RepositoryException e) {
+            String msg = "Unable to create workspace: "
+                    + e.getMessage();
+            log.error(msg);
+        }
+    }
+
+    // -----------------------------------------------< CreateWorkspaceChannel >
+
+    public void setListener(WorkspaceListener listener) {
+        createWorkspaceListener = listener;
+    }
+
+    public void workspaceCreated(String workspaceName,
+            ClonedInputSource inputSource) {
+        if (status != STARTED) {
+            log.info("not started: namespace operation ignored.");
+            return;
+        }
+        ClusterRecord record = null;
+        boolean succeeded = false;
+
+        try {
+            record = new WorkspaceRecord(workspaceName, inputSource, producer.append());
+            record.write();
+            record.update();
+            setRevision(record.getRevision());
+            succeeded = true;
+        } catch (JournalException e) {
+            String msg = "Unable to create log entry: " + e.getMessage();
+            log.error(msg);
+        } catch (Throwable e) {
+            String msg = "Unexpected error while creating log entry.";
+            log.error(msg, e);
+        } finally {
+            if (!succeeded && record != null) {
+                record.cancelUpdate();
+            }
+        }
+    }
+
     /**
      * Invoked when a cluster operation has ended. If <code>successful</code>,
      * attempts to fill the journal record and update it, otherwise cancels

Modified: jackrabbit/branches/1.5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterRecordDeserializer.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterRecordDeserializer.java?rev=718203&r1=718202&r2=718203&view=diff
==============================================================================
--- jackrabbit/branches/1.5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterRecordDeserializer.java
(original)
+++ jackrabbit/branches/1.5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterRecordDeserializer.java
Mon Nov 17 01:04:45 2008
@@ -55,6 +55,10 @@
             clusterRecord = new NodeTypeRecord(record);
             clusterRecord.read();
             break;
+        case WorkspaceRecord.IDENTIFIER:
+            clusterRecord = new WorkspaceRecord(record);
+            clusterRecord.read();
+            break;
         case ClusterRecord.END_MARKER:
             // JCR-1813: Invalid journal records during XATransactions
             // Some journal records may be empty due to JCR-1813 and other

Modified: jackrabbit/branches/1.5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterRecordProcessor.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterRecordProcessor.java?rev=718203&r1=718202&r2=718203&view=diff
==============================================================================
--- jackrabbit/branches/1.5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterRecordProcessor.java
(original)
+++ jackrabbit/branches/1.5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterRecordProcessor.java
Mon Nov 17 01:04:45 2008
@@ -52,4 +52,11 @@
      * @param record node type record
      */
     public void process(NodeTypeRecord record);
+
+    /**
+     * Process a workspace record
+     * @param record workspace record
+     */
+    public void process(WorkspaceRecord record);
+
 }

Modified: jackrabbit/branches/1.5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/config/RepositoryConfig.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/config/RepositoryConfig.java?rev=718203&r1=718202&r2=718203&view=diff
==============================================================================
--- jackrabbit/branches/1.5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/config/RepositoryConfig.java
(original)
+++ jackrabbit/branches/1.5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/config/RepositoryConfig.java
Mon Nov 17 01:04:45 2008
@@ -23,6 +23,7 @@
 import org.apache.jackrabbit.core.fs.FileSystemException;
 import org.apache.jackrabbit.core.fs.FileSystemFactory;
 import org.apache.jackrabbit.core.fs.FileSystemPathUtil;
+import org.apache.jackrabbit.core.xml.ClonedInputSource;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.w3c.dom.Element;
@@ -45,6 +46,8 @@
 import java.io.InputStreamReader;
 import java.io.OutputStreamWriter;
 import java.io.Reader;
+import java.io.StringReader;
+import java.io.StringWriter;
 import java.io.Writer;
 import java.net.URI;
 import java.util.Collection;
@@ -340,7 +343,7 @@
                         + "for default workspace: " + defaultWorkspace);
             }
             // create initial default workspace
-            createWorkspaceConfig(defaultWorkspace);
+            createWorkspaceConfig(defaultWorkspace, (StringBuffer)null);
         }
     }
 
@@ -460,12 +463,15 @@
      *
      * @param name workspace name
      * @param template the workspace template
+     * @param configContent optional stringbuffer that will have the content
+     *        of workspace configuration file written in
      * @return created workspace configuration
      * @throws ConfigurationException if creating the workspace configuration
      *                                failed
      */
     private synchronized WorkspaceConfig internalCreateWorkspaceConfig(String name,
-                                                                       Element template)
+                                                                       Element template,
+                                                                       StringBuffer configContent)
             throws ConfigurationException {
 
         // The physical workspace home directory on disk (TODO encode name?)
@@ -511,6 +517,7 @@
                 try {
                     // Create the directory
                     virtualFS.createFolder(configDir);
+
                     configWriter = new OutputStreamWriter(
                             virtualFS.getOutputStream(configFile));
                 } catch (FileSystemException e) {
@@ -537,8 +544,25 @@
                 TransformerFactory factory = TransformerFactory.newInstance();
                 Transformer transformer = factory.newTransformer();
                 transformer.setOutputProperty(OutputKeys.INDENT, "yes");
-                transformer.transform(
-                        new DOMSource(template), new StreamResult(configWriter));
+
+                if (configContent == null)
+                {
+                    transformer.transform(
+                            new DOMSource(template), new StreamResult(configWriter));
+                }
+                else
+                {
+                    StringWriter writer = new StringWriter();
+                    transformer.transform(
+                            new DOMSource(template), new StreamResult(writer));
+
+                    String s = writer.getBuffer().toString();
+                    configWriter.write(s);
+                    configContent.append(s);
+                }
+            } catch (IOException e) {
+                throw new ConfigurationException(
+                        "Cannot create a workspace configuration file", e);
             } catch (TransformerConfigurationException e) {
                 throw new ConfigurationException(
                         "Cannot create a workspace configuration writer", e);
@@ -585,14 +609,16 @@
      * the caller.
      *
      * @param name workspace name
+     * @param configContent optional StringBuffer that will have the content
+     *        of workspace configuration file written in
      * @return created workspace configuration
      * @throws ConfigurationException if creating the workspace configuration
      *                                failed
      */
-    public WorkspaceConfig createWorkspaceConfig(String name)
+    public WorkspaceConfig createWorkspaceConfig(String name, StringBuffer configContent)
             throws ConfigurationException {
         // use workspace template from repository.xml
-        return internalCreateWorkspaceConfig(name, template);
+        return internalCreateWorkspaceConfig(name, template, configContent);
     }
 
     /**
@@ -618,7 +644,7 @@
             throws ConfigurationException {
         ConfigurationParser parser = new ConfigurationParser(new Properties());
         Element workspaceTemplate = parser.parseXML(template);
-        return internalCreateWorkspaceConfig(name, workspaceTemplate);
+        return internalCreateWorkspaceConfig(name, workspaceTemplate, null);
     }
 
     /**

Modified: jackrabbit/branches/1.5/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/config/RepositoryConfigTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.5/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/config/RepositoryConfigTest.java?rev=718203&r1=718202&r2=718203&view=diff
==============================================================================
--- jackrabbit/branches/1.5/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/config/RepositoryConfigTest.java
(original)
+++ jackrabbit/branches/1.5/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/config/RepositoryConfigTest.java
Mon Nov 17 01:04:45 2008
@@ -220,7 +220,7 @@
     public void testCreateWorkspaceConfig() throws Exception {
         RepositoryConfig config =
             RepositoryConfig.create(REPOSITORY_XML, REPOSITORY_HOME);
-        config.createWorkspaceConfig("test-workspace");
+        config.createWorkspaceConfig("test-workspace", (StringBuffer)null);
         File workspaces_dir = new File(REPOSITORY_HOME, "workspaces");
         File workspace_dir = new File(workspaces_dir, "test-workspace");
         File workspace_xml = new File(workspace_dir, "workspace.xml");
@@ -231,7 +231,7 @@
         try {
             RepositoryConfig config =
                 RepositoryConfig.create(REPOSITORY_XML, REPOSITORY_HOME);
-            config.createWorkspaceConfig("default");
+            config.createWorkspaceConfig("default", (StringBuffer)null);
             fail("No exception thrown when creating a duplicate workspace");
         } catch (ConfigurationException e) {
             // test passed



Mime
View raw message