http://seancorfield.github.io for newer blog posts." />

An Architect's View

CFML, Clojure, Software Design, Frameworks and more...

An Architect's View

Model-Glue: Unity and Transfer

January 8, 2007 · 3 Comments

The very latest Model-Glue: Unity (the SVN trunk) now has direct support for Transfer built in. Joe mentioned that he has moved the explicit Reactor ORM support declarations out of the core Configuration.xml file. In that post he said you could just declare the ormAdapter and ormService beans directly yourself. His code base has moved on (already). If you download the very latest from SVN and you have the very latest ColdSpring from CVS, then you can take advantage of the new <alias> tag in ColdSpring! In your Model-Glue application's ColdSpring.xml file, just add these two lines to use Transfer:
<alias name="ormService.Transfer" alias="ormService"/>
<alias name="ormAdapter.Transfer" alias="ormAdapter"/>
Or, to use Reactor, add these lines instead:
<alias name="ormService.Reactor" alias="ormService"/>
<alias name="ormAdapter.Reactor" alias="ormAdapter"/>
MG:U has built-in adapters for both Reactor and Transfer now and default declarations for both ORM's factories (as the ormService.* beans above). Of course, you can easily override any of these if you need (for example, we have the Transfer factory in our parent bean factory and define our ormService to be a proxy to the Transfer factory so that all our MG:U applications share a single factory object).

Tags: modelglue · orm

3 responses so far ↓

  • 1 Mark Mandel // Jan 8, 2007 at 11:00 PM

    That is very very very very cool.

    (Did I use enough 'very's?)

    Much kudos to Joe, Sean and everyone else who is involved with MG:U, this is really neat that Transfer is all hooked up.

    Way to go guys.

    Maybe sometime soon I'll actually take some time off writing code for Transfer and actually play with MG:U ;D
  • 2 Robb // Jan 10, 2007 at 12:52 PM

    I would love to see that sample on how to set up a proxy to the Transfer factory in one single parent bean so that all objects share a single factory object.
  • 3 Sean Corfield // Jan 10, 2007 at 2:27 PM

    @Robb, I'll blog the proxy!

Leave a Comment

Leave this field empty