Ticket #302 (new enhancement)

Opened 19 years ago

Last modified 16 years ago

optional defaultProperties field at creating coldspring bean factory @ ModelGlue.cfm

Reported by: henryho Owned by: somebody
Priority: highest Milestone: 2.0.x-next-patch
Version: 2.0.304 Severity: normal
Keywords: Cc:

Description

add an optional field (e.g. ModelGlue?_BEAN_FACTORY_PROPERTIES) that can let us add the "defaultProperties" to the default bean factory during init()?

reason: to activate coldspring's ability to replace ${xxxxx} in coldspring.xml

see: http://www.danvega.org/blog/index.cfm/2006/11/25/Passing-Properties-To-ColdSpring

current workaround: set ModelGlue?_PARENT_BEAN_FACTORY that has already been initialized with defaultProperties in Application.cfc onApplicationStart(), and do not use the one created by MG.

discussed here: http://groups.google.com/group/model-glue/browse_thread/thread/de628a4fb85c6ebd/

Change History

Changed 19 years ago by henryho

Here are the modifications I made to my ModelGlue?.cfm:

around line 73: <!--- Create ColdSpring? ---> <cfif structKeyExists(application, "ModelGlue?_BEAN_FACTORY_DEFAULT_PROPERTIES")>

<cfset _modelglue.beanFactory = createObject("component", "coldspring.beans.DefaultXmlBeanFactory?").init(defaultProperties = application.ModelGlue?_BEAN_FACTORY_DEFAULT_PROPERTIES) />

<cfelse>

<cfset _modelglue.beanFactory = createObject("component", "coldspring.beans.DefaultXmlBeanFactory?").init()>

</cfif>

Please consider having something similar on the next release of MG.

Changed 16 years ago by cfgrok

  • milestone changed from Feature Requests to 2.0.x-next-patch

Changed 16 years ago by boomfish

It looks like support for the "ModelGlue_LOCAL_COLDSPRING_DEFAULT_PROPERTIES" variable (set in index.cfm) was added in Model-Glue 3.0.

The only thing I think really needs to be done at this point is to document the variable; in particular we ought to have a comment for it in /modelglueapplicationtemplate/index.cfm.

Note: See TracTickets for help on using tickets.