← Prev in month ← Prev in thread
Next in thread → Next in month →

RE: [sca-j] NEW ISSUE: SCA Spring C & I specification does not state whether Constructor Injection should be supported - JAVA-63

From
Mark Combellack <>
Date
2008-09-11T13:11:05+00:00
ID
Thread
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 | 

From:
Ramkumar R1 [mailto:] 

Sent: 11 September 2008 12:38

To: 

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  : 
← Prev in month ← Prev in thread
Next in thread → Next in month →