You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Greg Dritschler (JIRA)" <tu...@ws.apache.org> on 2008/03/31 15:56:25 UTC

[jira] Created: (TUSCANY-2171) binding.sca bindingType in definitions.xml not used if SCA binding is created during build phase

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


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/tuscany-dev@ws.apache.org/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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-2171) binding.sca bindingType in definitions.xml not used if SCA binding is created during build phase

Posted by "Jean-Sebastien Delfino (JIRA)" <tu...@ws.apache.org>.
    [ 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/tuscany-dev@ws.apache.org/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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Resolved: (TUSCANY-2171) binding.sca bindingType in definitions.xml not used if SCA binding is created during build phase

Posted by "Venkatakrishnan (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Venkatakrishnan resolved TUSCANY-2171.
--------------------------------------

    Resolution: Fixed

Fixed in r643489.

> 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/tuscany-dev@ws.apache.org/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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-2171) binding.sca bindingType in definitions.xml not used if SCA binding is created during build phase

Posted by "Venkatakrishnan (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-2171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12583714#action_12583714 ] 

Venkatakrishnan commented on TUSCANY-2171:
------------------------------------------

I've been trying to see how this can be done neatly but am only able to go as far as follows :-

- First users should not be able to override the 'bindingType' for a binding.  It comes with the definitions.xml that accompanies a binding extension.  The reason is that only a binding extension knows best what it always provides or may provide.

- The SCABinding extension provides a definitions.xml and in it the bindingtype definition as well.  During loading of this definitions.xml, I propose we (atleast for now) set the bindingType as a static field of SCABindingImpl.

Does that sound like a fix for now ?

> 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/tuscany-dev@ws.apache.org/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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Assigned: (TUSCANY-2171) binding.sca bindingType in definitions.xml not used if SCA binding is created during build phase

Posted by "Venkatakrishnan (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Venkatakrishnan reassigned TUSCANY-2171:
----------------------------------------

    Assignee: Venkatakrishnan

> 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/tuscany-dev@ws.apache.org/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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-2171) binding.sca bindingType in definitions.xml not used if SCA binding is created during build phase

Posted by "Venkatakrishnan (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-2171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12584039#action_12584039 ] 

Venkatakrishnan commented on TUSCANY-2171:
------------------------------------------

Yes, that sound cleaner.  Am going ahead with it.  Thanks Sebastien.

- Venkat

> 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/tuscany-dev@ws.apache.org/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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org