diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2009-07-22 20:28:03 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2009-07-22 20:28:03 +0000 |
commit | ecf9531818c689e51c9354902f35572e0becef31 (patch) | |
tree | 82b5188494c3b8be0b506a4b06cb6ce83f129908 /java/sca/modules/assembly/src | |
parent | 396bdfd297b947cb7c665cecda3d9ef01948554e (diff) |
TUSCANY-3150 TUSCANY-3176 updates to show how we can accumulate context and how we can make the code simpler in terms of introducing the monitor to a module. I would like to think there is a more automatic way of determining the bundle name.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@796871 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/assembly/src')
-rw-r--r-- | java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferenceWireBuilderImpl.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferenceWireBuilderImpl.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferenceWireBuilderImpl.java index 35876fa01f..dd62cbb11a 100644 --- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferenceWireBuilderImpl.java +++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferenceWireBuilderImpl.java @@ -66,6 +66,8 @@ public class ComponentReferenceWireBuilderImpl extends BaseBuilderImpl implement */ protected void wireComponentReferences(Composite composite, Monitor monitor) { + monitor.pushContext(composite.getName().toString()); + // Wire nested composites recursively for (Component component : composite.getComponents()) { Implementation implementation = component.getImplementation(); @@ -108,7 +110,14 @@ public class ComponentReferenceWireBuilderImpl extends BaseBuilderImpl implement componentReference.getName()); } } else { - warning(monitor, "TooManyReferenceTargets", composite, componentReference.getName()); +// --------------------------- +// TUSCANY-3132 first example of updated error handling + Monitor.error(monitor, + this, + "assembly-validation-messages", + "TooManyReferenceTargets", + componentReference.getName()); +// --------------------------- } } } @@ -118,6 +127,8 @@ public class ComponentReferenceWireBuilderImpl extends BaseBuilderImpl implement // for (ComponentReference componentReference : componentReferences.values()) { // componentReference.getTargets().clear(); // } + + monitor.popContext(); } /** |