The GenericORMController has an issue when you set the
ModelGlue_PARENT_BEAN_FACTORY (in site_root/index.cfm) to be an instance of
a (Java) Spring BeanFactory (or PersistenceContext). This is pretty easy to
do as ColdSpring provides a facade for this purpose.
The issue in the GenericORMController occurs because that controller relies
on a NoSuchBeanDefinitionException to be thrown when it queries the bean
factory to determine if ORM support has been configured. As it turns out,
Spring throws an exception with a different name, and if it's configured to
be a parent bean factory, Spring's BeanFactory will be the one throwing
the NoSuchBeanDefinitionException.
This little patch adds a check for Spring's exception for your
consideration:
--- ModelGlue/gesture/modules/orm/controller/GenericORMController.cfc
2010-03-04 18:53:28.000000000 -0600
+++ ModelGlue/gesture/modules/orm/controller/GenericORMController.cfc
2012-07-03 22:12:44.000000000 -0500
@@ -57,6 +57,9 @@
<cfcatch type="coldspring.NoSuchBeanDefinitionException">
<!--- No bean, no ORM. --->
</cfcatch>
+ <cfcatch
type="org.springframework.beans.factory.NoSuchBeanDefinitionException">
+ <!--- No bean in a Spring parent bean factory, no
ORM. --->
+ </cfcatch>
<cfcatch type="BeanFactory.FileNotFound">
<!--- Ditto for legacy apps using ChiliBeans --->
</cfcatch>
--
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