User Guide

Table Of Contents
1032 Chapter 42: Using Event Gateways
When a ColdFusion application responds to an event gateway message, or sends a message
independently, it does not use a CFEvent structure. However, the ColdFusion event gateway
service creates a Java CFEvent instance with the message data before calling the event gateways
outgoingMessage method.
Using persistent scopes in listener CFCs
ColdFusion listener CFCs can use the Application, Client, and Session persistent scopes.
Because incoming event gateway messages are not associated with HTTP requests, ColdFusion
uses different session and client IDs for interactions initiated by these events than for CFM Page
requests, as follows:
.
The gatewayID value is the event gateway ID that you set in the ColdFusion MX Administrator,
and gatewayType and originatorID are the values that the event gateway sets in the CFEvent
instance for an incoming message.
Application scope
The Application scope lets the CFC share data with any ColdFusion page or CFC that uses the
same application name. This way, a listener CFC can use the same Application scope as CFML
pages that might be used to send messages. Also, you can put multiple listener CFCs in a single
directory and have them share an Application.cfc or Application.cfm file and application name.
As with all ColdFusion code, use the Application.cfc This.name variable or the
cfapplication
tag to set the application name. The listener CFC can use an Application.cfc or Application.cfm
file if the CFC is in a directory that is in or under one of the following places:
the ColdFusion web root
a directory that is in the ColdFusion MX Administrator Mappings list.
GatewayType The type of event gateway, such as SMS. An application that can process
messages from multiple event gateway types can use this field. This value is the
gateway type name that is specified by the event Gateway class. It is not
necessarily the same as the gateway type name in the ColdFusion MX
Administrator.
CFCPath The location of the listener CFC. The listener CFC does not need to use this
field.
CFCMethod The listener method that ColdFusion invokes to process the event. The listener
CFC does not need to use this field.
CFCTimeout The time-out, in seconds, for the listener CFC to process the event request.
The listener CFC does not need to use this field.
Identifier Structure
Session ID gatewayType_gatewayID_originatorID
cfid originatorID
cftoken gatewayType_gatewayID
Field Description