CF8 bug resolving CFC paths when using RTMP channel

I didn't understand why sometimes my application failed to start properly. I've launched a debug session and enabled the 'break on exception' option and found that onApplicationStart was failing in this line:

<cfset application.beanFactory = createObject('component','coldspring.beans.DefaultXMLBeanFactory').init()>

throwing that the returned type of the init method wasn't of the type 'coldspring.beans.DefaultXMLBeanFactory'. This is weird because my Application.cfc is in my webroot, the ColdSpring folder also and I have a / for the webroot (needed for RTMP).

What was causing this?

The problem was that sometimes I launched the Flex application using a cfm template as the wrapper which would trigger the onApplicationStart method. When a call was made through the RTMP connection, the onApplicationStart wasn't called anymore since it was invoked during the cfm template request. In some other times used a html Template instead, the onApplicationStart would be then triggered by the first call through RTMP. The onApplicationStart could resolve the path to 'coldspring.beans.DefaultXMLBeanFactory' (I stepped in with the debugger) but raised the error when returning the value of init method.

The only workaround for now it to only use cf-polling-amf till it's fixed. Using cf-polling-amf, it works perfectly.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
BlogCFC was created by Raymond Camden. This blog is running version 5.8.001. Design by dcarter.