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

 


Help: OASIS Mailing Lists Help | MarkMail Help

sca-j message

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


Subject: [ISSUE 149] SCA Spring C & I specification need to specify the limitationsof implicit references - Discussion and Proposal



Folks,

This email discusses Issue 149 and makes a proposal for resolution.  It is based on WD04 of the Spring C&I Specification.

In the issue, Ram makes the point that there are potential ways to configure a Spring application context that can result in
difficulties in introspecting the Type of a Spring reference - namely if the actual parameters of the Bean are Generic types.

I am not sure that there is a real problem here.

To quote one of Ram's examples from the JIRA:

public void setSomeList(List<?> someList)

...might be the declaration for the setter method for a property on some Spring Bean.

I believe that in this case, the FORMAL type of the List is effectively List<Object> - ie the list can contain Objects of any Java class.
I think that it is possible to introspect this and to make the type of the reference Object.  In XML terms, I believe that this translates
to an <any/>.

In SCA terms this can only be introspected as a <property/> since there is no remotable interface.  It is a <property/> of type <any/>.

If the owner of the Spring application context does not want this mapping, then they have the facility of using the <sca:reference/>
element to explicitly state what kind of SCA artifact they want.


So I believe that it is possible to close Issue 149 with no action.

An alternative is to add a minimal amount of explanatory text as follows, to the end of section 3 (Component Type of a Spring Application Context):
-------------------------------
3.1 Introspecting the Type Implied by a Spring Bean Reference

In the case where a reference or a property in the component type is derived by introspection of bean references, the type of the reference or property
is determined by introspection of the related property setter method or constructor method of the Bean which is the source of the reference.

In some cases, the type introspected by this process could be a generic type - for example a List<?>.  In such cases, the formal type of the reference
becomes Object.  This will be interpreted as an SCA property with a Java type of Object, which maps to an XML type of <any/>.
-------------------------------

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





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]