One of the most exciting new features available in ColdFusion MX 7 Enterprise is event gateways. Event gateways offer ColdFusion developers fantastic new possibilities by allowing ColdFusion applications to interface with practically any Internet-enabled system, even if that system doesn’t communicate through HTTP. There’s a whole world of other protocols and now ColdFusion developers have access to more or less all of them through the event gateway architecture. The event gateways themselves are written in Java so if Java can communicate with something, now ColdFusion can as well.
ColdFusion MX 7 Enterprise ships with several event gateways. The gateway that seems to have garnered the most attention is the Short Messaging Service (SMS) gateway, which enables cell phone text messaging capabilities in ColdFusion applications. Although the potential for SMS-enabled ColdFusion applications is huge, if you’re like I am, you probably use instant messaging far more than you do your cell phone. IM junkies rejoice: ColdFusion MX 7 Enterprise ships with IM gateways for Extensible Messaging and Presence Protocol (XMPP) and Lotus Sametime.
In this tutorial I demonstrate using the XMPP gateway with an open-source Jabber server called Jive Messenger Server. (If you use Sametime, the vast majority of the ColdFusion code presented here will work with Sametime as well.) Jabber is an implementation of the free, open source, XML-based XMPP IM protocol. That’s a lot of acronyms! The main point is that Jabber is freely available, easy to install, and works great with CFMX 7’s XMPP gateway. Visit www.jabber.org for more information about XMPP and Jabber.
Step one in the journey to giving the ColdFusion server IM ability is installing a Jabber server. For this, you use Jive Messenger Server and a Jabber client; if you haven’t already installed a Jabber client, I recommend Exodus. I’ve also had good luck with Pandion. As an aside, even though I’m typically a Macintosh user, I’ll use Windows software in this article to reach the widest audience. Macintosh fans simply need to install a Macintosh-based Jabber server and client.
The Jive Messenger installation process is straightforward.
Now go into the administrator interface for Jive Messenger Server.
Make sure to leave Jive Messenger running in the background as you continue the tutorial.
Figure 1. The Jive Messenger Administrator
Believe it or not, once your Jabber server is running, the hard part is already out of the way.