May 22, 2008
So, I downloaded Ray Camden's Lighthouse Project some time ago to use it for automated bug tracking on a sizeable upgrade project I was working on.

I love the way Lighthouse works, it's a great ,simple tool and has almost all the features I want in a bug tracking system, except... that it's automated bug submission system is based on sending and receiving  emails.
As a rule, I'm a terribly impatient programmer... waiting around for minutes while an error email works it way into a bug tracker, or my inbox is simply too slow. So I decided to write a plugin for Lighthouse that would allow my application to submit bug directly to Lighthouse via a simple web service call.

I started tearing into the code and thanks to the very clean and simple way Ray wrote it, I was able to find everything I needed to setup the data input. I dropped in a custom CFC to handle the requests and everything looked good. That is until I fired off a test request to it and BAM... nothing happened.

After a fair amount of digging through the code and some google-ing, it turns out, that the onRequest function was swallowing up the web service response and basically refusing to let it back out.

As it turns out, this is a known "feature" of using Application.cfc and the onRequest method. Of course, that seems like a total cop out to me, but thankfully there is a quick and easy fix for it.

If you are planning on using onRequest in your Application.cfc, simply add the following code to your onRequestStart method.


This simple test against Arguments.thePage checks to see if the file type being called is a cfc. If it is, it dynamically deletes the onRequest method from the CFC in memory and magically lets the response through.

But silly me, it seems like this is something that should be addressed in the next CF8 updater or in CF9.
Categories: ColdFusion
icon date 21:46:17 | icon author Alan Rother
subscribe Blog
search
Categories
ColdFusion (4)
Crazy Ideas (1)
Family (1)
Recent posts
New Adobe Schwag
(19 Mar 2008 20:00:23)
MAX Day 1
(30 Sep 2007 08:27:39)
Reverse Package Tracking
(06 Sep 2007 21:14:31)
I Got My GotCFM? T-Shirt Today
(31 Aug 2007 11:43:17)
AV BLOG Upgraded
(17 Jul 2007 11:06:50)
FEED
[RSS][ATOM] All
[RSS][ATOM] ColdFusion
[RSS][ATOM] Flex
[RSS][ATOM] Random Thoughts
[RSS][ATOM] Photography
[RSS][ATOM] Crazy Ideas
[RSS][ATOM] Family
Mailing list