On Thu, Aug 5, 2010 at 3:10 PM, Yang Lei <yl.yangle...@gmail.com> wrote:
>
> I was trying to use Deploper to load contribution and iterate the deployable
> composites' contents. The composite returned does not have any components
> returned. The only thing loaded is the composite name. I would like to
> understand how I should be using Deployer to get the composite with the
> right content.
>
> Thanks for advise.
>
>
> The following method is added in
> sample-contribution-binding-sca-calculator's CalculatorTestCase
>
> public void testDeployer() throws Exception{
>
> ExtensionPointRegistry registry =
>
> new DefaultExtensionPointRegistry();
>
> Deployer deployer =
>
> new DeployerImpl(registry);
>
> deployer.start();
>
> Monitor monitor = (Monitor)deployer.createMonitor();
>
> org.apache.tuscany.sca.contribution.Contribution contribution =
> deployer.loadContribution( new URI("ABC"),new URL(location), monitor);
>
> Composite composite = contribution.getDeployables().get(0);
>
> System.
>
> out.println("Compsite Name:"+composite);
>
> for (Component c: composite.getComponents())
>
> System.
>
> out.println(c.getName());
>
> }
>
> The output:
> Compsite Name:Composite (name={http://sample}Calculator)
> --
> Thanks. Yang.
>

How are you defining the deployable ? Do you have a sca-contribution.xml ?


-- 
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/

Reply via email to