Ramkumar R wrote:
I came across this requirement, while working with Spring, but I believe
this topic also holds good for Java implementations.

Spring supports Constructor Injection by allowing to inject properties and
objects via the constructors. Not sure if Tuscany should support this
feature? As SCA+Spring depends on Tuscany runtime for binding and dependency
injections.

I believe currently Tuscany supports injection of service references through
getter & setter methods.


Supporting properties on an object is a good thing. It seems to me injecting them at construction is a special case of injecting them via a setter, namely the former is setting some properties, albeit at object creation time. I always thought it was a good thing to have a formal method which sets properties and always have the special constructor call that method.

--
Thanks, Dan Becker

Reply via email to