[
https://issues.apache.org/jira/browse/TUSCANY-2171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12583772#action_12583772
]
Jean-Sebastien Delfino commented on TUSCANY-2171:
-------------------------------------------------
A simpler fix is to pass the Definitions model object to the builder and then
look for the BindingType of the SCABinding in that Definitions object.
There is no need to create a proxy to an unresolved BindingType model object
and then try to resolve it later in your scenario. That kind of deferred
resolution is only relevant at read time when the SCA artifacts being read are
presented in a random order and you need to defer the resolution of references
to objects that have not been read yet...
In your case here, everything including BindingTypes has been read way before,
you just need to pass that Definitions model to the builder so that it can get
the correct BindingType for the SCABinding from it and point to it.
Hope this helps.
> binding.sca bindingType in definitions.xml not used if SCA binding is created
> during build phase
> ------------------------------------------------------------------------------------------------
>
> Key: TUSCANY-2171
> URL: https://issues.apache.org/jira/browse/TUSCANY-2171
> Project: Tuscany
> Issue Type: Bug
> Components: Java SCA Core Runtime
> Affects Versions: Java-SCA-1.0.1
> Reporter: Greg Dritschler
> Assignee: Venkatakrishnan
>
> I have a definitions.xml file which defines a bindingType for binding.sca.
> <bindingType type="sca:binding.sca" mayProvide="propagatesTransaction"/>
> I have a composite which uses an intent on a reference.
> <reference name="daService" target="DataAccessComponent"
> requires="propagatesTransaction"/>
> The reference does not have a <binding.sca> element. In this case the
> binding model object is created by
> CompositeConfigurationBuilderImpl.createSCABinding() which is shown below.
> private SCABinding createSCABinding() {
> SCABinding scaBinding = scaBindingFactory.createSCABinding();
> IntentAttachPointType bindingType =
> intentAttachPointTypeFactory.createBindingType();
> bindingType.setName(BINDING_SCA_QNAME);
> bindingType.setUnresolved(true);
> ((PolicySetAttachPoint)scaBinding).setType(bindingType);
> return scaBinding;
> }
> This method creates an IntentAttachPointType which is unresolved. There is
> no code to resolve the IntentAttachPointType to the "real" one. As a result
> the PolicyComputer uses the unresolved IntentAttachPointType model and does
> not realize that binding.sca provides the intent needed by the reference.
> Discussed on tuscany-dev here:
> http://www.mail-archive.com/[email protected]/msg28903.html
--
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]