Index: modeshape-jcr/pom.xml
===================================================================
--- modeshape-jcr/pom.xml (revision 2009)
+++ modeshape-jcr/pom.xml (working copy)
@@ -63,6 +63,16 @@
Testing (note the scope)
-->
+ org.modeshape
+ modeshape-search-lucene
+ test
+
+
+ org.modeshape
+ modeshape-clustering
+ test
+
+
junit
junit
Index: modeshape-jcr/src/main/java/org/modeshape/jcr/JcrEngine.java
===================================================================
--- modeshape-jcr/src/main/java/org/modeshape/jcr/JcrEngine.java (revision 2009)
+++ modeshape-jcr/src/main/java/org/modeshape/jcr/JcrEngine.java (working copy)
@@ -91,7 +91,7 @@ public class JcrEngine extends ModeShapeEngine implements Repositories {
/**
* Clean up session-scoped locks created by session that are no longer active by iterating over the {@link JcrRepository
- * repositories} and calling their {@link JcrRepository#cleanUpLocks() clean-up method}.
+ * repositories} and calling their {@link RepositoryLockManager#cleanUpLocks() clean-up method}.
*
* It should not be possible for a session to be terminated without cleaning up its locks, but this method will help clean-up
* dangling locks should a session terminate abnormally.
@@ -110,7 +110,7 @@ public class JcrEngine extends ModeShapeEngine implements Repositories {
for (JcrRepository repository : repos) {
try {
- repository.cleanUpLocks();
+ repository.getRepositoryLockManager().cleanUpLocks();
} catch (Throwable t) {
log.error(t, JcrI18n.errorCleaningUpLocks, repository.getRepositorySourceName());
}
Index: modeshape-jcr/src/main/java/org/modeshape/jcr/JcrRepository.java
===================================================================
--- modeshape-jcr/src/main/java/org/modeshape/jcr/JcrRepository.java (revision 2009)
+++ modeshape-jcr/src/main/java/org/modeshape/jcr/JcrRepository.java (working copy)
@@ -30,6 +30,8 @@ import java.security.AccessControlContext;
import java.security.AccessControlException;
import java.security.AccessController;
import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
import java.util.Collections;
import java.util.EnumMap;
import java.util.HashMap;
@@ -40,8 +42,6 @@ import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.WeakHashMap;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
@@ -57,7 +57,6 @@ import javax.jcr.query.Query;
import javax.security.auth.Subject;
import javax.security.auth.login.Configuration;
import javax.security.auth.login.LoginContext;
-import net.jcip.annotations.GuardedBy;
import net.jcip.annotations.Immutable;
import net.jcip.annotations.ThreadSafe;
import org.modeshape.common.collection.UnmodifiableProperties;
@@ -69,8 +68,6 @@ import org.modeshape.graph.ExecutionContext;
import org.modeshape.graph.Graph;
import org.modeshape.graph.GraphI18n;
import org.modeshape.graph.JaasSecurityContext;
-import org.modeshape.graph.Location;
-import org.modeshape.graph.Node;
import org.modeshape.graph.SecurityContext;
import org.modeshape.graph.Subgraph;
import org.modeshape.graph.Workspace;
@@ -87,19 +84,16 @@ import org.modeshape.graph.connector.inmemory.InMemoryRepositorySource;
import org.modeshape.graph.observe.Changes;
import org.modeshape.graph.observe.Observable;
import org.modeshape.graph.observe.Observer;
-import org.modeshape.graph.property.DateTime;
-import org.modeshape.graph.property.DateTimeFactory;
import org.modeshape.graph.property.Name;
import org.modeshape.graph.property.NamespaceRegistry;
import org.modeshape.graph.property.Path;
import org.modeshape.graph.property.PathFactory;
-import org.modeshape.graph.property.PathNotFoundException;
import org.modeshape.graph.property.Property;
import org.modeshape.graph.property.PropertyFactory;
import org.modeshape.graph.property.ValueFactories;
-import org.modeshape.graph.property.ValueFactory;
import org.modeshape.graph.property.basic.GraphNamespaceRegistry;
import org.modeshape.graph.query.parse.QueryParsers;
+import org.modeshape.graph.request.ChangeRequest;
import org.modeshape.graph.request.InvalidWorkspaceException;
import org.modeshape.jcr.RepositoryQueryManager.PushDown;
import org.modeshape.jcr.api.Repository;
@@ -108,6 +102,8 @@ import org.modeshape.jcr.query.JcrQomQueryParser;
import org.modeshape.jcr.query.JcrSql2QueryParser;
import org.modeshape.jcr.query.JcrSqlQueryParser;
import org.modeshape.jcr.xpath.XPathQueryParser;
+import com.google.common.collect.LinkedListMultimap;
+import com.google.common.collect.Multimap;
/**
* Creates JCR {@link Session sessions} to an underlying repository (which may be a federated repository).
@@ -410,9 +406,7 @@ public class JcrRepository implements Repository {
private final ExecutionContext executionContext;
private final RepositoryConnectionFactory connectionFactory;
private final RepositoryNodeTypeManager repositoryTypeManager;
- @GuardedBy( "lockManagersLock" )
- private final ConcurrentMap lockManagers;
- private final Path locksPath;
+ private final RepositoryLockManager repositoryLockManager;
private final Map