Return-Path: X-Original-To: apmail-tuscany-commits-archive@www.apache.org Delivered-To: apmail-tuscany-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F26BD4213 for ; Mon, 6 Jun 2011 12:37:25 +0000 (UTC) Received: (qmail 36334 invoked by uid 500); 6 Jun 2011 12:37:25 -0000 Delivered-To: apmail-tuscany-commits-archive@tuscany.apache.org Received: (qmail 36316 invoked by uid 500); 6 Jun 2011 12:37:25 -0000 Mailing-List: contact commits-help@tuscany.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tuscany.apache.org Delivered-To: mailing list commits@tuscany.apache.org Received: (qmail 36309 invoked by uid 99); 6 Jun 2011 12:37:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Jun 2011 12:37:25 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Jun 2011 12:37:24 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id D56042388A19; Mon, 6 Jun 2011 12:37:04 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1132612 - /tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java Date: Mon, 06 Jun 2011 12:37:04 -0000 To: commits@tuscany.apache.org From: antelder@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110606123704.D56042388A19@eris.apache.org> Author: antelder Date: Mon Jun 6 12:37:04 2011 New Revision: 1132612 URL: http://svn.apache.org/viewvc?rev=1132612&view=rev Log: Add a method to the DomainRegistry to get the contribution uri for the composite taht contains a running component Modified: tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java Modified: tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java?rev=1132612&r1=1132611&r2=1132612&view=diff ============================================================================== --- tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java (original) +++ tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java Mon Jun 6 12:37:04 2011 @@ -37,10 +37,10 @@ import org.apache.tuscany.sca.core.Exten import org.apache.tuscany.sca.core.LifeCycleListener; import org.apache.tuscany.sca.core.UtilityExtensionPoint; import org.apache.tuscany.sca.runtime.BaseDomainRegistry; +import org.apache.tuscany.sca.runtime.ContributionDescription; import org.apache.tuscany.sca.runtime.ContributionListener; import org.apache.tuscany.sca.runtime.DomainRegistry; import org.apache.tuscany.sca.runtime.EndpointListener; -import org.apache.tuscany.sca.runtime.ContributionDescription; import org.apache.tuscany.sca.runtime.RuntimeProperties; /** @@ -253,4 +253,16 @@ public class DomainRegistryImpl extends // TODO or should it just ensure the member name is LocalOnly and the run the command locally? throw new IllegalStateException("not supportted for " + LOCAL_MEMBER_NAME); } + + @Override + public String getContainingCompositesContributionURI(String componentName) { + for (Map cs : runningComposites.values()) { + for (Composite c : cs.values()) { + if (c.getComponent(componentName) != null) { + return c.getContributionURI(); + } + } + } + return null; + } }