[
https://issues.apache.org/jira/browse/TUSCANY-2010?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Simon Laws resolved TUSCANY-2010.
---------------------------------
Resolution: Fixed
Fix Version/s: (was: Java-SCA-Next)
Java-SCA-1.2
The root of the problem here is that for a hierarchy of assembly objects such as
Composite
Component
Service
BindingX
Composite
Service
BindingY
Component
Service
Binding
The CompositeConfigurationBuilder
1 - walks down the hierarchy calculating binding URIs as it goes
2 - resolves services such that implementation services are represented in the
components that they implement
the result in this case that BindingX is a direct reference to BindingY
3 - processes the services at the component level
The result of step 3 is that BindingY uri will be recalculated incorrectly when
BindingX uri is calculated. However step 3 is required if BindingX were
specified manually. So I've put a test in that skips the uri calculation if
BindingX and BindingY are the same object
Simon
> Default binding URI for service from Composite impl component is incorrect
> --------------------------------------------------------------------------
>
> Key: TUSCANY-2010
> URL: https://issues.apache.org/jira/browse/TUSCANY-2010
> Project: Tuscany
> Issue Type: Bug
> Components: Java SCA Assembly Model
> Affects Versions: Java-SCA-1.0.1
> Reporter: Scott Kurz
> Assignee: Simon Laws
> Priority: Minor
> Fix For: Java-SCA-1.2
>
>
> Consider the following two SCDL files, a top-level SCDL with a component
> implemented in a 2nd SCDL file:
> <!-- top-level SCDL excerpt -->
> <component name="MultiplyComponent">
> <implementation.composite name="multiply:MultiplyComposite"/>
> </component>
> <!-- composite impl SCDL excerpt -->
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
> name="MultiplyComposite">
> <service name="MultiplyService"
> promote="InnerMultiplyComponent/MultiplyService">
> <interface.java ..../>
> </service>
> <component name="InnerMultiplyComponent">
> <implementation.java... />
> </component>
> </composite>
> It seems that, based on the current CompositeConfigurationBuilderImpl.java
> code in the assembly module, I am going to end up with an effective default
> binding URI of "MultiplyComponent/MultiplyComponent" instead of simply the
> correct "MultiplyComponent".
> It seems like one fix is to change this segment:
> // around line 109
> Implementation implementation = component.getImplementation();
> if (implementation instanceof Composite) {
> // Process nested composite
> // configureComponents((Composite)implementation,
> componentURI); //PROBLEM
> configureComponents((Composite)implementation, null);
> //SEEMS TO WORK
> }
> However, I'm not sure if I'm giving this the thought this deserves. For
> example I see Sebastien made a change in r592270 and I'm not sure why.
> Maybe there's a better solution. Could we possibly want to, in some cases,
> do something like:
> URI.create(String).relativize(URI.create(String))
> in one or more case where we now do:
> URI.create(String).resolve(String)
> ?
> Just throwing that out there....
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]