Hi Luciano,

I have created TUSCANY-1477 for the issue.

Here is another situation I am running into.
Step 0: Create an EmbeddedSCADomain.
Step 1: Add contribution from contribution1.jar (which provides say
"Service1") to EmbeddedSCADomain from Step 0.
Step 2: Call EmbeddedSCADomain.DomainCompositeHelper.activateDomain()
Step 3: Call EmbeddedSCADomain.DomainCompositeHelper.startComponent() on all
componets from contribution1.jar.
Step 4: Add contribution from contribution2.jar (which provides say
"Service2") to EmbeddedSCADomain from Step 0.
Step 5: Call EmbeddedSCADomain.DomainCompositeHelper.activateDomain()
Step 6: Call EmbeddedSCADomain.DomainCompositeHelper.startComponent() on all
componets from contribution2.jar.

After Step 3, I am able to run Service1 successfully.  At Step 5, I get a
message like the following:
"Composite assembly problem: Service not found for component service:
CalculatorServiceComponent/$promoted$.CalculatorService"

After Step 6, Service1 no longer runs, where as Service2 runs successfully.

Am I doing anything wrong in using EmbeddedSCADomain?  Can additional
contribution be added to an EmbeddedSCADomain after it has been activated
without disrupting the existing services?

contribution1.jar and contribution2.jar are similar except that I add a "2"
to each component name and the composite name.

Thanks and regards,
Vamsi

On 7/24/07, Luciano Resende <[EMAIL PROTECTED]> wrote:

Yes, you are right, could you please create a JIRA. If you are
comfortable, it would be great if you could also help on the fix by
producing a patch, otherwise I'll investigate the issue.

On 7/23/07, Vamsavardhana Reddy <[EMAIL PROTECTED]> wrote:
> Hi Luciano,
>
> Thank you for your reply.  It was very helpful.
>
> I am seeing another problem and this is with removing components and
> composites from EmbeddedSCADomain.  I have called
> eScaDomain.getDomainCompositeHelper().stopComponent(
> eScaDomain.getDomainCompositeHelper().getComponent(component.getName()))
> with all the component names in my composite and then
> eScaDomain.getDomainCompositeHelper().removeComposite().  I am noticing
that
> the components are not getting removed from
> EmbeddedSCADomain.domainComposite.
> EmbeddedSCADomain.DomainCompositeHelper.removeComposite() is calling
> compositeActivator.deactivate().  But CompositeActivatorImpl.deactivate()
is
> empty.  Is there any other method to remove the components and composite
> added to EmbeddedSCADomain?  Your input will be very helpful.  Thank you
for
> your time.
>
> Best regards,
> Vamsi
>
> On 7/23/07, Luciano Resende <[EMAIL PROTECTED]> wrote:
> >
> > When using EmbeddedSCADomain, this is the expected behavior, activate
> > would include in the domain, and then you would need to start/stop
> > specific components. See the following as an example [1]
> >
> > [1]
> >
https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/itest/contribution-import-export/test-import-composite/src/test/java/helloworld/HelloWorldServerTestCase.java
> >
> > On 7/23/07, Vamsavardhana Reddy <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > >
> > > I have the following piece of code to add contribution to an
> > > EmbeddedSCADomain:
> > >
> > > <snip>
> > >                 EmbeddedSCADomain eScaDomain = new
> > > EmbeddedSCADomain(classLoader, domainUri);
> > >                 ModelResolverImpl modelResolver = new
> > > ModelResolverImpl(classLoader);
> > >                 Contribution contribution =
> > > eScaDomain.getContributionService().contribute(contributionURI, new
> > > URL(contributionRoot), modelResolver, false);
> > >                 for (DeployedArtifact artifact :
> > contribution.getArtifacts())
> > > {
> > >                     if (artifact.getModel() instanceof Composite) {
> > >                         eScaDomain.getDomainCompositeHelper
> > > ().addComposite((Composite)artifact.getModel());
> > >                     }
> > >                 }
> > >                 eScaDomain.getDomainCompositeHelper
().activateDomain();
> > > </snip>
> > >
> > > Service lookup is fine.  But, service invocation is throwing a
> > > NullPointerException.  Upon debugging I notice that the references
> > inside
> > > the composite are not wired.  If I add a call
> > > compositeActivator.start(domainComposite)
> > > inside EmbeddedSCADomain.activateDomain() method , I am getting my
code
> > to
> > > run as expected.  I am wondering if there is a problem in
> > > EmbeddedSCADomain.activateDomain() method.
> > >
> > > Thanks and regards,
> > > Vamsi
> > >
> >
> >
> > --
> > Luciano Resende
> > Apache Tuscany Committer
> > http://people.apache.org/~lresende
> > http://lresende.blogspot.com/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>


--
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to