Monday, January 01, 2007

Happy New Year! (From ColdSpring too!)

Happy new year everybody! Or should I just list out my limited readership by name? 2006 was a very crazy year for me, good in a lot of ways, completely crazy in others, so good riddens, but only sort of. I thought that today would be a really good day to sit back and relax, but instead I decided to work on some ColdSpring. Oh well. I'll relax later. So does that mean there's something new to announce? You bet! And you can thank Sean for bugging me, too. ColdSpring now supports the tag! Here's how it's used:

Lets say you have a bean defined, perhaps a reactor factory like the following, which you have referenced all throughout a complex configuration file:

<bean id="myReactorFactory" class="reactor.reactorFactory">
    <constructor-arg name="configuration">
        <value>/config/reactor.xml
    </constructor-arg>
</bean>

Now let's say you have switched architectures to something like Model-Glue:Unity, and you want to use that same reactor factory. But there is a problem, because Unity wants that bean to be named 'ormService'. Previously you would need to change the bean's id, and then all the bean ref tags, but now can just simply define an alias, like so:

<alias name="myReactorFactory" alias="ormService"/>

Walla! Done and done. Now that's just damn handy! This is still a work in progress, so feedback and testing would be great. Happy New Year (again)!

3 Comments:

Anonymous Simeon said...

Well right on man. I just asked you if we had this last week :)

Boy are you ever on top of things!

happy new year manht

11:18 AM  
Anonymous Anonymous said...

Sweet! This and Jared's recent include(?) tag are going to clean up our code quite a bit!

Sean Corfield

11:46 AM  
Blogger Chris Scott said...

Glad to help. Hopefully I can get some of the other timesaving features out as soon as I can. There's a lot I've been thinking about lately and it looks like I will finally have a bit more time.

1:03 PM  

Post a Comment

<< Home