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 does not state whether Constructor Injection should be supported - JAVA-63


Raised as http://www.osoa.org/jira/browse/JAVA-63

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: 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



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