From:
Ramkumar R1 [mailto:ramkumar_rj@in.ibm.com]
Sent: 11 September 2008 12:38
To: sca-j@lists.oasis-open.org
Subject: [sca-j] NEW ISSUE: SCA
Spring C & I specification does not state whether Constructor Injection
should be supported
Raiser:
Ramkumar Ramalingam
Target: sca-springci-draft-20070926.doc
Description:
The SCA Spring Client and Implementation specification is silent on whether the
Spring Constructor Injection should be supported or not.
Basically
Spring supports two types of Dependency Injection(DI) techniques 1) Setter
Injection and 2) Constructor Injection.
1)
Setter Injection: In which the dependent module exposes a setter method which
the framework uses to inject the dependency, the current specification supports
this as shown below... by injecting the SCAReference using the setter method.
<bean
id="Y" class"org.xyz.someapp.SomeOtherClass">
<property name="bar" ref="SCAReference"/>
</bean>
2)
Constructor Injection: In which the dependencies are provided through the class
constructor. The Specs remains silent on whether this should be supported or
not.
<bean
id="Y" class"org.xyz.someapp.SomeOtherClass">
<constructor-arg ref="SCAReference"/>
</bean>
Proposal:
None.
Thanks
& Regards,
R Ramkumar
Phone : 91-80-41927623
Email : ramkumar_rj@in.ibm.com