Ticket #188 (closed defect: fixed)

Opened 20 years ago

Last modified 19 years ago

Empty reactorConfiguration bean causes problems with parent bean factory

Reported by: seancorfield Owned by: somebody
Priority: normal Milestone:
Version: Severity: blocker
Keywords: Cc:

Description

Scenario:

We have a set of web services that use ColdSpring? and Reactor for assembly and persistence. We also have administrative applications built with Model-Glue. We want to share the configurations between the web services and the admin apps so we use the parent bean factory variable in index.cfm (in the admin apps) to attach application.cs (our web service ColdSpring? instance).

Our application.cs instance has a reactorConfiguration (of course) but Model-Glue doesn't find it because it has an empty configuration in Configuration.xml which is found first.

In the "normal" MG2 use case, a user's local ColdSpring?.xml contains the reactorConfiguration bean and that overlays (replaces) the empty definition in Configuration.xml.

Fix: remove empty reactorConfiguration bean from Configuration.xml.

There may be a MG1.x compatibility issue with this fix so the framework may need to have an empty reactorConfiguration bean definition in an additional ColdSpring? XML file that it loads into the main bean factory if the user does *not* specify the parent bean factory:

Replace this:

<!--- Very simple HBF support ---> <cfif isObject(ModelGlue?_PARENT_BEAN_FACTORY)>

<cfset _modelglue.beanFactory.setParent(ModelGlue?_PARENT_BEAN_FACTORY) />

</cfif> <cfset _modelglue.beanFactory.loadBeans(ModelGlue?_CORE_COLDSPRING_PATH) />

With:

<!--- Very simple HBF support ---> <cfif isObject(ModelGlue?_PARENT_BEAN_FACTORY)>

<cfset _modelglue.beanFactory.setParent(ModelGlue?_PARENT_BEAN_FACTORY) />

</cfif> <cfset _modelglue.beanFactory.loadBeans(ModelGlue?_CORE_COLDSPRING_PATH) />

<cfif not isObject(ModelGlue?_PARENT_BEAN_FACTORY)>

<cfset _modelglue.beanFactory.loadBeans(ModelGlue?_CORE_EMPTY_REACTOR_PATH) />

</cfif>

and add the following just above:

<cfparam name="ModelGlue?_CORE_EMPTY_REACTOR_PATH" type="string" default="#expandPath("/ModelGlue/unity/config/EmptyReactor.xml")#" />

Marking this as a blocker because it completely prevents the parent bean factory from specifying the reactorConfiguration.

Change History

Changed 20 years ago by joe.rinehart

  • status changed from new to closed
  • resolution set to fixed

Thanks Sean.

It's been fixed by removing the reactorConfiguration and having the ReactorAdapter? see if the reactorConfiguration bean exists in the factory before trying to load Reactor itself.

See changeset [220].

Note: See TracTickets for help on using tickets.