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