Are you really using ColdSpring?
Brian Kotek has an
excellent post about using ColdSpring to its full potential, in response to a series of articles on Tom Chiverton's blog about building services with ColdSpring and Reactor.
Brian shows how to use the
factory-bean and
factory-method descriptors in your ColdSpring XML file to handle automatic injection of beans obtained from factory objects that are also managed by ColdSpring. It's a powerful technique that helps completely remove a number of dependencies from your application code.
I use the same technique with Transfer and ColdSpring:
<bean id="dataSource" factory-bean="transferFactory" factory-method="getDatasource" />
<bean id="transfer" factory-bean="transferFactory" factory-method="getTransfer" />
This allows me to inject the data source object and the main Transfer API object directly into my service layer objects so they don't have to know about the Transfer factory at all.
Tags: coldfusion · coldspring · orm
2 responses so far ↓
1 Boyan // May 22, 2007 at 6:55 AM
is there some tutorials or something like it on using ColdSpring or LightWire with MG? I like the concept but I'm new to it and it seems I can't find simple docs to get me started.
2 Sean Corfield // May 22, 2007 at 8:17 AM
Leave a Comment