Index: dna-graph/src/main/java/org/jboss/dna/graph/connector/federation/FederatedRepositoryConnection.java =================================================================== --- dna-graph/src/main/java/org/jboss/dna/graph/connector/federation/FederatedRepositoryConnection.java (revision 1544) +++ dna-graph/src/main/java/org/jboss/dna/graph/connector/federation/FederatedRepositoryConnection.java (working copy) @@ -134,14 +134,18 @@ class FederatedRepositoryConnection implements RepositoryConnection { } protected boolean shouldProcessSynchronously( Request request ) { + if (request instanceof CompositeRequest) { + CompositeRequest composite = (CompositeRequest)request; + if (composite.size() == 1) return true; + // There is more than one request, and the JoinRequestProcessor needs to be able to run even if + // the ForkRequestProcessor is processing incoming requests. Normally this would work fine, + // but if the incoming request is a CompositeRequestChannel.CompositeRequest, the ForkRequestProcessor + // will block if the channel is still open. In a synchronous mode, this prevents the JoinRequestProcessor + // from completing the incoming requests. See DNA-616 for details. + return false; + } + // Otherwise, its just a single request ... return true; - // if (request instanceof CompositeRequest) { - // CompositeRequest composite = (CompositeRequest)request; - // if (composite.size() == 1) return true; - // return false; - // } - // // Otherwise, its just a single request ... - // return true; } /** Index: dna-graph/src/main/java/org/jboss/dna/graph/connector/federation/ForkRequestProcessor.java =================================================================== --- dna-graph/src/main/java/org/jboss/dna/graph/connector/federation/ForkRequestProcessor.java (revision 1544) +++ dna-graph/src/main/java/org/jboss/dna/graph/connector/federation/ForkRequestProcessor.java (working copy) @@ -611,7 +611,14 @@ class ForkRequestProcessor extends RequestProcessor { ReadNodeRequest placeholderRequest = new ReadNodeRequest(placeholder.location(), workspace.getName()); List children = new ArrayList(placeholder.children().size()); for (ProjectedNode child : placeholder.children()) { - children.add(child.location()); // the ProxyNodes will have only a path! + if (child instanceof ProxyNode) { + ProxyNode proxy = (ProxyNode)child; + children.add(proxy.federatedLocation()); // the ProxyNodes will have only a path! + proxy.federatedLocation(); + } else { + assert child instanceof PlaceholderNode; + children.add(child.location()); + } } placeholderRequest.addChildren(children); placeholderRequest.addProperties(placeholder.properties().values()); Index: dna-graph/src/main/java/org/jboss/dna/graph/connector/federation/JoinRequestProcessor.java =================================================================== --- dna-graph/src/main/java/org/jboss/dna/graph/connector/federation/JoinRequestProcessor.java (revision 1544) +++ dna-graph/src/main/java/org/jboss/dna/graph/connector/federation/JoinRequestProcessor.java (working copy) @@ -497,6 +497,17 @@ class JoinRequestProcessor extends RequestProcessor { return actual; } + protected Location determineActualLocation( Location actualInSource, + Projection projection ) { + assert projection != null; + // Get the projection from the source-specific location ... + Path pathInSource = actualInSource.getPath(); + for (Path path : projection.getPathsInRepository(pathInSource, pathFactory)) { + return actualInSource.with(path); + } + return actualInSource; + } + /** * {@inheritDoc} * @@ -657,6 +668,8 @@ class JoinRequestProcessor extends RequestProcessor { projectToFederated(actualLocation, projection, request, parent, children, properties); } Location locationOfProxy = readFromSource.getActualLocationOfNode(); + // The location is in terms of the source, so get the projected location ... + locationOfProxy = determineActualLocation(locationOfProxy, projection); actualLocationsOfProxyNodes.put(locationOfProxy.getPath(), locationOfProxy); } setCacheableInfo(request, fromSource.getCachePolicy()); Index: docs/examples/gettingstarted/pom.xml =================================================================== --- docs/examples/gettingstarted/pom.xml (revision 1544) +++ docs/examples/gettingstarted/pom.xml (working copy) @@ -10,7 +10,7 @@ sequencers - + repositories Index: docs/examples/gettingstarted/repositories/src/test/resources/log4j.properties =================================================================== --- docs/examples/gettingstarted/repositories/src/test/resources/log4j.properties (revision 1544) +++ docs/examples/gettingstarted/repositories/src/test/resources/log4j.properties (working copy) @@ -5,7 +5,7 @@ log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %m%n # Root logger option -log4j.rootLogger=WARNING, stdout +log4j.rootLogger=ERROR, stdout # Set up the default logging to be INFO level, then override specific units -log4j.logger.org.jboss.dna=WARNING +log4j.logger.org.jboss.dna=ERROR