ColdFusion 9.0 Resources |
Event gateway facilities and toolsColdFusion provides several features and tools for developing and deploying event-handling applications, these including the following:
Standard event gatewaysAdobe provides several event gateways as part of ColdFusion. These event gateways support the following messaging protocols:
ColdFusion also provides an event gateway, the CFML asynchronous event gateway, that lets a CFML application invoke a CFC method asynchronously. This event gateway does not follow the model of providing a mechanism for exchanging messages with resources outside ColdFusion. Instead, it provides a one-way path for invoking CFCs when an application does not require (indeed, cannot receive) a return value from the CFC. For detailed information on using the CFML asynchronous event gateway, see Using the CFML event gateway for asynchronous CFCs. Development tools and example codeColdFusion provides the following tools and example code for developing your own event gateways and event gateway applications:
For more information on these examples, see Using the example event gateways and gateway applications. The ColdFusion gateway directoryThe ColdFusion installation includes a cf_root\WEB-INF\cfusion\gateway directory on J2EE configurations, or cf_root\gateway directory on server configurations. This directory contains all the code for ColdFusion example event gateways and example event gateway applications, and example configuration files for use by standard ColdFusion event gateways. You do not have to place your event gateways, event gateway application CFCs, or event gateway configuration files in this directory, but ColdFusion is configured to find event gateways and CFCs that you place there. The following table lists the event gateway directory subdirectories, their purpose, and their initial contents. For more information on using the example event gateways and applications, see Using the example event gateways and gateway applications.
The eventgateway.log fileEvent gateways provided with ColdFusion log event gateway errors and events to the cf_root\WEB-INF\cfusion\logs\eventgateway.log file on J2EE configurations, or the cf_root\logs\eventgateway.log file on server configurations. ColdFusion includes methods that let any event gateway use this file. This log file can be useful in debugging event gateways and event gateway applications. ColdFusion Administrator event gateway pagesThe ColdFusion Administrator includes a Gateways section with three pages for managing event gateways:
The Settings page lets you enable and disable support for event gateways, specify the number of threads that ColdFusion can devote to processing events, specify the maximum number events that ColdFusion can hold in its event queue (which holds events that are waiting to be processed) and start the SMS test server. The Gateway Types page lets you add, remove, and configure event gateway types by specifying a name, a Java class, and startup time-out behavior. Note: The gateway type name in the ColdFusion Administrator
does not have to be the same as the gateway type that is used in
the gateway Java code and the CFEvent data structure;
however, use the same name in both places for consistency.
The Gateway Instances page lets you add, remove, configure, start, and stop individual event gateway instances. You configure an event gateway instance by specifying a unique ID, the gateway type, one or more listener CFC paths, a configuration file (not required for all gateway types), and a startup mode (manual, automatic, or disabled). |