You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Gaël Lalire <ga...@gmail.com> on 2011/03/18 15:36:06 UTC
SCA 2.x (2.0-Beta2) : Use case on felix
Hello,
I try to work with tuscany deployed as bundles in felix.
There is a use case I would like to work :
- An implementation.OSGi component in a bundle.composite (CalculatorComposite) whose CalculatorService is promoted.
- A java component declared in another bundle.composite (CalculatorClient) which use the CalculatorService.
I work with 2.0-Beta2 version.
I notice that some maven artifact are not deployed in maven repo1, so I check out the svn tag sources.
I was unable to deploy the bundle tuscany-implementation-java without 2 (missing ?) imports : javax.xml.ws, javax.jws.soap.
In tuscany-node-impl-osgi, the DomainDiscoveryService class contains a commented test (instanceof OSGiImplementation) : why is it commented ?
Also updating a bundle cause a felix issue, indeed felix invalidate previous BundleContext so you it becomes unusable but a Listener in EndPointMatcher keep it (this may be a felix issue and it isn't blocking : a workaround is the felix restart).
So my first bundle exports "http://sample" namespace and my second bundle import it.
In my second bundle I specified following component
<component name="CalculatorComponentC">
<implementation.composite name="sample:CalculatorComposite" />
</component>
First error when the second bundle is deployed : the import cannot be resolved.
This error come from constructors of OSGiNodeFactoryImpl which call setNodeFactory but not factories.add(this). So the listing of all composites failed.
Now my new error is :
Caused by: org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: CalculatorComponentC, Composite: {http://sample}CalculatorComposite, Component: CalculatorComponent] - [ASM90005] The SCA binding CalculatorService on component CalculatorComponent service CalculatorService should not have a URI and the URI is currently set to /CalculatorComponentC/CalculatorComponent/CalculatorService
I don't know how I could fix it.
Do I make the right actions to make my use case working ?
If yes should I avoid the URI setter ? or is there deep work needed ?
Thanks,
Gael Lalire
Re: SCA 2.x (2.0-Beta2) : Use case on felix
Posted by Raymond Feng <en...@gmail.com>.
Thank you for reporting the issues. I'll try to find some time to look into them.
Raymond
________________________________________________________________
Raymond Feng
rfeng@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com
________________________________________________________________
On Mar 18, 2011, at 7:36 AM, Gaël Lalire wrote:
> Hello,
>
> I try to work with tuscany deployed as bundles in felix.
> There is a use case I would like to work :
> - An implementation.OSGi component in a bundle.composite (CalculatorComposite) whose CalculatorService is promoted.
> - A java component declared in another bundle.composite (CalculatorClient) which use the CalculatorService.
>
> I work with 2.0-Beta2 version.
> I notice that some maven artifact are not deployed in maven repo1, so I check out the svn tag sources.
> I was unable to deploy the bundle tuscany-implementation-java without 2 (missing ?) imports : javax.xml.ws, javax.jws.soap.
> In tuscany-node-impl-osgi, the DomainDiscoveryService class contains a commented test (instanceof OSGiImplementation) : why is it commented ?
> Also updating a bundle cause a felix issue, indeed felix invalidate previous BundleContext so you it becomes unusable but a Listener in EndPointMatcher keep it (this may be a felix issue and it isn't blocking : a workaround is the felix restart).
>
> So my first bundle exports "http://sample" namespace and my second bundle import it.
>
> In my second bundle I specified following component
>
> <component name="CalculatorComponentC">
> <implementation.composite name="sample:CalculatorComposite" />
> </component>
>
> First error when the second bundle is deployed : the import cannot be resolved.
> This error come from constructors of OSGiNodeFactoryImpl which call setNodeFactory but not factories.add(this). So the listing of all composites failed.
>
> Now my new error is :
>
> Caused by: org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: CalculatorComponentC, Composite: {http://sample}CalculatorComposite, Component: CalculatorComponent] - [ASM90005] The SCA binding CalculatorService on component CalculatorComponent service CalculatorService should not have a URI and the URI is currently set to /CalculatorComponentC/CalculatorComponent/CalculatorService
>
> I don't know how I could fix it.
> Do I make the right actions to make my use case working ?
> If yes should I avoid the URI setter ? or is there deep work needed ?
>
> Thanks,
> Gael Lalire