This guide is licensed for use under the terms of the Creative Commons Attribution Non-Commercial 3.0 License. This License allows users to copy, distribute,
and transmit the guide for noncommercial purposes only so long as (1) proper attribution to Adobe is given as the owner of the guide; and (2) any reuse or
distribution of the guide contains a notice that use of the guide is governed by these terms. The best way to provide notice is to include the following link. To
view a copy of this license, visit
http://creativecommons.org/licenses/by-nc-sa/3.0/
Adobe, the Adobe logo, and ColdFusion are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other
countries.
AIX is a trademark of International Business Machines Corporation in the United States, other countries, or both. Java, Solaris, and Sun are trademarks or
registered trademarks of Sun Microsystems, Inc. in the United States and other countries. UNIX is a registered trademark of The Open Group in the US and
other countries. Linux is the registered trademark of Linus Torvalds in the U.S. and other countries. Macintosh is a trademark of Apple Inc., registered in the
United States and other countries. Microsoft and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or
other countries. All other marks are the property of their respective owners.
Adobe Systems Incorporated, 345 Park Avenue, San Jose, California 95110, USA.
Configuring and Administering ColdFusion is intended for anyone who has to configure and manage their Adobe®
ColdFusion® 9 development environment.
About ColdFusion documentation
The ColdFusion 9 documentation is designed to provide support for the complete spectrum of participants.
Documentation set
The ColdFusion documentation set includes the following titles:
BookDescription
1
Installing Adobe® ColdFusion® 9
Configuring and Administering
Adobe® ColdFusion® 9
Developing Adobe® ColdFusion® 9
Applications
Adobe® ColdFusion® 9 CFML
Reference
Describes system installation and basic configuration for Windows, Macintosh, Solaris, Linux, and AIX.
Describes how to perform ColdFusion administration tasks such as managing server settings, configuring
datasources, managing security, deploying ColdFusion applications, caching, setting up CFX tags,
monitoring server activity using the ColdFusion Server Monitor, and configuring web servers.
Describes how to develop your dynamic web applications. This book provides detailed information about
using the CFML programming language and ColdFusion features, such as ColdFusion Web Services,
ColdFusion Portlets, ColdFusion ORM, AJAX support, Flex and AIR integration, and integration with other
products and technologies such as Microsoft Office, OpenOffice, and SharePoint.
Provides descriptions, syntax, usage, and code examples for all ColdFusion tags, functions, and variables.
Viewing online documentation
All ColdFusion documentation is available online in HTML and Adobe Acrobat Portable Document Format (PDF)
files. Go to the ColdFusion Help and Support page at
documentation. In addition to viewing the online documentation, you can also add and view comments to the
documentation.
www.adobe.com/go/learn_cfu_support_en to view the online
Last updated 8/5/2010
Chapter 2: Administering ColdFusion
Although you use the ColdFusion Administrator to perform most ColdFusion administration tasks, you can also
manage databases, web server configurations, and Verity Search Server.
About the ColdFusion Administrator
The ColdFusion Administrator provides a browser-based interface for managing your ColdFusion environment. You
can configure many settings to provide optimal levels of security and functionality. The available options are based on
your edition of ColdFusion 9—Standard or Enterprise—as well as your configuration: server, multiserver, or J2EE. For
more information on ColdFusion configurations, see Preparing to Install ColdFusion in Installing ColdFusion.
The default location for the ColdFusion Administrator login page is:
Where servername is the fully qualified domain name of your web server. Common values for servername are localhost
or 127.0.0.1 (each refers to the web server on the local computer).
2
If you are using the ColdFusion built-in web server, include the port number as part of the servername. The default
port number for the server configuration is 8500; for example,
http://servername:8500/CFIDE/administrator/index.cfm. The default port number for the multiserver configuration
is 8300. If you are using the J2EE configuration, include the port number that the web server of the J2EE application
server uses.
If you were using the built-in web server in a version earlier than ColdFusion MX 7 and upgraded to ColdFusion 8,
the installer automatically finds an unused port for the built-in web server (typically 8501).
If your ColdFusion Administrator is on a remote computer, use the Domain Name Services (DNS) name or Internet
Protocol (IP) address of the remote host.
To access the ColdFusion Administrator, enter the password specified when you installed ColdFusion.
Note: If you are running ColdFusion in a multihomed environment and have problems displaying the ColdFusion
Administrator, see
For more information, see “Using the ColdFusion Administrator” on page 4.
“Web Server Management” on page 59 for configuration information.
About web server administration
ColdFusion applications require a web server to process ColdFusion Markup Language (CFML) pages. The server and
multiserver configurations provide a built-in web server along with support for external web servers, such as Apache,
IIS, and Sun ONE Web Server (formerly known as iPlanet).
For more information, see “Web Server Management” on page 59.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Administering ColdFusion
About Verity administration
ColdFusion includes Verity K2 Server search technology. Verity K2 Server is a high-performance search engine
designed to process searches quickly in a high-performance, distributed system.
For more information, see “Introducing Verity and Verity Tools” on page 116.
3
Last updated 8/5/2010
Chapter 3: Using the ColdFusion
Administrator
Use the Adobe ColdFusion Administrator to perform basic administration tasks. You can also use the Administrator
application programming interface (API) to perform Administrator functionality programmatically.
Initial administration tasks
Immediately after you install ColdFusion, you might have to perform some or all the administrative tasks described in
the following table:
TaskDescription
4
Establish database connectionsColdFusion applications require data source connections to query and write to databases. To create,
Specify directory mappingsDirectory mappings redirect relative file paths to physical directories on your server. To specify server-
Configure debugging settingsDebugging information provides important data about CFML page processing. To choose the debugging
Set up e-mailE-mail lets ColdFusion applications send automated e-mail messages. To configure an e-mail server and
Change passwordsYou might have to change the passwords that you set for the ColdFusion Administrator and Remote
Define user-specific access to the
ColdFusion Administrator
Configure Java settings(Server configuration only) You might have to customize Java settings, such as classpath information, to
verify, edit, and delete database connections, use the Data Sources page.
For more information, see “Data Source Management” on page 34.
wide directory aliases, use the Mappings page.
For more information, see “Mappings page” on page 12.
information to display, and to designate an IP address to receive debugging information, use the
Debugging & Logging section.
For more information, see “Debugging Output Settings page” on page 19.
mail options, use the Mail Server page.
For more information, see “Mail page” on page 12.
Development Service (RDS) during ColdFusion installation. To change passwords, use the Security
section.
For more information, see “Administrator page” on page 27 and “RDS page” on page 27.
To grant user-specific access to the ColdFusion Administrator, you create users and specify a user name,
password, applicable sandboxes, and the sections of the ColdFusion Administrator that each user can
access. For more information, see
meet the needs of your applications. To change Java settings, use the Java and JVM page.
For more information, see “Extensions section” on page 24.
“Security section” on page 27.
Restrict tag accessSome CFML tags might present a potential security risk for your server. To disable certain tags, use the
Sandbox Security page.
For more information, see “Administering Security” on page 75.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using the ColdFusion Administrator
Accessing user assistance
You can use the buttons on the upper left of the ColdFusion Administrator to access online Help, information about
additional resources, and system information.
Online Help Click the question-mark icon on any ColdFusion Administrator page to access the context-sensitive
online Help. The online Help has procedural and brief overview content for the ColdFusion Administrator page that
you are viewing. This information appears in a new browser window and contains standard Contents, Index, and
Search tabs.
System Information Click System Information to see information about the ColdFusion server, including version
number, serial number, and JVM details.
Resources Click Resources to display the Resources page, which provides links to the following:
• Getting Started experience
• Example applications,
• Product Information
• Technical Support and Training,
• Additional Installers
• Product Updates
• Community Resources
• Security-related Information
5
Server Settings section
The Server Settings section lets you manage client and memory variables, mappings, charting, and archiving. It also
allows you to configure e-mail and Java settings.
Settings page
The Settings page of the ColdFusion Administrator contains configuration options that you can set or enable to
manage ColdFusion. These options can significantly affect server performance. The following table describes the
options:
OptionDescription
Timeout Requests After (Seconds)Prevents unusually lengthy requests from using up server resources. Enter a limit to the time that
Enable Per App SettingsLets developers programmatically define ColdFusion settings such as mappings and debugging per
Use UUID For cftokenSpecify whether to use a universally unique identifier (UUID), rather than a random number, for a
Enable HTTP Status CodesConfigures ColdFusion to set a status code of 500 Internal Server Error for an unhandled error.
ColdFusion waits before terminating a request. Requests that take longer than the time-out period
are terminated.
application.
cftoken.
Disable this option to configure ColdFusion to set a status code of 200 OK for everything, including
unhandled errors.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using the ColdFusion Administrator
OptionDescription
6
Enable Whitespace ManagementCompresses repeating sequences of spaces, tabs, and carriage returns and linefeeds. Compressing
Disable CFC Type CheckTurns off verifying the CFC type when calling methods with CFCs as arguments. This option also
Disable Implicit UDF RegistrationWhen checked, Implicit UDFs (setters/getters) are not added into CFC's 'variable' scope, 'this' scope,
Disable Access To Internal ColdFusion
Java Components
Prefix serialized JSON withProtects web services, which return JSON data from cross-site scripting attacks by prefixing serialized
Enable In-Memory File SystemEnables the in-memory virtual file system support. By default, this is enabled.
Memory Limit for In-Memory Virtual
File System
Watch Configuration Files For Changes
(Check Every n Seconds)
Enable Global Script Protection Protects Form, URL, CGI, and Cookie scope variables from cross-site scripting attacks. Select this
whitespace can significantly compact the output of a ColdFusion page.
This option is enabled, by default.
disables verifying an object that implements the right interface.
Enabling this option can improve the performance of your application. However enable it only on a
production server.
or metadata. Although you can still invoke the implicit UDFs, this improves CFC creation
performance.
Prevents CFML code from accessing and creating Java objects that are part of the internal
ColdFusion implementation. This prevents a non-authenticated CFML template from reading or
modifying administration and configuration information for this server.
JSON strings with a custom prefix.
Lets you specify the memory limit in Megabytes (MB) for in-memory virtual file system.
Sets ColdFusion to monitor its configuration files and automatically reload them if they change. This
action is required if you deploy ColdFusion in a Websphere ND vertical cluster, because multiple
instances of ColdFusion share the same configuration files. It is recommended that you do not
enable this feature for most installations.
option if your application does not contain this type of protection logic.
Allow Extra Attributes in
AttributeCollection
Clear temporary files created during
CFaaS after
Default ScriptSrc DirectorySpecify the default path (relative to the web root) to the directory that contains the cfform.js file.
Google Map API KeySpecify the Google Map API license key that you require to access Google Maps.
Component with onServerStart()
method
Application.cfc/Application.cfm
lookup order
Specify whether ColdFusion tags can pass non-standard attributes in the attributecollection
structure.
Specify the time in minutes after which the temporary files created during CF as a Service(CFaaS)
operation must be deleted. The default value is 30 minutes.
Developers reference this file in the ScriptSrc attribute of the
In a hosted environment, you might need to move the cfform.js file to a directory other than CFIDE.
Specify the absolute path to a CFC having onServerStart() method or specify a dot delimited CFC
path under web root, like "a.b.server". By default, ColdFusion looks for server.cfc under web root.
Select the order in which ColdFusion searches for Application.cfm or Application.cfc if it is not found
in the current project folder. You can set ColdFusion to search as follows:
cfform tag.
• default search order: ColdFusion looks for an Application.cfc/Application.cfm file from the current
folder until the system root directory. On Windows, this could be C:\ and on UNIX, /opt.
• till web root: ColdFusion looks for an Application.cfc/Application.cfm file from the current folder
till web root.
• in web root: ColdFusion looks for an Application.cfc/Application.cfm file in the current folder or
web root.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using the ColdFusion Administrator
OptionDescription
7
Missing Template HandlerSpecify a page to execute when ColdFusion cannot find a requested page. This specification is
Site-Wide Error HandlerSpecify a page to execute when ColdFusion encounters an error while processing a request. This
Maximum Size Of Post DataLimits the amount of data that can be posted to the server in a single request. ColdFusion rejects
RequeSt Throttle ThresholdRequests smaller than the specified limit are not queued or counted as part of the total memory.
Request Throttle MemoryLimits total memory size for the throttle. If sufficient total memory is not available, ColdFusion
relative to the web root.
Note: If the user is running Microsoft Internet Explorer with "Show Friendly HTTP error messages"
enabled, Internet Explorer displays this page only if it contains more than 512 bytes.
specification is relative to the web root. When you define a site-wide error handler or missing
template handler, ColdFusion does not log page-not-found errors and exceptions.
Note: If the user is running Internet Explorer with Show Friendly HTTP Error Messages enabled,
Internet Explorer only displays this page if it contains more than 512 bytes.
single requests larger than the specified limit.
Requests larger than the specified limit are counted as part of total memory and are queued if the
request throttle-memory size is exceeded.
queues requests until enough memory is free.
Request Tuning page
The Request Tuning page of the Administrator contains configuration options that you use to specify the number of
different types of requests and threads that ColdFusion can handle simultaneously.
OptionDescription
Maximum Number Of Simultaneous
Template Requests
Maximum Number Of Simultaneous
Flash Remoting Requests
Maximum Number Of Simultaneous
Web Service Requests
Maximum Number Of Simultaneous
CFC Function Requests
Maximum Number Of Simultaneous
Report Threads
Maximum Number Of Threads
Available For CFTHREAD
Timeout Requests Waiting In Queue
After n Seconds
The number of CFML page requests that can be processed concurrently. Use this setting to increase
overall system performance for heavy-load applications. Requests beyond the specified limit are
queued.
The number of Adobe Flash® Remoting requests that can be processed concurrently.
The number of Web Service requests that can be processed concurrently.
The number of ColdFusion Component methods that can be processed concurrently through HTTP.
This does not affect starting CFC methods from CFML, only methods requested through an HTTP
request.
The maximum number of ColdFusion reports that can be processed concurrently.
CFTHREAD that runs concurrently. Threads that CFTHREAD creates in excess of the specified limit are
queued.
If a request has waited in queue beyond the specified limit, time out the request. This value must be
at least as long as the Request Timeout setting (currently 60 seconds).
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using the ColdFusion Administrator
OptionDescription
8
Request Queue Timeout Page Specify a relative path to an HTML page to send to clients when a template requests time out before
Maximum Number Of Running JRun
Threads
Maximum Number Of Queued JRun
Threads
getting a chance to run. For example "/CFIDE/timeout.html.” This page cannot contain CFML. If a
page is not specified, clients receive a 500 Request Timeout error when their request does not get a
chance to run.
Maximum number of JRun handler threads that run concurrently. This option is used to set the
number of request threads that the underlying JRun J2EE application server runs at the same time.
This includes any non-ColdFusion requests such as JSP or HTML pages served through JRun.
Maximum number of requests that JRun can accept at any one time. This is the number of requests
that the underlying JRun J2EE application server can accept at the same time.
Caching page
The Caching page of the Administrator contains configuration options that you can set or enable to cache templates,
queries, and data sources. These options can significantly affect server performance. The following table describes the
settings:
OptionDescription
Maximum Number Of Cached
Templates
Trusted CacheUse cached templates without checking whether they changed. For sites that are not updated
Enter a value that specifies the number of templates that ColdFusion caches. For best application
performance, set this option to a value that is large enough to contain the commonly accessed
ColdFusion pages, yet small enough to avoid excessive reloading. You can experiment with a range
of values on your development server; a suitable starting point is one page per MB of Java Virtual
Machine (JVM) size.
frequently, using this option minimizes file system overhead.
Cache Template in RequestWhen checked, any requested files are inspected only once for potential updates within a request. If
Component cacheWhen checked, component path resolution is cached and not resolved again. This setting does not
Save Class FilesSaves to disk the class files that the ColdFusion bytecode compiler generates. During the
Cache Web Server PathsCaches ColdFusion page paths for a single server. Clear this option if ColdFusion connects to a web
Maximum Number Of Cached Queries Enter a value to limit the maximum number of cached queries that the server maintains. Cached
Clear Template Cache NowEmpties the template cache. ColdFusion reloads templates into memory the next time they are
Clear Component Cache NowEmpties the component cache. ColdFusion ignores the resolved path for components and try
unchecked, requested file are inspected for changes each and every time when it is accessed within
the same request. For application where templates/components are not expected to reflect updates
within the same request, this minimizes file system overhead. This setting does not require restarting
the server.
require restarting the server.
development phase, it is typically faster if you disable this option.
server with multiple websites or multiple virtual websites.
queries allow retrieval of result sets from memory rather than through a database transaction.
Because queries reside in memory, and query result set sizes differ, provide a limit for the number of
cached queries. You enable cached queries with the
cfquery tag. When the maximum number of cached queries is reached, the oldest query is
the
dropped from the cache and replaced with the specified query. If you set the maximum number of
cached queries to 0, query caching is unlimited.
requested and recompiles them if they have been modified.
resolution again.
cachedwithin or cachedafter attributes of
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using the ColdFusion Administrator
Client Variables page
Client variables let you store user information and preferences between sessions. Using information from client
variables, you can customize page content for individual users.
You enable client variable default settings in ColdFusion on the Client Variables page of the Administrator.
ColdFusion lets you store client variables in the following ways:
• In database tables
Note: If your data source uses one of the JDBC drivers bundled with ColdFusion 9, ColdFusion can automatically
create the necessary tables. If your data source uses the ODBC Socket or a third-party JDBC driver, you manually
create the necessary CDATA and CGLOBAL database tables.
• As cookies in the web browsers
• In the operating system registry
Important: Adobe recommends that you do not store client variables in the registry because it can critically degrade
performance of the server. If you use the registry to store client variables, you allocate sufficient memory and disk
space.
To override settings specified in the Client Variables page, use the Application.cfc file or the cfapplication tag. For
more information, see the Developing ColdFusion Applications.
9
The following table compares the client variable storage options:
Storage typeAdvantagesDisadvantages
Data source
Browser cookies
System registry
• Can use existing data source
• Portable: not tied to the host system or
operating system
• Simple implementation
• Good performance
• Can be set to expire automatically
• Client-side control
• Simple implementation
• Good performance
• Requires database transaction to read/write variables
• More complex to implement
• Users can configure browsers to disallow cookies
• Cookie data is limited to 4-KB
• Netscape Navigator allows only 20 cookies from one host;
ColdFusion uses three cookies to store read-only data,
leaving only 17 cookies available
• Possible restriction of the registry’s maximum size limit in
Windows in the Control Panel
• Integrated with the host system: not practical for
• Registry can be exported easily to other systems
• Server-side control
clustered servers
• Not available for UNIX
Migrating client variable data
To migrate your client variable data to another data source, determine the structure of the database tables that store
this information. Client variables stored externally use two simple database tables, as shown in the following tables:
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using the ColdFusion Administrator
CDATA Table
ColumnData type
cfidCHAR(64), TEXT, VARCHAR, or equivalent
appCHAR(64), TEXT, VARCHAR, or equivalent
dataMEMO, LONGTEXT, LONG VARCHAR, or equivalent
CGLOBAL Table
ColumnData type
cfidCHAR(64), TEXT, VARCHAR, or equivalent
dataMEMO, LONGTEXT, LONG VARCHAR, or equivalent
lvisitTIMESTAMP, DATETIME, DATE, or equivalent
Creating client variable tables
Use the following sample ColdFusion page as a model for creating client variable database tables in your own database.
However, keep in mind that not all databases support the same column data type names. For the proper data type, see
your database documentation.
10
Note: The ColdFusion Administrator can create client variable tables for data sources that use one of the bundled JDBC
drivers. For more information, see the Online Help.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using the ColdFusion Administrator
Sample table creation page
<!---- Create the Client variable storage tables in a datasource.
This example applies to Microsoft Access databases. --->
<cfquery name="data2" datasource="#DSN#">
CREATE UNIQUE INDEX id1
ON CDATA (cfid,app)
</cfquery>
<cfquery name="global1" datasource="#DSN#">
CREATE TABLE CGLOBAL
(
cfid char(20),
data memo,
lvisit date
)
</cfquery>
<cfquery name="global2" datasource="#DSN#">
CREATE INDEX id2
ON CGLOBAL (cfid)
</cfquery>
<cfquery name="global2" datasource="#DSN#">
CREATE INDEX id3
ON CGLOBAL (lvisit)
</cfquery>
11
Memory Variables page
Use the Memory Variables page of the ColdFusion Administrator to enable application and session variables serverwide. By default, application and session variables are enabled when you install ColdFusion. If you disable either type
of variable in the Memory Variables page, you cannot use them in a ColdFusion application.
You can specify maximum and default time-out values for session and application variables. Unless you define a timeout value in an Application.cfc or Application.cfm file, application variables expire in two days. Session variables
expire when user sessions end. To change these behaviors, enter new default and maximum time-out values on the
Memory Variables page of the Administrator.
Note: Time-out values that you specify for application variables override the time-out values set in the Application.cfc or
Application.cfm file.
You can also specify whether to use J2EE session variables. When you enable the J2EE session variables, ColdFusion
creates an identifier for each session and does not use the CFToken or CFID cookie value. For more information, see
the Developing ColdFusion Applications.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using the ColdFusion Administrator
Note: When using J2EE sessions, ensure that the session time out, specified in the WEB-INF/web.xml session-timeout
element, is longer than the session time out specified in the ColdFusion Administrator, and longer than any
sessiontimeout attribute specified in a cfapplication tag.
Mappings page
Use the Mappings page of the ColdFusion Administrator to add, update, and delete logical aliases for paths to
directories on your server. ColdFusion mappings apply only to pages that ColdFusion processes with the
cfmodule tags. If you save CFML pages outside the web_root directory (or whatever directory is mapped to "/"),
and
you add a mapping to the location of those files on your server.
Assume that the "/" mapping on your server points to C:\coldfusion9\wwwroot, but that all of your ColdFusion header
pages reside in C:\2002\newpages\headers. Add a mapping in the ColdFusion Administrator that points to
C:\2002\newpages\headers, for ColdFusion to find the header pages. For example, add a mapping for /headers that
points to C:\2002\newpages\headers. In the ColdFusion pages located in C:\coldfusion9\wwwroot, you reference these
header pages using /headers in your
cfinclude and cfmodule tags.
Note: ColdFusion mappings are different from web server virtual directories. For information on creating a virtual
directory to access a given directory using a URL in your web browser, consult your web server documentation.
cfinclude
12
Mail page
Use the Mail page of the ColdFusion Administrator to specify a mail server to send automated e-mail messages.
ColdFusion supports the Simple Mail Transfer Protocol (SMTP) for sending e-mail messages and the Post Office
Protocol (POP) for retrieving e-mail messages from your mail server. To use e-mail messaging in your ColdFusion
applications, you must have access to an SMTP server and a POP account.
The ColdFusion Enterprise Edition supports mail-server failover, as well as additional mail delivery options.
The ColdFusion implementation of SMTP mail uses a spooled architecture. This means that when a cfmail tag is
processed in an application page, the messages generated might not be sent immediately. If ColdFusion has a large
queue, delivery could occur after some delay.
Note: For more information about the cfmail tag, see Sending SMTP e-mail with the cfmail tag in Sending and Receiving
E-Mail in the Developing ColdFusion Applications.
Mail Server Settings area
The following table describes basic mail server settings:
OptionDescription
Mail ServerEnter a valid mail server for sending dynamic SMTP mail messages in the text box. You can enter an
UsernameEnter the user name for the mail server, if necessary.
PasswordEnter the password for the mail server, if necessary.
Internet address, such as mail.company.com, or the IP address of the mail server, such as 127.0.0.1.
SignSelect this check box to configure ColdFusion to digitally sign your mails.
KeystoreLocation of the Keystore containing the private key and certificate. The supported type is JKS (java key
Keystore PasswordKeystore password.
KeyAliasAlias of the key with which the certificate and private key is stored in Keystore. If it is not specified then
store) and pkcs12.
the first entry in the Keystore is be picked up.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using the ColdFusion Administrator
OptionDescription
13
KeyPasswordPassword with which the private key is stored. If it is not specified, KeystorePassword is used as
Verify Mail Server ConnectionVerifies that ColdFusion can connect to your specified mail server after you submit this form.
Server PortEnter the number of the port on which the mail server is running. Contact your server administrator if
Backup Mail Servers (Enterprise
Edition only)
Maintain Connection To Mail Server
(Enterprise Edition only)
Connection Timeout (seconds)Enter the number of seconds that ColdFusion should wait for a response from the mail server before
Enable SSL Socket Connections To
Mail Server
Enable TLS Connection To Mail
Server
KeyPassword.
Even if you do not use this option, send a test message to verify that your mail server connection works.
you are unsure of the appropriate port number.
Enter zero or more backup servers for sending SMTP mail messages. You can enter an Internet address,
such as mail.company.com, or the IP address of the mail server, such as 127.0.0.1. Separate multiple
servers with a comma.
If the mail server requires authentication, prepend the mail server with the user name and password, as
follows: username:password@mailserveraddress
To use a port number other than the default (25), specify mailserveraddress:portnumber
Keeps mail server connections open after sending a mail message. Enabling this option can enhance
performance when delivering multiple messages.
timing out.
Enables SSL encryption on the connections to the mail server.
Enables Transport Level Security (TLS) on the connection to the mail server.
Mail Spool Settings area
The following table describes mail server spool settings:
OptionDescription
Spool Interval (Seconds)Enter the interval, in seconds, at which you want the mail server to process spooled mail.
Mail Delivery Threads
(Enterprise Edition only)
Spool Mail Messages For Delivery
To
(Memory spooling available for
Enterprise Edition only)
Maximum Number Of Messages
Spooled To Memory
(Enterprise Edition only)
View Undelivered MailClick to view undelivered mails.
Enter the maximum number of simultaneous threads used to deliver spooled mail.
Routes outgoing mail messages to the mail spooler. If you disable this option, ColdFusion delivers
outgoing mail messages immediately. In ColdFusion Enterprise Edition, you can spool messages to disk
(slower, but messages persist across shutdowns) or to memory (faster, but messages do not persist).
You can override this setting in the cfmail tag.
Enter the maximum number of messages that spool to memory before switching to disk spooling.
Mail Logging Settings area
Select preferences for handling mail logs, as described in the following table:
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using the ColdFusion Administrator
OptionDescription
14
Error Log SeverityFrom the drop-down list object, select the type of SMTP-related error message to write to a log file. The
options are the following:
• Debug (contains Information, Warning, and Error)
• Information (contains Warning and Error)
• Warning (contains Error)
• Error
Log All Mail Messages Sent By
ColdFusion
Saves to a log file the To, From, and Subject fields of all e-mail messages.
ColdFusion writes sent-mail and mail-error logs to the following directories:
• \coldfusion9\logs (Windows server configuration)
• /opt/coldfusion9/log (Solaris and Linux server configuration)
• cf_webapp_root/WEB-INF/cfusion/logs (multiserver and J2EE configurations, all platforms)
The following table describes the e-mail log files:
LogDescription
mailsent.logRecords sent e-mail messages.
mail.logRecords general e-mail errors.
Mail Character Set Settings area
Select preferences for the default mail character set, as described in the following table:
OptionDescription
Default CFMail CharSetFrom the drop-down list object, select the default character set that the cfmail tag uses. The default
value is UTF-8. If most of your e-mail clients use a specific character set, you can use this setting to switch
to that locale-specific character set. For example, Japanese mail is typically sent using the ISO-2022-JP
character set.
Charting page
The ColdFusion charting and graphing server lets you produce highly customizable business graphics, in various
formats, using the
The following table describes the caching and thread settings for the ColdFusion charting and graphing server:
OptionDescription
Cache TypeSet the cache type. Charts can be cached either in memory or to disk. Memory caching is faster, but more
Maximum Number Of Cached
Images
Max Number Of Charting Threads Specify the maximum number of chart requests that can be processed concurrently. The minimum
Disk Cache LocationWhen caching to disk, specify the directory in which to store the generated charts.
cfquery tag. Use the Charting page in the Administrator to control characteristics of the server.
memory intensive.
Specify the maximum number of charts to store in the cache. After the cache is full, if you generate a new
chart, ColdFusion discards the oldest chart in the cache.
number is 1 and the maximum is 5. (Higher numbers are more memory-intensive.)
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using the ColdFusion Administrator
Font Management page
The Font Management page lets you review and define fonts for use with Adobe® FlashPaper™ and Acrobat® PDF
output formats. ColdFusion generates FlashPaper and PDF output through the
cfreport tag, when used to call a report created with the ColdFusion Report Builder.
cfdocument tag and through the
ColdFusion automatically registers Acrobat built-in fonts and fonts located in typical font locations (such as the
Windows\fonts directory). However, if your server has additional fonts installed in nonstandard locations, you register
them with the ColdFusion Administrator so that the
cfdocument and cfreport tags can locate and render PDF and
FlashPaper reports.
This page contains the following topics:
Register New Font with ColdFusion Lets you browse to a directory that contains fonts, or select a specific font.
User Defined Fonts Displays the fonts that have been registered explicitly.
Current System Fonts Displays fonts stored in platform-specific system font directories.
For more information on font management, see the ColdFusion Administrator online Help. For more information on
reporting in ColdFusion, see Creating Reports and Documents for Printing in the Developing ColdFusion Applications.
Document page
The Document page allows you to configure OpenOffice application. If you did not configure during installation,
provide the directory path to configure OpenOffice.
15
Depending on whether your ColdFusion server is installed on a local or remote server, you can configure OpenOffice
with your ColdFusion server instance.
For more information about configuring OpenOffice with ColdFusion, see Configuring OpenOffice in Installing ColdFusion.
Java and JVM page
The Java and JVM page lets you specify the following settings, which enable ColdFusion to work with Java:
OptionDescription
Java Virtual Machine PathThe absolute file path to the location of the Java Virtual Machine (JVM) root directory. The default is
Minimum JVM Heap SizeThe JVM initial heap size.
Maximum JVM Heap Size The JVM maximum heap size. The default value is 512 MB.
ColdFusion Class PathThe file paths to the directories that contain the JAR files that ColdFusion uses. Specify either the fully
JVM ArgumentsThe arguments to the JVM. Use a space to separate multiple entries (for example, -Xint -Xincgc).
Note: This page is available in the server configuration only.
Before ColdFusion saves your changes, it saves a copy of the current cf_root/runtime/bin/jvm.config file as jvm.bak. If
your changes prevent ColdFusion from restarting, use the jvm.bak file to restore your system. For more information,
see the Online Help.
cf_root/runtime/jre.
qualified name of a directory that contains your JAR files or a fully qualified JAR filename. Use a comma
to separate multiple entries.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using the ColdFusion Administrator
Settings Summary page
The Settings Summary page shows all ColdFusion configuration settings. Click a group name to open the
Administrator section of that group, where you can edit settings. This page is not enabled in the Standard Edition.
In ColdFusion, you can export the server settings to PDF by clicking the Save As PDF button on this page.
Data & Services section
The Data & Services section of the Administrator is the interface for ColdFusion, data sources, and Verity search and
indexing features. The following table describes some common tasks that you can perform in the Data & Services
section of the Administrator:
TaskDescription
16
Create and manage JDBC data
sources
Create and maintain ColdFusion
collections
Define mappings for web services The Web Services page lets you produce and consume remote application functionality over the
Specify settings to integrate with
Adobe® Flex™ applications
The Data Sources page lets you establish, edit, and delete JDBC data source connections for ColdFusion.
For more information, see
The ColdFusion Collections page lets you create and delete Verity/Solr collections and perform
maintenance operations on collections that you create. For more information, see
Collections page” on page 16.
Internet. For more information, see
The Flex Integration page lets you specify which Flex integration features to enable and which IP
addresses can perform data service operations. For more information, see
page 17.
“Data Source Management” on page 34.
“ColdFusion
“Web Services page” on page 17.
“Flex Integration page” on
Data Sources page
The Data Sources page lets you create, edit, and delete JDBC data sources. Before you can use a database in a
ColdFusion application, you register the data source in the ColdFusion Administrator. For more information, see
“Data Source Management” on page 34.
ColdFusion Collections page
Use this page to create and manage your Verity or Solr collections.
ColdFusion lets you manage your collections from the Administrator. You can index, optimize, purge, or delete
Verity/Solr collections that are connected to ColdFusion. You use the icons in the Actions column to perform the
following actions:
ActionDescription
IndexAnalyzes the files in a collection and assembles metadata and pointers to the files.
OptimizeReclaims space left by deleted and changed files by consolidating collection indexes for faster searching. You
PurgeDeletes all documents in a collection, but not the collection itself. Leaves the collection directory structure intact.
DeleteDeletes a collection.
should optimize collections regularly.
ColdFusion includes Verity and Solr, which provides indexing and searching technology. This enables creating,
populating, and managing collections of indexed data that are optimized for fast and efficient site searches.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using the ColdFusion Administrator
A collection is a logical group of documents and metadata about the documents. The metadata includes word indexes,
an internal documents table of document field information, and logical pointers to the document files.
For more information about building search interfaces, see Building a Search Interface and Solr search support in the
Developing ColdFusion Applications.
If the ColdFusion Collections page is unable to retrieve collections, ensure that Verity/Solr Search Server is running.
For more information, see “Collections and the ColdFusion Verity architecture” on page 116 and “Solr Server and
Collections” on page 169.
Verity K2 Server page
You can install Verity on a different host computer from the computer on which ColdFusion is running. If so,
configure the host to be used by ColdFusion for performing search operations. In addition, you may need to use
advanced settings to configure the aliases and ports of the services that ColdFusion uses. You need not change these
values if you are running with the ColdFusion installed version of Verity.
Web Services page
You can use web services to produce and consume remote application functionality over the Internet. The ColdFusion
Administrator lets you register web services so that you do not have to specify the entire Web Services Description
Language (WSDL) URL when you reference the web service. The first time you reference a web service, ColdFusion
automatically registers it in the Administrator.
17
When you register a web service, you can shorten your code and change a web service URL without editing your code.
For more information, see Using Web Services in the Developing ColdFusion Applications.
Flex Integration page
Use this page to specify which Flex integration features to enable and which IP addresses can perform data-service
operations. If you enable Adobe LiveCycle Data Services ES support, but do not specify any IP addresses, only
processes on the local computer can connect to the LiveCycle Data Services ES server in ColdFusion.
OptionDescription
Enable Flash Remoting
Support
Enable Remote LiveCycle
Data Management Access
Server IdentitySpecifies the ColdFusion server on which you want to enable Flex Data Management Support.
Enable RMI Over SSL For
Data Management
Select IP Addresses Where
LiveCycle Data Services
Are Running
To use SSL, create a keystore file. The keystore is a self-signed certificate. (You do not need a certificate signed by a
Certificate Authority, although if you do use one, you do not need to configure Flex as indicated in the following steps.)
The information in the keystore is encrypted and can be accessed only with the password that you specify. To create
the keystore, use the Java keytool utility, which is included in the Java Runtime Environment (JRE).
Specifies whether to enable Flash clients to connect to this ColdFusion server and invoke methods in ColdFusion
components (CFCs).
Specifies whether to enable a LiveCycle Data Services ES server to connect to this ColdFusion server and invoke
methods in CFCs to fill, sync, get, or count records in a result set used in a Flex application. Enable this option only
if you are running LiveCycle Data Services ES remotely.
To encrypt communication between ColdFusion and Flex, enable Secure Sockets Layer (SSL).
Specifies which LiveCycle Data Services ES servers can connect to the LiveCycle Data Services ES support in
ColdFusion. If you do not specify a list of allowed IP addresses, only processes on the local computer can connect
to the LiveCycle Data Services ES support in ColdFusion
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using the ColdFusion Administrator
Enable SSL
1 Create the keystore.
2 Configure Flex.
3 Enable SSL in the ColdFusion Administrator.
Create the keystore
❖ To generate the SSL server (ColdFusion) keystore file, use the keytool utility, with a command similar to the
The following table describes the parameters of the keytool utility:
ParameterDescription
18
-aliasThe name of the keystore entry. You can use any name for this, as long as you are consistent when referring
-dnameThe Distinguished Name, which contains the Common Name (cn) of the server.
-keystoreThe location of the keystore file.
-keypassThe password for your private key.
-storepassThe password for the keystore. The encrypted storepass is stored in ColdFusion configuration files.
-rfcGenerates the certificate in the printable encoding format.
-fileThe name of the keystore file.
-vGenerates detailed certificate information
to it.
Place the certificate you created in the file that the JVM uses to determine what certificates to trust. The file in which
you place the certificate (usually named cacerts), is located in the JRE, in the lib/security folder.
Configure Flex
1 To export the keystore to a certificate, use the keytool utility, with a command similar to the following:
The preceding example specifies the location of the keystore for LiveCycle Data Services ES with integrated JRun,
installed by using the default settings. If you are using a different server, specify the location of the cacerts file for the
JRE that you are using. For example, if you are using JBoss, specify the keystore location as
$JAVA_HOME/jre/lib/security/cacerts.
Enable SSL in the ColdFusion Administrator
1 Select Data & Services > Flex Integration, and specify the keystore file in the Full Path To Keystore box.
2 Specify the keystore password in the Keystore Password box.
3 Select Enable RMI Over SSL For Data Management, and then click Submit Changes.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using the ColdFusion Administrator
If you specify an invalid keystore file or password, ColdFusion does not enable SSL, and disables LiveCycle Data
Management Support.
Debugging & Logging section
Debugging Output Settings page
Use the Debugging Settings and Debugging IPs pages to configure ColdFusion to provide debugging information for
every application page that a browser request. Specify debugging preferences by using the pages as follows:
• On the Debugging Settings page, select debugging output options. If debugging is enabled, the output appears in
block format after normal page output.
• On the Debugging IPs page, restrict access to debugging output. If a debugging option is enabled, debugging output
is visible to all users by default.
Note: Enabling debugging affects performance. It is advised that you do not enable debugging on a production server.
The Debug Output Settings page provides the following debugging options:
OptionDescription
19
Enable Robust Exception InformationDisplays detailed information in the exceptions page, including the physical path and URI of
Enable Request Debugging OutputEnables the ColdFusion debugging service.
Select Debugging Output FormatControls debugging format. Select either of the following formats:
the template, the line number and snippet, the SQL statement used (if any), the data source
name (if any), and the Java stack trace.
• classic.cfm The format available in ColdFusion 5 and earlier. It provides a basic view and
few browser restrictions.
• dockable.cfm A dockable tree-based debugging panel. For details about the panel and
browser restrictions, see the online Help.
Report Execution TimesReports execution times that exceed a specified time limit.
General Debug InformationShow general information about the ColdFusion MX version, template, timestamp, user
Database Activity Shows the database activity for the SQL Query events and Stored Procedure events in the
Exception InformationShows all ColdFusion exceptions raised for the request in the debugging output.
Tracing InformationShows trace event information in the debugging output. Tracing lets you track program flow
Timer InformationShows output from the cftimer tag.
Flash Form Compile Errors And Messages (Development use only) Displays ActionScript errors in the browser when Flash forms are
locale, user agent, user IP, and host name.
debugging output.
and efficiency using the
compiling, and affects the display time of the page.
cftrace tag.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using the ColdFusion Administrator
OptionDescription
20
VariablesDisplays information about parameters, URL parameters, cookies, sessions, and CGI variables
Enable Performance Monitoring
(Server configuration only)
Enable CFSTAT
(Server configuration only)
in the debugging output.
Enables the standard NT Performance Monitor application to display information about a
running server.
TIP: Restart ColdFusion after you change this setting.
Shows performance information on platforms that do not support the NT Performance
Monitor. For more information, see
TIP: Restart ColdFusion after you change this setting.
“Using the cfstat utility” on page 20.
Using the cfstat utility
The cfstat command-line utility provides real-time performance metrics for ColdFusion. The cfstat utility uses a
socket connection to obtain metric data. You can use the cfstat utility to display information that ColdFusion writes
to the System Monitor without using the System Monitor application. The following table lists the metrics that the
cfstat utility returns:
Metric abbreviationMetric nameDescription
Pg/SecPage hits per secondThe number of ColdFusion pages processed per second. You can
DB/SecDatabase accesses per secondThe number of database accesses per second that ColdFusion makes.
Req Q'edNumber of queued requestsThe number of requests that are currently waiting for ColdFusion to
reduce this limit by moving static content to HTML pages.
Any difference in complexity and resource load between calls is
ignored.
process them. Lower values, which you can achieve with efficient
CFML, are better.
Req Run'gNumber of running requestsThe number of requests that ColdFusion is currently actively
Req TO'edNumber of timed out requestsThe total number of ColdFusion requests that have timed out. Lower
AvgQ TimeAverage queue timeA running average of the time, in milliseconds, that requests wait for
AvgReq TimeAverage request timeA running average of the time, in milliseconds, that it takes ColdFusion
AvgDB TimeAverage database transaction timeA running average of the time that ColdFusion spends on database-
Bytes In/SecBytes incoming per secondThe number of bytes that ColdFusion read in the last second (not an
Bytes Out/SecBytes outgoing per secondThe number of bytes that ColdFusion wrote in the last second (not an
processing.
values, which you can achieve by aggressive caching, removing
unnecessary dynamic operations and third-party events, are better.
ColdFusion to process them. Lower values, which you can achieve
with efficient CFML and enhanced caching, are better.
to process a request (including queued time). Lower values, which you
can achieve with efficient CFML, are better.
related processing of ColdFusion requests.
average).
average).
Before you use the cfstat utility, ensure that you selected the Enable Performance Monitoring option in the
ColdFusion Administrator (on the Debugging & Logging > Debugging Settings page). If you select this option, restart
ColdFusion for this change to take effect.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using the ColdFusion Administrator
cfstat options
The cf_root/bin directory contains the cfstat utility. From that directory, type cfstat and use the following switches:
SwitchDescriptionComment
-nSuppress column headers.Useful for saving output to a file.
21
-sDisplay output in a single line.Display a single line and delay display of the first line so the cfstat
#Where # is an integer, display output
every # seconds.
utility can display meaningful values in the per-second counters.
If you do not specify an integer, the cfstat utility returns one line.
Specify this switch with or without the -s switch.
This example runs the cfstat utility and displays a new line every 20 seconds:
cfstat 20
Debugging IP Addresses page
Use the Debugging IP Addresses page to restrict debugging output to one or more IP addresses. You can add and
remove IP addresses.
Note: If you do not specify IP addresses, and debugging options are active, ColdFusion displays debugging output for all
users.
Debugger Settings page
To use the ColdFusion Debugger that runs in Eclipse, select the Allow Line Debugging option.
Specify the port and the maximum number of simultaneous debugging sessions. Specify the debugger port in the JVM
settings of your application server, for example:
To stop a currently running debugging session, click Stop Debugging.
For the changes that you specify on this page to take effect, restart the ColdFusion server.
Logging Settings page
Use the Logging Settings page of the Administrator to change ColdFusion logging options. The following table
describes the settings:
OptionDescription
Log DirectorySpecifies the directory to which error log files are written.
TIP: Restart ColdFusion after you change this setting.
Maximum File Size (kb) Sets the maximum file size for log files. When a file reaches this limit, it automatically is archived.
Maximum Number Of ArchivesSets the maximum number of log archives to create. When they reach this limit, files are deleted in
the order of oldest to newest.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using the ColdFusion Administrator
OptionDescription
22
Log Slow Pages Taking Longer Than [n]
Seconds
Log All CORBA CallsLogs all CORBA calls.
Enable Logging For Scheduled Tasks Logs ColdFusion Executive task scheduling.
Logs the names of pages that take longer than the specified interval to process. Logging slow
pages can help you diagnose potential problems or bottlenecks in your ColdFusion applications.
Entries are written to the server.log file.
Log Files page
The Log Files page lets you perform operations on log files, such as searching, viewing, downloading, archiving, and
deleting.
Click a Log File icon located in the Actions column of the Available Log Files table, to search, view, download, archive,
or delete a log file.
For more information, see the ColdFusion Administrator online Help.
The following table describes the ColdFusion log files:
Log fileDescription
rdservice.logRecords errors that occur in the ColdFusion Remote Development Service (RDS). RDS provides
application.logRecords every ColdFusion error reported to a user. Application page errors, including ColdFusion
exception.log Records stack traces for exceptions that occur in ColdFusion.
remote HTTP-based access to files and databases.
syntax, ODBC, and SQL errors, are written to this log file.
scheduler.logRecords scheduled events that have been submitted for execution. Indicates whether task
eventgateway.logRecords events and errors related to event gateways.
migration.logRecords errors related to upgrading from a previous version of ColdFusion.
migrationException.logRecords errors related to running ColdFusion applications after upgrading from a previous version
server.logRecords errors for ColdFusion.
customtag.logRecords errors generated in custom tag processing.
car.logRecords errors associated with site archive and restore operations.
mail.logRecords errors generated by an SMTP mail server.
mailsent.logRecords messages that ColdFusion sends.
flash.log
submission was initiated and whether it succeeded. Provides the scheduled page URL, the date and
time executed, and a task ID.
of ColdFusion.
Records entries for Flash® Remoting.
Enable/Disable logging
In ColdFusion 9.0.1, a new icon has been added in the Actions column of the Log Files page. This icon lets you
stop/start logging for a particular log type.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using the ColdFusion Administrator
Log files introduced in ColdFusion 9.0.1
You can generate log files for the following services in ColdFusion 9.0.1:
• http
• ftp
• web service
• Portlet
• Derby
• Feed
Scheduled Tasks page
Use the Scheduled Tasks page to schedule the execution of local and remote web pages, to generate static HTML pages,
send mail with the
batch-style processing. The scheduling facility is useful for applications that do not require user interactions or
customized output. ColdFusion developers use this facility to schedule daily sales reports, corporate directories,
statistical reports, and so on.
Information that is read more often than written is a good candidate for scheduled tasks. Instead of executing a query
to a database every time the page is requested, ColdFusion renders the static page with information that the scheduled
event generates. Response time is faster because no database transaction takes place.
cfmail tag, update database tables, index Verity collections, delete temporary files, and any other
23
You can run scheduled tasks once; on a specified date; or at a specified time, daily, weekly, or monthly; daily; at a
specified interval; or between specified dates.
The Scheduled Task page lets you create, edit, pause, resume, and delete scheduled tasks. For more information, see
the Online Help.
Scheduling enhancement in ColdFusion 9.0.1
This release supports automatic logging of scheduled tasks.
System Probes page
System probes help you evaluate the status of your ColdFusion applications. Like scheduled tasks, they access a URL
at a specified interval, but they can also check for the presence or absence of a string in the URL. If the URL contents
are unexpected, or if an error occurred while accessing the URL, the probe can send an e-mail alert to the address
specified on the System Probes page. The probe can also execute a script to perform a recovery action, such as
restarting the server. All probe actions are logged in the logs/probes.log file. The System Probes page also displays the
status of each probe.
Use the buttons in the Actions column in the System Probes table to perform the following actions:
ActionDescription
EditLets you edit the probe.
RunRuns the probe immediately, even if it was previously disabled.
Enable/DisableStarts and stops the probe from automatically executing at its specified interval.
DeleteDeletes the probe.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using the ColdFusion Administrator
Because probes run as scheduled ColdFusion tasks, they do not run if the server on which they are hosted crashes, or
if the host web server crashes or otherwise does not respond.
System probes are available in ColdFusion Enterprise Edition only.
Code Analyzer page
The Code Analyzer page evaluates your ColdFusion pages for potential incompatibilities between ColdFusion 9 and
previous versions of ColdFusion. It reviews the CFML pages that you specify and informs you of any potential
compatibility issues. Additionally, the Code Compatibility Analyzer detects unsupported and deprecated CFML
features, and outlines the required implementation changes that ensure a smooth migration
License Scanner page
The License Scanner page searches the local subnet to find other running instances of ColdFusion. You can use this
information to determine whether the ColdFusion instances within the subnet are licensed appropriately.
The ColdFusion Administrator uses universal datagram protocol (UDP) multicast to collect license and version
information from all ColdFusion instances running within the subnet.
24
Server Monitoring section
The Server Monitoring section lets you run the following:
• Server Monitor
• Multiserver Monitor
The Server Monitor is an Adobe SWF application that lets you track activities on a ColdFusion Server. You can identify
information about the server, including requests, queries, memory usage, and errors. You can start and stop collecting
server information and take snapshots of the server.
The Multiserver Monitor is another SWF application. It lets you track the status of several servers.
Extensions section
Use the Extensions section of the Administrator to configure ColdFusion to work with other technologies, such as Java
and CORBA.
Java Applets page
The Java Applets page of the Administrator lets you register applets and edit and delete applet registrations. Before you
can use Java applets in your ColdFusion applications, register them in the Java Applets page.
When your applet is registered with ColdFusion, using the cfapplet tag in your CFML code is simple, because all
parameters are predefined: Enter the applet source and the form variable name to use.
Note: Parameters set with the cfapplet tag override parameters defined on the Java Applets page.
For more information, see the Online Help.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using the ColdFusion Administrator
CFX Tags page
Before you can use a CFX tag in ColdFusion applications, register it. Use the CFX Tags page to register and manage
ColdFusion custom tags built with C++ and Java.
You can build CFX tags in the following two ways:
• Using C++ as a dynamic link library (DLL) on Windows or as shared objects (.so or .sl extension) on Solaris and Linux
• Using Java interfaces defined in the cfx.jar file
For more information, see the Online Help.
Custom Tag Paths page
Use the Custom Tag Paths page of the Administrator to add, edit, and delete custom tag directory paths. The default
custom tag path is under the installation directory. To use custom tags in another path, register the path on this
Administrator page.
For more information, see the online Help.
CORBA Connectors page
Use the CORBA Connectors page to register, edit, and delete CORBA connectors. Register CORBA connectors before
you use them in ColdFusion applications and restart the server when you finish configuring the CORBA connector.
25
ColdFusion loads object request broker (ORB) libraries dynamically by using a connector, which does not restrict
ColdFusion developers to a specific ORB vendor. The connectors depend on the ORB runtime libraries provided by
the vendor. A connector for Borland Visibroker is embedded within ColdFusion. Make sure that the ORB runtime
libraries are in cf_root/runtime/lib (server configuration) or cf_webapp_root/WEB-INF/cfusion/lib (multiserver and
J2EE configurations).
The following table contains information about the libraries and connectors:
Operating System VendorORBColdFusion connectorORB library
The Event Gateways section of the Administrator lets you configure event gateway settings, gateway types, and
gateway instances.
Event Gateways Settings page
The Event Gateways Settings page lets you configure settings for all event gateways, and start or stop the Short Message
Service (SMS) test server. The following table describes the settings:
OptionDescription
26
Enable ColdFusion Event
Gateway Services
Event Gateway Processing
Threads
Maximum Number Of Events To
Queue
Start/Stop SMS Test ServerStarts and stops the short message service (SMS) test server.
Specifies whether the service is enabled. Changing this setting restarts the service.
Specifies the maximum number of threads used to execute ColdFusion functions when an event arrives.
A higher number uses more resources, but increases event throughput.
Specifies the maximum number of events allowed on the event queue. If the queue length exceeds this
value, gateway events are not be added to the processing queue.
Gateway Types page
The Gateways Types pages let you configure the types of gateways available on your system. After you configure a type,
you can create any number of gateway instances of that type. The following table describes the event gateway types that
ColdFusion includes:
Gateway typeDescription
CFMLTriggers asynchronous events from ColdFusion.
DataManagementLets a ColdFusion application notify a Flex destination about changes in the data that the destination
DataServicesMessagingSends messages to and receive messages from Flex applications.
FMS GatewayModifies data through the ColdFusion application or the Flash client, and reflects the change in the
SMSUsed to send and receive SMS messages.
manages.
Flash Media Server shared object.
SAMETIMEUsed to send and receive instant messages through Lotus SameTime.
XMPPUsed to send and receive instant messages through the Extensible Messaging and Presence Protocol
SamplesSample gateway types, including the following:
(XMPP).
• DirectoryWatcher Watches a directory for file changes.
• JMS Acts as a Java Messaging Service consumer or producer.
• Socket Listens on a TCP/IP port.
Gateway Instances page
The Gateway Instances page lets you configure ColdFusion event gateway instances to direct events from various
sources to ColdFusion components (CFCs) that you have written. The following table describes the settings:
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using the ColdFusion Administrator
OptionDescription
27
Gateway IDA name for the event gateway instance. You use this value in the ColdFusion GetGatewayHelper and
Gateway TypeThe event gateway type.
CFC PathThe absolute path to the listener CFC that handles incoming messages.
Configuration File(Optional) Configuration file, if necessary for the event gateway instance.
Startup ModeThe event gateway startup status, as follows:
SendGatewayMessage functions.
• Automatic Start the event gateway when ColdFusion starts.
• Manual Do not start the event gateway with ColdFusion, but allow starting it from the Gateway
Instances page.
• Disabled Do not allow the event gateway to start.
Security section
The Security section of the Administrator lets you configure the security frameworks of ColdFusion.
For more information on security, see “Administering Security” on page 75.
Administrator page
Use the Administrator page of the Administrator to enable and disable password-restricted access to the
Administrator, and to change the Administrator password. Restrict ColdFusion Administrator access to trusted users.
You can also configure all users to use a single ColdFusion Administrator password or allow only users defined in the
User Manager and the root administrative user to have access to the ColdFusion Administrator.
RDS page
Use the RDS page to enable and disable password-restricted RDS access to server resources from Adobe Macromedia
Dreamweaver MX , Adobe Macromedia HomeSite+ , ColdFusion Extensions for Eclipse, or the ColdFusion Report
Builder, and to change the RDS password. You can also configure all users to use a single RDS password, or allow only
users defined in the User Manager to have access through RDS.
Sandbox security page
You use the Sandbox Security page (called Resource Security in the Standard Edition) to specify security permissions
for data sources, tags, functions, files, directories, IP addresses, ports, and runtime permissions.
Sandbox security uses the location of your ColdFusion pages to determine functionality. A sandbox is a designated area
(CFM files or directories that contain CFM files) of your site to which you apply security restrictions. By default, a
subdirectory (or child directory) inherits the sandbox settings of the directory one level above it (the parent directory).
If you define sandbox settings for a subdirectory, you override the sandbox settings inherited from the parent
directory.
Use sandbox security to control access to the following:
• Data sources
• Tags
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using the ColdFusion Administrator
• Functions
• Files and directories
• IP addresses and ports
You can also edit runtime permissions for ColdFusion pages.
Note: If you have enabled sandbox security and want to use the Administrator API, enable access to the CFIDE/adminapi
directory.
User Manager page
Use the User Manager page to specify the user name, password, description, access rights, exposed services, sandboxes,
and allowed roles for individual users. This page is especially useful for web hosting when multiple ColdFusion
applications are on one server, each maintained by a different user or organization.
You can grant access to the ColdFusion Administrator, which also grants access to the Administrator API.
If the administrator revokes the role of a user while the user is logged in, the revocation takes effect only when the user
logs in again.
The default user ID of an administrator is admin. To change the administrator user ID, add the following in the neosecurity.xml file, replacing admin with the user ID to use:
Specify client IP addresses that have the permission to access exposed services.
Packaging and Deployment section
The Packaging and Deployment section of the Administrator lets you create and deploy CAR files. You can also create
J2EE EAR or WAR files that include an existing ColdFusion application and the ColdFusion runtime system.
ColdFusion Archives page
The ColdFusion Archives page includes tools that let you archive and deploy ColdFusion applications, configuration
settings, data source information, and other types of information to back up your files faster. The complete list of
archivable information includes the following:
• Name and file location
• Server settings
• ColdFusion mappings
• Data sources
• Verity collections
• Scheduled tasks
• Event gateway instances
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using the ColdFusion Administrator
• Java applets
• CFX tags
• Archive to do lists
After you archive the information, you can use the Administrator to deploy your web applications to the same
ColdFusion server or to a ColdFusion server running on a different computer. Additionally, you can use these features
to deploy and receive any ColdFusion archive file electronically.
The Archive Settings page lets you configure various archive system settings that apply to all archive and deployment
operations. For more information, see the Online Help.
J2EE Archives page
The J2EE Archives page lets you create an enterprise application archive (EAR) file or web application archive (WAR)
file that contains the following items:
• The ColdFusion web application.
• Server settings, such as data sources and custom tag paths.
• The CFML pages of your application, stored in the root directory of the ColdFusion web application.
With this EAR or WAR file, a J2EE administrator can deploy your ColdFusion MX application to a J2EE application
server.
29
If you are creating a cluster of server instances when running the multiserver configuration, use this page to create the
WAR or EAR files required to create each of the servers in the cluster.
You can create a J2EE archive regardless of whether you are running ColdFusion MX in the server configuration or
the J2EE configuration. However, you must be running the J2EE configuration to deploy an EAR or WAR file.
Enterprise Manager section
The Enterprise Manager section of the Administrator lets you create JRun server instances with ColdFusion already
deployed, register remote JRun server instances, and create clusters of JRun server instances.
Note: The Enterprise Manager section appears only if you install the multiserver configuration. It does not display in the
server configuration. Nor does it display when running in a J2EE configuration (other than that deployed in the cfusion
server of the multiserver configuration).
Instance Manager page
The Instance Manager page lets you view the local and remote JRun servers that can be accessed by a cfusion server
running in the multiserver configuration.
From this page you can access pages that define new, local, JRun servers and register existing JRun servers running on
remote computers, as follows:
Add New Instance Create a JRun server and automatically deploy a copy of the current ColdFusion MX application
into that server. Alternatively, you can deploy ColdFusion MX applications packaged using the J2EE Archives page.
Register Remote Instance Define an existing remote JRun server to the Instance Manager for adding these servers to
a cluster. It is not mandatory to run the remote JRun server instance when you define it to the Instance Manager.
However, it must be running before you can add it to a cluster.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using the ColdFusion Administrator
Cluster Manager page
The Cluster Manager page in ColdFusion MX Administrator lets you create and manage clusters of JRun servers, each
containing the same ColdFusion MX application.
Custom Extensions section
You can extend the functionality of the ColdFusion Administrator by adding links to other web applications and sites.
These links appear under the Custom Extensions section in the left navigation pane of the Administrator.
Extend the Administrator
1 Create a file that contains the HTML link code, followed by a <BR>, with a separate line for each link. Do not include
other HTML code, such as
The target attribute is required for each link; if you specify target="content", the page appears in the main pane
of the Administrator. If you specify any other value for the
2 Save this file as extensionscustom.cfm in the Administrator root directory (/CFIDE/administrator/).
For example, the following file adds links for Bowdoin College, Universidad Complutense de Madrid, and La Sapienza:
<head> or <body> tags.
target attribute, the page appears in a new window.
Alternatively, you can extend the ColdFusion Administrator by editing the
wwwroot/CFIDE/administrator/custommenu.xml file.
Administrator API
You can use the Administrator API to perform most ColdFusion Administrator tasks programmatically. The
Administrator API consists of a set of ColdFusion components (CFCs) that contain methods you call to perform
Administrator tasks. For example, you use the
The CFCs for the Administrator API are located in the cf_web_root/CFIDE/adminapi directory. Each CFC
corresponds to an area of the ColdFusion Administrator, as the following table shows:
CFCDescription
accessmanager.cfcSpecify the user name, password, description, access rights, sandboxes, and allowed roles for individual
users.
administrator.cfcContains basic Administrator functionality, including login, logout, the Migration wizard, and the Setup
wizard. You must call the
setMSQL method of datasource.cfc to add a SQL Server data source.
login method before calling any other methods in the Administrator API.
base.cfcBase object for all other Administrator API CFCs.
datasource.cfcAdd, modify, and delete ColdFusion data sources.
debugging.cfcManage debug settings
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using the ColdFusion Administrator
CFCDescription
eventgateway.cfcManage event gateways
extensions.cfcManage custom tags, mappings, CFXs, applets, CORBA, and web services.
office.cfcManage OpenOffice settings.
mail.cfcManage ColdFusion mail settings.
runtime.cfcManage runtime settings for fonts, cache, charts, configuration, and other settings.
security.cfcManage passwords, RDS, and sandbox security.
serverinstance.cfcStart, stop, and restart JRun servers. This CFC only works when running the multiserver configuration.
servermonitoring.cfcPerform many of the Server Monitor tasks programmatically.
The adminapi directory also contains an Application.cfm file and two subdirectories.
Note: If you are using sandbox security, enable access to the cf_web_root/CFIDE/adminapi directory to use the
Administrator API.
Following are the styles of methods in the Administrator API:
Method arguments When setting complex or varied values, the Administrator API uses method arguments.
31
Getting and setting simple values When setting simple values, such as true or false debug settings, the Administrator
API uses get and set property methods.
To view the methods, method arguments, and documentation for the Administrator API CFCs, use the CFC Explorer.
For example, to view datasource.cfc when running in the server configuration, open a browser to
http://localhost:8500/CFIDE/adminapi/datasource.cfc.
Use the Administrator API
1 Instantiate administrator.cfc:
<cfscript>
// Login is always required.
adminObj = createObject("component","cfide.adminapi.administrator");
Note: You can instantiate administrator.cfc and call the login method in a single line of code, as the following
example shows:
The following example adds a SQL Server data source:
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using the ColdFusion Administrator
<cfscript>
// Login is always required. This example uses two lines of code.
adminObj = createObject("component","cfide.adminapi.administrator");
adminObj.login("admin");
// Instantiate the data source object.
myObj = createObject("component","cfide.adminapi.datasource");
The following example adds the same SQL Server data source, but uses the argumentCollection attribute to pass all
method arguments in a structure:
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using the ColdFusion Administrator
<cfscript>
// Login is always required. This example uses a single line of code.
createObject("component","cfide.adminapi.administrator").login("admin");
// Instantiate the data source object.
myObj = createObject("component","cfide.adminapi.datasource");
// Required arguments for a data source.
stDSN = structNew();
stDSN.driver = "MSSQLServer";
stDSN.name="northwind_MSSQL";
stDSN.host = "10.1.147.73";
stDSN.port = "1433";
stDSN.database = "northwind";
stDSN.username = "sa";
//Create a DSN.
myObj.setMSSQL(argumentCollection=stDSN);
</cfscript>
<!--- Optionally dump the stDSN structure. --->
<!---
<cfoutput>
<cfdump var="#stDSN#">
</cfoutput>
--->
33
Last updated 8/5/2010
Chapter 4: Data Source Management
A data source is a complete database configuration that uses a JDBC driver to communicate with a specific database.
In Adobe ColdFusion, you configure a data source for each database that you want to use. After you configure a data
source, ColdFusion can then communicate with that data source through JDBC.
For basic information on data sources and connecting to databases, click Resources in the ColdFusion Administrator,
and then select Getting Started Experience.
About JDBC
JDBC is a Java Application Programming Interface (API) that you use to execute SQL statements. JDBC enables an
application, such as ColdFusion, to interact with various database management systems (DBMSs), without using
interfaces that are database- and platform-specific.
The following table describes the four types of JDBC drivers:
34
TypeNameDescription
1JDBC-ODBC bridgeTranslates JDBC calls to ODBC calls, and sends them to the ODBC driver.
Advantages: Allows access to many different databases.
Disadvantages: The ODBC driver, and possibly the client database libraries, must reside on the
ColdFusion server computer. Performance is slower than other JDBC driver types.
Adobe does not recommend this driver type unless your application requires DBMS-specific
features.
2Native-API/partly Java
driver
3JDBC-Net pure Java driver Translates JDBC calls to the middle-tier server, which then translates the request to the database-
4Native-protocol/all-Java
driver
Converts JDBC calls to database-specific calls.
Advantages: Better performance than Type 1 driver.
Disadvantages: The client database libraries of the vendor must reside on the same computer as
ColdFusion.
ColdFusion includes a Type 2 driver for use with Microsoft Access Unicode databases.
specific native-connectivity interface.
Advantages: The database libraries of vendors are not required client computer. Can be tailored for
small size (faster loading).
Disadvantages: Database-specific code must be executed in the middle tier.
ColdFusion includes an ODBC socket Type 3 driver for use with Microsoft Access databases and
ODBC data sources.
Converts JDBC calls to the network protocol used directly by the database.
Advantages: Fast performance. No special software needed on the computer on which you run
ColdFusion.
Disadvantages: Many of these protocols are proprietary, requiring a different driver for each
database.
ColdFusion includes Type 4 drivers for many DBMSs; however, not all DBMSs are supported in
ColdFusion Standard Edition.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Data Source Management
JDBC drivers are stored in JAR files. For example, the JDBC drivers that are supplied with ColdFusion are in the
_drivers.jar file. If you are using another JDBC driver, you must store it in the ColdFusion classpath. For example,
cf_root/cfusion/lib (server configuration) or cf_webapp_root/WEB-INF/cfusion/lib (multiserver or J2EE
configuration).
Supplied drivers
The following table lists the database drivers supplied with ColdFusion and where you can find more information
about them:
DriverTypeFor more information
Apache Derby Client“Connecting to Apache Derby Client” on page 37
Apache Derby Embedded“Connecting to Apache Derby Embedded” on page 38
DB2 Universal Database4“Connecting to DB2 Universal Database” on page 39
DB2 OS/3904“Connecting to other data sources” on page 53
Informix4“Connecting to Informix” on page 40
Microsoft Access3“Connecting to Microsoft Access” on page 41
35
Microsoft Access with Unicode support2“Connecting to Microsoft Access with Unicode” on page 42
Microsoft SQL Server4“Connecting to Microsoft SQL Server” on page 43
MySQL4“Connecting to MySQL” on page 46
ODBC Socket3“Connecting to ODBC Socket” on page 51
Oracle4“Connecting to Oracle” on page 52
Other“Connecting to other data sources” on page 53
Sybase4“Connecting to Sybase” on page 56
To see a list of database versions that ColdFusion supports, go to www.adobe.com/go/learn_cfu_cfsysreqs_en.
When running in the J2EE configuration, the ColdFusion Administrator also lets you configure a data source that
connects to a JNDI data source. A Java Naming and Directory Interface (JNDI) data source is equivalent to a
ColdFusion data source, except you define it by using your J2EE application server. After it’s defined, ColdFusion
applications use it as they would any data source. For information on defining a JNDI data source, see
“Connecting to
JNDI data sources” on page 57.
Adding data sources
In the ColdFusion Administrator, you configure your data sources to communicate with ColdFusion. After you add a
data source to the Administrator, you access it by name in any CFML tag that establishes database connections; for
example, in the cfquery tag. During a query, the data source tells ColdFusion which database to connect to and what
parameters to use for the connection.
The ColdFusion Administrator organizes information about all ColdFusion server database connections in a single
location. In addition to adding data sources, you can use the Administrator to specify changes to your database
configuration, such as relocation, renaming, or changes in security permissions.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Data Source Management
Adding data sources in the Administrator
You use the ColdFusion Administrator to quickly add a data source for use in your ColdFusion applications. When
you add a data source, you assign it a data source name (DSN) and set all information required to establish a
connection.
Note: ColdFusion includes data sources that are configured by default. You do not need the following procedure to work
with these data sources.
1 In the ColdFusion Administrator, select Data & Services > Data Sources.
2 Under Add New Data Source, enter a data source name; for example, MyTestDSN. The following names are
reserved; you cannot use them for data source names:
• service
• jms_provider
• comp
• jms
3 Select a driver from the drop-down list; for example, Microsoft SQL Server.
4 Click Add.
A form for additional DSN information appears. The available fields in this form depend on the driver that you
selected.
36
5 In the Database field, enter the name of the database; for example, Northwind.
6 In the Server field, enter the network name or IP address of the server that hosts the database, and enter any
required Port value. For example, the bullwinkle server on the default port.
7 If your database requires login information, enter your user name and password.
Note: The omission of required user name and password information is a common reason why a data source fails to
verify.
8 (Optional) Enter a Description.
9 (Optional) Click Show Advanced Settings to specify any ColdFusion specific settings; for example, to configure
which SQL commands can interact with this data source.
10 Click Submit to create the data source.
ColdFusion automatically verifies that it can connect to the data source.
11 (Optional) To verify this data source later, click the verify icon in the Actions column.
Note: To check the status of all data sources available to ColdFusion, click Verify All Connections.
Specifying connection string arguments
The ColdFusion Administrator lets you specify connection-string arguments for data sources. In the Advanced
Settings page, use the Connection String field to enter name-value pairs separated by a semicolon. For more
information, see the documentation for your database driver.
Note: The cfqueryconnectstring attribute is no longer supported.
Guidelines for data sources
When you add data sources to ColdFusion, keep in mind the following guidelines:
• Data source names must be all one word.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Data Source Management
• Data source names can contain only letters, numbers, hyphens, and the underscore character (_).
• Data source names must not contain special characters or spaces.
• Although data source names are not case sensitive, use a consistent capitalization scheme.
• Depending on the JDBC driver, connection strings and JDBC URLs might be case sensitive.
• Use the Administrator to verify that ColdFusion can connect to the data source.
• A data source must exist in the ColdFusion Administrator before you use it on an application page to retrieve data.
Connection Issues
Executing a query when you restart a database can result in error during the first request. The error does not occur in
subsequent requests or if connection pooling is disabled. This is because, during the first request, the cached
connection is used to execute the query, leading to an exception. To overcome this issue, validate the connection before
executing the query.
Provide validationQuery (to validate the connection) before executing the query in the Advanced Settings page.
Note: validationQuery has to be used with caution as it can result in performance issues.
37
Connecting to Apache Derby Client
Use the settings in the following table to connect ColdFusion to Apache Derby Client:
SettingDescription
CF Data Source NameThe data source name (DSN) that ColdFusion uses to connect to the data source.
DatabaseThe name of the database.
ServerThe name of the server that hosts the database that you want to use. If the database is local, enclose the word local
User nameThe user name that ColdFusion passes to the JDBC driver to connect to the data source if a ColdFusion application
PasswordThe password that ColdFusion passes to the JDBC driver to connect to the data source if a ColdFusion application
Description(Optional) A description for this connection.
Connection StringA field that passes database-specific parameters, such as login credentials, to the data source.
Limit ConnectionsSpecifies whether ColdFusion limits the number of database connections for the data source. If you enable this
Restrict Connections ToSpecifies the maximum number of database connections for the data source. To use this restriction, enable the
in parentheses.
does not supply a user name (for example, in a
The user name must have CREATE PACKAGE privileges for the database, or the database administrator must create
a package. Consult the database administrator when configuring this type of data source.
does not supply a password (for example, in a
option, use the Restrict Connections To field to specify the maximum.
Limit Connections option.
cfquery tag).
cfquery tag).
Maintain ConnectionsColdFusion establishes a connection to a data source for every operation that requires one. Enable this option to
Timeout (min)The number of minutes that ColdFusion MX maintains an unused connection before destroying it.
Disable ConnectionsIf selected, suspends all client connections.
Login Timeout (sec)The number of seconds before ColdFusion times out the attempt to log in to the data source connection.
improve performance by caching the data source connection.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Data Source Management
SettingDescription
38
CLOBReturns the entire contents of any CLOB/ Text columns in the database for this data source. If deselected,
BLOB Returns the entire contents of any BLOB/Image columns in the database for this data source. If deselected,
LongText Buffer (chr)The default buffer size, used if the CLOB option is not selected. The default value is 64000 bytes.
BLOB Buffer (bytes)The default buffer size, used if the BLOB option is not selected. The default value is 64000 bytes.
Allowed SQLThe SQL operations that can interact with the current data source.
Validation QueryCalled when a connection from the pool is resued. This can slow query response time because an additional query
ColdFusion retrieves the number of characters specified in the Long Text Buffer setting. For UDB 7.1 and 7.2, a 32K
limit on CLOBs exists.
ColdFusion retrieves the number of characters specified in the BLOB Buffer setting. BLOBs are not supported on
UDB 7.1 and 7.2.
is generated. Specify the validation query just before restarting the database to verify all connections, but remove
the validation query after restarting the database to avoid any performance loss.
Connecting to Apache Derby Embedded
Use the settings in the following table to connect ColdFusion to Apache Derby Embedded:
SettingDescription
CF Data Source NameThe data source name (DSN) that ColdFusion uses to connect to the data source.
Database folderThe folder where the database is located.
Create DatabaseSelect this option to create a database. The new database exists in the path specified in the Database Folder. If the
Description(Optional) A description for this connection.
ColdFusion user nameThe user name you use to log in to the ColdFusion Administrator.
ColdFusion PasswordThe password you use to log in to the ColdFusion Administrator.
Connection StringA field that passes database-specific parameters, such as login credentials, to the data source.
Limit ConnectionsSpecifies whether ColdFusion limits the number of database connections for the data source. If you enable this
Maintain ConnectionsColdFusion establishes a connection to a data source for every operation that requires one. Enable this option to
Max Pooled StatementsSelect this option to reuse prepared statements (that is, stored procedures and queries that use the cfqueryparam
database exists, an SQL warning is generated, and a connection to the existing database is established.
option, use the Restrict Connections To field to specify the maximum.
improve performance by caching the data source connection.
tag). Although you tune this setting based on your application, start by setting it to the sum of the following:
• Unique cfquery tags that use the cfqueryparam tag
• Unique cfstoredproc tags
Timeout (min)The number of minutes that ColdFusion MX maintains an unused connection before destroying it.
Disable ConnectionsIf selected, suspends all client connections.
Login Timeout (sec)The number of seconds before ColdFusion times out the attempt to log in to the data source connection.
CLOBReturns the entire contents of any CLOB/ Text columns in the database for this data source. If deselected,
ColdFusion retrieves the number of characters specified in the Long Text Buffer setting. For UDB 7.1 and 7.2, a 32K
limit on CLOBs exits.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Data Source Management
SettingDescription
39
BLOB Returns the entire contents of any BLOB/Image columns in the database for this data source. If deselected,
LongText Buffer (chr)The default buffer size, used if the CLOB option is not selected. The default value is 64000 bytes.
BLOB Buffer (bytes)The default buffer size, used if the BLOB option is not selected. The default value is 64000 bytes.
Allowed SQLThe SQL operations that can interact with the current data source.
Validation queryCalled when a connection from the pool is resued. This can slow query response time because an additional query
ColdFusion retrieves the number of characters specified in the BLOB Buffer setting. BLOBs are not supported on
UDB 7.1 and 7.2.
is generated.Specify the validation query just before restarting the database to verify all connections, but remove
the validation query after restarting the database to avoid any performance loss.
Note: When you add an Apache Derby Embedded data source, ensure that the specified directory does not exist.
Connecting to DB2 Universal Database
For information on defining data sources that work with DB2 for OS/390 or iSeries, see “Connecting to other data
sources” on page 53. To see a list of DB2 versions that ColdFusion supports, go to
www.adobe.com/go/learn_cfu_cfsysreqs_en.
Note: DB2 Universal Database (UDB) refers to all versions of DB2 running on Windows, UNIX, and Linux/s390
platforms.
Use the settings in the following table to connect ColdFusion to DB2:
SettingDescription
CF Data Source NameThe data source name (DSN) that ColdFusion uses to connect to the data source.
DatabaseThe name of the database.
ServerThe name of the server that hosts the database that you want to use. If the database is local, enclose the word local
PortThe number of the TCP/IP port that the server monitors for connections.
User nameThe user name that ColdFusion passes to the JDBC driver to connect to the data source if a ColdFusion application
PasswordThe password that ColdFusion passes to the JDBC driver to connect to the data source if a ColdFusion application
Description(Optional) A description for this connection.
Connection StringA field that passes database-specific parameters, such as login credentials, to the data source.
Limit ConnectionsSpecifies whether ColdFusion limits the number of database connections for the data source. If you enable this
Restrict Connections ToSpecifies the maximum number of database connections for the data source. To use this restriction, enable the
Maintain ConnectionsColdFusion establishes a connection to a data source for every operation that requires one. Enable this option to
in parentheses.
does not supply a user name (for example, in a
The user name must have CREATE PACKAGE privileges for the database, or the database administrator must create
a package. Consult the database administrator when configuring this type of data source.
does not supply a password (for example, in a
option, use the Restrict Connections To field to specify the maximum.
Limit Connections option.
improve performance by caching the data source connection.
cfquery tag).
cfquery tag).
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Data Source Management
SettingDescription
40
Max Pooled StatementsEnables reuse of prepared statements (that is, stored procedures and queries that use the cfqueryparam tag).
Although you tune this setting based on your application, start by setting it to the sum of the following:
• Unique cfquery tags that use the cfqueryparam tag
• Unique cfstoredproc tags
Timeout (min)The number of minutes that ColdFusion MX maintains an unused connection before destroying it.
Interval (min)The time (in minutes) that the server waits between cycles to check for expired data source connections to close.
Disable ConnectionsIf selected, suspends all client connections.
Login Timeout (sec)The number of seconds before ColdFusion times out the attempt to log in to the data source connection.
CLOBReturns the entire contents of any CLOB/Text columns in the database for this data source. If deselected,
BLOB Returns the entire contents of any BLOB/Image columns in the database for this data source. If deselected,
LongText Buffer (chr)The default buffer size, used if the CLOB option is not selected. The default value is 64000 bytes.
BLOB Buffer (bytes)The default buffer size, used if the BLOB option is not selected. The default value is 64000 bytes.
Allowed SQLThe SQL operations that can interact with the current data source.
Validation queryCalled when a connection from the pool is resued. This can slow query response time because an additional query
ColdFusion retrieves the number of characters specified in the Long Text Buffer setting. For UDB 7.1 and 7.2, a 32K
limit on CLOBs exits.
ColdFusion retrieves the number of characters specified in the BLOB Buffer setting. BLOBs are not supported on
UDB 7.1 and 7.2.
is generated. Specify the validation query just before restarting the database to verify all connections, but remove
the validation query after restarting the database to avoid any performance loss.
Connecting to Informix
To see a list of Informix versions that ColdFusion supports, go to www.adobe.com/go/learn_cfu_cfsysreqs_en. Use the
settings in the following table to connect ColdFusion to Informix data sources:
SettingDescription
CF Data Source NameThe data source name (DSN) that ColdFusion uses to connect to the data source.
DatabaseThe database to which this data source connects.
Informix ServerThe name of the Informix database server to which you want to connect.
ServerThe name of the server that hosts the database. If the database is local, enclose the word local in parentheses.
PortThe number of the TCP/IP port that the server monitors for connections.
User nameThe user name that ColdFusion passes to the JDBC driver to connect to the data source if a ColdFusion application
does not supply a user name (for example, in a
PasswordThe password that ColdFusion passes to the JDBC driver to connect to the data source if a ColdFusion application
does not supply a password (for example, in a
Description(Optional) A description for this connection.
Connection StringA field that passes database-specific parameters, such as login credentials, to the data source.
cfquery tag).
cfquery tag).
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Data Source Management
SettingDescription
41
Limit ConnectionsSpecifies whether ColdFusion limits the number of database connections for the data source. If you enable this
Restrict Connections ToSpecifies the maximum number of database connections for the data source. To use this restriction, enable the
Maintain ConnectionsColdFusion establishes a connection to a data source for every operation that requires one. Enable this option to
Max Pooled StatementsEnables reuse of prepared statements (that is, stored procedures and queries that use the cfqueryparam tag).
option, use the Restrict Connections To field to specify the maximum.
Limit Connections option.
improve performance by caching the data source connection.
Although you tune this setting based on your application, start by setting it to the sum of the following:
• Unique cfquery tags that use the cfqueryparam tag
• Unique cfstoredproc tags
Timeout (min)The number of minutes that ColdFusion MX maintains an unused connection before destroying it.
Interval (min)The time (in minutes) that the server waits between cycles to check for expired data source connections to close.
Disable ConnectionsIf selected, suspends all client connections.
Login Timeout (sec)The number of seconds before ColdFusion times out the data source connection login attempt.
CLOBSelect to return the entire contents of any CLOB/ Text columns in the database for this data source. If not selected,
BLOB Select to return the entire contents of any BLOB/ Image columns in the database for this data source. If not
LongText BufferThe default buffer size, used if the CLOB option is not selected. The default value is 64000 bytes.
BLOB BufferThe default buffer size; used if the BLOB option is not selected. The default value is 64000 bytes.
ColdFusion retrieves the number of characters specified in the Long Text Buffer setting.
selected, ColdFusion retrieves the number of characters specified in the BLOB Buffer setting.
Allowed SQLThe SQL operations that can interact with the current data source.
Validation queryCalled when a connection from the pool is resued. This can slow query response time because an additional query
is generated. Configure the validation query just before restarting the database to verify all connections, but
remove the validation query after restarting the database to avoid any performance loss.
Connecting to Microsoft Access
Use the settings in the following table to connect ColdFusion to Microsoft Access data sources:
SettingDescription
CF Data Source NameThe data source name (DSN) used by ColdFusion to connect to the data source.
Database FileThe file that contains the database.
System Database FileTo secure access to the specified database file, click Browse Server to locate and enter a database that contains
Use Default User nameIf selected, ColdFusion does not pass a user name or password when requesting a connection. The Microsoft
ColdFusion User nameThe user name that ColdFusion passes to the JDBC driver to connect to the data source if a ColdFusion application
ColdFusion PasswordThe password that ColdFusion passes to the JDBC driver to connect to the data source if a ColdFusion application
database security information. By default, the system database is located in the same directory as the MDB file or
in the windows\system32\system.mdw directory.
Access driver uses the default user name and password.
does not supply a user name (for example, in a
does not supply a password (for example, in a
cfquery tag).
cfquery tag).
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Data Source Management
SettingDescription
Description(Optional) A description for this connection.
42
Page TimeoutThe number of milliseconds before a request for a ColdFusion page times out. The default is 600. If you observe
Max Buffer SizeThe size of the internal buffer, in kilobytes, that Access uses to transfer data to and from the disk. The default
Connection StringA field that passes database-specific parameters, such as login credentials, to the data source.
Default User nameThe user name that ColdFusion passes to the JDBC driver to connect to the data source if a ColdFusion application
Default PasswordThe password that ColdFusion passes to the JDBC driver to connect to the data source if a ColdFusion application
Return Timestamp as
String
Limit ConnectionsSpecifies whether ColdFusion limits the number of database connections for the data source. If you enable this
Restrict Connections ToSpecifies the maximum number of database connections for the data source. To use this restriction, enable the
Maintain ConnectionsColdFusion establishes a connection to a data source for every operation that requires one. Enable this option to
Timeout (min)The number of minutes that ColdFusion MX maintains an unused connection before destroying it.
Interval (min)The time (in minutes) that the server waits between cycles to check for expired data source connections to close.
Disable ConnectionsIf selected, suspends all client connections.
Login Timeout (sec)The number of seconds before ColdFusion times out the data source connection login attempt.
excessive network activity when using this driver, increase the page time-out value.
buffer size is 2048 KB. Specify an integer value divisible by 256.
does not supply a user name (for example, in a
does not supply a password (for example, in a
Enable this setting if your application retrieves Date/Time data and then reuses it in SQL statements without
applying formatting (using functions such as
option, use the Restrict Connections To field to specify the maximum.
Limit Connections option.
improve performance by caching the data source connection.
cfquery tag).
cfquery tag).
DateFormat, TimeFormat, and CreateODBCDateTime).
CLOBReturns the entire contents of any CLOB/ Text columns in the database for this data source. If not selected,
BLOB Returns the entire contents of any BLOB/ Image columns in the database for this data source. If deselected,
LongText BufferThe default buffer size, used if the CLOB option is not selected. The default value is 64000 bytes.
BLOB BufferThe default buffer size, used if the BLOB option is not selected. The default value is 64000 bytes.
Allowed SQLThe SQL operations that can interact with the current data source.
Validation queryCalled when a connection from the pool is resued. This can slow query response time because an additional query
ColdFusion retrieves the number of characters specified in the Long Text Buffer setting.
ColdFusion retrieves the number of characters specified in the BLOB Buffer setting.
is generated. Specify the validation query before restarting the database to verify all connections, but remove the
validation query after restarting the database to avoid any performance loss.
Connecting to Microsoft Access with Unicode
Use the settings in the following table to connect ColdFusion to Microsoft Access with Unicode data sources (this is a
Type 2 driver):
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Data Source Management
SettingDescription
CF Data Source NameThe data source name (DSN) that ColdFusion uses to connect to the data source.
Database FileThe file that contains the database.
Description(Optional) A description for this connection.
43
ColdFusion User nameThe user name that ColdFusion passes to the JDBC driver to connect to the data source if a ColdFusion application
does not supply a user name (for example, in a
ColdFusion PasswordThe password that ColdFusion passes to the JDBC driver to connect to the data source if a ColdFusion application
does not supply a password (for example, in a
Page TimeoutThe time (in tenths of a second) before a request for a ColdFusion page times out.
Max Buffer SizeThe size of the internal buffer, in kilobytes, used by Microsoft Access to transfer data to and from the disk. Can be
any integer value divisible by 256.
Connection StringA field that passes database-specific parameters, such as login credentials, to the data source.
Limit ConnectionsSpecifies whether ColdFusion limits the number of database connections for the data source. If you enable this
option, use the Restrict Connections To field to specify the maximum.
Restrict Connections ToSpecifies the maximum number of database connections for the data source. To use this restriction, enable the
Limit Connections option.
Maintain ConnectionsColdFusion establishes a connection to a data source for every operation that requires one. Enable this option to
improve performance by caching the data source connection.
Timeout (min)The number of minutes that ColdFusion MX maintains an unused connection before destroying it.
Interval (min)The time (in minutes) that the server waits between cycles to check for expired data source connections to close.
Disable ConnectionsIf selected, suspends all client connections.
Login Timeout (sec)The number of seconds before ColdFusion times out the data source connection login attempt.
CLOBSelect to return the entire contents of any CLOB/Text columns in the database for this data source. If not selected,
ColdFusion retrieves the number of characters specified in the Long Text Buffer setting.
cfquery tag).
cfquery tag).
BLOB Select to return the entire contents of any BLOB/Image columns in the database for this data source. If not
LongText BufferThe default buffer size, used if the CLOB option is not selected. The default value is 64000 bytes.
BLOB BufferThe default buffer size, used if the BLOB option is not selected. The default value is 64000 bytes.
Allowed SQLThe SQL operations that can interact with the current data source.
Validation queryCalled when a connection from the pool is resued. This can slow query response time because an additional query
selected, ColdFusion retrieves the number of characters specified in the BLOB Buffer setting.
is generated. Specify the validation query just before restarting the database to verify all connections, but remove
the validation query after restarting the database to avoid any performance loss.
Note: This driver uses the Microsoft Jet list of reserved words, including the word Last. For a complete list, see
http://support.microsoft.com/?kbid=248738.
Connecting to Microsoft SQL Server
To see a list of SQL Server versions that ColdFusion supports, go to www.adobe.com/go/learn_cfu_cfsysreqs_en. Use
the settings in the following table to connect ColdFusion to SQL Server:
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Data Source Management
SettingDescription
CF Data Source NameThe data source name (DSN) that ColdFusion uses to connect to the data source.
DatabaseThe database to which this data source connects.
44
ServerThe name of the server that hosts the database that you want to use. If the database is local, enclose the word
PortThe number of the TCP/IP port that the server monitors for connections.
User nameThe user name that ColdFusion passes to the JDBC driver to connect to the data source if a ColdFusion application
PasswordThe password that ColdFusion passes to the JDBC driver to connect to the data source if a ColdFusion application
Description(Optional) A description for this connection.
Connection StringA field that passes database-specific parameters, such as login credentials, to the data source.
Select MethodDetermines whether server cursors are used for SQL queries.
local in parentheses. If you are running SQL Server locally (or using MSDE), specify 127.0.0.1 for the
server name instead of the actual instance name.
does not supply a user name (for example, in a
does not supply a password (for example, in a
cfquery tag).
cfquery tag).
• The Direct method provides more efficient retrieval of data when you retrieve recordsets in a forward-only
direction and you limit your SQL Server connection to a single open SQL statement at a time. This is typical for
ColdFusion applications.
• The Cursor method lets you have multiple open SQL statements on a connection. This is not typical for
ColdFusion applications, unless you use pooled statements.
Limit ConnectionsSpecifies whether ColdFusion limits the number of database connections for the data source. If you enable this
Restrict Connections ToSpecifies the maximum number of database connections for the data source. To use this restriction, enable the
Maintain ConnectionsColdFusion establishes a connection to a data source for every operation that requires one. Enable this option to
option, use the Restrict Connections To field to specify the maximum.
Limit Connections option.
improve performance by caching the data source connection.
String FormatEnable this option if your application uses Unicode data in DBMS-specific Unicode data types, such as National
Max Pooled StatementsEnables reuse of prepared statements (that is, stored procedures and queries that use the cfqueryparam tag).
Character or nchar.
Although you tune this setting based on your application, start by setting it to the sum of the following:
• Unique cfquery tags that use the cfqueryparam tag
• Unique cfstoredproc tags
Timeout (min)The number of minutes that ColdFusion MX maintains an unused connection before destroying it.
Interval (min)The time (in minutes) that the server waits between cycles to check for expired data source connections to close.
Disable ConnectionsIf selected, suspends all client connections.
Login Timeout (sec)The number of seconds before ColdFusion times out the data source connection login attempt.
CLOBSelect to return the entire contents of any CLOB/Text columns in the database for this data source. If not selected,
BLOB Select to return the entire contents of any BLOB/ Image columns in the database for this data source. If not
LongText BufferThe default buffer size, used if Enable Long Text Retrieval (CLOB) is not selected. The default value is 64000 bytes.
ColdFusion retrieves the number of characters specified in the Long Text Buffer setting.
selected, ColdFusion retrieves the number of characters specified in the BLOB Buffer setting.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Data Source Management
SettingDescription
BLOB BufferThe default buffer size, used if the BLOB option is not selected. The default value is 64000 bytes.
Allowed SQLThe SQL operations that can interact with the current data source.
45
Validation queryCalled when a connection from the pool is resued. This can slow query response time because an additional query
is generated. Configure the validation query just before restarting the database to verify all connections, but
remove the validation query after restarting the database to avoid any performance loss.
Settings for the Northwind sample database
Previous versions of SQL Server included a sample database named Northwind. Establishing a connection to the
Northwind database can help you learn ColdFusion while using a familiar database.
To establish a connection to the SQL Server Northwind database, set up the database in the SQL Server Enterprise
manager and in the ColdFusion Administrator.
Set up the database in the SQL Server Enterprise manager
1 Expand the server group.
2 Expand the server.
3 Under the Security folder, right-click on Logins.
4 Select New Login.
5 Select Windows Authentication or SQL Server Authentication settings.
6 Select the Northwind database, and specify the language.
7 Ensure that the database server is using mixed authentication. While in Enterprise Manager, right-click the server,
select Properties > Security and then select the Security tab. Ensure that the SQL Server and Windows options are
clicked.
8 Click OK.
Set up the database in the ColdFusion Administrator
1 Open the ColdFusion Administrator.
2 Click Data & Services > Data Sources.
3 Type northwind in the Data Source Name field, and select Microsoft SQL Server in the Driver drop-down list.
4 Click Add.
5 Type Northwind in the Database Name field, 127.0.0.1 (or the database server IP address) in the Server field, and
1433 in the Port field.
Note: Do not specify a user name or password when defining the data source.
6 Save the data source.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Data Source Management
Troubleshooting SQL Server connections
If you are having trouble establishing a connection to SQL Server, review the following considerations:
• If you installed SQL Server using a server name other than the default, use your chosen domain\servername
wherever there’s a reference to (local).
The following situations can cause a Connection Refused error:
• If you specified authentication information in SQL Server, ensure that you have not defined a user name and
password in the ColdFusion data source.
• You are running a connection-limited version of SQL Server and the request exceeds the limit for TCP/IP
connections.
You can prevent this exception by setting the Limit Connections and Restrict Connections To options in
ColdFusion Administrator on the Advanced Settings page for the data sources, and specifying a number less than
the SQL Server maximum.
• SQL Server does not enable the TCP/IP protocol. This problem can happen when SQL Server is on the same
computer as ColdFusion. To fix this problem, perform the following steps:
1 In SQL Server Enterprise Manager, right-click on the name of your SQL Server and click Properties.
2 Click Network Configuration and the General Tab.
3 Move TCP/IP from the Disabled Protocols section to the Enabled Protocols section.
4 Click OK.
5 Restart the SQL Server services.
6 Verify your data source.
• If you have are having trouble connecting, consider using mixed-mode authentication for SQL Server (Windows
and SQL) and removing the user name and password from the ColdFusion data source.
46
Connecting to MySQL
To see a list of MySQL versions that ColdFusion supports, go to www.adobe.com/go/learn_cfu_cfsysreqs_en.
Note: By default, queries to MySQL data sources return isCaseSensitive = NO for each column in the return structure
from the
turn on the calls to isCaseSensitive.
Use the settings in the following table to connect ColdFusion to MySQL data sources:
SettingDescription
CF Data Source NameThe data source name (DSN) that ColdFusion uses to connect to the data source.
DatabaseThe database to which this data source connects.
ServerThe name of the server that hosts the database that you want to use. If the database is local, enclose
PortThe number of the TCP/IP port that the server monitors for connections.
User nameThe user name that ColdFusion passes to the JDBC driver to connect to the data source, if a ColdFusion
GetMetaData function. Set the system property -Dcoldfusion.mysql.enableiscasesensitive=true to
the word local in parentheses.
application does not supply a user name (for example, in a
cfquery tag).
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Data Source Management
SettingDescription
47
PasswordThe password that ColdFusion passes to the JDBC driver to connect to the data source, if a ColdFusion
Description(Optional) A description for this connection.
Connection StringA field that passes database-specific parameters, such as login credentials, to the data source.
Limit ConnectionsSpecifies whether ColdFusion limits the number of database connections for the data source. If you
Restrict Connections ToSpecifies the maximum number of database connections for the data source. To use this restriction,
Maintain ConnectionsColdFusion establishes a connection to a data source for every operation that requires one. Enable this
Timeout (min)The number of minutes that ColdFusion MX maintains an unused connection before destroying it.
Query Timeout (seconds)The default query timeout values for a DSN. This settings is only applicable for MySQL DataDirect driver.
application does not supply a password (for example, in a
enable this option, use the Restrict Connections To field to specify the maximum.
you must enable the Limit Connections option.
option to improve performance by caching the data source connection.
A new argument
qtimeout has been added to the following methods in the Administrator API:
cfquery tag).
• setDB2()
• setMySQL_DD()
• setOracle()
• setSybase()
• setInformix()
• setMSSQL
For details on MySQL DataDirect driver upgrade, see “New querytimeout connection option” on
page 48 in Developing ColdFusion Applications.
Interval (min)The time (in minutes) that the server waits between cycles to check for expired data source connections
Disable ConnectionsIf selected, suspends all client connections.
Login Timeout (sec)The number of seconds before ColdFusion times out the data source connection login attempt.
CLOBSelect to return the entire contents of any CLOB/ Text columns in the database for this data source. If
BLOB Select to return the entire contents of any BLOB/ Image columns in the database for this data source. If
LongText BufferThe default buffer size; used if Enable Long Text Retrieval (CLOB) is not selected. The default value is
BLOB BufferThe default buffer size; used if the BLOB option is not selected. The default value is 64000 bytes.
Allowed SQLThe SQL operations that can interact with the current data source.
Validation queryCalled when a connection from the pool is resued. This can slow query response time because an
to close.
not selected, ColdFusion retrieves the number of characters specified in the Long Text Buffer setting.
not selected, ColdFusion retrieves the number of characters specified in the BLOB Buffer setting.
64000 bytes.
additional query is generated. You should specify this just before restarting the database to verify all
connections, but remove the validation query after restarting the database to avoid any performance
loss.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Data Source Management
DataDirect Connect JDBC Support
ColdFusion 9 supports the latest version of DataDirect drivers for database operations. These drivers improve
performance and provide support for additional databases.
DataDirect driver features
ColdFusion transacts with the database server using the DataDirect drivers that are available as packaged JAR files.
Upgrade the JAR files to the latest version to be able to use the new features and performance enhancements.
ColdFusion 9 supports DataDirect driver version 4.0 SP 1, which provides the following features to enhance database
operations:
• Support for MySQL (Enterprise and Commercial), Oracle11g, DB2v9.5, Informix 11, SQL Server 2008
Note: For Oracle databases, if you want to filter the retrieval of column names or indexes for a particular schema, then
the schema name must be provided along with the table name in the
table attribute value is: schemaname.tablename.
• Improved performance
• IPv6 Address Support
• Querytimeout connection option to set default query timeout value. For details, see New querytimeout connection
option.
table attribute. In this case, the format of the
48
Creating a data source in MySQL
To create a MySQL Enterprise ColdFusion data source, select the driver type as MySQL(Datadirect) from the drivers
pop up menu in ColdFusion Administrator.
Note: The MySQL5 Enterprise database sometimes requires access permission for all users who try to connect to it, if the
access permission is not specified during configuration.
To grant the required permission, you can use the command: grant all on *.* to 'root'@'%' identified by
'admin';.
Replace root and admin by MYSQL username and MYSQL password, respectively.
A new admin API method, setMySQL_DD has been added, which lets you create a MySQL DataDirect data source.
New querytimeout connection option
As part of the DataDirect upgrade, the querytimeout option has been added in the Advanced Settings panel of the
Edit DSN page. The
Following is the description of querytimeout and pagetimeout from the DataDirect documentation:
"When the page time-out is much higher and the query times out, an exception is thrown to indicate that the query
has timed out. Similarly, if the query timeout is much higher and page times out, an exception is thrown to indicate
the page has timed out. However, when a page times out while a query is executing, the page times out only after the
query's execution is complete."
A new argument qtimeout has been added to the following methods in the Administrator API:
querytimeout connection option sets the default query timeout values for a DSN.
• setDB2()
• setMySQL_DD()
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Data Source Management
• setOracle()
• setSybase()
• setInformix()
• setMSSQL()
Note: The qtimeout option is not supported by all databases.
For more information about DataDirect JDBC Connect, see:
1 In the ColdFusion Administrator, go to Data & Services > Data Sources.
2 Select the data source to enable SSL Connection.
3 In the data source page, click Show Advanced Settings.
4 In the Connection String text box, specify the connection properties as per the SSL requirements.
49
Connection properties
The following table provides details of the connection properties and specifies which database the properties apply to:
PropertyRelevanceDescriptionApplies to
KeyStoreApplies only if client authentication is enabled
KeyStorePasswordApplies only if client authentication is enabled
KeyPasswordOptional
TrustStoreIgnored if
TrustStorePasswordIgnored if
ValidateServerCertifi
cate
HostNameInCertificateOptional
on database server
on database server
Used if keys in keystore file have a different
password than the keystore file
ValidateServerCertificate=false
ValidateServerCertificate=false
Optionaltrue|false
Applies if EncryptionMethod=SSL and
ValidateServerCertificate=true
The directory of the keystore file to be usedDB2, Oracle
The password to access the keystore fileDB2, Oracle
The password to access the individual keys in
the keystore file
The directory of the truststore fileDB2, Microsoft SQL
The password to access the truststore fileDB2, Microsoft SQL
Determines whether the driver validates the
certificate sent by the database server
host_name | #SERVERNAME#
Host name for certificate validation
DB2, Oracle
Server, Oracle, Sybase
Server, Oracle, Sybase
DB2, Microsoft SQL
Server, Oracle, Sybase
DB2, Microsoft SQL
Server, Oracle, Sybase
useSSLRequired for enabling SSLtrue|false
Use SSL when communicating with the
server
Last updated 8/5/2010
MySQL
CONFIGURING AND ADMINISTERING COLDFUSION 9
Data Source Management
PropertyRelevanceDescriptionApplies to
50
requireSSLOptionaltrue|false
Require SSL connection if useSSL=true
verifyServerCertificateOptionaltrue|false
Determines whether to validates the
certificate sent by the database server
clientCertificateKeySt
oreUrl
clientCertificateKeySt
oreType
clientCertificateKeySt
orePassword
trustCertificateKeySt
oreUrl
trustCertificateKeySt
oreType
trustCertificateKeySt
orePassword
Applies only if client authentication is enabled
on the database server
Optional
Depends on the keystore type supported by
your JVM
Applies only if client authentication is enabled
on database server
Applies only if
verifyServerCertificate=true
Optional
Depends on the keystore type supported by
your JVM
Required if
verifyServerCertificate=true
URL to the client certificate KeyStore. If not
specified, use defaults.
KeyStore type for client certificates. NULL or
empty means use default. Standard keystore
types supported by the JVM are "JKS" and
"PKCS12". Your environment might have
more types available depending on the
security products available to the JVM.
Password for the client certificate KeyStoreMySQL (4/5)
URL to the trusted root certificate KeyStore. If
not specified, use defaults.
KeyStore type for trusted root certificates.
NULL or empty means use default. Standard
keystore types supported by the JVM are
"JKS" and "PKCS12". Your environment might
have more types available depending on the
security products available to the JVM.
Password for the trusted root certificate
KeyStore
MySQL
MySQL
MySQL
MySQL
MySQL (4/5)
MySQL (4/5)
MySQL (4/5)
Specifying connection properties
The following table details the connection properties that you must specify for each database driver to enable SSL
connection. The table provides all possible values for each driver. Specify the optional values (see the table in the
“Enabling SSL Connection” on page 49) as per your requirements.
section
Database Database Driver Connection Property
DB2DB2 Universal
Microsoft SQL
Server
Database
Microsoft SQL
Server
EncryptionMethod=SSL; KeyStore=path to keystore; KeyStorePassword=keystore
Password; KeyPassword=key Password; TrustStore=path to keystore;
ertificate&trustCertificateKeyStoreType=
KeyStoreType&trustCertificateKeyStorePassword=trustedRootCertificatePassw
ord
Note: Not all MySQL (4/5) properties listed are supported by all MySQL versions.
See MySQL documentation for details of the supported properties for your version.
Note: If the database driver attempts to connect to a database server that does not support SSL, connection might hang.
You can avoid issues when connecting to a server that does not support SSL by setting a login timeout.
For more information on enabling SSL for DB2, Microsoft SQL Server, Oracle, and Sybase, see the DataDirect
documentation available at the following URL:
Use the settings in the following table to connect ColdFusion to ODBC Socket data sources (this is a Type 3 driver):
SettingDescription
CF Data Source NameThe data source name (DSN) that ColdFusion uses to connect to the data source.
ODBC DSNSelect the ODBC DSN to connect to ColdFusion.
Trusted ConnectionSpecifies whether to use domain user account access to the database. Only valid for SQL Server.
User nameThe user name that ColdFusion passes to the JDBC driver to connect to the data source if a ColdFusion
application does not supply a user name (for example, in a
PasswordThe password that ColdFusion passes to the JDBC driver to connect to the data source if a ColdFusion
application does not supply a password (for example, in a
Description(Optional) A description for this connection.
Connection StringA field that passes database-specific parameters, such as login credentials, to the data source.
Return Timestamp as StringEnable this option if your application retrieves Date/Time data and then reuses it in SQL statements
without applying formatting (using functions such as
CreateODBCDateTime).
cfquery tag).
cfquery tag).
DateFormat, TimeFormat, and
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Data Source Management
SettingDescription
52
Limit ConnectionsSpecifies whether ColdFusion limits the number of database connections for the data source. If you
Restrict Connections ToSpecifies the maximum number of database connections for the data source. To use this restriction,
Maintain ConnectionsColdFusion establishes a connection to a data source for every operation that requires one. Enable this
Timeout (min)The number of minutes that ColdFusion MX maintains an unused connection before destroying it.
Interval (min)The time (in minutes) that the server waits between cycles to check for expired data source connections
Disable ConnectionsIf selected, suspends all client connections.
Login Timeout (sec)The number of seconds before ColdFusion times out the attempt to log in to the data source
CLOBSelect to return the entire contents of any CLOB/Text columns in the database for this data source. If
BLOB Select to return the entire contents of any BLOB /Image columns in the database for this data source. If
LongText BufferThe default buffer size; used if Enable Long Text Retrieval (CLOB) is not selected. The default value is
BLOB BufferThe default buffer size; used if the BLOB option is not selected. The default value is 64000 bytes.
Allowed SQLThe SQL operations that can interact with the current data source.
Validation queryCalled when a connection from the pool is resued. This can slow query response time because an
enable this option, use the Restrict Connections To field to specify the maximum.
enable the Limit Connections option.
option to improve performance by caching the data source connection.
to close.
connection.
not selected, ColdFusion retrieves the number of characters specified in the Long Text Buffer setting.
not selected, ColdFusion retrieves the number of characters specified in the BLOB Buffer setting.
64000 bytes.
additional query is generated. Configure this just before restarting the database to verify all
connections, but remove the validation query after restarting the database to avoid any performance
loss.
Connecting to Oracle
To see a list of Oracle versions that ColdFusion supports, go to www.adobe.com/go/learn_cfu_cfsysreqs_en. Use the
settings in the following table to connect ColdFusion to Oracle data sources:
SettingDescription
CF Data Source NameThe data source name (DSN) that ColdFusion uses to connect to the data source.
SID NameThe Oracle System Identifier (SID) that refers to the instance of the Oracle database software running on
the server. The default value is
ServerThe name of the server that hosts the database that you want to use. If the database is local, enclose the
word local in parentheses.
PortThe number of the TCP/IP port that the server monitors for connections.
User nameThe user name that ColdFusion passes to the JDBC driver to connect to the data source if a ColdFusion
application does not supply a user name (for example, in a
PasswordThe password that ColdFusion passes to the JDBC driver to connect to the data source if a ColdFusion
application does not supply a password (for example, in a
Description(Optional) A description for this connection.
Last updated 8/5/2010
ORCL.
cfquery tag).
cfquery tag).
CONFIGURING AND ADMINISTERING COLDFUSION 9
Data Source Management
SettingDescription
Connection StringA field that passes database-specific parameters, such as login credentials, to the data source.
53
Limit ConnectionsSpecifies whether ColdFusion limits the number of database connections for the data source. If you
Restrict Connections ToSpecifies the maximum number of database connections for the data source. To use this restriction,
Maintain ConnectionsColdFusion establishes a connection to a data source for every operation that requires one. Enable this
Max Pooled StatementsEnables reuse of prepared statements (that is, stored procedures and queries that use the
enable this option, use the Restrict Connections To field to specify the maximum.
enable the Limit Connections option.
option to improve performance by caching the data source connection.
cfqueryparam tag). Although you tune this setting based on your application, start by setting it to the
sum of the following:
• Unique cfquery tags that use the cfqueryparam tag
• Unique cfstoredproc tags
The default value is 300.
Timeout (min)The number of minutes that ColdFusion MX maintains an unused connection before destroying it.
Interval (min)The time (in minutes) that the server waits between cycles to check for expired data source connections
Disable ConnectionsIf selected, suspends all client connections.
Login Timeout (sec)The number of seconds before ColdFusion times out the attempt to log in to the data source
CLOBSelect to return the entire contents of any CLOB/Text columns in the database for this data source. If not
BLOB Select to return the entire contents of any BLOB/ Image columns in the database for this data source. If
to close.
connection.
selected, ColdFusion retrieves the number of characters specified in the Long Text Buffer setting.
not selected, ColdFusion retrieves the number of characters specified in the BLOB Buffer setting.
LongText BufferThe default buffer size; used if Enable Long Text Retrieval (CLOB) is not selected. The default value is
BLOB BufferThe default buffer size; used if the BLOB option is not selected. The default value is 64000 bytes.
Allowed SQLThe SQL operations that can interact with the current data source.
Validation queryCalled when a connection from the pool is resued. This can slow query response time because an
64000 bytes.
additional query is generated. Specify the validation query before restarting the database to verify all
connections, but remove the validation query after restarting the database to avoid any performance
loss.
Connecting to other data sources
Use the settings in the following table to connect ColdFusion to data sources through JDBC drivers that do not appear
in the drop-down list of drivers:
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Data Source Management
SettingDescription
CF Data Source NameThe data source name (DSN) that ColdFusion uses to connect to the data source.
JDBC URLThe JDBC connection URL for this data source.
54
Driver ClassThe fully qualified class name of the driver. For example, com.inet.tds.TdsDriver. The JAR file that
Driver Name(Optional) The name of the driver.
User nameThe user name that ColdFusion passes to the JDBC driver to connect to the data source if a ColdFusion
PasswordThe password that ColdFusion passes to the JDBC driver to connect to the data source if a ColdFusion
Description(Optional) A description for this connection.
Connection StringA field that passes database-specific parameters, such as login credentials, to the data source.
Limit ConnectionsSpecifies whether ColdFusion limits the number of database connections for the data source. If you
Restrict Connections ToSpecifies the maximum number of database connections for the data source. To use this restriction,
Maintain ConnectionsColdFusion establishes a connection to a data source for every operation that requires one. Enable this
Timeout (min)The number of minutes that ColdFusion MX maintains an unused connection before destroying it.
Interval (min)The time (in minutes) that the server waits between cycles to check for expired data source connections
Disable ConnectionsIf selected, suspends all client connections.
Login Timeout (sec)The number of seconds before ColdFusion times out the attempt to log in to the data source
contains this class must be in a directory defined in the ColdFusion classpath.
application does not supply a user name (for example, in a
application does not supply a password (for example, in a
enable this option, use the Restrict Connections To field to specify the maximum.
enable the Limit Connections option.
option to improve performance by caching the data source connection.
to close.
connection.
cfquery tag).
cfquery tag).
CLOBSelect to return the entire contents of any CLOB/Text columns in the database for this data source. If not
BLOB Select to return the entire contents of any BLOB/ Image columns in the database for this data source. If
LongText BufferThe default buffer size; used if Enable Long Text Retrieval (CLOB) is not selected. The default value is
BLOB BufferThe default buffer size; used if the BLOB option is not selected. The default value is 64000 bytes.
Allowed SQLThe SQL operations that can interact with the current data source.
selected, ColdFusion retrieves the number of characters specified in the Long Text Buffer setting.
not selected, ColdFusion retrieves the number of characters specified in the BLOB Buffer setting.
64000 bytes.
For example, you can use the Other Data Sources option to define a data source for DB2 OS/390 or iSeries, using the
following settings:
Note: DB2 OS/390 refers to all supported versions of DB2 on OS/390 and z/OS platforms. DB2 iSeries refers to all
supported versions of DB2 on iSeries and AS/400.
For more information on DB2, see “Connecting to DB2 Universal Database” on page 39.
Connecting to PostgreSQL
55
To see a list of PostgreSQL versions that ColdFusion supports, go to www.adobe.com. Use the settings in the following
table to connect ColdFusion to PostgreSQL data sources:
SettingDescription
CF Data Source NameThe data source name (DSN) that ColdFusion uses to connect to the data source.
DatabaseThe database to which this data source connects.
ServerThe name of the server that hosts the database that you want to use. If the database is local, enclose the
PortThe number of the TCP/IP port that the server monitors for connections.
User nameThe user name that ColdFusion passes to the JDBC driver to connect to the data source if a ColdFusion
PasswordThe password that ColdFusion passes to the JDBC driver to connect to the data source if a ColdFusion
Description(Optional) A description for this connection.
Connection StringA field that passes database-specific parameters, such as login credentials, to the data source.
Limit ConnectionsSpecifies whether ColdFusion limits the number of database connections for the data source. If you
Restrict Connections ToSpecifies the maximum number of database connections for the data source. To use this restriction,
word local in parentheses. This name must be either a fully qualified domain name (resolvable through
DNS) or an IP address. It cannot be a netbios name (even if you are running NBT), or an alias you set up
using the client connectivity wizard (both of these approaches worked in earlier ColdFusion versions).
application does not supply a user name (for example, in a
application does not supply a password (for example, in a
enable this option, use the Restrict Connections To field to specify the maximum.
enable the Limit Connections option.
cfquery tag).
cfquery tag).
Maintain ConnectionsColdFusion establishes a connection to a data source for every operation that requires one. Enable this
Timeout (min)The number of minutes that ColdFusion MX maintains an unused connection before destroying it.
Interval (min)The time (in minutes) that the server waits between cycles to check for expired data source connections
option to improve performance by caching the data source connection.
to close.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Data Source Management
SettingDescription
Disable ConnectionsIf selected, suspends all client connections.
56
Login Timeout (sec)The number of seconds before ColdFusion times out the attempt to log in to the data source
CLOBSelect to return the entire contents of any CLOB/ Text columns in the database for this data source. If not
BLOB Select to return the entire contents of any BLOB/ Image columns in the database for this data source. If
LongText BufferThe default buffer size; used if Enable Long Text Retrieval (CLOB) is not selected. The default value is
BLOB BufferThe default buffer size; used if the BLOB option is not selected. The default value is 64000 bytes.
Allowed SQLThe SQL operations that can interact with the current data source.
Validation queryCalled when a connection from the pool is resued. This can slow query response time because an
connection.
selected, ColdFusion retrieves the number of characters specified in the Long Text Buffer setting.
not selected, ColdFusion retrieves the number of characters specified in the BLOB Buffer setting.
64000 bytes.
additional query is generated. Specify the validation query before restarting the database to verify all
connections, but remove the validation query after restarting the database to avoid any performance
loss.
Connecting to Sybase
To see a list of Sybase versions that ColdFusion supports, go to www.adobe.com/go/learn_cfu_cfsysreqs_en. Use the
settings in the following table to connect ColdFusion to Sybase data sources:
SettingDescription
CF Data Source NameThe data source name (DSN) that ColdFusion uses to connect to the data source.
DatabaseThe database to which this data source connects.
ServerThe name of the server that hosts the database that you want to use. If the database is local, enclose the
PortThe number of the TCP/IP port that the server monitors for connections.
User nameThe user name that ColdFusion passes to the JDBC driver to connect to the data source if a ColdFusion
PasswordThe password that ColdFusion passes to the JDBC driver to connect to the data source if a ColdFusion
Description(Optional) A description for this connection.
Connection StringA field that passes database-specific parameters, such as login credentials, to the data source.
Select MethodDetermines whether server cursors are used for SQL queries.
word local in parentheses. This name must be either a fully qualified domain name (resolvable through
DNS) or an IP address. It cannot be a netbios name (even if you are running NBT), or an alias you set up
using the client connectivity wizard (both of these approaches worked in earlier ColdFusion versions).
application does not supply a user name (for example, in a
application does not supply a password (for example, in a
cfquery tag).
cfquery tag).
• The Direct method provides more efficient retrieval of data when you retrieve recordsets in a forward-
only direction and you limit your Sybase connection to a single open SQL statement at a time. This is
typical for ColdFusion applications.
• The Cursor method lets you have multiple open SQL statements on a connection. This is not typical
for ColdFusion applications, unless you use pooled statements.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Data Source Management
SettingDescription
57
Limit ConnectionsSpecifies whether ColdFusion limits the number of database connections for the data source. If you
Restrict Connections ToSpecifies the maximum number of database connections for the data source. To use this restriction,
Maintain ConnectionsColdFusion establishes a connection to a data source for every operation that requires one. Enable this
Max Pooled StatementsEnables reuse of prepared statements (that is, stored procedures and queries that use the
enable this option, use the Restrict Connections To field to specify the maximum.
enable the Limit Connections option.
option to improve performance by caching the data source connection.
cfqueryparam tag). Although you tune this setting based on your application, start by setting it to the
sum of the following:
• Unique cfquery tags that use the cfqueryparam tag
• Unique cfstoredproc tags
Timeout (min)The number of minutes that ColdFusion MX maintains an unused connection before destroying it.
Interval (min)The time (in minutes) that the server waits between cycles to check for expired data source connections
Disable ConnectionsIf selected, suspends all client connections.
Login Timeout (sec)The number of seconds before ColdFusion times out the attempt to log in to the data source
CLOBSelect to return the entire contents of any CLOB/ Text columns in the database for this data source. If not
BLOB Select to return the entire contents of any BLOB/ Image columns in the database for this data source. If
to close.
connection.
selected, ColdFusion retrieves the number of characters specified in the Long Text Buffer setting.
not selected, ColdFusion retrieves the number of characters specified in the BLOB Buffer setting.
LongText BufferThe default buffer size; used if Enable Long Text Retrieval (CLOB) is not selected. The default value is
BLOB BufferThe default buffer size; used if the BLOB option is not selected. The default value is 64000 bytes.
Allowed SQLThe SQL operations that can interact with the current data source.
Validation queryCalled when a connection from the pool is resued. This can slow query response time because an
64000 bytes.
additional query is generated. Specify the validation query before restarting the database to verify all
connections, but remove the validation query after restarting the database to avoid any performance
loss.
Connecting to JNDI data sources
Use the settings in the following table to connect ColdFusion to JNDI data sources that are defined for a J2EE
application server (multiserver and J2EE configurations only):
SettingDescription
CF Data Source NameThe data source name (DSN) that ColdFusion uses to connect to the data source.
JNDI NameThe JNDI location in which the J2EE application server stores the data source.
User nameThe user name that ColdFusion passes to JNDI to connect to JNDI if a ColdFusion application does not
supply a user name (for example, in a
PasswordThe password that ColdFusion passes to JNDI to connect to the data source if a ColdFusion application
does not supply a password (for example, in a
cfquery tag).
cfquery tag).
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Data Source Management
SettingDescription
Description(Optional) A description for this connection.
58
JNDI Environment SettingsSpecifies additional JNDI environment settings, if necessary by the JNDI data source. Use comma-
CLOBSelect to return the entire contents of any CLOB/ Text columns in the database for this data source. If not
BLOB Select to return the entire contents of any BLOB/ Image columns in the database for this data source. If
LongText BufferThe default buffer size; used if Enable Long Text Retrieval (CLOB) is not selected. The default value is
BLOB BufferThe default buffer size; used if the BLOB option is not selected. The default value is 64000 bytes.
Allowed SQLThe SQL operations that can interact with the current data source.
separated list of name-value pair. For example if you must specify a user name and password to connect
to JNDI, specify the following:
selected, ColdFusion retrieves the number of characters specified in the Long Text Buffer setting.
not selected, ColdFusion retrieves the number of characters specified in the BLOB Buffer setting.
64000 bytes.
Note: The ColdFusion Administrator does not display the JNDI data source option when running in the server
configuration.
Connecting to an external JDBC Type 4 data source
To use a JDBC driver that is not included with ColdFusion (such as SQLAnywhere) configure the JDBC driver and
add a data source for it.
Connect to an external JDBC data source:
1 Copy the database driver .jar file to one of the following directories:
• (server configuration only) cf_root/lib
• (multiserver or J2EE configuration) cf_webapp_root/WEB-INF/cfusion/lib
2 Restart ColdFusion.
Note: In Windows, ensure that you restart all of the ColdFusion 9 services.
3 In the ColdFusion Administrator, add the other JDBC Type 4 data source, selecting Other from the Driver drop-
down list.
For more information, see the chapter on data source management in Configuring and Administering ColdFusion.
You can now connect to an external JDBC Type 4 data source.
Last updated 8/5/2010
Chapter 5: Web Server Management
You can connect Adobe ColdFusion to the built-in web server and to external web servers, such as Apache, IIS, and
Sun ONE Web Server (formerly known as iPlanet).
ColdFusion lets you manage web servers when running in the server configuration, in the multiserver configuration,
and when deploying on Macromedia JRun in the J2EE configuration. (Some J2EE application servers include web
server plug-ins that provide similar functionality.)
About web servers in ColdFusion
The web server is a critical component in your ColdFusion environment, and understanding how ColdFusion interacts
with web servers can help you administer your site. ColdFusion provides the following web server options:
Built-in web server A lightweight, all-Java, HTTP 1.0 web server. Suitable for development but not intended for use in
production applications. For more information, see
External web server A customized web server connector module that forwards requests for ColdFusion pages from an
external web server to ColdFusion. For more information, see
“Using the built-in web server” on page 59.
“Using an external web server” on page 60.
59
Using the built-in web server
The ColdFusion server configuration is built on top of JRun, which includes the JRun web server (JWS), also called the
built-in web server. Although not intended for use in a production environment, the built-in web server is useful in
the following cases:
Coexistence/transition The built-in web server lets you run a previous version of ColdFusion (using an external web
server) and ColdFusion (using the built-in web server) on the same computer while you migrate your existing
applications to ColdFusion.
Development If your workstation runs ColdFusion but does not run an external web server, you can still develop and
test ColdFusion applications locally through the built-in web server.
All web servers listen on a TCP/IP port, which you can specify in the URL. By default, web servers listen for HTTP
requests on port 80 (for example, http://www.adobe.com and http://www.adobe.com:80 are the same). Similarly, port
443 is the default port for https requests.
By default in the server configuration, the built-in web server listens on port 8500. For example, to access the
ColdFusion Administrator through the built-in web server, specify
http://servername:8500/CFIDE/administrator/index.cfm. In the multiserver configuration, the default port for the
built-in web server is 8300.
Note: URLs are case sensitive on UNIX operating systems.
If you enable the built-in web server during the installation process and the port is already in use, the installer
automatically finds the next-highest available port and configures the built-in web server to use that port. To
determine the port number used by the built-in web server, open the cf_root/runtime/servers/coldfusion/SERVERINF/jrun.xml file in a text editor and examine the
configuration, the path is jrun_root/servers/cfusion/SERVER-INF/jrun.xml.
port attribute of the WebService service. In the multiserver
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Web Server Management
Note: When you install ColdFusion Enterprise Edition using the multiserver configuration, the installation wizard
always configures the built-in web server, even if you select an external web server.
Keep in mind the following when using the built-in web server:
• Whenever possible, configure your external web server as part of the ColdFusion installation, except for the two
cases mentioned previously (coexistence with a previous ColdFusion version, and when the computer has no web
server). If you select the built-in web server by mistake, run the Web Server Configuration Tool manually to
configure your external web server after the installation. For information about the Web Server Configuration
Tool, see
“Web server configuration” on page 61.
• The default web root when using the built-in web server is cf_root/wwwroot (server configuration) or
jrun_root/servers/cfusion/cfusion-ear/cfusion-war (multiserver configuration). By default, the ColdFusion
Administrator (CFIDE directory) is under this web root.
• If you want the built-in web server to serve pages from a different web root directory, define a virtual mapping in
the cf_root/wwwroot/WEB-INF/jrun-web.xml file (jrun_root/servers/cfusion/cfusion-ear/cfusion-war/WEBINF/jrun-web.xml in the multiserver configuration), as the following example shows:
Important: If you have CFML pages under your external web server’s root, ensure that ColdFusion is configured to serve
these pages through the external web server. If you did not configure ColdFusion to use an external web server, your
external web server serves ColdFusion Markup Language (CFML) source code for ColdFusion pages saved under its web
root.
Using an external web server
ColdFusion uses the JRun web server connector to forward requests from an external web server to the ColdFusion
runtime system.
When a request is made for a CFM page, the connector on the web server opens a network connection to the JRun
proxy service. The ColdFusion runtime system handles the request and sends its response back through the proxy
service and connector. The web server connector uses web-server-specific plug-in modules, as the following table
describes:
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Web Server Management
Web serverConnector details
ApacheThe Web Server Configuration Tool adds the following elements to the Apache httpd.conf file:
• A LoadModule directive defines the connector.
• An AddHandler directive tells Apache to route requests for ColdFusion pages through the connector.
For Apache 1.3.x, the connection module is mod_jrun.so; for Apache 2.x, the connection module is
mod_jrun20.so.
61
IISThe Web Server Configuration Tool adds the following elements at either the global level (default) or
website level:
• An ISAPI filter (available on IIS 5 only).
• Extension mappings that tell IIS to route requests for ColdFusion pages through the connector.
With IIS 5, the IIS connection module is jrun.dll. IIS 6 uses a connection module named jrun_iis6.dll and a
helper DLL named jrun_iis6_wildcard.dll.
Sun ONE Web Server, including
iPlanet and Netscape Enterprise
Server (NES)
The Web Server Configuration Tool adds the following elements to Sun ONE Web Server configuration
files:
• obj.conf A PathCheck directive for the JRun filter and ObjectType directives to route requests for
ColdFusion pages through the connector.
• magnus.conf Init directives to load and initialize the connector.
In Windows, the Sun ONE Web Server connection module is jrun_nsapi.dll; on UNIX, the Sun ONE Web
Server connection module is jrun_nsapi.so.
With iPlanet 4.x, the Web Server Configuration Tool places all settings in the obj.conf file.
Web server configuration
ColdFusion uses the Web Server Configuration Tool to configure an external web server with the modules and settings
that the connector requires connect to ColdFusion. You can run the Web Server Configuration Tool through either
the command-line interface or the graphical user interface (GUI). In either case, the Web Server Configuration Tool
configures your external web server to interact with a ColdFusion server.
Using GUI mode
The Web Server Configuration Tool includes a GUI mode, which you can use to specify external web server
configuration settings through a graphical interface.
Note: When you use the Web Server Configuration Tool in GUI mode, select the Configure Web Server for ColdFusion
Applications check box.
Run the Web Server Configuration Tool in GUI mode
1 Open a console window.
Note: In Windows, to start the Web Server Configuration Tool, select Start > Programs > Adobe > ColdFusion 9 >
Web Server Configuration Tool.
2 Change to the cf_root/runtime/bin (server configuration) or jrun_root/bin (multiserver configuration) directory.
3 Start the Web Server Configuration Tool using the wsconfig.exe (Windows) or wsconfig (UNIX) command.
The Web Server Configuration Tool window appears.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Web Server Management
4 Click Add.
5 Select Configure Web Server For ColdFusion Applications.
6 In the Server drop-down list, select the server or cluster name that you want to configure. (Individual server names
in a cluster do not appear. Clustering support is only available on the multiserver configuration.)
Note: The server or cluster does not have to reside on the web server computer. In this case, enter the IP address or
server name of the remote computer in the JRun Host field.
7 In the Web Server Properties area, enter web-server-specific information, and click OK.
8 (Optional) Move the CFIDE directory and other directories (such as cfdocs) from the built-in web server’s web root
to your web server root directory. In addition, you can copy your application’s CFM pages from the built-in web
server’s web root to your web server root directory.
Note: When a page is requested, the web server connector first looks for the ColdFusion page in the cf_root/wwwroot
(server configuration) or jrun_root/servers/cfusion/cfusion-ear/cfusion-war (multiserver configuration) directory,
and then looks under the web server root. Alternatively, you can use the command-line interface and specify the cfwebroot option.
9 (Optional) The web server connector does not serve static content (such as HTML files and images) from the built-
in web server’s root directory. If your ColdFusion web application has an empty context root (/) and you want to
serve pages from the built-in web server’s root directory, you can create a web server mapping to the corresponding
directory under the built-in web server.
62
Using the command-line interface
You can also run the Web Server Configuration Tool through a command-line interface.
Run the command-line interface
1 Open a console window.
2 Change to the cf_root/runtime/bin (server configuration) or jrun_root/bin (multiserver configuration) directory.
3 Execute the wsconfig.exe (Windows) or wsconfig (UNIX) command:
wsconfig.exe [-options]
./wsconfig [-options]
The following table describes the options:
OptionDescription
-wsSpecifies the web server, as follows:
• IIS
• Apache
• SunOne
• iPlanet
• NES
The web server name you supply is not case sensitive.
-dir Specifies the path to the configuration directory (Apache conf or NES/iPlanet config).
-siteSpecifies the IIS website name (case-sensitive). Specify All or 0 to configure the connector at a
global level, which applies to all IIS websites.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Web Server Management
OptionDescription
-host Specifies the ColdFusion server address. The default value is localhost.
-serverSpecifies the ColdFusion server name.
-usernameSpecifies a user name defined to the JRun server. The default value is guest account.
-passwordSpecifies a password that corresponds to -username. The default value is guest account.
-norestartSpecifies not to restart the web server.
63
-clusterSpecifies the JRun cluster name. Use this option to define a connection to a JRun cluster instead
-lEnables verbose logging for the connector.
-aEnables native OS memory allocation.
-map.cfm,.cfc,.cfml,.cfr,
.cfswf,.jsp,.jws
-filter-prefix-only(IIS 5 only) Sets ignoresuffixmap=true in the jrun.ini file. This means that the connector
-coldfusionEnsures that the proper ColdFusion mappings are set (.cfm, .cfml, .cfc, .cfswf, .cfr, .jsp, .jws), and,
-upgradeUpgrades existing configured connectors with newer modules from a newer wsconfig.jar file.
-serviceSpecifies the Apache Windows service name. The default value is Apache.
-binSpecifies the path to the Apache server binary file (apache.exe in Windows, httpd on UNIX).
-scriptSpecifies the path to the Apache UNIX control script file (apachectl, but slightly different with
-vEnables verbose output from the Web Server Configuration Tool.
-cfwebrootSpecifies the directory corresponding to cf_root/wwwroot. If you use this option, the Web
of a single server.
Specifies the extension mappings list. (To use the web server connector with ColdFusion,
specify .cfm, .cfc, .cfml, .cfr, .cfswf, .jsp, .jws.)
module runs as an IIS extension.
filter-prefix-only is implicitly specified.
if IIS,
Always use this option when you configure a web server for use with ColdFusion.
certain Apache variants, such as Stronghold).
Server Configuration Tool creates web server mappings for /CFIDE and /cfdocs, each of which
points to the corresponding directories under cf_root/wwwroot. This option is useful in a
multihoming or hosting environment where you want multiple applications to share the
ColdFusion Administrator.
-listLists all configured web servers.
-list -host server-hostLists all JRun servers on the specified host.
-removeRemoves a configuration. Requires the -ws and either the -dir or -site options.
-uninstallRemoves all configured connectors.
-h Lists all parameters.
Using the batch files and shell scripts
The ColdFusion server configuration includes batch files and shell scripts that implement typical command-line
connector configurations. These files are in the cf_root/bin/connectors directory. For example, the IIS_connector.bat
file configures all sites in IIS to site 0, which establishes a globally defined connector so that all sites inherit the filter
and mappings.
If you use Apache or Sun ONE Web Server, use these files as prototypes, editing, and saving them as appropriate for
your site.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Web Server Management
command-line interface examples
Examples of multiple use-cases for different web servers:
The -cfwebroot option allows all sites to share the ColdFusion Administrator that runs under
C:\Inetpub\wwwroot. This example does not automatically configure newly added sites after the first
but you can rerun with
-site 0 at a later time, and the Web Server Configuration Tool configures new sites only.
The Web Server Configuration Tool stores properties in configuration files, as follows:
IIS In the jrun.ini file, typically found in a subdirectory of the cf_root/runtime/lib/wsconfig (server configuration) or
jrun_root/lib/wsconfig (multiserver configuration) directory. For IIS 5 only, it also defines filter and extension
mappings in the IIS metabase.
Apache In the httpd.conf file, typically found in the apache_root/conf directory.
Sun ONE Web Server/iPlanet In the obj.conf and magnus.conf files, typically found in the ws_root/server-http-
xxx/config directory.
The following table describes the web server connector properties in the web server configuration files. The web server
connector uses these settings to help it find the ColdFusion server and know which servers to connect to.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Web Server Management
PropertyDescription
65
bootstrapSpecifies the IP address and port on which the JRun server’s proxy service is listening for connector requests.
serverstoreSpecifies the full path and filename of the file that contains information for the associated JRun server. The
verboseCreates more detailed web server log file entries for the connector. Enabling this option can cause the web
scriptpath(IIS only) Points to the virtual /JRunScripts directory on the web server.
errorurl(Optional) Specifies the URL to a file that contains a customized error message. This property is commented
ssl(Optional) Enables secure sockets layer (SSL) between the web server and the JRun server. Set this setting to
apiallocEnables native operating-system memory allocation rather than the web server’s allocator (for use on Solaris
ignoresuffixmap(IIS only) Forces the connector to use application mappings.
proxyretryintervalSpecifies the number of seconds to wait before trying to reconnect to an unreachable clustered server.
connecttimeoutSpecifies the number of seconds to wait on a socket connect to a JRun server.
recvtimeoutSpecifies the number of seconds to wait on a socket receive to a JRun server.
sendtimeoutSpecifies the number of seconds to wait on a socket send to a JRun server.
JRun must also be configured to listen on this port and address combination, the ProxyService must be
activated, and the JRun server must be running. Specify ipaddress:portnumber (for example, 127.0.0.1:51011).
connector creates this file automatically. The default filename is jrunserver.store.
server’s log files to fill quickly. Specify
Server, the connector writes to the error log configured for the web server; on IIS, the connector writes to its
own log in the related wsconfig subdirectory.
out by default. Restart the web server after enabling this setting.
false.
with Sun ONE, at the direction of Adobe Support staff).
true or false; the default value is false. In Apache and Sun ONE Web
Each time you run the Web Server Configuration Tool, it creates a configuration file and directory. For example, the
first time you run the tool in the server configuration, it creates files under cf_root/runtime/lib/wsconfig/1; the second
time, it creates cf_root/runtime/lib/wsconfig/2; and so on. Each of these subdirectories contains the appropriate
platform-specific connector module and web-server-specific supporting files.
Sample configuration files
The following are some examples of connector-specific web server properties that help describe the web server
configuration file parameters. These examples assume that JRun and the web server are on the same computer.
Apache configuration file
The following is a typical httpd.conf file for an installation of ColdFusion on the same computer as an Apache 2.0 web
server:
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Web Server Management
# JRun Settings
LoadModule jrun_module "C:/coldfusion9/runtime/lib/wsconfig/1/mod_jrun20.so"
<IfModule mod_jrun20.c>
JRunConfig Verbose false
JRunConfig Apialloc false
JRunConfig Ssl false
JRunConfig Ignoresuffixmap false
JRunConfig Serverstore "C:/coldfusion9/runtime/lib/wsconfig/1/jrunserver.store"
JRunConfig Bootstrap 127.0.0.1:51011
#JRunConfig Errorurl <optionally redirect to this URL on errors>
#JRunConfig ProxyRetryInterval <number of seconds to wait before trying to reconnect to
unreachable clustered server>
#JRunConfig ConnectTimeout 15
#JRunConfig RecvTimeout 300
#JRunConfig SendTimeout 15
AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr .cfswf
</IfModule>
IIS configuration file
For IIS, the connector uses the jrun.ini file to initialize the jrun.dll file (jrun_iis6.dll on IIS 6). The following is a typical
jrun.ini file:
66
verbose=false
scriptpath=/JRunScripts/jrun.dll
serverstore=C:/coldfusion9/runtime/lib/wsconfig/1/jrunserver.store
bootstrap=127.0.0.1:51011
apialloc=false
ssl=false
ignoresuffixmap=true
#errorurl=<optionally redirect to this URL on errors>
#proxyretryinterval=<number of seconds to wait before trying to reconnect to unreachable
clustered server>
#connecttimeout=<number of seconds to wait on a socket connect to a JRun server>
#recvtimeout=<number of seconds to wait on a socket receive to a JRun server>
#sendtimeout=<number of seconds to wait on a socket send to a JRun server>
Netscape, iPlanet, or Sun ONE configuration file
The following is a typical obj.conf file for Netscape, iPlanet, or Sun ONE Web Server:
Note: Java must be disabled for the virtual server class that contains the server configured for JRun.
The following is a typical magnus.conf file for Netscape, iPlanet, or Sun ONE Web Server:
...
Init fn="load-modules" shlib="C:/coldfusion9/runtime/lib/wsconfig/1/jrun_nsapi.dll"
funcs="jruninit,jrunfilter,jrunservice"
Init fn="jruninit" serverstore="C:/coldfusion9/runtime/lib/wsconfig/1/jrunserver.store"
bootstrap="127.0.0.1:51011" verbose="true" apialloc="false" ssl="false"
ignoresuffixmap="false" #errorurl="<optionally redirect to this URL on errors>"
connecttimeout="15" recvtimeout="300" sendtimeout="15"
Multihoming
You typically use the Web Server Configuration Tool to configure a connection between the web server and
ColdFusion server running on the same computer. However, you can use the web server connector to route requests
to multiple virtual sites to a single ColdFusion server. This is known as multihoming.
In a multihomed environment, you have multiple virtual hosts (also known as virtual sites) connected to a single
ColdFusion server. You might use these virtual hosts for separate applications, such as Human Resources (HR),
payroll, and marketing, or for separate users in a hosting environment.
Note: You use web-server-specific methods to create separate virtual websites for each use.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Web Server Management
Multihoming configuration tasks include:
Enabling access to the ColdFusion Administrator If any of the applications under a virtual host need to access the
ColdFusion Administrator, create a web server mapping (Alias directive in Apache) for /CFIDE that points to the
original CFIDE directory. Alternatively, you can copy the entire CFIDE directory to the virtual website.
You can also configure the web server using the command-line Web Server Configuration Tool -cfwebroot option,
which allows access to the CFIDE directory under the specified web root.
Enabling access to the cfform.js file If you do not create a web server mapping for /CFIDE, and any of the applications
under a virtual host use the
cfform tag, enable the virtual host to find the JavaScript files under the CFIDE/scripts
directory. To enable access to the scripts, use one of the following options:
• Copy the original_web_root/CFIDE/scripts directory to a CFIDE/scripts directory on your virtual host.
• Modify all cfform tags to use the scriptsrc attribute to specify the location of the cfform.js file.
Disabling the cacheRealPath attribute To ensure that ColdFusion always returns pages from the correct server,
disable Cache Web Server Paths in the Caching page of the ColdFusion Administrator. (When you use the multiserver
configuration, set the
cacheRealPath attribute to false for the ProxyService in the
The procedures you perform to enable multihoming differ for each web server.
68
IIS
When you use IIS, you run the IIS Administrator to create additional websites and run the Web Server Configuration
Tool. You store ColdFusion pages under the web root of each virtual website.
Connect multiple virtual sites on IIS to a single ColdFusion server
1 Use the IIS Administrator to create virtual websites, as necessary. The web root directory should enable read, write,
and execute access. For more information, see your IIS documentation.
2 Configure DNS for each virtual website, as described in your IIS documentation.
3 Test each virtual website to ensure that HTML pages are served correctly.
4 Run the Web Server Configuration Tool, as follows:
• GUI - Select IIS for the Web Server, select All from the IIS Web Site drop-down list, and select the Configure
Web Server for ColdFusion Applications check box.
• Command line - Specify the -site 0 and -cfwebroot options, as the following server configuration example
shows:
cf_root/runtime/bin/wsconfig.exe -ws iis -site 0
-cfwebroot cf_root/wwwroot -coldfusion -v
5 Test each virtual website to ensure that ColdFusion pages are served correctly.
Apache
When you use Apache, you modify the apache_root/conf/httpd.conf file to create virtual hosts and run the Web Server
Configuration Tool. You store ColdFusion pages under the web root of each virtual website.
Connect multiple Apache virtual hosts on a web server to a single ColdFusion server
1 Configure DNS for each virtual website, as described in your web server documentation.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Web Server Management
2 Open the apache_root/conf/httpd.conf file in a text editor and create virtual hosts, as necessary. For more
information, see your Apache documentation. For example:
3 Test each virtual host to ensure that HTML pages are served correctly.
4 Run the Web Server Configuration Tool, as follows:
• GUI - Specify Apache for the Web Server, specify the directory that contains the httpd.conf file, and select the
Configure Web Server for ColdFusion Applications check box.
• Command line - Specify -wsapache and the directory that contains the httpd.conf file, as the following example
shows:
cf_root/runtime/bin/wsconfig.exe -ws apache
-dir "c:\program files\apache group\apache2\conf"
-cfwebroot cf_root/wwwroot -coldfusion -v
For additional UNIX command-line examples, see “Using the command-line interface” on page 62.
The Web Server Configuration Tool updates the httpd.conf file. For a sample, see “Apache” on page 68.
5 Restart Apache. You store ColdFusion files for each virtual host in the directory specified by the DocumentRoot
directive.
6 Test each virtual host to ensure that ColdFusion pages are served correctly.
Sun ONE Web Server, iPlanet, and Netscape
When you use Sun ONE Web Server version 6, you use the Server Administrator to create virtual servers and run the
Web Server Configuration Tool. You store ColdFusion pages under the web root of each virtual server.
Note: For earlier versions of Sun ONE/iPlanet and Netscape Enterprise Server (NES), create separate server instances for
each site and run the Web Server Configuration Tool once for each site.
Connect multiple Sun ONE Web Server virtual hosts to a single ColdFusion server
1 Using the Sun ONE Web Server Administrator, create virtual web servers for ColdFusion to use. For more
information, see your Sun ONE Web Server documentation.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Web Server Management
2 Configure DNS for each virtual website, as described in your web server documentation.
3 Test each virtual server to ensure that HTML pages are served correctly.
4 Run the Web Server Configuration Tool, as follows:
• GUI - Specify Netscape Enterprise Server/Sun ONE for the web server, specify the directory that contains the
obj.conf and magnus.conf files, and select the Configure Web Server for ColdFusion Applications check box.
• Command line - Specify -wssunone and the directory that contains the obj.conf file, as the following example
shows:
cf_root/runtime/bin/wsconfig -ws sunone -dir [path to config]
-cfwebroot cf_root/wwwroot -coldfusion -v
5 Test each virtual server to ensure that ColdFusion pages are served correctly.
70
Last updated 8/5/2010
Chapter 6: Deploying ColdFusion
Applications
Adobe ColdFusion includes archive and deployment options that let you package applications and create archive files.
Archive and deployment options
ColdFusion includes the following archive and deployment options.
ColdFusion archive files You can package your ColdFusion application’s pages, data sources, and settings in a
ColdFusion Archive (CAR) file. For more information, see
J2EE archives You can package your ColdFusion application as an Enterprise Application Archive (EAR) or Web
Application Archive (WAR) file for easy deployment to a J2EE application server. For more information, see
“Packaging applications in J2EE archive files” on page 72.
“Packaging applications in CAR files” on page 71.
71
Cfcompile utility The cfcompile utility lets you precompile the ColdFusion pages of your application, into Java class
files. In addition, you can compile ColdFusion pages to bytecode and save this bytecode in files with the CFM, CFC,
or CFR extension. For more information, see
“Using the cfcompile utility” on page 73.
Packaging applications in CAR files
CAR files let you archive and deploy website configuration information, files, and applications. Use this feature to
deploy your website applications to another location or to back up your files quickly and easily. You manage CAR files
using the Packaging & Deployment > ColdFusion Archives area of the ColdFusion Administrator.
Note: CAR file archiving and deployment is different from J2EE archiving and packaging through EAR and WAR files.
Perform the following steps when you archive and deploy site information:
1 Create the archive definition.
Identify the type of information to archive about a site. You can archive almost anything about the site, including
directories, files, CFX tags, ColdFusion mappings, Verity collections, automated tasks, and server settings. Each
archive definition that you create is assigned a name. You use this name each time you build or deploy its content.
2 Build the archive.
Select the name of the archive definition and specify a location to which you store the CAR file.
3 Deploy the archive.
Specify the location of the CAR file and the location to which you restore the contents.
Note: ColdFusion does not deploy Administrator and RDS passwords, nor does it unpack archives created in earlier
versions of ColdFusion.
For more information on creating, building, and deploying CAR files, see ColdFusion Administrator online Help.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Deploying ColdFusion Applications
Packaging applications in J2EE archive files
When running ColdFusion in the multiserver and J2EE configurations, you deploy the ColdFusion application, in
enterprise application archive (EAR) or web application archive (WAR) format, on a J2EE application server. You then
create your ColdFusion application, configuring resources (such as data sources), and storing CFM, CFC, and CFR
files in the web application root or in the web server root. In earlier ColdFusion versions, your J2EE administrator had
to redo each of these steps when deploying your ColdFusion application onto a production J2EE server.
The ColdFusion Administrator lets you create an EAR or WAR file that contains the entire application. This archive
file contains the ColdFusion web application, settings for ColdFusion (such as data source definitions), and the CFM,
CFC, and CFR files that your application uses.
If you are using the multiserver configuration, you can combine J2EE archiving with the instance creation
functionality of the ColdFusion Administrator Enterprise Manager. First, create an EAR file that contains your
application and all of its settings. Use that EAR file in the Create From EAR/WAR option of the Instance Manager. For
more information on the Enterprise Manager, see
Application packaging
The J2EE Archive feature lets you quickly create an archive file that a J2EE administrator can use to deploy your
ColdFusion application.
“Defining additional server instances” on page 83.
72
Add a new archive definition and create an archive file
1 Open the ColdFusion Administrator.
2 Specify a unique name for the archive file (no extension) in the Archive Name field.
3 Click Add. The Add New Archive screen appears.
4 Specify archive settings on the Add New Archive screen.
5 Click Create. ColdFusion creates an EAR or WAR file in the specified application distribution directory.
The following table describes the settings you make when creating or modifying an archive:
SettingDescription
Archive TypeSelect EAR or WAR.
Context Root (EAR only)Each J2EE web application running in a server is rooted at a unique base URL, called a context root (or
Serial NumberSpecifies a ColdFusion Enterprise Edition serial number. If you do not specify a valid ColdFusion
COM SupportIf your application doesn’t use COM support, you can reduce the size of the archive file by omitting the
context path). The J2EE application server uses the initial portion of the URL (that is, the portion
immediately following http://hostname) to determine which web application services an incoming
request.
For example, if you are running ColdFusion with a context root of cfmx, you display the Administrator
using the URL http://hostname/cfmx/CFIDE/administrator/index.cfm. Most J2EE application servers
allow one application in each server instance to use a forward slash (/) for the context root. The Remote
Development Services (RDS) web application is not required if you use a context root of /.
Enterprise Edition serial number when creating the archive file, it is deployed as an Enterprise Edition
evaluation version, which reverts to the Developer Edition after 30 days.
supporting files.
DebuggingIf the current ColdFusion server is running with debugging enabled, you can disable debugging in the
application contained in the archive file.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Deploying ColdFusion Applications
SettingDescription
73
Include CFML SourceYou can optionally deploy Java bytecode instead of CFML source code. For more information, see
ColdFusion AdministratorIf your application does not require modification by using the ColdFusion Administrator, you can reduce
Data sourcesSpecifies the data source definitions to include in the archive file.
“Sourceless distribution” on page 74.
archive size and reduce security issues by omitting the Administrator files.
Deployment considerations
After the archive file is created, you deploy by using standard ColdFusion J2EE configuration deployment techniques.
For more information, see Installing an EAR file or WAR files in Installing the J2EE Configuration of Installing ColdFusion.
Post-deployment considerations
Depending on your application, the resources that it uses, and the environment in which it is deployed, you may need
to perform post-deployment configuration, as follows:
Mappings The ColdFusion mappings in the archived application refer to directories on the original computer. If those
directories do not exist on the deployment computer, modify the ColdFusion mappings by using the ColdFusion
Administrator or the Administrator API.
Verity Ensure that the Verity server settings on the original computer are appropriate for the deployment computer.
If they are not, use the ColdFusion Administrator or the appropriate tags to modify the Verity server settings.
Serial number J2EE deployment is a ColdFusion Enterprise feature. To upgrade to the Enterprise Edition, use the
ColdFusion Administrator or the Administrator API to enter a serial number.
For more information on the Administrator API, see “Administrator API” on page 30.
Using the cfcompile utility
You can use the cfcompile utility for the following purposes:
Precompiling ColdFusion pages Precompile your application’s CFM pages into Java class files. At runtime,
ColdFusion does not have to compile CFM pages.
Sourceless distribution Create CFM pages as Java bytecode. You can deploy these CFM pages instead of CFML source
code.
The cfcompile utility is located in the cf_root/bin (server configuration) or cf_webapp_root/WEB-INF/cfusion/bin
(multiserver and J2EE configuration) directory.
Before you can use the cfcompile utility in the J2EE configuration, set the CFUSION_HOME, J2EEJAR, and WEBINF
variables in the cfcompile.sh/cfcompile.bat file.
Precompiling ColdFusion pages
You can use the cfcompile utility to precompile ColdFusion pages (CFM, CFC, and CFR files). This can enhance
initial page loading time at runtime.
Use the following command to compile ColdFusion pages into Java classes:
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Deploying ColdFusion Applications
cfcompile webroot [directory-to-compile]
The following table describes these parameters:
ParameterDescription
74
webrootFully qualified path to the web server root; for example, C:\Inetpub\wwwroot or
directory-to-compileFully qualified path to the directory where the files to be compiled are located. This directory must be
C:\coldfusion9\wwwroot.
under the web root directory. If not specified, all ColdFusion templates in the web root directory are
compiled.
Sourceless distribution
You can use the cfcompile utility with the -deploy option to create ColdFusion pages (CFM, CFC, and CFR files)
that contain Java bytecode. You can then deploy the bytecode versions of the ColdFusion pages instead of the original
CFML source code.
Use the following command to compile CFML files into bytecode format that you can deploy instead of CFML source code:
webrootFully qualified path to the web server root; for example, C:\Inetpub\wwwroot or
directory-to-compileFully qualified path to the directory where the files to be compiled are located. This directory must be
output-directoryFully qualified path to the directory to contain the compiled deployable files. This cannot be the same
C:\coldfusion9\wwwroot.
under the web root directory. This is required for the -
directory as the source directory.
deploy option.
After you run the cfcompile utility, perform the following steps:
1 Back up your original CFML files
2 Copy the generated bytecode CFML files to the original directory
3 Deploy the application.
The J2EE Archive screen of the ColdFusion Administrator lets you create an EAR or WAR file that contains bytecode
versions of your application’s CFML files.
Last updated 8/5/2010
Chapter 7: Administering Security
You can secure many Adobe ColdFusion resources using password authentication and configure sandbox security.
About ColdFusion security
Security is especially important in web-based applications, such as those you develop in ColdFusion. ColdFusion
developers and administrators must fully understand the security risks that could affect their development and
runtime environments so they can enable and restrict access appropriately.
You can implement development security by requiring a password to use the ColdFusion Administrator and a
password for Remote Development Services (RDS), which allows developers to develop CFML pages remotely. You
implement runtime security in your CFML pages and in the ColdFusion Administrator. ColdFusion has the following
runtime security categories:
User security Programmatically determine the logged-in user and allow or disallow restricted functionality based on
the roles assigned to that user. For more information about user security, see ColdFusion security features in Securing
Applications in the Developing ColdFusion Applications.
75
Sandbox security Using the ColdFusion Administrator, define the actions and resources that the ColdFusion pages in
and below a specified directory can use.
Note: If you have the Enterprise Edition of ColdFusion, you can configure multiple security sandboxes. If you have the
Standard Edition of ColdFusion, you can only configure a single security sandbox.
The Security area in the Administrator lets you do the following tasks:
• Configure password protection for the ColdFusion Administrator. For more information, see “ColdFusion
Administrator password protection” on page 75.
• Configure password protection for RDS access. For more information, see “RDS password protection” on page 76.
• Enable, disable, and customize ColdFusion security, on the Security > Sandbox Security page (called Resource
Security page in the Standard edition). For more information, see
“Using sandbox security” on page 77.
Using password protection
Password protection restricts access to the ColdFusion Administrator and to a ColdFusion server when you attempt
access through RDS security.
ColdFusion Administrator password protection
Secure access to the ColdFusion Administrator is enabled by default. The password that you enter during installation
is saved as the default. You are prompted to enter this password whenever you open the Administrator.
Password protection for accessing the Administrator helps guard against unauthorized modifications of ColdFusion,
and Adobe recommends using passwords. You can disable or change the Administrator password on the Security >
CF Admin Password page.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Administering Security
Configurable seed for password encryption
In ColdFusion 9 Update 1, Administrator has option to specify a new seed value to encrypt data source passwords.
Previously, ColdFusion used to assign a default seed value to encrypt data source passwords, but modification was not
allowed.
To modify the default seed value assigned by ColdFusion or to change the value you specified,
1 In the ColdFusion Administrator, got to Security > Administrator and then in the Password Seed section, specify
the new seed value between 8-500 characters.
2 Click Submit Changes.
Note: When you modify the seed value, all data source connections are reset. Therefore, Adobe recommends that you
perform this task when the server is idle or at the initial phase (after installation).
RDS password protection
If you configured password protection for RDS access when you installed ColdFusion, you are prompted for the
password when you attempt to access ColdFusion from Dreamweaver MX 2004, HomeSite+, or the ColdFusion
Report Builder.
You can disable RDS or change the RDS password on the Security > RDS Password page.
76
Note: Disabling RDS also disables the applet that the ColdFusion Administrator uses in file-related dialog boxes.
If you use RDS security, you rely on web server and operating system security settings to set permissions for
ColdFusion application and document directories.
Exposing services to users
ColdFusion exposes many existing enterprise services as web services. You can access these services using SOAP and
AMF/Flash remoting.
The following are the exposed services:
• cfpdf
• cfImage
• cfdocument
• cfmail
• cfpop
• cfchart
• upload service
You can secure the exposed services to prevent access by unknown applications or users. This can be done by
configuring the client IP address range to which services are accessible. Also, you can set up user access control for the
services.
On the Security > User Manager page, you can select the services available to a user from the Exposed Services section.
By default, all the services are listed in the Prohibited Services drop-down list. Press CTRL and select the services that
you want the user to avail and click the << button.
Now, click Edit User to implement the changes to the user settings.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Administering Security
Configure IP address to access exposed services
To configure IP addresses to access exposed services:
1 Go to Security > Allowed IP Addresses
2 To add an IP address, specify the IP address in the IP addresses field and click Add.
3
To remove an IP address, select the IP address from the View/Remove Selected IP Addresses for Exposed Services list.
4 Click Remove Selected to remove the IP addresses.
Using sandbox security
Sandbox security (called Resource security in the Standard Edition) uses the location of your ColdFusion pages to
control access to ColdFusion resources. A sandbox is a designated directory of your site to which you apply security
restrictions. Sandbox security lets you specify which tags, functions, and resources (for example, files, directories, and
data sources) can be used by ColdFusion pages located in and under the designated directory.
To use sandbox security in the multiserver and J2EE editions, the application server must be running a security
manager (
line in the jrun_root/jvm.config file):
java.lang.SecurityManager) and you define the following JVM arguments (for JRun, this is the java.args
Note: Sandbox security is not enabled by default. You enable it on the Security > Sandbox Security page before
ColdFusion enforces the settings.
Using multiple sandboxes (Enterprise Edition only)
By default, a subdirectory of a sandbox inherits the settings of the directory one level above it. However, if you define
a sandbox for a subdirectory, the subdirectory no longer inherits settings from the parent, completely overriding the
parent directory’s sandbox settings. For example, consider the following directories:
If you define a sandbox for the wwwroot directory, the settings also apply to the sales and rnd directories. If you also
define a sandbox for the rnd directory, the rnd sandbox settings also apply to the dev and qa directories. The wwwroot
and sales directories maintain their original settings, and the rnd settings override the wwwroot directory settings for
the rnd directory and subdirectories.
This hierarchical arrangement of security permits the configuration of personalized sandboxes for users with different
security levels. For example, if you are a web hosting administrator who hosts several clients on a ColdFusion shared
server, you can configure a sandbox for each customer. This prevents one customer from accessing the data sources or
files of another customer.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Administering Security
Resources that you can restrict
You can restrict the following resources:
Data Sources Restrict the use of ColdFusion data sources.
CF Tags Restrict the use of ColdFusion tags that manipulate resources on the server (or on an external server), such as
files, the registry, Lightweight Directory Access Protocol (LDAP), mail, and the log.
CF Functions Restrict the use of ColdFusion functions that access the file system.
Files/Dirs Enable tags and functions in the sandbox to access files and directories outside the sandbox.
Note: To use the Administrator API when sandbox security is enabled, allow access to the cf_web_root/CFIDE/adminapi
directory.
Server/Ports Specify the servers, ports, and port ranges that the ColdFusion tags that call third-party resources can use.
For more information, see the Administrator online Help.
Note: When you run ColdFusion in the J2EE configuration on IBM WebSphere, the Files/Dirs and Server/Ports tabs are
not enabled.
About directories and permissions
When you enable access to files outside the sandbox, you specify the filename. When you enable access to directories
outside the sandbox, you specify directoryname\indicator, where indicator is a dash or asterisk, as follows:
78
• A backslash followed by a dash (\-) lets tags and functions access all files in the specified directory, and recursively
allows access to all files in subdirectories.
• A backslash followed by an asterisk (\*) lets tags and functions access all files in the specified directory and also lets
tags and functions access a list of subdirectories. However, this option denies access to files in any subdirectories.
You can also specify the actions that ColdFusion tags and functions can perform on files and directories outside the
sandbox. The following table shows the relationship between the permissions of a file and a directory:
PermissionEffect on filesEffect on directories
ReadView the fileList all files in the directory
WriteWrite to the fileNot applicable
ExecuteExecute the file Not applicable
DeleteDelete the fileDelete the directory
Add a sandbox (Enterprise Edition only)
ColdFusion Enterprise Edition lets you define multiple security sandboxes.
1 Open the Security > Sandbox Security page in the ColdFusion Administrator.
The Sandbox Security Permissions page appears.
2 In the Add Security Sandbox box, enter the name of the new sandbox. This name must be either a ColdFusion
mapping (defined in the Administrator) or an absolute path.
3 Select New Sandbox from the drop-down list to create a sandbox based on the default sandbox, or select an existing
sandbox to copy its settings to your new sandbox.
4 Click Add.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Administering Security
The new sandbox appears in the list of Defined Directory Permissions.
Configure a sandbox
Before you begin security sandbox configuration, analyze your application and its usage to determine the tags,
functions, and resources that it requires. You can then configure the sandbox to enable access to the required resources
and disable use of the appropriate tags and functions. For example, if the applications in the sandbox do not use the
cfregistry tag, you can safely disable it.
Note: In the Standard Edition, the Root Security Context is the only sandbox without any initial list of defined directory
permissions.
1 Open the Security > Sandbox Security page (Security > Resource Security page in the Standard Edition) in the
ColdFusion Administrator.
2 (Enterprise Edition only) In the list of Defined Directory Permissions, click the name or Edit icon for the directory.
A page with several tabs appears. This is the initial page in the Standard Edition. The remaining steps describe the
use of each tab.
3 To disable a data source, in the left column of the Datasources tab, highlight the data source, and click the right
arrow.
By default, ColdFusion pages in this sandbox can access all data sources.
79
Note: If <<ALL DATASOURCES>> is in the Enabled Datasources column, any data source that you add is enabled.
If you move <<ALL DATASOURCES>> to the Disabled Datasources column, any new data source is disabled.
4 Click the CFTags tab.
5 To disable tags, in the left column of the CFTags tab, highlight the tags, and click the right arrow.
By default, ColdFusion pages in this sandbox can access all listed tags.
6 Click the CFFunctions tab.
7 To disable functions, in the left column of the CFFunctions tab, highlight the functions, and click the right arrow.
By default, ColdFusion pages in this sandbox can access all listed functions.
8 Click the Files/Dirs tab.
9 To enable files or directories, in the File Path box, enter or browse to the files or directories; for example, C:\pix. A
file path that consists of the special token <<ALL FILES>> matches any file. For information on using the
backslash-hyphen (\-) and backslash-asterisk (\*) wildcard characters, see
“About directories and permissions” on
page 78.
10 Select the permissions.
For example, select the Read check box to let ColdFusion pages in the mytestapps sandbox read files in the C:\pix
directory.
11 Click Add Files/Paths. When you edit an existing sandbox, this button reads Edit Files/Paths.
The file path and its permissions appear in the Secured Files and Directories list.
12 In the Secured Files and Directories list, verify that the file path is correct.
The character after the backslash is important. For information, see “About directories and permissions” on
page 78.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Administering Security
Note: The Files/Dirs tab works together with the file-based permissions of the operating system. To restrict a user from
browsing another user’s directory, use file-based permissions.
13 Click the Server/Ports tab.
14 To turn off default behavior (global access to all servers and ports), enter the IP addresses and port numbers that
pages in this sandbox can connect to by using tags that access external resources (for example,
cfldap, cfhttp, and so on). You can specify an IP address, a server name (such as www.someservername.com), or
cfmail, cfpop,
a domain name (such as someservername.com). You can optionally specify a port restriction.
Note: This behavior differs from other tabs, such as CFTags, where you select items to disable. If you set any values in
this tab, external-resource tags executed in this sandbox can access only the specified servers and ports.
For example, to allow this sandbox access to 207.88.220.3 on ports 80 and lower, perform the following steps:
a In the IP Address field, enter 207.88.220.3.
b In the Port field, enter 80, and click This Port and Lower.
Note: To deny access by these ColdFusion tags to an entire site, enable access for a local resource, such as your local
mail server, FTP server, and so on.
15 Click Finish to save changes to the sandbox.
80
Sandbox Considerations
Using OpenOffice within Sandbox
Grant permissions in sandbox for the following filepaths:
For disk-based caching to work inside a sandbox, the sandbox must provide read/write permission to the disk cache
directory. This can be the default directory (
diskStore property.
The diskStore property in cf_root\lib\ehcache.xml is used to specify the directory for disk cache (<diskStore
path="java.io.tmpdir"/>).Use the following code to identify the temp directory:
<cfscript>
writeoutput("Temp Dir : " &
createobject("java","java.lang.System").getProperty("java.io.tmpdir") );
</cfscript>
java.io.tmpdir) or a user-configured directory as identified by the
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Administering Security
Also, read permission must be granted to cf_root\lib\ehcache.xml for certain functions that read from/write to
ehCache.xml to work. For example,
cacheGetProperties and cacheSetProperties.
Using Service CFCs within Sandbox
Grant the following permissions:
• execute permission to cf_root\CustomTags\com\adobe\coldfusion
• read permission to cf_root\WEB-INF\cftags\META_INF\taglib.tld
81
Last updated 8/5/2010
Chapter 8: Using Multiple Server Instances
When you use the multiserver configuration to install Adobe ColdFusion Enterprise Edition, you can use the
ColdFusion Administrator to create multiple server instances. Deploying ColdFusion on multiple server instances lets
you isolate individual applications and leverage clustering functionality.
Management of multiple server instances changed as of ColdFusion MX 7, as follows:
ColdFusion MX Use a J2EE deployment, along with J2EE application server features to deploy the ColdFusion
application on multiple instances of the J2EE application server.
Post-ColdFusion MX Use the ColdFusion Administrator in the multiserver configuration to create JRun server
instances and to automatically deploy the ColdFusion application on those instances. Additionally, you can combine
the Administrator-driven server-instance creation with the ColdFusion Administrator J2EE Archive feature to deploy
a ColdFusion application that contains all of your application’s CFM files (including CFCs and CFRs), settings
(including data source definitions), and the ColdFusion web application. For more information on J2EE Archive, see
“Packaging applications in J2EE archive files” on page 72.
82
About multiple server instances
The ColdFusion Administrator lets you create server instances and clusters. Additionally, you can connect to remote
JRun servers and add them to clusters.
Running multiple instances of ColdFusion has the following advantages:
Application isolation You deploy an independent application to each server instance. Each server instance has
separate settings and, because each server instance runs in its own Java Virtual Machine (JVM), problems that one
application encounter have no effect on other applications.
Clustering (load balancing and failover) You deploy the same application to each server instance and add the instances
to a cluster. The web server connector optimizes performance and stability by automatically balancing load and by
switching requests to another server instance when a server instance stops running.
The multiserver configuration is a specialized J2EE configuration that installs JRun and deploys ColdFusion as an
expanded Enterprise Application Archive (EAR) in the cfusion JRun server. The cfusion server is the only server that
can create servers and clusters. The JRun instance creation and clustering options in the ColdFusion Administrator
are not available in the server configuration, nor are they available in the J2EE configuration, even if you deploy
ColdFusion on JRun.
Note: You can also manually deploy ColdFusion on multiple server instances, using the server creation and deployment
facilities of your J2EE application server. For more information, see the ColdFusion documentation.
Expanded archive considerations
ColdFusion must run from an expanded directory structure. The Instance Manager expands the EAR or WAR file
automatically and then deploys the expanded directory structure into the new server instance.
For more information on deploying ColdFusion in the J2EE configuration, see Installing ColdFusion.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using Multiple Server Instances
File location considerations
ColdFusion lets you store CFM pages either under the external web server root or under the ColdFusion web
application root. The discussions here assume that you store your CFM pages under the ColdFusion web application
root and specify a context root for your application. However, in ColdFusion MX 6.1 documentation, the assumption
that you stored CFM pages under the web server root.
If you use the web server connector to access pages under the ColdFusion web application root and your ColdFusion
web application has an empty context root (this is the default), the connector does not automatically serve static
content, such as HTML pages and image files. If so, define web server mappings so that it can serve files from the
ColdFusion web application root.
For more information on serving CFM pages from the web server root, see “Web Server Management” on page 59
Defining additional server instances
The multiserver configuration is a customized installation of JRun. JRun supports multiple server instances (also called
JRun servers) running on the same computer. Each server instance runs in a separate JVM, which executes all
ColdFusion pages for that instance.
83
Use the Instance Manager area of the ColdFusion Administrator to define and manage server instances. The Instance
Manager only runs in the cfusion JRun server that is created as part of a multiserver configuration installation.
Note: When you create a server instance using the Instance Manager, if you previously modified the cfusion (Enterprise
Manager) instance, the log files for the new instance point to the default cfusion instance. Before you modify the cfusion
instance, ensure that you want to share the modification among all new instances.
When you create a server instance with the Instance Manager, by default it deploys a copy of the cfusion server
ColdFusion enterprise application, including data sources, mappings, and settings. Alternatively, you can create a
server instance and specify the location of an EAR or WAR file (created by the J2EE Archive page), which the Instance
Manager uses as the basis for your new ColdFusion server instance.
Note: If you are running JRun 4, you can also create a server in the JRun Management Console (JMC) and deploy the
ColdFusion application using JRun deployment functionality.
Define a server instance
1 Ensure that you installed ColdFusion using the multiserver configuration.
2 Open the ColdFusion Administrator for the cfusion server in a browser
(http://hostname:8300/CFIDE/administrator).
3 Select Enterprise Manager > Instance Manager.
4 Click Add New Instance.
5 Specify the following in the Add New ColdFusion Server area:
• Server name
• (Optional) Directory that contains the server instance. The ColdFusion Administrator fills in the default
automatically (jrun_root/servers/servername).
• (Optional) Create from EAR/WAR. If you use the J2EE Packaging feature to create a J2EE archive file with your
application files (including CFM, CFC, and CFR files) and data sources, use this field to specify the EAR or WAR
filename and create a server instance with your application deployed automatically.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using Multiple Server Instances
• (Optional, Windows only) Specify whether to create a Windows service for the server instance and whether to
define the Windows service with an auto restart recovery option.
6 Click Submit.
The ColdFusion Administrator creates a server instance with ColdFusion deployed in it and starts the server
instance. The ColdFusion application that it deploys is based on the application archive file specified in the Create
from EAR/WAR field or on the cfusion server instance (if you don’t specify an EAR or WAR file).
Creating a JRun server instance and deploying the ColdFusion application can take a few minutes.
7 Click Return to Instance Manager.
You can also start and stop the server instance using the JMC, the JRun Launcher, or the command line (jrun_root/bin
jrun start|stop --servername).
Enabling application isolation
You can create separate server instances, each with its own ColdFusion applications; each application then has its own
ColdFusion and J2EE server resources. In this configuration, you typically have a single external web server with
multiple server instances on one computer, and separate virtual hosts (or sites) for each server instance.
84
Note: Like ColdFusion, other J2EE application servers provide equivalent capabilities, and most of the concepts apply
when deploying the ColdFusion J2EE configuration on those J2EE servers.
Running independent applications this way has several advantages, including the following:
• Errors at the levels of the ColdFusion application or the JRun server do not affect any other ColdFusion
applications.
• You can support multihomed servers, where a single web server supports multiple IP addresses or domain names,
such as www.mycompany.com and services.anothercompany.com, each running from a separate web root. For
more information, see
“Multihoming” on page 67.
• Individual applications can use different JVM configurations, or even different JVM implementations. This feature
is useful if one application requires a large Java heap. To specify customized JVM options, start the JRun server
instance from the command line using the jvm.config file. This feature is explained in the “Starting and stopping JRun servers” section in Installing and Using ColdFusion.
Note: Installing and Using ColdFusion describes creating multiple server instances on a single computer. To create
multiple server instances on separate computers, each computer requires a separate license of ColdFusion Enterprise
Edition.
To achieve complete application isolation, you use web-server-specific functionality to create a separate website for
each application. Web servers have different terminology for this concept. For example, in IIS, you define separate
websites (available in Windows server editions only) and in Apache, you create multiple virtual hosts.
These instructions apply when running ColdFusion in the multiserver configuration. The principles apply when
running ColdFusion on other J2EE application servers. However, not all J2EE application servers integrate with
external web servers. For more information, see
config option of the jrun command, which specifies a customized
“Multihoming” on page 67.
These instructions assume that you deploy each application at a named context root, which enables users to access
CFM pages by specifying http://hostname/context-root/pagename.cfm. If other web applications are running in the
server instance, each web application must use a different context root.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using Multiple Server Instances
For example, with a context root of cf, users access CFM pages by specifying http://hostname/cf/pagename.cfm. For
more information on using a context root, see Installing ColdFusion.
Note: Although cf is the context root, it does not relate to your web application directory structure.
Use multiple server instances for application isolation
1 Create a separate server instance by using the instructions in “Defining additional server instances” on page 83. If
you are using the built-in web server, proceed to step 6 in this procedure.
2 Using your web-server-specific method, create a virtual website (or separate website) for the application.
For more information, see “Multihoming” on page 67, or consult your web server documentation.
3 Test each virtual website to ensure that HTML pages are served correctly.
4 Store the ColdFusion files of your application, in the ColdFusion web application root (recommended for
application portability) or the web root of the virtual website.
5 Follow the instructions for your web server to configure the connection between your virtual website and the server
instance. For more information, see
6 Test your application.
7 Repeat these steps for each server instance.
“Web server configuration for application isolation” on page 85.
85
Web server configuration for application isolation
When you use multiple server instances for application isolation, the steps you perform to configure communication
between the website and the server instance differ for each web server.
To enhance performance when using an external web server with multiple server instances, place all static content
(HTML files and images, for example) under the web server root directory or one of its subdirectories. Minimize the
amount of static content served from ColdFusion web application root directory.
Configuring application isolation in IIS
When you use multiple virtual websites with multiple server instances under IIS, you define separate filters and
mappings for each virtual website and server instance combination.
It is assumed that you already created server instances and virtual websites, as described in “Enabling application
isolation” on page 84.
Configure multiple server instances for application isolation when using IIS
Run the Web Server Configuration Tool multiple times, once for each virtual website, and specify a different site and
server instance each time. Ensure that you select the Configure Web Server for ColdFusion MX Applications option
(GUI) or use the Configuration Tool, see
Configuring application isolation in Apache
When you use multiple virtual hosts with multiple server instances under Apache, you edit the httpd.conf file
manually.
coldfusion option (command line). For more information on running the Web Server
“Using an external web server” on page 60.
It is assumed that you already created server instances and virtual websites, as described in “Enabling application
isolation” on page 84.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using Multiple Server Instances
Configure multiple server instances for application isolation when using Apache
1 Run the Web Server Configuration Tool once, specifying the location of the Apache httpd.conf file and any other
required information. Ensure that you select the Configure Web Server for ColdFusion MX Applications option
(GUI) or use the -
2 The Web Server Configuration Tool creates a sequentially numbered subdirectory under jrun_root/lib/wsconfig.
You can use the subdirectory created by the Web Server Configuration Tool for one of your virtual hosts, but you
must create additional subdirectories for all other virtual hosts. For example, the first time you run the Web Server
Configuration Tool, it creates jrun_root/lib/wsconfig/1; if you have two other virtual hosts, manually create two
other directories (jrun_root/lib/wsconfig/mystore and jrun_root/lib/wsconfig/myemp in this example). These
directories can be empty.
3 Open the jrun_root/servers/servername/SERVER-INF/jrun.xml file for each server instance and locate the
ProxyService service. Ensure that the deactivated element is set to false, and note the value of the port element.
10 (Optional) Store the ColdFusion files of your application in the external web server root directory.
11 Test the applications under each virtual host.
Note: Remember that the web server connector doesn’t serve static content, such as HTML and images. Place these files
under the web root or create a web server mapping to the ColdFusion web application root.
Configuring application isolation in Sun ONE Web Server
Under Sun ONE Web Server, each ColdFusion server instance is mapped to a Sub ONE Web Server instance, when
you use multiple virtual hosts with multiple server instances.
It is assumed that you already created server instances, as described in “Enabling application isolation” on page 84.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using Multiple Server Instances
Configure multiple server instances for application isolation when using Sun ONE Web
Server
Run the Web Server Configuration Tool for each Sun ONE Web Server instance. Specify a different configuration
directory and ColdFusion server instance each time. Ensure that you select the Configure Web Server for ColdFusion
MX Applications option (GUI) or use the -
coldfusion option (command line).
Enabling clustering for load balancing and failover
Load balancing is an enterprise-level feature in which the application server automatically alternates requests among
the server instances in a cluster. Clustering also enables application servers to route requests to a running server
instance when the original server instance goes down.
Note: These instructions apply only when you are running ColdFusion in the multiserver configuration. If you are
running JRun4, you can also create clusters in the JMC.
You can get load balancing and failover by deploying identical ColdFusion applications and configurations to multiple
server instances and adding the instances to a cluster. Each instance must have the same applications deployed and the
same resources configured (such as data sources, Verity collections, and mappings). The web server connector
optimizes performance and stability by automatically balancing load and by switching requests to another server
instance when a server instance stops running.
89
Note: Because clustering uses Jini Network Technology, you must be connected to a network for clustering to work.
For maximum failover protection, use multiple computers in a cluster. However, purchase a separate ColdFusion
Enterprise Edition license for each computer.
Note: If you set up and test multiple server instances while running the 30-day trial version, the cluster might not continue
to function appropriately when the trial version reverts to the Developer version after 30 days.
To implement session failover for the server instances in a cluster, enable session replication for each server instance.
Session replication coordinates session information in real time among the server instances in a cluster. Enabling
session replication lets JRun automatically route a request to a running server if the current server is unavailable.
Note: When a cluster uses session replication, session data is copied to other servers in the cluster each time it is modified.
This can degrade performance if you store a significant amount of information in session scope. If you plan to store a
significant amount of information in session scope, consider storing this information in client variables saved in a
database.
To enable session replication, manually edit the jrun-web.xml and set persistence to false. To do this, open the
jrun_root/servers/server_name/server_name-ear/server_name-war/WEBINF/jrun-web.xml file and modify the
For more information, see TechNote "JRun 4: Configuring session replication to enable session failover" at
www.adobe.com/go/tn_18226.
Configure a cluster of server instances for load balancing and failover
1 Create your application and the data sources required for the application.
2 Check that you installed ColdFusion by using the multiserver configuration.
3 Open the ColdFusion Administrator for the cfusion server in a browser
(http://hostname:8300/CFIDE/administrator).
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using Multiple Server Instances
4 Select Packaging & Deployment > J2EE Packaging.
5 Use the J2EE Archives page to create an EAR file that contains the application, its CFM pages, the required data
sources, and other settings.
6 Select Enterprise Manager > Instance Manager.
7 Create server instances for the cluster as described in “Defining additional server instances” on page 83. Use the
Create From EAR/WAR field to specify the archive file that you created.
8 (Optional) Click the Register Remote Instance button to define existing remote server instances so that you can
include them in the cluster. If you use a remote server, ensure that it contains the same application and settings as
the local server instances.
Note: A server can participate in only one cluster. When adding remote instances to a cluster, ensure that the instance
is not already part of a cluster.
9 Ensure that each server instance is started.
Note: To administer a cluster, at least one member server instance must be running.
10 Select Enterprise Manager > Cluster Manager.
11 Name the cluster and click Add.
The ColdFusion Administrator adds the cluster to the Configured Clusters area.
90
12 Click the cluster name or the edit icon.
The Edit Cluster screen appears.
13 Use the arrow icons to add server instances to the cluster.
14 (Optional) Enable session replication, and specify a cluster algorithm.
Note: When you enable sticky sessions, the connector does not always route requests strictly based on the cluster
algorithm. For more information, see Administrator online Help.
15 Click Submit.
16 Select Enterprise Manager > Instance Manager.
17 Use the CF Admin icon on the Instance Manager to open the ColdFusion Administrator on each server instance.
Ensure that required resources (such as data sources and Verity collections) are defined appropriately. If you are
using session replication, go to the Memory Variables page and enable J2EE sessions. Enable J2EE sessions for all
server instances in the cluster. If J2EE sessions are not enabled in the ColdFusion Administrator, session replication
does not function properly.
CFC serialization lets you use J2EE session replication in a cluster and have access to the CFCs in session data across
all instances in the cluster. Session replication also ensures that that Session scope variables are replicated across the
cluster. However, session replication does not support replication of arrays in Session scope CFCs or variables.
You can also preserve and access data in a CFC in the case of session failover. ColdFusion structures stored inside
the session scope are available in the session scope, even after failover. For example, if you are running multiple
ColdFusion instances to balance server load, you can store useful data, including CFCs, inside the session so that
you can access the data across all the pages that are served in that session.
To enable CFC serialization, set the CFC in the session, as follows:
18 For servers that are not on the same subnet, open the jrun_root/lib/security.properties file and add the IP addresses
of the other JRun servers in the cluster to the
Note: This step is required only for servers that are not on the same subnet; it is not necessary if all servers are on the
same subnet.
19 Restart all JRun servers in the cluster.
20 Run the Web Server Configuration Tool. Choose your website, but instead of choosing a single server instance,
select the cluster. Ensure that you select the Configure Web Server for ColdFusion MX Applications option (GUI)
or use the -
21 Open the SERVER-INF/jrun.xml file for each server instance and ensure that the ProxyService deactivated
attribute is set to
22 (Optional) Store the ColdFusion files of your application in the external web server root directory.
23 Test the application to ensure that load balancing and failover work as expected.
coldfusion option (command line). For more information, see “Web server configuration” on page 61.
false.
jrun.trusted.hosts property.
Define remote server instances to the ColdFusion
91
Administrator
You can use the Cluster Manager to add ColdFusion server instances running on other computers. However, first define
them to the ColdFusion Administrator through the Add Remote Server Instance area of the Instance Manager page.
Note: To define a remote server instance, it must be running. You cannot start or stop servers remotely.
1 Open the ColdFusion Administrator for the cfusion server in a browser
(http://hostname:8300/CFIDE/administrator).
2 Select Enterprise Manager > Instance Manager.
3 Specify the following in the Add Remote ColdFusion Instance area:
• Server name
• The IP address or DNS name of the remote host.
• The remote port of the remote server. To determine the remote port, open the
jrun_root/servers/servername/SERVER-INF/jndi.properties file and note the port number in the
java.naming.provider.url property.
4 Click Add Remote ColdFusion Server.
Last updated 8/5/2010
Chapter 9: Using the ColdFusion Server
Monitor
The ColdFusion Server Monitor lets you track activities on a ColdFusion Server. You can identify information about
the server, including requests, queries, memory usage, and errors. You can start and stop collecting server information
and take snapshots of the server.
To track the status of more than one ColdFusion server, use the Multiserver Monitor.
Gathering information about ColdFusion servers
The Server Monitor and Multiserver Monitor provide information about your ColdFusion servers. Generally, the
information that the Server Monitor provides is more detailed than the information that the Multiserver Monitor
provides. However, the Multiserver Monitor provides a good way to track the status of multiple ColdFusion servers.
The Server Monitor provides information about the following:
92
• Requests, queries, sessions, and threads
• Response time
• Memory usage
• Alerts and errors
• Snapshots of server information
The Multiserver Monitor provides the following information:
• Requests
• Response time
• JVM memory usage
• Alerts, errors, and time outs
Starting the ColdFusion Server Monitor
The ColdFusion Server Monitor is a SWF application that you access from the ColdFusion Administrator. The Server
Monitor begins gathering and displaying data when you start it.
The ColdFusion Multiserver Monitor is a SWF application that can provide information about more than one
ColdFusion server. To gather detailed information about one ColdFusion server, use the Server Monitor. To gather
information about several servers, use the Multiserver Monitor.
Start the ColdFusion Server Monitor
1 Start the ColdFusion Administrator.
2 Select Server Monitoring > Server Monitor, and then click Launch Server Monitor.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using the ColdFusion Server Monitor
Start the ColdFusion Multiserver Monitor
1 Start the ColdFusion Administrator.
2 Select Server Monitoring > Server Monitor, and then click Launch Multiserver Monitor.
Note: The cross domain details need to be mentioned in the crossdomain.xml file and this file must be placed directly
under webroot. Previously, this file was placed under <webroot>/CFIDE/multiservermonitor-access-policy.xml. For
more information, see
By default, server monitoring is turned off. To start and stop monitoring, profiling, and memory tracking, click the
corresponding buttons in the top bar of the Server Monitor. The following table indicates what data the Server Monitor
collects when you click the Start button:
Start MonitoringStarts gathering information about all requests, including active requests, slowest requests, active sessions,
Start ProfilingStarts gathering tag and function timing information for the Slowest Requests report; the CFML stack trace for
Start Memory TrackingStarts gathering information about memory consumption, including overall memory usage, the queries and
Reset All StatisticsResets all statistics collected on the server.
RefreshUpdates the data for all the graphs, reports, and message boxes on the page.
cumulative server usage, highest hit counts, template cache status, request throttle data, requests that timed
out, requests with errors, and server alerts. The Server Monitor does not gather information for requests that
are excluded on the Filter Settings page.
the Active Requests report; information about active queries, slowest queries, cached queries, and query
cache status; database pool status; and the most frequently run queries. This information gathering lets you
find bottlenecks in your application. You can view details about each request that is slow or consumes a lot
of memory. You can determine which tags and functions cause the request to run slowly and which variables
consume the most memory. You can use this information on both development and production servers. To
gather the profiling information, turn on monitoring, profiling, and, if needed, memory tracking.
sessions that use the most memory, the memory usage of all application and server scopes, and profiling
information on the largest variables on the Requests by Memory Usage report, if profiling is enabled.
You must enable profiling to view query-related reports; you must enable profiling and memory tracking to
view the Queries by Memory Usage report.
Viewing Server Monitor Reports
When you start the Server Monitor, the Overview page appears. To return to the Overview page from any other page,
click Overview.
By default, the Server Monitor retrieves data for graphs every 5 seconds; it retrieves data for reports every 30 seconds.
All the graphs let you display either all the data collected, or the data collected for a specified recent period.
The Server Monitor lets you control the detail, which you turn on and off with the following buttons:
Start Monitoring Turns on all monitoring.
Start Profiling Turns on monitoring of individual tags, functions, and query execution times.
Start Memory Tracking Turns on tracking of memory that different scopes use. If Profiling is also on, the Server
Monitor tracks the memory that individual tags, functions, and queries use.
Turning on or off monitoring, profiling, and memory tracking determines which data the Server Monitor gathers. For
example, all the query reports require that you turn on profiling. The performance effect of turning on monitoring and
profiling is minimal; however the performance effect of memory tracking can be significant.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using the ColdFusion Server Monitor
Overview
The Overview page appears when you start the ColdFusion Server Monitor. It provides an indication of the overall
performance of the server, and displays the following reports:
Average response time Total response time divided by the number of requests. Click the drop-down list to view data
collected since the server started, for the past 5 min, or for the past minute.
Requests per second Number of requests per second. Click the drop-down list to view data collected since the server
started, for the past 5 min, or for the past minute.
Slowest active requests Lowest active requests that are slower than the threshold set on Slowest Requests page. The
number of requests in the list depends on the report size set on the Slowest Requests page.
Alerts Lists any alerts. To specify when an alert is generated, select Alerts > Alert Configuration. Alerts indicate
whether your server is approaching an unresponsive state or if it is running slowly.
Last error Most recent error that any application generates on the server that is in the included paths specified on the
Filter Settings page.
In addition, the Summary page lists the other reports available. To view a different report, click its name. The available
reports are:
• Requests with errors
• Requests that timed out
• Requests slower than 20 seconds
• Requests that use more than 40MB
• Sessions that exceed 4KB
• Queries slower than 20 seconds
• Queries slower than 10 seconds on average
• Queries that exceed 20KB
94
Statistics
Request Statistics
The Request Statistics section contains the following reports:
Active Requests
The Active Requests report lists all currently active requests that take longer to load than the request interval for
reports specified in the Refresh Interval setting. Requests include browser requests, CFC HTTP requests, web services,
gateways, and Flash remoting. You can view a list, a detailed view, or a graph of active requests. The detailed view
includes the CFML stack trace, which you can use to find deadlocked requests and where a long running request is
blocked. To see all request graphs in one view, click Chart. The graph indicates the number of requests that the server
is currently processing and the number of requests that are awaiting allocation of an application server thread to begin
execution. If the graph indicates that many requests are queued, you might want to increase the size of the thread pool.
Alternatively, if ColdFusion is deployed in a cluster, you may want to add a server instance for more efficient load
balancing.
Note: The Server Monitor includes LiveCycle Data Management Assemblers as Flash Remoting requests.
Last updated 8/5/2010
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using the ColdFusion Server Monitor
Active ColdFusion Threads
The Active ColdFusion Threads report lists all currently active threads. You can view a list, a detailed view, or a graph
of active threads.
Slowest Requests
The Slowest Requests report lists the slowest requests. You can specify the threshold that determines whether a request
appears on this page. The lower the threshold, the more requests appear on the list. Use the Report Size option to limit
the number of items in the list. You can view a list or a detailed view of the slowest requests. The detailed view includes
the CFML stack trace. For more information, see
“Request handling” on page 102.
Slowest ColdFusion Threads
The Slowest ColdFusion Threads report lists the slowest ColdFusion threads. You can specify the threshold that
determines whether a ColdFusion thread appears in this report. As the threshold decreases, the number of requests in
the report increases.
Active Sessions
The Active Sessions report lists all active sessions. You can view a list, a detailed view, or a graph of active sessions. The
graph displays the active sessions and the number of users logged in to the server.
95
Cumulative Server Usage
The Cumulative Server Usage report lists the requests that have cumulatively used the most CPU time on the server.
Even if a request runs rapidly, if it runs frequently, it can consume a large proportion of CPU time. Tuning requests
with high cumulative server time can provide server-wide performance benefits. You can view a list, a detailed view,
or a graph of cumulative server usage. Use the Report Size option to limit the number of items in the list.
Highest Hit Counts
The Highest Hit Counts report lists the requests that have the highest hit count. You can view a list or a graph of
requests with the highest hit count. Use the Report Size option to limit the number of items in the list.
Template Cache Status
The Template Cache status report shows information about the template cache to indicate how it is performing. The
template cache is where ColdFusion stores compiled CFM and CFC templates in memory. When a template is
executed for the first time, it is compiled to Java bytecode, and then stored in the template cache. As long as the
template is unchanged, ColdFusion uses the compiled form of the template stored in the template cache. The Template
Cache status page lets you monitor the cache-hit ratio, which indicates the number of cache hits in relation to the
number of cache misses. Cache hits are the templates retrieved from the cache. Cache misses are the templates that must
be compiled before being placed in the cache. A server that is performing well should have more cache hits than misses,
which is a high cache-hit ratio. If the cache-hit ratio is too low, you might want to increase the cache size by selecting
Server Settings > Caching in the ColdFusion Administrator. For more information, see
“Caching” on page 102. The
Template Cache page also lets you monitor the number of templates in the cache, and the estimated memory that the
cache occupies.
Note: The template cache count includes both the Least Recently Used (LRU) cache and the soft cache. As a result, the
count can exceed the number configured in the ColdFusion Administrator.
Last updated 8/5/2010
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.