Adobe COLDFUSION 9 Manual page 1274

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

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using External Resources
The standard ColdFusion event gateways log errors in interaction with any messaging server, errors in messages sent
by the ColdFusion application, and recoverable errors in event gateway operation. The event gateways also log
informational status messages for significant normal events, including event gateway initialization and restarts.
ColdFusion event gateway messages in the eventgateway.log file normally have the following format:
gatewayType (gatewayID) message body
When you are developing an event gateway application, you can use the ColdFusion Log viewer to inspect the
eventgateway.log file and filter the display by using the gateway type and possibly the gateway ID as keywords. By
selecting different severity levels, you can get a good understanding of errors and possible inefficiencies in your
application and event gateway operation.
Deploying event gateways and applications
To deploy an event gateway application in a ColdFusion server, install your listener CFC and configure a gateway
instance that uses the CFC.
Deploy an event gateway application
Ensure that the ColdFusion Administrator is configured with the required event gateway type. If it is not, deploy
1
the event gateway type (see
If the event gateway type requires a configuration file, ensure that a valid file exists in the gateway\config directory.
2
Some event gateways could be designed to let multiple event gateway instances share a configuration file. Others
could require a separate file for each event gateway instance.
3
Install the event gateway application listener CFC and any other application components. ColdFusion provides a
cf_root\gateways\cfc directory as a convenient location for these CFCs, and includes a mapping in the ColdFusion
Administrator page for that directory. However, ColdFusion does not require you to install the listener CFC in this
directory.
4
Configure an event gateway instance on the Gateway Instances page of the Event Gateways section in the
ColdFusion Administrator (see
Using the CFML event gateway for asynchronous CFCs
The ColdFusion CFML event gateway lets CFML code send a message to CFC methods asynchronously. This event
gateway lets you initiate processing by a CFC method without waiting for it to complete or return a value. Possible uses
for asynchronous CFCs that you access using this event gateway include the following:
• Reindexing a Verity collection with new information without delaying an application, for example, when a user
uploads a new file
• Logging information, particularly if significant amount of data must be logged
• Running batch processes that could take a substantial amount of time to complete
Because asynchronous CFCs run independently of a request, they do not provide feedback to the user. Save any results
or error information to a file, data source, or other external resource.
By default, ColdFusion delivers the message to a CFC method named onIncomingMessage. You can specify any
method name, however, in the SendGatewayMessage method's data parameter.
"Deploying an event
gateway" on page 1333).
"Configuring an event gateway
Last updated 8/5/2010
instance" on page 1262)
1269

Advertisement

Table of Contents
loading

Table of Contents