diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2010-02-08 21:36:46 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2010-02-08 21:36:46 +0000 |
commit | fd207779a42554d576f6b4a587249446fc992bae (patch) | |
tree | dce7855e635b5c7fca7381f12c5b233199e1e1a7 /sca-java-2.x/trunk/modules/node-impl/src/main | |
parent | f740fbe6c1b14f5accb0d32482f078f0db6142f3 (diff) |
Generate unique Node URI if it's not set in the NodeConfiguration
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@907810 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/node-impl/src/main')
-rw-r--r-- | sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java b/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java index 4f4c3ba123..7b8e20c2c1 100644 --- a/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java +++ b/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java @@ -108,6 +108,10 @@ public class NodeFactoryImpl extends NodeFactory { @Override public Node createNode(NodeConfiguration configuration) { + if (configuration.getURI() == null) { + // Make sure a unique node URI is created for the same node factory + configuration.setURI(generateNodeURI()); + } return new NodeImpl(this, configuration); } |