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: RE: [sca-j] NEW ISSUE: SCA Spring C & I specification need to specify the limitations of implicit references - [JAVA-149]


Hi,

 

Raised as new Issue 149. See:

http://www.osoa.org/jira/browse/JAVA-149

 

Thanks,

 

Mark

Mark Combellack| Software Developer| Avaya | Eastern Business Park | St. Mellons | Cardiff | CF3 5EA | Voice: +44 (0) 29 2081 7624 | mcombellack@avaya.com


From: Ramkumar R1 [mailto:ramkumar_rj@in.ibm.com]
Sent: 23 March 2009 12:29
To: sca-j@lists.oasis-open.org
Subject: [sca-j] NEW ISSUE: SCA Spring C & I specification need to specify the limitations of implicit references

 


Raiser:                Ramkumar Ramalingam

Target:        sca-springci-1.1-spec-WD01.doc

 
Description:

 
The SCA Spring Client and Implementation specification is silent on mentioning the limitations of using implicit references within spring configuration.


Section 2.1 of the specification states that, SCA references and properties can be directly used within the spring configuration files. But there are few scenarios where the SCA references and properties can't be directly used within the spring configuration files. For example, in a scenario as shown below...

<bean id="moreComplexObject" class="example.ComplexObject">
  <!-- results in a setSomeList(java.util.List) call -->
  <property name="someList">
    <list>
        <value>a list element followed by a reference</value>
        <ref bean="myDataSource" />
    </list>
  </property>
  

  <!-- results in a setSomeMap(java.util.Map) call -->
  <property name="someMap">
    <map>
        <entry>
            <key>
                <value>an entry</value>
            </key>
            <value>just some string</value>
        </entry>
        <entry>
            <key>
                <value>a ref</value>
            </key>
            <ref bean="myDataSource" />
        </entry>
    </map>
  </property>
  

  <!-- results in a setSomeSet(java.util.Set) call -->
  <property name="someSet">
    <set>
        <value>just some string</value>
        <ref bean="myDataSource" />
    </set>
  </property>
</bean>


In the above scenario, the spring implementation class might have defined the list to look like this...

       private List<?> someList;
    public List<?> getSomeList() {
        return someList;
    }
    public void setSomeList(List<?> someList) {
        this.someList = someList;
    }

so introspection of the references and properties type might not be possible for the SCA runtime.

Proposal:
Section 2.1 of the specification should state that the direct use of SCA references and properties will not be supported for the 3 different scenarios as shown above, due to a limitation that the SCA runtime would not be able to introspect the reference/property types here.

The solution to this limitation is to use explicit reference/property for the above scenarios as shown below....

<sca:reference name="myDataSource" type="java.lang.String"/>




Thanks & Regards,

R Ramkumar
Open Source SOA Development - Apache Tuscany
Phone : 91-80-41927623
Email  : ramkumar_rj@in.ibm.com



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