diff options
Diffstat (limited to 'java/sca/modules/node-api/src')
-rw-r--r-- | java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java b/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java index 94df876a31..7f87fb950e 100644 --- a/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java +++ b/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java @@ -369,10 +369,13 @@ public abstract class NodeFactory extends DefaultNodeConfigurationFactory { Contribution[] contributions = getContributions(locations); return createNode(contributions); } - + + private volatile static int count =0; private NodeConfiguration createConfiguration(Contribution... contributions) { NodeConfigurationFactory factory = this; NodeConfiguration configuration = factory.createNodeConfiguration(); + // Make sure a unique node URI is created for the same node factory + configuration.setURI(Node.DEFAULT_NODE_URI+(count++)); if (contributions != null) { for (Contribution c : contributions) { configuration.addContribution(c.getURI(), c.getLocation()); |