Title:
Bug 83424:(Watson Migration Closure)This is something I would really like to see in CF10
| View in TrackerStatus/Resolution/Reason: Closed/Deferred/
Reporter/Name(from Bugbase): Mark Mandel / Mark Mandel (mark.mandel)
Created: 06/22/2010
Components: Language, CF Component
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 0000 /
Priority/Frequency: Major / Unknown
Locale/System: English / Platforms All
Vote Count: 0
Problem:
This is something I would really like to see in CF10.I want to be able to intercept when any CFC is created via new/createObject.The use case is essentially for how Spring does domain/transient object dependency injection. See: http://www.gridshore.nl/2009/01/27/injecting-domain-objects-with-spring/I'm actually kinda loathe to hook this into Application.cfc, as it can be such a pain to provide values to dynamically, but it seems like the best place.I would figure there would be two values:1) A CFC to listen for the events2) An (optional) array of class names to listen for.Obviously this will impact performance, but I figure that if no event listener is set, or the list of optional array names is empty, no even will be fired, and the impact should be minimal.What do people think of this idea?Currently, injecting dependencies with any DI engine into new ORM entities is a fair pain. This would simplify things significantly.
Method:
Result:
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3041698
External Customer Info:
External Company:
External Customer Name: Mark Mandel
External Customer Email: 3EA9517D445A9E8999201549
External Test Config: 06/22/2010
Attachments:
Comments: