This is the exact coldspring.xml that I referenced in the code I posted.
I've pasted it in and attached it.
<beans>
<!-- This is your Model-Glue configuration -->
<bean id="modelGlueConfiguration" class="
ModelGlue.unity.framework.ModelGlueConfiguration">
<!--
Reload - should the framework always reload? Be sure to change
reload to
false when you go to production!
-->
<property name="reload"><value>false</value></property>
<!--
Sets the URL variable name (key) and value (password) that will
force
the framework to reload regardless of the value of "reload".
If reloadKey is "init" and reloadPassword is "true", adding
?init=true
to the URL will cause the framework to reload.
-->
<property name="reloadKey"><value>init</value></property>
<property name="reloadPassword"><value>true</value></property>
<!-- Rescaffold whenever the framework loads, regardless of
URL.scaffold? -->
<property name="rescaffold"><value>false</value></property>
<!--
Sets the URL variable name (key) and value (password) that will
force
the framework to detect changes to / additions of / deletions of
<scaffold />
tags.
If rescaffoldKey is "scaffold" and rescaffoldPassword is "true",
adding
?scaffold=true to the URL will cause the framework to reload
<scaffold />
tags.
-->
<property name="rescaffoldKey"><value>scaffold</value></property>
<property name="rescaffoldPassword"><value>true</value></property>
<!--
Display the Model-Glue debugging trace?
verbose = show all events and added trace values (same as
"true")
trace = show only added trace values
none = show no debugging values (same as "false")
-->
<property name="debug"><value>false</value></property>
<!--
Where is ModelGlue.xml?
Running expandPath() on this value should return the absolute
path of ModelGlue.xml.
When you make your application live, move the file to someplace
that's not web accessible
-->
<property
name="configurationPath"><value>/mgsample01/config/ModelGlue.xml</value></property>
<!--
When using scaffolds, where should the Scaffold-generated XML be
placed?
-->
<property
name="scaffoldPath"><value>/mgsample01/config/scaffolds/Scaffolds.xml</value></property>
<!-- What URL variable defines the event to run? -->
<property name="eventValue"><value>event</value></property>
<!-- What is the name of the default event to run? -->
<property name="defaultEvent"><value>page.index</value></property>
<!-- If FORM.someValue and URL.someValue both exist, which value is
kept? -->
<property name="statePrecedence"><value>form</value></property>
<!--
What directories contain files that can be used via <include />
tags?
This is a comma-delimited list that will be searched in order.
-->
<property
name="viewMappings"><value>/mgsample01/views,/actionpacks/security/views</value></property>
<!--
When scaffolding views, where should generated view .CFM files
be placed?
This directory is searched after all values in "viewMappings".
-->
<property
name="generatedViewMapping"><value>/mgsample01/views/generated</value></property>
<!-- The path to the ScaffoldConfiguration.xml file that defines
scaffolding settings -->
<!-- -->
<property
name="scaffoldConfigurationPath"><value>/ModelGlue/unity/config/ScaffoldingConfiguration.xml</value></property>
<!--
<property
name="scaffoldConfigurationPath"><value>/mgsample01/config/ScaffoldingConfiguration.xml</value></property>
-->
<!--
The list of events to create when no "type" attribute is added
to a <scaffold />
tag, such as Widget.list, Widget.edit, etc.
-->
<property
name="defaultScaffolds"><value>list,edit,view,commit,delete</value></property>
<!--
The name of the ColdFusion template used to invoke Model-Glue
events.
-->
<property name="defaultTemplate"><value>index.cfm</value></property>
<!--
The name of the event-handler to call when an exception occurs.
-->
<property
name="defaultExceptionHandler"><value>exception</value></property>
<!--
The time, in minutes, to cache data in controllers when no
timeout is specified.
-->
<property name="defaultCacheTimeout"><value>5</value></property>
</bean>
<!-- Put definitions for your own beans and services here -->
<!-- ORM Framework Configuration -->
<!--
BLEEDING EDGE NOTES ON ORM CONFIGURATION:
You're using a Bleeding Edge Release of MG2, and it's likely
a subversion update just caused something like a "bean
definition not found error"
for either "ormAdapter" or "ormService."
That's because the bean definitions for them have been removed
from the central
/ModelGlue/unity/config/Configuration.xml file, and you're now
responsible for
for configuring them yourself.
If you've got the lastest (from CVS) version of ColdSpring, the
commented-out
code below will work.
If you don't want to much about with CVS and updating
ColdSpring, do the following:
1. Open up /ModelGlue/unity/config/Configuration.xml
2. Choose whether to use Reactor or Transfer
3. Uncomment the appropriate "To use xxxx as an ORM
Framework..." block below
4. Delete the <alias /> tags in the ORM block you uncommented
5. If using Reactor, copy/paste the beans named "
ormAdapter.Reactor" and
"ormService.Reactor" to this file (from
Configuration.xml) and remove
the ".Reactor" from their name attributes.
6. If using Transfer, copy/paste the beans named "
ormAdapter.Transfer" and
"ormService.Transfer" to this file (from
Configuration.xml) and remove
the ".Transfer" from their name attributes.
-->
<!--
To use Transfer as an ORM framework, uncomment the following:
<alias alias="ormAdapter" name="ormAdapter.Transfer" />
<alias alias="ormService" name="ormService.Transfer" />
<bean id="transferConfiguration" class="
transfer.com.config.Configuration">
<constructor-arg
name="datasourcePath"><value>/mgsample01/config/transfer/Datasource.xml</value></constructor-arg>
<constructor-arg
name="configPath"><value>/mgsample01/config/transfer/Transfer.xml</value></constructor-arg>
<constructor-arg
name="definitionPath"><value>/mgsample01/model/data/transfer</value></constructor-arg>
</bean>
-->
<!--
To use Reactor as an ORM framework, uncomment the following:
-->
<alias alias="ormAdapter" name="ormAdapter.Reactor" />
<alias alias="ormService" name="ormService.Reactor" />
<bean id="reactorConfiguration" class="reactor.config.config">
<!-- Where to find Reactor.xml? -->
<constructor-arg
name="pathToConfigXml"><value>/mgsample01/config/reactor/Reactor.xml</value></constructor-arg>
<property name="project"><value>mgsample01</value></property>
<!--
<property name="dsn"><value>appmanager</value></property>
<property name="type"><value>oracle</value></property>
-->
<!-- -->
<property name="dsn"><value>Development</value></property>
<property name="type"><value>mssql</value></property>
<!-- The directory in which to put generated code you can modify
-->
<property
name="mapping"><value>/mgsample01/model/data/reactor</value></property>
<!-- Should reactor detect changes (development), run fast but
not detect changes (production), or always re-generate code (always)? -->
<property name="mode"><value>production</value></property>
</bean>
<!-- Reactor for the model to be used outside of Model Glue-->
<!-- In Model Glue use getModelGlue().getORMService()-->
<bean id="Reactor" class="reactor.reactorFactory">
<constructor-arg name="Configuration">
<ref bean="reactorConfiguration" />
</constructor-arg>
</bean>
</beans>
On 5/15/07, Brian Kotek <[EMAIL PROTECTED]> wrote:
Nice find Chris. However, I still think the root of the problem is that
Bryan does not have his Reactor instance in production mode. The fact that
in his tests he's getting the readFields twice indicates this, since in
production mode it only runs once. Bryan, can you post your ColdSpring.xml
?
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[EMAIL PROTECTED]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
<beans>
<!-- This is your Model-Glue configuration -->
<bean id="modelGlueConfiguration" class="ModelGlue.unity.framework.ModelGlueConfiguration">
<!--
Reload - should the framework always reload? Be sure to change reload to
false when you go to production!
-->
<property name="reload"><value>false</value></property>
<!--
Sets the URL variable name (key) and value (password) that will force
the framework to reload regardless of the value of "reload".
If reloadKey is "init" and reloadPassword is "true", adding ?init=true
to the URL will cause the framework to reload.
-->
<property name="reloadKey"><value>init</value></property>
<property name="reloadPassword"><value>true</value></property>
<!-- Rescaffold whenever the framework loads, regardless of URL.scaffold? -->
<property name="rescaffold"><value>false</value></property>
<!--
Sets the URL variable name (key) and value (password) that will force
the framework to detect changes to / additions of / deletions of <scaffold />
tags.
If rescaffoldKey is "scaffold" and rescaffoldPassword is "true", adding
?scaffold=true to the URL will cause the framework to reload <scaffold />
tags.
-->
<property name="rescaffoldKey"><value>scaffold</value></property>
<property name="rescaffoldPassword"><value>true</value></property>
<!--
Display the Model-Glue debugging trace?
verbose = show all events and added trace values (same as "true")
trace = show only added trace values
none = show no debugging values (same as "false")
-->
<property name="debug"><value>false</value></property>
<!--
Where is ModelGlue.xml?
Running expandPath() on this value should return the absolute path of ModelGlue.xml.
When you make your application live, move the file to someplace that's not web accessible
-->
<property name="configurationPath"><value>/mgsample01/config/ModelGlue.xml</value></property>
<!--
When using scaffolds, where should the Scaffold-generated XML be placed?
-->
<property name="scaffoldPath"><value>/mgsample01/config/scaffolds/Scaffolds.xml</value></property>
<!-- What URL variable defines the event to run? -->
<property name="eventValue"><value>event</value></property>
<!-- What is the name of the default event to run? -->
<property name="defaultEvent"><value>page.index</value></property>
<!-- If FORM.someValue and URL.someValue both exist, which value is kept? -->
<property name="statePrecedence"><value>form</value></property>
<!--
What directories contain files that can be used via <include /> tags?
This is a comma-delimited list that will be searched in order.
-->
<property name="viewMappings"><value>/mgsample01/views,/actionpacks/security/views</value></property>
<!--
When scaffolding views, where should generated view .CFM files be placed?
This directory is searched after all values in "viewMappings".
-->
<property name="generatedViewMapping"><value>/mgsample01/views/generated</value></property>
<!-- The path to the ScaffoldConfiguration.xml file that defines scaffolding settings -->
<!-- -->
<property name="scaffoldConfigurationPath"><value>/ModelGlue/unity/config/ScaffoldingConfiguration.xml</value></property>
<!--
<property name="scaffoldConfigurationPath"><value>/mgsample01/config/ScaffoldingConfiguration.xml</value></property>
-->
<!--
The list of events to create when no "type" attribute is added to a <scaffold />
tag, such as Widget.list, Widget.edit, etc.
-->
<property name="defaultScaffolds"><value>list,edit,view,commit,delete</value></property>
<!--
The name of the ColdFusion template used to invoke Model-Glue events.
-->
<property name="defaultTemplate"><value>index.cfm</value></property>
<!--
The name of the event-handler to call when an exception occurs.
-->
<property name="defaultExceptionHandler"><value>exception</value></property>
<!--
The time, in minutes, to cache data in controllers when no timeout is specified.
-->
<property name="defaultCacheTimeout"><value>5</value></property>
</bean>
<!-- Put definitions for your own beans and services here -->
<!-- ORM Framework Configuration -->
<!--
BLEEDING EDGE NOTES ON ORM CONFIGURATION:
You're using a Bleeding Edge Release of MG2, and it's likely
a subversion update just caused something like a "bean definition not found error"
for either "ormAdapter" or "ormService."
That's because the bean definitions for them have been removed from the central
/ModelGlue/unity/config/Configuration.xml file, and you're now responsible for
for configuring them yourself.
If you've got the lastest (from CVS) version of ColdSpring, the commented-out
code below will work.
If you don't want to much about with CVS and updating ColdSpring, do the following:
1. Open up /ModelGlue/unity/config/Configuration.xml
2. Choose whether to use Reactor or Transfer
3. Uncomment the appropriate "To use xxxx as an ORM Framework..." block below
4. Delete the <alias /> tags in the ORM block you uncommented
5. If using Reactor, copy/paste the beans named "ormAdapter.Reactor" and
"ormService.Reactor" to this file (from Configuration.xml) and remove
the ".Reactor" from their name attributes.
6. If using Transfer, copy/paste the beans named "ormAdapter.Transfer" and
"ormService.Transfer" to this file (from Configuration.xml) and remove
the ".Transfer" from their name attributes.
-->
<!--
To use Transfer as an ORM framework, uncomment the following:
<alias alias="ormAdapter" name="ormAdapter.Transfer" />
<alias alias="ormService" name="ormService.Transfer" />
<bean id="transferConfiguration" class="transfer.com.config.Configuration">
<constructor-arg name="datasourcePath"><value>/mgsample01/config/transfer/Datasource.xml</value></constructor-arg>
<constructor-arg name="configPath"><value>/mgsample01/config/transfer/Transfer.xml</value></constructor-arg>
<constructor-arg name="definitionPath"><value>/mgsample01/model/data/transfer</value></constructor-arg>
</bean>
-->
<!--
To use Reactor as an ORM framework, uncomment the following:
-->
<alias alias="ormAdapter" name="ormAdapter.Reactor" />
<alias alias="ormService" name="ormService.Reactor" />
<bean id="reactorConfiguration" class="reactor.config.config">
<!-- Where to find Reactor.xml? -->
<constructor-arg name="pathToConfigXml"><value>/mgsample01/config/reactor/Reactor.xml</value></constructor-arg>
<property name="project"><value>mgsample01</value></property>
<!--
<property name="dsn"><value>appmanager</value></property>
<property name="type"><value>oracle</value></property>
-->
<!-- -->
<property name="dsn"><value>Development</value></property>
<property name="type"><value>mssql</value></property>
<!-- The directory in which to put generated code you can modify -->
<property name="mapping"><value>/mgsample01/model/data/reactor</value></property>
<!-- Should reactor detect changes (development), run fast but not detect changes (production), or always re-generate code (always)? -->
<property name="mode"><value>production</value></property>
</bean>
<!-- Reactor for the model to be used outside of Model Glue-->
<!-- In Model Glue use getModelGlue().getORMService()-->
<bean id="Reactor" class="reactor.reactorFactory">
<constructor-arg name="Configuration">
<ref bean="reactorConfiguration" />
</constructor-arg>
</bean>
</beans>