OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

sca-assembly message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [sca-assembly] ISSUE 6: usage of not promoted references


 

+1 on all points.

 

Michael

 


From: Mike Edwards [mailto:mike_edwards@uk.ibm.com]
Sent: Wednesday, October 10, 2007 1:32 PM
To: sca-assembly@lists.oasis-open.org
Subject: RE: [sca-assembly] ISSUE 6: usage of not promoted references

 


Peter,

Let me try - I think Michael Rowley was correct in what he said, but perhaps I can put it differently to help clarify...

Comments as <mje>...</mje>

Yours,  Mike.

Strategist - Emerging Technologies, SCA & SDO.
Co Chair OASIS SCA Assembly TC.
IBM Hursley Park, Mail Point 146, Winchester, SO21 2JN, Great Britain.
Phone & FAX: +44-1962-818014    Mobile: +44-7802-467431  
Email:  mike_edwards@uk.ibm.com


"Peshev, Peter" <peter.peshev@sap.com>

10/10/2007 14:41

To

"Michael Rowley" <mrowley@bea.com>, "Martin Chapman" <martin.chapman@oracle.com>, <sca-assembly@lists.oasis-open.org>

cc

 

Subject

RE: [sca-assembly] ISSUE 6: usage of not promoted references

 

 

 




Hi Michael,

Can you please make some clarifications for your first paragraph (sorry,
being non-native speaker leads to some problems understanding more
complex sentences:) -

you are saying that it is legal for unpromoted reference to have URI
"designating a target service" or internal wire in the reference, but
you are not explicitly saying whether it is  legal to supply the
accessible address of some endpoint outside the SCA domain.


In other words having in mind the following definition



<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
name="MyValueComposite">
  <component name="MyValueServiceComponent">
     <implementation.java class="services.myvalue.MyValueServiceImpl"/>
     <reference name="StockQuoteService">
       <binding.ws uri="http://www.sqs.com/StockQuoteService"/>
     </reference>
     <reference name="StockQuoteService2">
       <binding.jms>
           <destination name="StockQuoteServiceQueue"/>
           <connectionFactory name="StockQuoteServiceQCF"/>
       </binding.jms>
     </reference>                
  </component>

 <!-- no references and promotion on purpose -->
<composite>


should both references be OK and behave accordingly when invoked from
the component code,  even though the second doesn't even have URI ?


<mje>
It is less a question of whether the reference has a URI, more a question of whether the binding
has a specified endpoint.  For some bindings, it is possible to identify a target endpoint without
using a URI.  I think that is what you have done in the example above for the StockQuoteService2
reference which has a JMS binding applied. with a target identified by a Queue name.

I think that both of the references in the example above do identify endpoints.

Both will be valid references in the case where they sit inside a composite which does not
promote them.</mje>


How about when MyValueComposite is used as implementation.composite as
in :  


<composite name="Wrapper">
<component name="MyValueServiceComponent">
  <implementation.composite name="foo:MyValueComposite"/>
</component>
</composite>

Should the external calls to JMS / WS will operate when being invoked
without the assembler knowledge, or the pattern is - "promote everything
to the domain and wire from there" ?


<mje>The component you give in the first snippet, if it is contained in MyValueComposite,
but MyValueComposite does not promote either of the references, then both references
will be operational, targetting the endpoints as defined within the references.

Neither of the two references will form part of the componentType of the MyValueComposite
and what this means is that:

a) It is not possible to configure the MyValueComposite in any way that will change the endpoints
targetted by the two references

b) It is not visible to an assembler that the MyValueComposite has these two references to
external services (unless the assembler cracks open the MyValueComposite and inspects
its contents.</mje>


<mje>
Whether it is good practice to construct composites in this way is another matter altogether.
I argue that it is not good practice, since it is not possible to re-use the composite without
also using the services targetted by the references - if the assembler wanted to change
those target services, then the assembler would have to crack open the composite and
make changes - implying a modified copy rather than re-use.</mje>

Btw, when reading several times the assembly spec trying to figure out
whether that should work I discovered the following sentence lone 2309 :


[the uri attribute is] required for references defined in composites
contributed to SCA domains.


<mje>This is a whole different issue - this indicates that a reference contributed to the
Domain can't be reconfigured by anything, so it can only have a meaning if it carries
configuration for a target service...</mje>

That seems to be target for another issue, since it's possible for a
binding to uniquely define extenal target not by the URI but by some
other means, like in the second reference sample. Should I raise another
issue or I am missing something ?


Best Regards
Peter







Best Regards
Peter

-----Original Message-----
From: Michael Rowley [mailto:mrowley@bea.com]
Sent: Friday, 5. October 2007 16:56
To: Martin Chapman; sca-assembly@lists.oasis-open.org
Subject: RE: [sca-assembly] ISSUE 6: usage of not promoted references


I believe that an unpromoted binding must have a URI (or EPR)
designating a target service, or the reference itself must be internally
wired.  If a target service is not provided in any way, then the
programming model should represent the reference as null (or some
equivalent for the language in question).  If the reference has a
multiplicity of 1..1 or 1..n, then such an unresolved reference should
generate a deployment error.

If the binding does designate a target, then if the reference is not
promoted, then neither the target nor the binding can be overridden.  If
the reference is promoted, then either can be overridden.  But in both
cases, the reference is operational.

I agree this could be clarified, probably in the binding section.

Michael

-----Original Message-----
From: Martin Chapman [mailto:martin.chapman@oracle.com]
Sent: Friday, October 05, 2007 6:40 AM
To: sca-assembly@lists.oasis-open.org
Subject: [sca-assembly] ISSUE 6: usage of not promoted references

http://www.osoa.org/jira/browse/ASSEMBLY-6

>-----Original Message-----
>From: Peshev, Peter [mailto:peter.peshev@sap.com]
>Sent: Friday, October 05, 2007 7:58 AM
>To: sca-assembly@lists.oasis-open.org
>Subject: [sca-assembly] NEW ISSUE: usage of not promoted references
>
>
>TARGET: SCA Assembly Specification
>
>DESCRIPTION: If a component X has a reference with a binding
>attached to it (ws.binding or jms.binding) and with no target
>in SCA terms, and that component is used in a composite
>however the reference is NOT listed as promoted. Is the
>reference still operational and what should happen if the
>component code invokes it ?
>
>That describes the common use case when a component is calling
>non-SCA world and that component needs to be used in an
>assembly. Does the assembler needs to promote a reference all
>the way up to the domain or he/she can leave it as it is ?
>
>PROPOSAL: Clarify the issue, and add a separate section in the
>spec with examples how components calling non-SCA code via
>standard bindings can be used in assembly.
>
>
>





 

Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU







[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]