summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/contribution/src
diff options
context:
space:
mode:
authoredwardsmj <edwardsmj@13f79535-47bb-0310-9956-ffa450edef68>2009-08-05 12:32:13 +0000
committeredwardsmj <edwardsmj@13f79535-47bb-0310-9956-ffa450edef68>2009-08-05 12:32:13 +0000
commit809fc112853dbc527ac7dd0d29a6caf0abe0cfd5 (patch)
tree688e22c6347f208fe7bc8117095d499cf61e2088 /java/sca/modules/contribution/src
parentbad730807dfc4325d486a499fd98e6e4df578cb5 (diff)
Add Contribution context information to Monitor during Resolve phase
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@801178 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/contribution/src')
-rw-r--r--java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/ContributionContentProcessor.java54
1 files changed, 30 insertions, 24 deletions
diff --git a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/ContributionContentProcessor.java b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/ContributionContentProcessor.java
index 4e075fea24..d651393e78 100644
--- a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/ContributionContentProcessor.java
+++ b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/ContributionContentProcessor.java
@@ -215,30 +215,36 @@ public class ContributionContentProcessor implements ExtendedURLArtifactProcesso
public void resolve(Contribution contribution, ModelResolver resolver) throws ContributionResolveException {
- if( !preResolved ) preResolve( contribution, resolver);
- ModelResolver contributionResolver = contribution.getModelResolver();
-
- // Resolve all artifact models
- for (Artifact artifact : contribution.getArtifacts()) {
- Object model = artifact.getModel();
- if (model != null) {
- try {
- artifactProcessor.resolve(model, contributionResolver);
- } catch (Throwable e) {
- throw new ContributionResolveException(e);
- }
- }
- }
-
- // Resolve deployable composites
- List<Composite> deployables = contribution.getDeployables();
- for (int i = 0, n = deployables.size(); i < n; i++) {
- Composite deployable = deployables.get(i);
- Composite resolved = (Composite)contributionResolver.resolveModel(Composite.class, deployable);
- if (resolved != deployable) {
- deployables.set(i, resolved);
- }
- } // end for
+ try {
+ monitor.pushContext("Contribution: " + contribution.getURI());
+
+ if( !preResolved ) preResolve( contribution, resolver);
+ ModelResolver contributionResolver = contribution.getModelResolver();
+
+ // Resolve all artifact models
+ for (Artifact artifact : contribution.getArtifacts()) {
+ Object model = artifact.getModel();
+ if (model != null) {
+ try {
+ artifactProcessor.resolve(model, contributionResolver);
+ } catch (Throwable e) {
+ throw new ContributionResolveException(e);
+ }
+ }
+ }
+
+ // Resolve deployable composites
+ List<Composite> deployables = contribution.getDeployables();
+ for (int i = 0, n = deployables.size(); i < n; i++) {
+ Composite deployable = deployables.get(i);
+ Composite resolved = (Composite)contributionResolver.resolveModel(Composite.class, deployable);
+ if (resolved != deployable) {
+ deployables.set(i, resolved);
+ }
+ } // end for
+ } finally {
+ monitor.popContext();
+ } // end try
} // end method resolve
/**