Friday, February 29, 2008

Recording of my BlazeDS presentation

I gave my "BlazeDS Revealed" presentation to the ColdFusion Online Meetup group last night to about 55 people via Acrobat Connect. Charie Arehart does a great job of organizing these online-only meetings that cover just a ton of ColdFusion and related topics and each presentation is recorded so you can watch topics that interest you after the fact.

As he reminded me more than once last night, he is always looking for speakers.

The recording of my BlazeDS session is available here.

Thursday, February 28, 2008

Using ColdFusion with SQL Server XML/SOAP Endpoints

John Jarrad has blogged a very nice explanation on how he got ColdFusion 8 working with SQL Server 2005's XML/SOAP Endpoints. John referenced a few of my older posts like the one about how to use the Apache Commons HTTPClient instead of the built in HTTPSender class.

The interesting thing is that he did not use the HTTPClient library (although using this should have allowed the Digest and NTLM authentication to work since the library supports it) because the HTTPSender class (see source here) does in fact support HTTP 1.1, just not by default. The trick is to set the right property on the web service stub so that the Axis engine does the right thing.

The other note to John's post is that you can use cfinvoke if you want to, but you just have to use cfobject/CreateObject to create the web service "stub" first, then pass that in as the webservice attribute of cfinvoke.


<cfset ws = CreateObject("webservice", "https://webservice.yourcompany.com/sql/whatever_endpoint?wsdl")>
<cfset ws._setProperty("axis.transport.version", "1.1")>
<cfinvoke webservice="ws" method="JJData" returnvariable="result">
</cfinvoke>


John also notes that processing the result set and turning it in to a query is pretty slow. Not sure what is causing this other than there is a large amount of data getting processed.

Wednesday, February 27, 2008

BlazeDS presentation Feb 28, 2008

I will be giving a presentation about BlazeDS to the ColdFusion Online Meetup this Thursday, February 28. I believe anyone can join the Acrobat Connect room (from anywhere in the world, how cool is that?) and the session will be recorded so you can watch me again and again. :-)

Check out the details here.

Here is the description:
Recently Adobe announced the release of BlazeDS which will make some key server technologies open source and free to use in any application. These technologies are critical to building great applications with Flex and AIR. Tom will talk about exactly what you get in BlazeDS and how it relates to LiveCycle Data Services and will detail some of the reasons why you might want to use these server technologies. He will also explain how ColdFusion developers can take advantage of BlazeDS in their applications.

Monday, February 25, 2008

BlazeDS and Flex 3/AIR 1.0 out today!


Today Adobe shipped Flex 3 and Air 1.0 along with releasing the open source BlazeDS technology. These are some amazing and world changing things that just hit the streets.

I'll let others talk about how revolutionary AIR is and how great Flex 3 is going to be. The BlazeDS open source project is what I am excited about (and not only because I work on the BlazeDS/LiveCycle Data Services team).

In a nutshell, two of the three important technologies included in LCDS 2.5.1 have been released a) for free (as in beer) and b) as open source. This means that you can use Remoting (aka Flash Remoting) and Flex Messaging in your Flex applications, backed by Java or ColdFusion, without any licensing whatsoever. You can file bugs on the technology in the public JIRA bug tracking system. You can even check out the source and see what makes it work (or debug a problem when it doesn't).

Anyway, the team is very excited about BlazeDS and the whole company is pumped for AIR 1.0. Check them out!

http://opensource.adobe.com/wiki/display/blazeds/BlazeDS

Wednesday, February 20, 2008

Directory Watcher talk by Dave Ferguson

It looks like I will be giving a talk to the Online ColdFusion Meetup next week (details to follow). In browsing around the meetup site, I decided to watch a talk about the Directory Watcher Event Gateway, one of the example gateways we shipped in ColdFusion 7 (& 8). I am always impressed at how useful folks find this gateway as I wrote it on a whim in just a few hours because we wanted to provide some source code examples for those who wanted to write their own gateway.

Anyway, if you do watch Dave's talk, there are a few questions and quirks he mentions that I wanted to try and clear up.

First, note that the Java source for this gateway is shipped with every copy of CF in /gateway/src/examples/watcher. I am still waiting for someone else to fix the problem of slow uploaded files triggering the "ADD" event before it is done writing the file. Dave gives a CFML/Java based work around for this problem in his talk (and makes the files available on his blog here).

Dave notes that the "Out"count in the CF administrator is always 0 for this gateway. This is the number of messages/events that the gateway has sent, well, out. For instance how many times SendGatewayMessage() was called for this gateway. Since the Directory Watcher doesn't do outgoing messages (see line 187), this count will of course always be zero.

Dave mentioned that when he returns something from (in his case) one of the onAdd, onChange or onDelete functions, he gets a meaningless error in the logs. I filed a bug on this for Dave (#71311). The problem is that as a convenience the gateway system will take the return value of an event processing CFC function and send that "out" to the gateway. For instance if you receive an SMS or IM message to one of those gateways, you can return a Struct with a reply message from the onIncomingMessage function and the system will (in effect) call SendGatewayMessage() on that gateway with that struct. Since he was returning a simple value (i.e. "1") CF tries to make that a Struct, fails and reports the strange error. It *should* ignore that return value and log a warning (in the eventgateway.log) that it is doing this.

Dave was asked about timeouts for the CFC processing functions. Event Gateway CFC function calls are subject to the same timeout value as ColdFusion requests. A gateway can override this value (in the Java code) by calling CFEvent.setCfcTimeOut(). Otherwise the timeout is the same as for "regular" CFML page requests.

There was a question about file renames and what the Directory Watcher does when it sees this. The watcher does in fact report an ADD and a DELETE event when you change the name of a file. This is by design and I verified this on ColdFusion 7 and 8.

Hope this info helps those looking for more information about this gateway.

30 On Air launches

Check out the new 30 On Air site for some fun videos answering the questions
Why AIR? Why Flash Player? Why Flash? Why Flex? Why Coldfusion? Why AJAX? Why LiveCycle? Why Dreamweaver?

You can upload your own video also, just tag it on YouTube with the "30onair" tag. I like the rocking guitar solo video, but maybe I have been playing too much Guitar hero.