Adobe COLDFUSION 9 Manual page 1318

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using External Resources
Configuring a Data Services Messaging event gateway
Although you can configure an instance of a Data Services Messaging event gateway by creating a configuration file
and specifying that file as the configuration file when you create an instance of the event gateway, you can also provide
the configuration information in the message sent from the Flex application. You provide configuration information
to the Data Services Messaging event gateway in a configuration file to do either of the following:
• Have the Data Services Messaging event gateway send messages to Flex Enterprise Services 2 on a different
computer
• Use the Data Services Messaging event gateway with a specific Flex destination, and ignore any destination
specified in the message
The Data Services Messaging event gateway configuration file is a simple Java properties file that contains the following
properties:
Property
Description
destination
A hard-coded destination. If you specify this value, any destination information in the message is ignored.
The host name or IP address of the Flex Enterprise Services 2 server.
host
The following example is a configuration file:
#
# Flex event gateway configuration
#
# This is the destination of the messages.
destination=Gateway1
# host name or IP address of the Flex Enterprise Server
host=127.0.0.1
If you create a configuration file, save it in the cf_root/gateway/config/ directory, with the extension .cfg.
Sending outgoing messages
Your ColdFusion application sends a message to a Flex application by doing the following actions:
1
The ColdFusion application sends an outgoing message, in a
CFC, or by calling the ColdFusion
A method provided by the Data Services Messaging gateway gets called when you send an outgoing message.
2
In outgoing messages sent from CFML, the following structure members are translated to the Flex message:
Name
Contents
body
Body of the message. Required.
CorrelationID
Correlation identifier of the message.
Destination
Flex destination of the message. Required if it is not specified in the configuration file.
Headers
If the message contains any headers, the CFML structure that contains the header names as keys and values.
LowercaseKeys
If the value is set to
TimeToLive
Number of milliseconds during which this message is valid.
cfreturn
function.
SendGatewayMessage
yes
, the structure keys are converted to lowercase during creation of ActionScript types.
Last updated 8/5/2010
tag in the listener method of the listener
1313

Advertisement

Table of Contents
loading

Table of Contents