You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by md...@apache.org on 2010/08/26 12:11:03 UTC
svn commit: r989584 - in /jackrabbit/trunk/test/performance:
base/src/main/java/org/apache/jackrabbit/performance/
jackrabbit22/src/test/resources/
Author: mduerig
Date: Thu Aug 26 10:11:03 2010
New Revision: 989584
URL: http://svn.apache.org/viewvc?rev=989584&view=rev
Log:
JCR-2727: Add user manager performance tests
Added:
jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/AddGroupMembersTest.java (with props)
jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/CreateUserTest.java (with props)
jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/GroupGetMembersTest.java (with props)
jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/GroupMemberLookupTest.java (with props)
jackrabbit/trunk/test/performance/jackrabbit22/src/test/resources/
jackrabbit/trunk/test/performance/jackrabbit22/src/test/resources/btree-usermanager-repository.xml (with props)
jackrabbit/trunk/test/performance/jackrabbit22/src/test/resources/default-usermanager-repository.xml (with props)
Modified:
jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/AbstractPerformanceTest.java
Modified: jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/AbstractPerformanceTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/AbstractPerformanceTest.java?rev=989584&r1=989583&r2=989584&view=diff
==============================================================================
--- jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/AbstractPerformanceTest.java (original)
+++ jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/AbstractPerformanceTest.java Thu Aug 26 10:11:03 2010
@@ -16,14 +16,6 @@
*/
package org.apache.jackrabbit.performance;
-import java.io.File;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.PrintWriter;
-import java.util.Arrays;
-
-import javax.jcr.SimpleCredentials;
-
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.io.output.FileWriterWithEncoding;
@@ -31,6 +23,14 @@ import org.apache.commons.math.stat.desc
import org.apache.jackrabbit.core.RepositoryImpl;
import org.apache.jackrabbit.core.config.RepositoryConfig;
+import javax.jcr.SimpleCredentials;
+
+import java.io.File;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.util.Arrays;
+
public abstract class AbstractPerformanceTest {
protected void testPerformance(String name) throws Exception {
@@ -83,6 +83,10 @@ public abstract class AbstractPerformanc
runTest(suite, new CreateManyChildNodesTest(), name);
runTest(suite, new UpdateManyChildNodesTest(), name);
runTest(suite, new TransientManyChildNodesTest(), name);
+ runTest(suite, new CreateUserTest(), name);
+ runTest(suite, new AddGroupMembersTest(), name);
+ runTest(suite, new GroupMemberLookupTest(), name);
+ runTest(suite, new GroupGetMembersTest(), name);
}
private void runTest(
Added: jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/AddGroupMembersTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/AddGroupMembersTest.java?rev=989584&view=auto
==============================================================================
--- jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/AddGroupMembersTest.java (added)
+++ jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/AddGroupMembersTest.java Thu Aug 26 10:11:03 2010
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.jackrabbit.performance;
+
+import org.apache.jackrabbit.api.JackrabbitSession;
+import org.apache.jackrabbit.api.security.user.Group;
+import org.apache.jackrabbit.api.security.user.User;
+import org.apache.jackrabbit.api.security.user.UserManager;
+
+import javax.jcr.Session;
+
+import java.security.Principal;
+
+public class AddGroupMembersTest extends AbstractTest {
+ private static final Principal GROUP_PRINCIPAL = new Principal() {
+ public String getName() {
+ return "test_group";
+ }
+ };
+
+ private Session session;
+ private UserManager userMgr;
+ private int userCount;
+ private Group group;
+ private User currentUser;
+
+ @Override
+ protected void beforeSuite() throws Exception {
+ session = getRepository().login(getCredentials());
+ userMgr = ((JackrabbitSession) session).getUserManager();
+ group = userMgr.createGroup(GROUP_PRINCIPAL);
+ }
+
+ @Override
+ protected void beforeTest() throws Exception {
+ currentUser = userMgr.createUser("user_" + userCount, "pass");
+ userCount++;
+ }
+
+ @Override
+ protected void runTest() throws Exception {
+ group.addMember(currentUser);
+ }
+
+ @Override
+ protected void afterSuite() throws Exception {
+ for (int k = 0; k < userCount; k++) {
+ userMgr.getAuthorizable("user_" + k).remove();
+ }
+ group.remove();
+ session.logout();
+ }
+
+}
Propchange: jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/AddGroupMembersTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/AddGroupMembersTest.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision Rev URL
Added: jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/CreateUserTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/CreateUserTest.java?rev=989584&view=auto
==============================================================================
--- jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/CreateUserTest.java (added)
+++ jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/CreateUserTest.java Thu Aug 26 10:11:03 2010
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.jackrabbit.performance;
+
+import org.apache.jackrabbit.api.JackrabbitSession;
+import org.apache.jackrabbit.api.security.user.UserManager;
+
+import javax.jcr.Session;
+
+public class CreateUserTest extends AbstractTest {
+ private Session session;
+ private UserManager userMgr;
+ private int userCount;
+
+ @Override
+ protected void beforeSuite() throws Exception {
+ session = getRepository().login(getCredentials());
+ userMgr = ((JackrabbitSession) session).getUserManager();
+ }
+
+ @Override
+ protected void runTest() throws Exception {
+ userMgr.createUser("user_" + userCount, "pass");
+ userCount++;
+ }
+
+ @Override
+ protected void afterSuite() throws Exception {
+ for (int k = 0; k < userCount; k++) {
+ userMgr.getAuthorizable("user_" + k).remove();
+ }
+ session.logout();
+ }
+
+}
Propchange: jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/CreateUserTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/CreateUserTest.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision Rev URL
Added: jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/GroupGetMembersTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/GroupGetMembersTest.java?rev=989584&view=auto
==============================================================================
--- jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/GroupGetMembersTest.java (added)
+++ jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/GroupGetMembersTest.java Thu Aug 26 10:11:03 2010
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.jackrabbit.performance;
+
+import org.apache.jackrabbit.api.JackrabbitSession;
+import org.apache.jackrabbit.api.security.user.Group;
+import org.apache.jackrabbit.api.security.user.UserManager;
+
+import javax.jcr.Session;
+
+import java.security.Principal;
+import java.util.Iterator;
+
+public class GroupGetMembersTest extends AbstractTest {
+ private static int USER_COUNT = 2000;
+ private static final Principal GROUP_PRINCIPAL = new Principal() {
+ public String getName() {
+ return "test_group";
+ }
+ };
+
+ private Session session;
+ private UserManager userMgr;
+ private Group group;
+
+ @Override
+ protected void beforeSuite() throws Exception {
+ session = getRepository().login(getCredentials());
+ userMgr = ((JackrabbitSession) session).getUserManager();
+ group = userMgr.createGroup(GROUP_PRINCIPAL);
+ for (int k = 0; k < USER_COUNT; k++) {
+ group.addMember(userMgr.createUser("user_" + k, "pass"));
+ }
+ }
+
+ @Override
+ protected void runTest() throws Exception {
+ Iterator<?> members = group.getMembers();
+
+ // Iterate half way through the list should show differences
+ // between lazy and eager iterators returned from getMembers
+ for (int k = 0; k < USER_COUNT/2; k++) {
+ members.next();
+ }
+ }
+
+ @Override
+ protected void afterSuite() throws Exception {
+ for (int k = 0; k < USER_COUNT; k++) {
+ userMgr.getAuthorizable("user_" + k).remove();
+ }
+ group.remove();
+ session.logout();
+ }
+
+}
Propchange: jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/GroupGetMembersTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/GroupGetMembersTest.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision Rev URL
Added: jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/GroupMemberLookupTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/GroupMemberLookupTest.java?rev=989584&view=auto
==============================================================================
--- jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/GroupMemberLookupTest.java (added)
+++ jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/GroupMemberLookupTest.java Thu Aug 26 10:11:03 2010
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.jackrabbit.performance;
+
+import org.apache.jackrabbit.api.JackrabbitSession;
+import org.apache.jackrabbit.api.security.user.Authorizable;
+import org.apache.jackrabbit.api.security.user.Group;
+import org.apache.jackrabbit.api.security.user.UserManager;
+
+import javax.jcr.Session;
+
+import java.security.Principal;
+import java.util.Random;
+
+public class GroupMemberLookupTest extends AbstractTest {
+ private static int USER_COUNT = 2000;
+ private static final Principal GROUP_PRINCIPAL = new Principal() {
+ public String getName() {
+ return "test_group";
+ }
+ };
+
+ private final Random rng = new Random();
+
+ private Session session;
+ private UserManager userMgr;
+ private Group group;
+ private Authorizable user;
+
+ @Override
+ protected void beforeSuite() throws Exception {
+ session = getRepository().login(getCredentials());
+ userMgr = ((JackrabbitSession) session).getUserManager();
+ group = userMgr.createGroup(GROUP_PRINCIPAL);
+ for (int k = 0; k < USER_COUNT; k++) {
+ group.addMember(userMgr.createUser("user_" + k, "pass"));
+ }
+ }
+
+ @Override
+ protected void beforeTest() throws Exception {
+ String id = "user_" + rng.nextInt(USER_COUNT);
+ user = userMgr.getAuthorizable(id);
+ }
+
+ @Override
+ protected void runTest() throws Exception {
+ group.isMember(user);
+ }
+
+ @Override
+ protected void afterSuite() throws Exception {
+ for (int k = 0; k < USER_COUNT; k++) {
+ userMgr.getAuthorizable("user_" + k).remove();
+ }
+ group.remove();
+ session.logout();
+ }
+
+}
Propchange: jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/GroupMemberLookupTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/GroupMemberLookupTest.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision Rev URL
Added: jackrabbit/trunk/test/performance/jackrabbit22/src/test/resources/btree-usermanager-repository.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/test/performance/jackrabbit22/src/test/resources/btree-usermanager-repository.xml?rev=989584&view=auto
==============================================================================
--- jackrabbit/trunk/test/performance/jackrabbit22/src/test/resources/btree-usermanager-repository.xml (added)
+++ jackrabbit/trunk/test/performance/jackrabbit22/src/test/resources/btree-usermanager-repository.xml Thu Aug 26 10:11:03 2010
@@ -0,0 +1,159 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+<!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 1.6//EN"
+ "http://jackrabbit.apache.org/dtd/repository-1.6.dtd">
+<!-- Example Repository Configuration File -->
+<Repository>
+ <!--
+ virtual file system where the repository stores global state
+ (e.g. registered namespaces, custom node types, etc.)
+ -->
+ <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+ <param name="path" value="${rep.home}/repository"/>
+ </FileSystem>
+
+ <!--
+ data store configuration
+ -->
+ <DataStore class="org.apache.jackrabbit.core.data.FileDataStore"/>
+ <!--
+ sample database data store configuration
+ <DataStore class="org.apache.jackrabbit.core.data.db.DbDataStore">
+ <param name="url" value="jdbc:h2:~/test"/>
+ <param name="user" value="sa"/>
+ <param name="password" value="sa"/>
+ </DataStore>
+ -->
+
+ <!--
+ repository lock mechanism configuration
+ <RepositoryLockMechanism class="org.apache.jackrabbit.core.util.CooperativeFileLock"/>
+ -->
+
+ <!--
+ security configuration
+ -->
+ <Security appName="Jackrabbit">
+ <!--
+ security manager:
+ class: FQN of class implementing the JackrabbitSecurityManager interface
+ -->
+ <SecurityManager class="org.apache.jackrabbit.core.DefaultSecurityManager" workspaceName="security">
+ <!-- <param name="config" value="${rep.home}/security.xml"/> -->
+ <UserManager class="org.apache.jackrabbit.core.security.user.UserManagerImpl">
+ <param name="groupMembershipSplitSize" value="25" />
+ </UserManager>
+ </SecurityManager>
+
+ <!--
+ access manager:
+ class: FQN of class implementing the AccessManager interface
+ -->
+ <AccessManager class="org.apache.jackrabbit.core.security.DefaultAccessManager">
+ <!-- <param name="config" value="${rep.home}/access.xml"/> -->
+ </AccessManager>
+
+ <LoginModule class="org.apache.jackrabbit.core.security.authentication.DefaultLoginModule">
+ <!--
+ anonymous user name ('anonymous' is the default value)
+ -->
+ <param name="anonymousId" value="anonymous"/>
+ <!--
+ administrator user id (default value if param is missing is 'admin')
+ -->
+ <param name="adminId" value="admin"/>
+ <!--
+ optional parameter 'principalProvider'.
+ the value refers to the class name of the PrincipalProvider implementation.
+ -->
+ <!-- <param name="principalProvider" value="..."/> -->
+ </LoginModule>
+ </Security>
+
+ <!--
+ location of workspaces root directory and name of default workspace
+ -->
+ <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default" maxIdleTime="2"/>
+ <!--
+ workspace configuration template:
+ used to create the initial workspace if there's no workspace yet
+ -->
+ <Workspace name="${wsp.name}">
+ <!--
+ virtual file system of the workspace:
+ class: FQN of class implementing the FileSystem interface
+ -->
+ <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+ <param name="path" value="${wsp.home}"/>
+ </FileSystem>
+ <!--
+ persistence manager of the workspace:
+ class: FQN of class implementing the PersistenceManager interface
+ -->
+ <PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.DerbyPersistenceManager">
+ <param name="url" value="jdbc:derby:${wsp.home}/db;create=true"/>
+ <param name="schemaObjectPrefix" value="${wsp.name}_"/>
+ </PersistenceManager>
+ <!--
+ Search index and the file system it uses.
+ class: FQN of class implementing the QueryHandler interface
+ -->
+ <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
+ <param name="path" value="${wsp.home}/index"/>
+ </SearchIndex>
+ </Workspace>
+
+ <!--
+ Configures the versioning
+ -->
+ <Versioning rootPath="${rep.home}/version">
+ <!--
+ Configures the filesystem to use for versioning for the respective
+ persistence manager
+ -->
+ <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+ <param name="path" value="${rep.home}/version" />
+ </FileSystem>
+
+ <!--
+ Configures the persistence manager to be used for persisting version state.
+ Please note that the current versioning implementation is based on
+ a 'normal' persistence manager, but this could change in future
+ implementations.
+ -->
+ <PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.DerbyPersistenceManager">
+ <param name="url" value="jdbc:derby:${rep.home}/version/db;create=true"/>
+ <param name="schemaObjectPrefix" value="version_"/>
+ </PersistenceManager>
+ </Versioning>
+
+ <!--
+ Search index for content that is shared repository wide
+ (/jcr:system tree, contains mainly versions)
+ -->
+ <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
+ <param name="path" value="${rep.home}/repository/index"/>
+ </SearchIndex>
+
+ <!--
+ Run with a cluster journal
+ -->
+ <Cluster id="node1">
+ <Journal class="org.apache.jackrabbit.core.journal.MemoryJournal"/>
+ </Cluster>
+</Repository>
Propchange: jackrabbit/trunk/test/performance/jackrabbit22/src/test/resources/btree-usermanager-repository.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: jackrabbit/trunk/test/performance/jackrabbit22/src/test/resources/default-usermanager-repository.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/test/performance/jackrabbit22/src/test/resources/default-usermanager-repository.xml?rev=989584&view=auto
==============================================================================
--- jackrabbit/trunk/test/performance/jackrabbit22/src/test/resources/default-usermanager-repository.xml (added)
+++ jackrabbit/trunk/test/performance/jackrabbit22/src/test/resources/default-usermanager-repository.xml Thu Aug 26 10:11:03 2010
@@ -0,0 +1,156 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+<!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 1.6//EN"
+ "http://jackrabbit.apache.org/dtd/repository-1.6.dtd">
+<!-- Example Repository Configuration File -->
+<Repository>
+ <!--
+ virtual file system where the repository stores global state
+ (e.g. registered namespaces, custom node types, etc.)
+ -->
+ <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+ <param name="path" value="${rep.home}/repository"/>
+ </FileSystem>
+
+ <!--
+ data store configuration
+ -->
+ <DataStore class="org.apache.jackrabbit.core.data.FileDataStore"/>
+ <!--
+ sample database data store configuration
+ <DataStore class="org.apache.jackrabbit.core.data.db.DbDataStore">
+ <param name="url" value="jdbc:h2:~/test"/>
+ <param name="user" value="sa"/>
+ <param name="password" value="sa"/>
+ </DataStore>
+ -->
+
+ <!--
+ repository lock mechanism configuration
+ <RepositoryLockMechanism class="org.apache.jackrabbit.core.util.CooperativeFileLock"/>
+ -->
+
+ <!--
+ security configuration
+ -->
+ <Security appName="Jackrabbit">
+ <!--
+ security manager:
+ class: FQN of class implementing the JackrabbitSecurityManager interface
+ -->
+ <SecurityManager class="org.apache.jackrabbit.core.DefaultSecurityManager" workspaceName="security">
+ <!-- <param name="config" value="${rep.home}/security.xml"/> -->
+ </SecurityManager>
+
+ <!--
+ access manager:
+ class: FQN of class implementing the AccessManager interface
+ -->
+ <AccessManager class="org.apache.jackrabbit.core.security.DefaultAccessManager">
+ <!-- <param name="config" value="${rep.home}/access.xml"/> -->
+ </AccessManager>
+
+ <LoginModule class="org.apache.jackrabbit.core.security.authentication.DefaultLoginModule">
+ <!--
+ anonymous user name ('anonymous' is the default value)
+ -->
+ <param name="anonymousId" value="anonymous"/>
+ <!--
+ administrator user id (default value if param is missing is 'admin')
+ -->
+ <param name="adminId" value="admin"/>
+ <!--
+ optional parameter 'principalProvider'.
+ the value refers to the class name of the PrincipalProvider implementation.
+ -->
+ <!-- <param name="principalProvider" value="..."/> -->
+ </LoginModule>
+ </Security>
+
+ <!--
+ location of workspaces root directory and name of default workspace
+ -->
+ <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default" maxIdleTime="2"/>
+ <!--
+ workspace configuration template:
+ used to create the initial workspace if there's no workspace yet
+ -->
+ <Workspace name="${wsp.name}">
+ <!--
+ virtual file system of the workspace:
+ class: FQN of class implementing the FileSystem interface
+ -->
+ <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+ <param name="path" value="${wsp.home}"/>
+ </FileSystem>
+ <!--
+ persistence manager of the workspace:
+ class: FQN of class implementing the PersistenceManager interface
+ -->
+ <PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.DerbyPersistenceManager">
+ <param name="url" value="jdbc:derby:${wsp.home}/db;create=true"/>
+ <param name="schemaObjectPrefix" value="${wsp.name}_"/>
+ </PersistenceManager>
+ <!--
+ Search index and the file system it uses.
+ class: FQN of class implementing the QueryHandler interface
+ -->
+ <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
+ <param name="path" value="${wsp.home}/index"/>
+ </SearchIndex>
+ </Workspace>
+
+ <!--
+ Configures the versioning
+ -->
+ <Versioning rootPath="${rep.home}/version">
+ <!--
+ Configures the filesystem to use for versioning for the respective
+ persistence manager
+ -->
+ <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+ <param name="path" value="${rep.home}/version" />
+ </FileSystem>
+
+ <!--
+ Configures the persistence manager to be used for persisting version state.
+ Please note that the current versioning implementation is based on
+ a 'normal' persistence manager, but this could change in future
+ implementations.
+ -->
+ <PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.DerbyPersistenceManager">
+ <param name="url" value="jdbc:derby:${rep.home}/version/db;create=true"/>
+ <param name="schemaObjectPrefix" value="version_"/>
+ </PersistenceManager>
+ </Versioning>
+
+ <!--
+ Search index for content that is shared repository wide
+ (/jcr:system tree, contains mainly versions)
+ -->
+ <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
+ <param name="path" value="${rep.home}/repository/index"/>
+ </SearchIndex>
+
+ <!--
+ Run with a cluster journal
+ -->
+ <Cluster id="node1">
+ <Journal class="org.apache.jackrabbit.core.journal.MemoryJournal"/>
+ </Cluster>
+</Repository>
Propchange: jackrabbit/trunk/test/performance/jackrabbit22/src/test/resources/default-usermanager-repository.xml
------------------------------------------------------------------------------
svn:eol-style = native