<cfset variables.framework.beanFactory = application.beanFactory />
<cfdump var="#application._taffy.EXTERNALBEANFACTORY.getBean("CityService")#" /><cfabort/>
<cffunction name="setCityService" output="false" returntype="void" access="public">
<cfargument name="cityService" required="true" />
<cfset StructAppend( variables, arguments ) />
</cffunction>
--
You received this message because you are subscribed to the Google
Groups "Taffy Users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to taffy-users...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
<cffunction name="applicationStartEvent" access="public" output="false" returntype="void"
hint="this method is called by the Traffy framework as a pseudo application bootstrap">
<cfset application.config = loadConfig() />
<cfset application.beanFactory = initBeanFactory() />
<cfset variables.framework.beanFactory = application.beanFactory />
</cffunction>
--
You received this message because you are subscribed to a topic in the Google Groups "Taffy Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/taffy-users/UrkyvuM3GNk/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to taffy-users...@googlegroups.com.
<mailto:taffy-users%2Bunsu...@googlegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to a topic in
the Google Groups "Taffy Users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/taffy-users/UrkyvuM3GNk/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email
to taffy-users...@googlegroups.com
<mailto:taffy-users%2Bunsu...@googlegroups.com>.
To unsubscribe from this group and all its topics, send an email to taffy-users...@googlegroups.com.
Thanks for offering... I sent you a hangout invitation.
--
You received this message because you are subscribed to the Google Groups "Taffy Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to taffy-users...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hmm, seems reasonable. I don't see anything wrong. Can you share more of your code, or are you available for a quick G+ hangout so I can watch over your shoulder?
Adam
Dave Shuck wrote:
I actually mistyped that. This is my applicationStartEvent(). Sorry for the confusion!<cffunction name="applicationStartEvent" access="public" output="false" returntype="void"
hint="this method is called by the Traffy framework as a pseudo application bootstrap">
<cfset application.config = loadConfig() />
<cfset application.beanFactory = initBeanFactory() />
<cfset variables.framework.beanFactory = application.beanFactory />
</cffunction>
an email to taffy-users...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to a topic in the Google Groups "Taffy Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/taffy-users/UrkyvuM3GNk/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to taffy-users...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "Taffy Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to taffy-users...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hi Dave,
Sounds like you're not too far off...
https://github.com/atuttle/Taffy/wiki/So-you-want-to:-Use-an-external-bean-factory-like-ColdSpring-to-resolve-dependencies-of-your-resources#create-your-bean-factory
In short, you should be using ApplicationStartEvent(), not onRequest(), because Taffy has to know about the available services during its bootstrapping phase in order to inject them into the resource CFCs. The above link should get you straightened out. :)
Welcome aboard!
Adam
Dave Shuck wrote:
I am using Taffy for the first time today and am struggling with what I feel should be a simple concept. I have an external ColdSpring beanfactory, and in the requestStartEvent() I have the following:<cfset variables.framework.beanFactory = application.beanFactory />
If I go and short-circuit the onRequest() method in the api.cfc with the following...<cfdump var="#application._taffy.EXTERNALBEANFACTORY.getBean("CityService")#" /><cfabort/>
... I see a dump of a service that I have defined in my ColdSpring instance.
In the documentation, if I am interpreting it correctly I should then be able to put the following inside one of my resource classes:<cffunction name="setCityService" output="false" returntype="void" access="public">
<cfargument name="cityService" required="true" />
<cfset StructAppend( variables, arguments ) />
</cffunction>--
If this exists, I should then have access to variables.cityService within that resource instance, right? For some reason, it appears that this isn't working as I would expect. The setCityService() method is never being invoked. Am I misunderstanding the way that this works?
Thanks in advance.
~d
You received this message because you are subscribed to the Google Groups "Taffy Users" group.
Adam, thanks for taking the time to look at the issue with me. In case
anyone else runs across this issue, it was related to the lack of an
explicit local scope on pre-CF9 during the dependency injection on
bootstrap. The bug fix can be seen here:
https://github.com/dshuck/Taffy/commit/4400cbcabcea98e8b36960ff1efc734a3569165a
On Wed, Apr 17, 2013 at 2:06 PM, Adam Tuttle <ad...@fusiongrokker.com
<mailto:ad...@fusiongrokker.com>> wrote:
Weird, I haven't gotten anything. I'm inviting you to one as well...
Dave Shuck <mailto:dsh...@gmail.com>
April 17, 2013 3:03 PM
Thanks for offering... I sent you a hangout invitation.
--
You received this message because you are subscribed to the
Google Groups "Taffy Users" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to taffy-users...@googlegroups.com
<mailto:taffy-users...@googlegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.
Adam Tuttle <mailto:ad...@fusiongrokker.com>
April 17, 2013 2:48 PM
Hmm, seems reasonable. I don't see anything wrong. Can you share
more of your code, or are you available for a quick G+ hangout so
I can watch over your shoulder?
Adam
Dave Shuck wrote:
Dave Shuck <mailto:dsh...@gmail.com>
April 17, 2013 2:20 PM
I actually mistyped that. This is my applicationStartEvent().
Sorry for the confusion!
<cffunction name="applicationStartEvent" access="public"
output="false" returntype="void"
hint="this method is called by the Traffy framework
as a pseudo application bootstrap">
<cfset application.config = loadConfig() />
<cfset application.beanFactory = initBeanFactory() />
<cfset variables.framework.beanFactory =
application.beanFactory />
</cffunction>
On Wed, Apr 17, 2013 at 1:18 PM, Adam Tuttle
<mailto:taffy-users%2Bunsu...@googlegroups.com>.
For more options, visit
https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to a
topic in the Google Groups "Taffy Users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/taffy-users/UrkyvuM3GNk/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an
email to taffy-users...@googlegroups.com
<mailto:taffy-users%2Bunsu...@googlegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the
Google Groups "Taffy Users" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to taffy-users...@googlegroups.com
<mailto:taffy-users...@googlegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.
Adam Tuttle <mailto:ad...@fusiongrokker.com>
April 17, 2013 2:18 PM
Hi Dave,
Sounds like you're not too far off...
https://github.com/atuttle/Taffy/wiki/So-you-want-to:-Use-an-external-bean-factory-like-ColdSpring-to-resolve-dependencies-of-your-resources#create-your-bean-factory
In short, you should be using ApplicationStartEvent(), not
onRequest(), because Taffy has to know about the available
services during its bootstrapping phase in order to inject them
into the resource CFCs. The above link should get you
straightened out. :)
Welcome aboard!
Adam
Dave Shuck wrote:
Dave Shuck <mailto:dsh...@gmail.com>
<mailto:taffy-users...@googlegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to a topic in
the Google Groups "Taffy Users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/taffy-users/UrkyvuM3GNk/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email
to taffy-users...@googlegroups.com
<mailto:taffy-users%2Bunsu...@googlegroups.com>.