Thanks Sean, your factories talk is what starting me really rethinking ColdSpring's role in my application. I'm refactoring my config file and controllers/services to take better advantage of ColdSpring. Speaking of, I hope you'll post your findings on using AOP security with Reactor; AOP is next on my hit list of things to tackle and the conference really got me excited about utilizing it. :)
On 3/14/06, Sean Corfield <[EMAIL PROTECTED]> wrote: > On 3/14/06, Ken Dunnington <[EMAIL PROTECTED]> wrote: > > Chris, I attended your Model Management session at cf.objective() > > (which was excellent, btw) > > Yes it was! I enjoyed both of Chris's sessions! > > > create my gateway, but since Reactor uses the individual Record > > objects as a kind of facade for the DAO, does it make any sense to use > > ColdSpring to manage those objects using factory-method and > > singleton="false"? > > No. ColdSpring is really not intended to manage transient objects. I > think I addressed that in my factories talk on Saturday? I know that > subject has come up on this list in the past. > > I've been trying to figure out how to use AOP to apply security in > situations like this and it's tricky. You don't want to apply AOP to > transient objects (since it's all about object creation and transient > objects are created over and over again) so it would be nice to apply > AOP to the DAO - except you can't get Reactor to use a > ColdSpring-managed DAO since Reactor manages its own object creation. > So I'm looking at applying AOP to the Reactor factory itself - which > works in a basic case, BTW - but now I have a circular dependency (my > AOP aspect object depends on the factory to which it is being applied) > and, right now, ColdSpring won't quite handle that (I'm trying to > figure out a fix but it's certainly an edge case). > > So, the bottom line is: transient objects can come from Reactor but > not from ColdSpring. > > > Furthermore, Doug just added Dictionary objects to the reactorFactory > > so the more general question is, does it make sense to hide the > > factory (Reactor) from the model (Service), and just be sure to inject > > all possible dependencies (DAO/Record/Dictionary)? Or should the > > Service be given access to the factory directly (at least in this > > case)? > > The service will need access to the factory directly. > > I have the gateways injected (using ColdSpring and the factory-bean / > factory-method stuff) because that ensures that they are only created > once. > > Glad you enjoyed the conference! > -- > Sean A Corfield -- http://corfield.org/ > Got frameworks? > > "If you're not annoying somebody, you're not really alive." > -- Margaret Atwood > > -- Quidquid latine dictum sit, altum sonatur. - Whatever is said in Latin sounds profound.
