Random thoughts quickly emailed off the top of my head:

That'll reload the parent for MG's default bean factory... the one that 
actually runs the application.

Since the parent/child relationship resolves differences between beans that 
have the same ID, I'm not 100% sure where the cache resides... if it resides in 
the child (which is actually entirely possible, now that I think of it), then 
setParent() will need to clear any relevant cached beans or CS will just return 
the cached version and won't reload them from the new parent.

I think. I'd have to go look at the code and I don't really have time at the 
moment. Check out the code for setParent(), getParent() and getBean()... but 
beware, getBean() is a MONSTER METHOD and does some really blow-your-mind black 
magic/code voodoo to resolve bean ID conflicts with the parent AND deal with 
circular dependencies.

Hope that gives you some sort of direction to go...

Laterz,
J

On Jul 31, 2014, at 1:09 PM, Brian G <[email protected]> wrote:

> 
> Guys - any thoughts on whether this will work or not?
> 
> 
> On Wednesday, July 9, 2014 9:30:30 PM UTC-7, Brian G wrote:
> First, this is the code I saw (from 
> https://github.com/dhughes/ColdBooks/blob/master/Application.cfc):
> 
> <cfif structKeyExists( application, this.realName ) AND structKeyExists( 
> application[this.realName], "framework" ) >
>       <cfset application[this.realName].framework.getBeanFactory().setParent( 
> application.cs ) />
> </cfif>
> 
> 
> 
> -- 
> -- 
> Model-Glue Sites:
> Home Page: http://www.model-glue.com
> Documentation: http://docs.model-glue.com
> Bug Tracker: http://bugs.model-glue.com
> Blog: http://www.model-glue.com/blog
>  
> You received this message because you are subscribed to the Google
> Groups "model-glue" group.
> 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/model-glue?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "model-glue" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
-- 
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog

You received this message because you are subscribed to the Google
Groups "model-glue" group.
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/model-glue?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"model-glue" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to