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: [sca-j] NEW ISSUE: SCA Spring C & I specification does not state whetherConstructor 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


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