By Peter Bell

InitMethod Added to LightWire

I just had a use case where I needed the ability to call a custom init() method after fully initializing a bean but before returning it from LightWire (I needed a config method for my #BusinessObjectName#Metadata config beans to automagically add any config properties I hadn't explicitly set for an object). In the past I'd just called super.config() at the end of the init() method, but that didn't allow for metadata inheritance (if you called MyUserMetadata that extended UserMetadata config would get called twice and it'd get nasty). So, I have officially added support for an InitMethod property to the addSingleton(), addTransient() and addBean() config methods. This has not been added to the ColdSpring XML reader, but I'll have a word with Paul and wouldn't be surprised if this got done soon. For now I've just updated the LightWire svn repo for anyone in a rush to use the feature :->

Comments
BlogCFC was created by Raymond Camden. This blog is running version 5.005.