That is helpful. Since Dave's suggestion I've been reading up more on ColdSpringProperty.cfc and learning about parent bean factories. It will definitely be useful. So far I've switched to putting the factory in application scope and it's working like a charm. Thanks guys!
On Jan 20, 1:19 pm, Kurt Wiersma <[email protected]> wrote: > You can use a feature of ColdSpring call hierarchical bean factories > to help solve this issue. The Mach II ColdSpring property allows you > to assign a parent bean factory to your Mach II app's ColdSpring bean > factory by using the "parentBeanFactoryKey" and > "parentBeanFactoryScope" parameters. Simply reference your bean > factory that you placed in the application scope from your > Application.cfc and then the Mach II app will use that bean factory as > it parent bean factory. If your Mach II apps needs access to CS > managed bean it will check in the Mach II bean factory first (this > will probably be empty in your case) then check the parent bean > factory which is the one from your application cfc. > > http://trac.mach-ii.com/machii/wiki/UsingColdSpringWithMach-II#parent... > > Mach II config example: > > <property name="coldSpringProperty" > type="MachII.properties.ColdspringProperty"> > <parameters> > <parameter name="beanFactoryPropertyName" > value="serviceFactory"/> > <parameter name="configFile" > value="config/coldspring.xml"/> > <parameter name="configFilePathIsRelative" > value="true"/> > <parameter name="resolveMachIIDependencies" > value="true"/> > <parameter name="parentBeanFactoryScope" > value="application"/> > <parameter name="parentBeanFactoryKey" > value="baseServiceFactory"/> > <parameter > name="placeFactoryInApplicationScope" value="false" /> > <parameter name="placeFactoryInServerScope" > value="false" /> > </parameters> > </property> > > Hopefully this helps you. :) > > --Kurt > > > > > > > > On Thu, Jan 20, 2011 at 10:59 AM, Rachel Lehman <[email protected]> wrote: > > We have an app that has a legacy section (admin console, of course!) > > most of which is written in CF5-era style, not MVC/framework based; > > but the primary (user-facing) side of our app is written with Mach II > > and uses ColdSpring beans. They share a lot of the same model and are > > under the same Application.cfc. > > Right now we basically load the ColdSpring factory twice, once just in > > the Application scope for the legacy code, and once through MachII for > > the framework-ed part of the app. We recently upgraded MachII from 1.6 > > (yay!) and everything is going great but while we were working on this > > we thought it would be nice to resolve this duplicate factory/beans > > issue. > > I'm wondering if it's possible to load the service factory that MachII > > uses outside MachII somehow so we could access it from the legacy > > code? Or can anyone suggest a better way to go about doing this? > > Thanks so much for suggestions. > > > -- > > You received this message because you are subscribed to Mach-II for CFML > > list. > > To post to this group, send email to [email protected] > > To unsubscribe from this group, send email to > > [email protected] > > For more options, visit this group > > athttp://groups.google.com/group/mach-ii-for-coldfusion?hl=en > > > SVN:http://svn.mach-ii.com/machii/ > > Wiki / Documentation / Tickets:http://trac.mach-ii.com/machii/ -- You received this message because you are subscribed to Mach-II for CFML list. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/mach-ii-for-coldfusion?hl=en SVN: http://svn.mach-ii.com/machii/ Wiki / Documentation / Tickets: http://trac.mach-ii.com/machii/
