Closed tschneidereit closed 12 years ago
Turns out I'll probably not implement this feature after all. If anyone absolutely wants to implement it and sends a pull request with good implementation and tests, I'll probably merge that, but I'm mostly of the opinion that a real binding solution should be used here, instead.
Hi,
Just for the record, I don't think a general circular case such as A needs B, B needs C and C needs A should fit with a binding solution. Indeed, binding to me would be the case where A needs B and B needs A, thus both direction.
Thanks for your great work,
I'd like to add that a setter injection that supports circular injection as in Spring could be interesting :-)
http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/beans.html#d0e2299
I'd like to add that a setter injection that supports circular injection as in Spring could be interesting :-)
http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/beans.html#d0e2299
While I agree that having support for circular dependencies would be handy, supporting it would require a major rewrite of core parts of Swiftsuspenders. I'm very unlikely to do this rewrite, so I'm afraid this isn't going to happen, sorry.
Hi,
circular dependencies are supported in mvcExpress. Currently it is on the branch : release_1.0
My approach is simple - if dependency is not satisfied AND pending injection feature is enabled - injection goes to pending dependencies registry. If dependency is set in fixed(can be changed) time frame... all is well.. if not - error is thrown.
By default I disable the feature because some nasty synchronization problem might occur if programmer does not know what he is doing...
Maybe it will help.
cheers.
Marking an injection point as "live" should cause it to be updated as soon as the mapped value changes.