1 Step RoboPDF, ActiveEdit, ActiveTest, Authorware, Blue Sky Software, Blue Sky, Breeze, Breezo, Captivate, Central,
ColdFusion, Contribute, Database Explorer, Director, Dreamweaver, Fireworks, Flash, FlashCast, FlashHelp, Flash Lite,
FlashPaper, Flex, Flex Builder, Fontographer, FreeHand, Generator, HomeSite, JRun, MacRecorder, Macromedia, MXML,
RoboEngine, RoboHelp, RoboInfo, RoboPDF, Roundtrip, Roundtrip HTML, Shockwave, SoundEdit, Studio MX, UltraDev,
and WebHelp are either registered trademarks or trademarks of Macromedia, Inc. and may be registered in the United States or
in other jurisdictions including internationally. Other product names, logos, designs, titles, words, or phrases mentioned within
this publication may be trademarks, service marks, or trade names of Macromedia, Inc. or other entities and may be registered in
certain jurisdictions including internationally.
This product includes code licensed from RSA Data Security.
Third-Party Information
This guide contains links to third-party websites that are not under the control of Macromedia, and Macromedia is not
responsible for the content on any linked site. If you access a third-party website mentioned in this guide, then you do so at your
own risk. Macromedia provides these links only as a convenience, and the inclusion of the link does not imply that Macromedia
endorses or accepts any responsibility for the content on those third-party sites.
Configuring and Administering ColdFusion MX is intended for anyone who needs to configure and
manage their ColdFusion development environment.
About Macromedia ColdFusion MX 7 documentation
The ColdFusion MX 7 documentation is designed to provide support for the complete spectrum of
participants.
Documentation set
The ColdFusion MX 7 documentation set includes the following titles:
BookDescription
Installing and Using
ColdFusion MX
Configuring and
Administering
ColdFusion MX
ColdFusion MX
Developer’s Guide
Getting Started
Building
ColdFusion MX
Applications
CFML ReferenceProvides descriptions, syntax, usage, and code examples for all ColdFusion
CFML Quick Reference Shows the syntax of ColdFusion tags, functions, and variables in a brief guide.
Describes system installation and basic configuration for Microsoft Windows,
Solaris, and Linux. www.macromedia.com/go/livedocs_cfmx7docs_installing
Part I describes how to manage the ColdFusion environment, including
connecting to your data sources and configuring security for your applications.
Part II describes Verity search tools and utilities that you can use for configuring
the Verity Search Server, as well as creating, managing, and troubleshooting
Verity collections. To see this manual, go to www.macromedia.com/go/
livedocs_cfmx7docs_configadmin.
Describes how to develop your dynamic web applications, including retrieving
and updating your data, and using structures and forms. This manual includes
two volumes. To see this manual, go to www.macromedia.com/go/
livedocs_cfmx7docs_dev.
Contains an overview of ColdFusion features and application development
procedures. This manual includes a tutorial that guides you through the process
of developing a sample ColdFusion application. To see this manual online, go to
www.macromedia.com/go/livedocs_cfmx7docs_gs.
tags, functions, and variables. This manual includes two volumes. To see this
manual, go to www.macromedia.com/go/livedocs_cfmx7docs_cfml_reference.
Viewing online documentation
All ColdFusion MX documentation is available online in HTML and Adobe Acrobat Portable
Document Format (PDF) files. Go to the documentation home page for ColdFusion MX on the
Macromedia website: www.macromedia.com. In addition, you can view the documentation in
LiveDocs, which lets you add comments to pages and view the latest comments added by
Macromedia, by going to www.macromedia.com/go/livedocs_cfmx7docs.
8Introduction:
PART I
Administering ColdFusion MX 7
This part describes how to manage the ColdFusion environment, including using the
ColdFusion MX Administrator, connecting to your data sources, managing your web server,
deploying your applications, and configuring security for your applications.
This chapter presents an overview of Macromedia ColdFusion MX 7 configuration and
administration tasks. Although you perform most ColdFusion MX administration tasks using the
ColdFusion MX Administrator, you also manage databases, web server configurations, and the
Verity Search Server.
The ColdFusion MX 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 MX 7—
Standard or Enterprise—as well as your configuration: server, multiserver, or J2EE. For more
information on ColdFusion MX configurations, see “About the ColdFusion MX 7 installation” in
Chapter 1, “Preparing to Install ColdFusion MX 7,” in Installing and Using ColdFusion MX.
The default location for the ColdFusion MX 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).
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 used by the J2EE application server’s web server.
Tip: If you were using the built-in web server in a previous version and upgraded to ColdFusion MX 7,
the installer automatically finds an unused port for the built-in web server (typically 8501).
11
If your ColdFusion MX 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 MX Administrator, enter the password specified when you installed
ColdFusion MX.
Tip: If you are running in a multihomed environment and have problems displaying the
ColdFusion MX Administrator, see Chapter 4, “Web Server Management,” on page 65 for
configuration information.
For more information, see Chapter 2, “Using the ColdFusion MX Administrator,” on page 13.
About web server administration
ColdFusion MX 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 Chapter 4, “Web Server Management,” on page 65.
About Verity administration
ColdFusion MX includes Verity K2 Server search technology. Verity K2 Server is a highperformance search engine designed to process searches quickly in a high-performance,
distributed system.
For more information, see Chapter 8, “Introducing Verity and Verity Tools,” on page 105.
12Chapter 1: Administering ColdFusion MX
CHAPTER 2
Using the ColdFusion MX Administrator
This chapter explains the basic administration tasks, following the structure of the Macromedia
ColdFusion MX Administrator sections. It also includes a brief description of each Administrator
screen and a discussion of performing Administrator functionality programmatically through the
Administrator application programming interface (API).
Immediately after you install ColdFusion MX, you might have to perform some or all of the
administrative tasks described in the following table:
TaskDescription
Establish database
connections
Specify directory
mappings
Configure debugging
settings
Set up e-mailE-mail lets ColdFusion applications send automated e-mail messages. To
Change passwordsYou might have to change the passwords that you set for the
Configure Java settings (Server configuration only) You might have to customize Java settings,
Restrict tag accessSome CFML tags might present a potential security risk for your server. To
ColdFusion applications require data source connections to query and
write to databases. To create, verify, edit, and delete database
connections, use the Data Sources page.
For more information, see Chapter 3, “Data Source Management,” on
page 43.
Directory mappings redirect relative file paths to physical directories on
your server. To specify server-wide directory aliases, use the Mappings
page.
For more information, see “Mappings page” on page 20.
Debugging information provides important data about CFML page
processing. To choose the debugging information to display, and to
designate an IP address to receive debugging information, use the
Debugging & Logging section.
For more information, see “Debugging Settings and Debugging IPs
pages” on page 26.
configure an e-mail server and mail options, use the Mail Server page.
For more information, see “Mail Server page” on page 20.
ColdFusion MX Administrator and RDS during ColdFusion MX
installation. To change passwords, use the Security section.
For more information, see “CF Admin Password page” on page 35 and
“RDS Password page” on page 36.
such as classpath information, to meet the needs of your applications. To
change Java settings, use the Java and JVM page.
For more information, see “Extensions section” on page 32.
disable certain tags, use the Sandbox Security page.
For more information, see Chapter 6, “Administering Security,” on
page 85.
Accessing user assistance
You can obtain assistance from the ColdFusion MX Administrator in the following ways:
Online Help You access the context-sensitive online Help by clicking the question-mark icon on
any ColdFusion MX Administrator page. The online Help has procedural and brief overview
content for the ColdFusion MX Administrator page that you are viewing. This information
appears in a new browser window and contains standard Contents, Index, and Search tabs.
14Chapter 2: Using the ColdFusion MX Administrator
Getting Started Experience Click the Getting Started link to open the Getting Started
Experience, which provides descriptions of new features, code examples, and sample applications
to help you learn about ColdFusion MX.
Documentation Click the Documentation link to access the entire ColdFusion MX
documentation set online.
Tech notes Click the Tech Notes link to access the collection of articles about ColdFusion MX
from the Macromedia website (www.macromedia.com).
Server Settings section
The Server Settings section lets you manage client and memory variables, mappings, charting,
and archiving. You also configure e-mail and Java settings in this section.
The Server Settings section contains the following pages:
• Settings page
• Caching page
• Client Variables page
• Memory Variables page
• Mappings page
• Mail Server page
• Charting Settings page
• Java and JVM Settings page
• ColdFusion Archives page
• Settings Summary page
Settings page
The Settings page of the ColdFusion MX Administrator contains configuration options that you
can set or enable to manage ColdFusion MX. These options can significantly affect server
performance. The following table describes the options:
OptionDescription
Maximum number of
simultaneous requests
(not available in J2EE
configuration)
Timeout requests after n
seconds
Use UUID for cftokenSpecify whether to use a universally unique identifier (UUID), rather
Enter a number to limit simultaneous requests to ColdFusion MX.
When the server reaches the limit, requests are queued and handled in
the order received. Limiting the number of simultaneous requests can
improve performance.
Select this option to prevent unusually lengthy requests from using up
server resources. Enter a limit to the time that ColdFusion MX waits
before terminating a request. Requests that take longer than the
timeout period are terminated.
than a random number, for a cftoken.
Server Settings section15
OptionDescription
Enable HTTP status codes Select this option to configure ColdFusion MX to set a status code of
Enable Whitespace
Management (not available
in J2EE configuration)
Enable Global Script
Protection
Default CFFORM
ScriptSrc Directory
Missing Template Handler Specify a page to execute when ColdFusion MX cannot find a
Site-wide Error HandlerSpecify a page to execute when ColdFusion MX encounters an error
500 Internal Server Error for an unhandled error. Disable this option to
configure ColdFusion MX to set a status code of 200 OK for
everything, including unhandled errors.
Select this option to compress repeating sequences of spaces, tabs,
and carriage return/linefeeds. Compressing whitespace can
significantly compact the output of a ColdFusion page.
Select this option to protect Form, URL, CGI, and Cookie scope
variables from cross-site scripting attacks. Select this option if your
application does not contain this type of protection logic.
Specify the default path (relative to the web root) to the directory that
contains the cfform.js file. 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.
requested page. This specification is relative to the web root.
Note: If the user is running Microsoft Internet Explorer with "Show
Friendly HTTP error messages" enabled in advanced settings (the
default), Internet Explorer will only display this page if it contains more
than 512 bytes.
while processing a request. This specification is relative to the web
root. When you define a site-wide error handler or missing template
handler, ColdFusion MX does not log page not found errors and
exceptions.
Note: If the user is running Internet Explorer with "Show Friendly HTTP
error messages" enabled in advanced settings (the default), Internet
Explorer will only display this page if it contains more than 512 bytes.
cfform tag.
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 cacheSelect this option if you want ColdFusion MX to use cached templates
16Chapter 2: Using the ColdFusion MX Administrator
Select this option by entering a value that specifies the number of
templates that ColdFusion MX caches. For best performance, set this
to a value that is large enough to contain your application’s 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.
without checking whether they changed. For sites that are not updated
frequently, using this option minimizes file system overhead.
OptionDescription
Save Class FilesSelect this option to save to disk the class files generated by the
Cache web server paths
(not available in J2EE
configuration)
Limit the maximum number
of cached queries on the
server to [n] queries
Clear Template Cache Now Empties the template cache. ColdFusion reloads templates into
ColdFusion bytecode compiler. During the development phase, it is
typically faster if you disable this option.
Select this option to cache ColdFusion page paths for a single server.
Clear this option if ColdFusion MX connects to a web server with
multiple websites or multiple virtual websites.
Select this option by entering a value to limit the maximum number of
cached queries that the server maintains. Cached 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, you must provide a limit for the number of cached queries.
You enable cached queries with the
attributes of the
memory the next time they are requested and recompiles them if they
have been modified.
cfquery tag.
cachedwithin or cachedafter
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 MX on the Client Variables page of the
Administrator. ColdFusion MX 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 MX 7,
ColdFusion MX can automatically create the necessary tables. If your data source uses the ODBC
Socket or a third-party JDBC driver, you must manually create the necessary CDATA and
CGLOBAL database tables.
• As cookies in users’ web browsers
• In the operating system registry
Caution: Macromedia recommends that you do not store client variables in the registry because it
can critically degrade performance of the server. If you do use the registry to store client variables,
you must allocate sufficient memory and disk space.
You can override settings specified in the Client Variables page using the Application.cfc file or
the
cfapplication tag. For more information, see ColdFusion MX Developer’s Guide.
Server Settings section17
The following table compares the client variable storage options:
Storage typeAdvantagesDisadvantages
Data source• Can use existing data source
• Portable: not tied to the host
system or operating system
Browser cookies • Simple implementation
• Good performance
• Can be set to expire automatically
• Client-side control
System registry• Simple implementation
• Good performance
• Registry can be exported easily to
other systems
• Server-side control
• 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 MX
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 clustered servers
• Not available for UNIX
Migrating client variable data
To migrate your client variable data to another data source, you should know the structure of the
database tables that store this information. Client variables stored externally use two simple
database tables, like those shown in the following tables:
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.
Tip: The ColdFusion MX Administrator can create client variable tables for data sources that use one
of the bundled JDBC drivers. For more information, see the online help.
18Chapter 2: Using the ColdFusion MX Administrator
Sample table creation page
<!---- Create the Client variable storage tables in a datasource.
This example applies to Microsoft Access databases. --->
You use the Memory Variables page of the ColdFusion MX Administrator to enable application
and session variables server-wide. By default, application and session variables are enabled when
you install ColdFusion MX. 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 timeout 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 timeout values on the Memory Variables page of the
Administrator.
Note: Timeout values that you specify for application variables override the timeout values set in the
Application.cfc or Application.cfm file.
Server Settings section19
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 ColdFusion MX Developer’s Guide.
Note: When using J2EE sessions, ensure that the session timeout, specified in the
WEB-INF/web.xml
the ColdFusion MX Administrator and longer than any
cfapplication tag.
session-timeout element is longer than the session timeout that you specify in
sessiontimeout attribute specified in a
Mappings page
You use the Mappings page of the ColdFusion MX Administrator to add, update, and delete
logical aliases for paths to directories on your server. ColdFusion mappings apply only to pages
processed by ColdFusion MX with the
cfinclude and cfmodule tags. If you save CFML pages
outside of the web_root directory (or whatever directory is mapped to "/"), you must add a
mapping to the location of those files on your server.
Assume that the "/" mapping on your server points to C:\CFusionMX7\wwwroot, but all your
ColdFusion header pages reside in C:\2002\newpages\headers. In order for ColdFusion MX to
find your header pages, you must add a mapping in the ColdFusion MX Administrator that
points to C:\2002\newpages\headers (for example, add a mapping for /headers that points to
C:\2002\newpages\headers). In the ColdFusion pages located in C:\CFusionMX7\wwwroot, you
reference these header pages using /headers in your
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’s documentation.
cfinclude and cfmodule tags.
Mail Server page
You use the Mail Server page of the ColdFusion MX Administrator to specify a mail server to
send automated e-mail messages. ColdFusion MX 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 MX 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 is extremely busy or 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
Chapter 39, “Sending and Receiving E-Mail,” in ColdFusion MX Developer’s Guide.
20Chapter 2: Using the ColdFusion MX Administrator
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
Verify Mail Server
Connection
Server PortEnter the number of the port on which the mail server is running. Contact
Backup Mail Servers
(Enterprise Edition only)
Maintain Connection to
Mail Server
(Enterprise Edition only)
Connection Timeout
(seconds)
text box. 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.
Select this option to verify that ColdFusion MX can connect to your
specified mail server after you submit this form.
Whether or not you use this option, you should verify that your mail server
connection works by sending a test message.
your server administrator if 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
username and password, as follows:
username:password@mailserveraddress
To use a port number other than the default (25), specify
mailserveraddress:portnumber
Select this option to keep mail server connections open after sending a
mail message. Enabling this option can enhance performance when
delivering multiple messages.
Enter the number of seconds that ColdFusion MX should wait for a
response from the mail server before timing out.
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
Mail Delivery Threads
(Enterprise Edition only)
process spooled mail.
Enter the maximum number of simultaneous threads used to deliver
spooled mail.
Server Settings section21
OptionDescription
Spool mail messages for
delivery
(Memory spooling
available for Enterprise
Edition only)
Maximum number of
messages spooled to
memory
(Enterprise Edition only)
Select this option to route outgoing mail messages to the mail spooler. If
you disable this option, ColdFusion MX delivers outgoing mail messages
immediately. In ColdFusion MX 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
Enter the maximum number of messages ColdFusion MX will spool to
memory before switching to disk spooling.
cfmail tag.
Mail Logging Settings area
Select preferences for handling mail logs, as described in the following table:
OptionDescription
Error Log SeverityFrom the drop-down list box, 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 e-mail messages
sent by ColdFusion MX
Select this option to save to a log file the To, From, and Subject fields of
all e-mail messages.
ColdFusion MX writes sent mail and mail error logs to the following directories:
• \CFusionMX7\logs (Windows server configuration)
• /opt/coldfusionmx7/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
CharSet
22Chapter 2: Using the ColdFusion MX Administrator
From the drop-down list box, select the default character set used by the
cfmail tag. The default value is UTF-8. If the majority 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 Settings page
The ColdFusion charting and graphing engine lets you produce highly customizable business
graphics, in a variety of formats, using the
cfquery tag. You use the Charting page in the
Administrator to control characteristics of the engine.
The following table describes the caching and thread settings for the ColdFusion charting and
graphing engine:
OptionDescription
Cache TypeSet the cache type. Charts can be cached either in memory or to disk.
Memory caching is faster, but more memory intensive.
Maximum number of
images in cache
Max number of charting
threads
Disk cache locationWhen caching to disk, specify the directory in which to store the
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.
Specify the maximum number of chart requests that can be processed
concurrently. The minimum number is 1 and the maximum is 5. (Higher
numbers are more memory-intensive.)
generated charts.
Font Management page
The Font Management page lets you review and define fonts for use with Macromedia FlashPaper
and Acrobat PDF output formats. ColdFusion generates FlashPaper and PDF output through the
cfdocument tag and through the cfreport tag, when used to call a report created with the
ColdFusion Report Builder.
ColdFusion MX 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 must register them with the ColdFusion MX
Administrator so that the
cfdocument and cfreport tags can locate and render PDF and
FlashPaper reports.
This page contains the following sections:
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 MX Administrator online Help.
For more information on reporting in ColdFusion MX, see Chapter 32, “Creating Reports for
Printing,” in ColdFusion MX Developer’s Guide.
Server Settings section23
Java and JVM Settings page
The Java and JVM Settings page lets you specify the following settings, which enable
ColdFusion MX to work with Java:
OptionDescription
Java Virtual Machine
Path
Minimum JVM Heap
Size
Maximum Memory Size The JVM maximum heap size. The default value is 512 MB.
Class PathThe file paths to the directories that contain the JAR files used by
JVM ArgumentsThe arguments to the JVM. Use a space to separate multiple entries (for
Note: This page is available in the server configuration only.
The absolute file path to the location of the Java virtual machine (JVM)
root directory. The default is cf_root/runtime/jre.
The JVM initial heap size.
ColdFusion MX. Specify either the fully qualified name of a directory that
contains your JAR files or a fully qualified JAR filename. Use a comma to
separate multiple entries.
example, -Xint -Xincgc).
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.
Settings Summary page
The Settings Summary page shows all ColdFusion configuration settings. Click a group name to
open that group’s Administrator section, where you can edit settings. This page is not enabled in
the Standard Edition.
Data & Services section
The Data & Services section of the Administrator is the interface for ColdFusion MX, 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
Create and manage
JDBC data sources
Create and maintain
Verity collections
Define mappings for web
services
24Chapter 2: Using the ColdFusion MX Administrator
The Data Sources page lets you establish, edit, and delete JDBC data
source connections for ColdFusion MX. For more information, see
Chapter 3, “Data Source Management,” on page 43.
The Verity Collections page lets you create and delete Verity collections
and perform maintenance operations on collections that you create. For
more information, see “Verity Collections page” on page 25.
The Web Services page lets you produce and consume remote
application functionality over the Internet. For more information, see
“Web Services page” on page 26.
The Data & Services section contains the following pages:
• Data Sources page
• Ver i ty C o lle ct io ns pa ge
• Verity K2 Server page
• Web Servi c es page
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 must register the data source in the ColdFusion MX
Administrator. For more information, see Chapter 3, “Data Source Management,” on page 43.
Verity Collections page
ColdFusion MX includes Verity, which provides indexing and searching technology to create,
populate, and manage collections of indexed data that are optimized for fast and efficient site
searches.
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 Chapter 24, “Building a Search
Interface,” in ColdFusion MX Developer’s Guide.
ColdFusion lets you manage your collections from the Administrator. You can index, optimize,
purge, or delete Verity 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
OptimizeReclaims space left by deleted and changed files by consolidating
PurgeDeletes all documents in a collection, but not the collection itself. Leaves
DeleteDeletes a collection.
the files.
collection indexes for faster searching. You should optimize collections
regularly.
the collection directory structure intact.
The Verity Search Server must be running. If this page is unable to retrieve collections, ensure
that the Verity Search Server is running. For more information, see “Collections and the
ColdFusion MX Verity architecture” on page 105.
Data & Services section25
Verity K2 Server page
You can install Verity on a different host computer from the one ColdFusion MX is running on.
If this is the case, you can configure the host that ColdFusion will use when it performs search
operations. If you have purchased the Verity product, you may need to use advanced settings to
configure the aliases and ports of the services that ColdFusion uses. You should not need to
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 MX 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 MX automatically
registers it in the Administrator.
When you register a web service, you can shorten your code and change a web service’s URL
without editing your code. For more information, see Chapter 36, “Using Web Services,” in
ColdFusion MX Developer’s Guide.
Debugging & Logging section
The Debugging & Logging section contains the following pages:
• Debugging Settings and Debugging IPs pages
• Debugging IP Addresses page
• Logging Settings page
• Log Files page
• Scheduled Tasks page
• System Probes page
• Code Compatibility Analyzer page
• License Scanner page
Debugging Settings and Debugging IPs pages
You use the Debugging Settings and Debugging IPs pages to configure ColdFusion MX to
provide debugging information for every application page requested by a browser. You specify
debugging preferences 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. You should not enable debugging on a production
server.
26Chapter 2: Using the ColdFusion MX Administrator
The Debugging Settings page provides the following debugging options:
OptionDescription
Enable Robust Exception
Information
Enable DebuggingEnables the ColdFusion debugging service.
Select Debugging Output
Format
Report Execution TimesReports execution times that exceed a specified time limit.
General Debug InformationShow general information about the ColdFusion MX version,
Database Activity Shows the database activity for the SQL Query events and
Exception InformationShows all ColdFusion exceptions raised for the request in the
Tracing InformationShows trace event information in the debugging output. Tracing
Timer InformationShows output from the
VariablesDisplays information about parameters, URL parameters,
Displays detailed information in the exceptions page, including
the template’s physical path and URI, the line number and
snippet, the SQL statement used (if any), the data source name
(if any), and the Java stack trace.
Controls debugging format. Select either of the following
formats:
• 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.
template, time stamp, user locale, user agent, user IP, and host
name.
Stored Procedure events in the debugging output.
debugging output.
lets you track program flow and efficiency using the
cftimer tag.
cftrace tag.
cookies, sessions, and CGI variables in the debugging output.
Enables the standard NT Performance Monitor application to
display information about a running server.
Shows performance information on platforms that do not support
the NT Performance Monitor. For more information, see “Using
the cfstat utility” on page 28.
* Restart ColdFusion MX after changing this setting.
Debugging & Logging section27
Using the cfstat utility
The
cfstat command-line utility provides real-time performance metrics for ColdFusion MX.
Using a socket connection to obtain metric data, the
cfstat utility displays the information that
ColdFusion MX writes to the System Monitor without actually using the System Monitor
application. The following table lists the metrics that the
cfstat utility returns:
Metric
abbreviation
Pg/SecPage hits per secondThe number of ColdFusion pages processed per
DB/SecDatabase accesses per
CP/SecCache pops per secondThe number of ColdFusion template cache pops per
Req Q'edNumber of queued requests The number of requests that are currently waiting for
Req Run'gNumber of running requests The number of requests that ColdFusion MX is
Req TO'edNumber of timed out
AvgQ TimeAverage queue timeA running average of the time, in milliseconds, that
AvgReq Time Average request timeA running average of the time, in milliseconds, that
AvgDB TimeAverage database
Bytes In/SecBytes incoming per second The number of bytes that ColdFusion MX read in the
Bytes
Out/Sec
Metric nameDescription
second. You can reduce this by moving static content
to HTML pages.
The number of database accesses per second made
second
requests
transaction time
Bytes outgoing per second The number of bytes that ColdFusion MX wrote in the
by ColdFusion MX. Any difference in complexity and
resource load between calls is ignored.
second. A cache pop occurs when ColdFusion MX
ejects a cached template from the template cache to
make room for a new template.
ColdFusion MX to process them. Lower values,
which you can achieve with efficient CFML, are
better.
currently actively processing.
The total number of ColdFusion requests that have
timed out. Lower values, which you can achieve by
aggressive caching, removing unnecessary dynamic
operations and third-party events, are better.
requests spend waiting for ColdFusion MX to
process them. Lower values, which you can achieve
with efficient CFML and enhanced caching, are
better.
ColdFusion MX spends to process a request
(including queued time). Lower values, which you can
achieve with efficient CFML, are better.
A running average of the time that ColdFusion MX
spends on database-related processing of
ColdFusion requests.
last second (not an average).
last second (not an average).
28Chapter 2: Using the ColdFusion MX Administrator
Before you use the cfstat utility, ensure that you selected the Enable Performance Monitoring
check box in the ColdFusion MX Administrator (on the Debugging & Logging > Debugging
Settings page). If you select this check box, you must restart ColdFusion MX for this change to
take effect.
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.
-sDisplay output in a single line.Display a single line and delay display of the first
#Where # is an integer, display
output every # seconds.
line so the
values in the per-second counters.
If you do not specify an integer, the
returns one line. Specify this switch with or without
the -s switch.
cfstat utility can display meaningful
cfstat utility
This example runs the
cfstat 20
cfstat utility and displays a new line every 20 seconds:
Debugging IP Addresses page
You 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 MX displays
debugging output for all users.
Debugging & Logging section29
Logging Settings page
You use the Logging Settings page of the Administrator to change ColdFusion MX logging
options. The following table describes the settings:
OptionDescription
Log directory*Specifies the directory to which error log files are written.
Maximum file size
(kb)
Maximum number of
archives
Log slow pages
taking longer than [n]
seconds
Log all CORBA calls Logs all CORBA calls.
Enable logging for
scheduled tasks
* Restart ColdFusion MX after changing this setting.
Sets the maximum file size for log files. When a file hits this size, it
automatically is archived.
Sets the maximum number of log archives to create. When they reach this
limit, files are deleted in the order of oldest to newest.
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.
Logs ColdFusion Executive task scheduling.
Log Files page
The Log Files page lets you perform operations on log files, such as searching, viewing,
downloading, archiving, and deleting.
Click on 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 MX Administrator online Help.
The following table describes the ColdFusion MX log files:
Log fileDescription
rdservice.logRecords errors that occur in the ColdFusion Remote Development Service
(RDS). RDS provides remote HTTP-based access to files and databases.
application.logRecords every ColdFusion MX error reported to a user. Application page
exception.log Records stack traces for exceptions that occur in ColdFusion.
scheduler.logRecords scheduled events that have been submitted for execution. Indicates
server.logRecords errors for ColdFusion MX.
customtag.logRecords errors generated in custom tag processing.
car.logRecords errors associated with site archive and restore operations.
30Chapter 2: Using the ColdFusion MX Administrator
errors, including ColdFusion MX syntax, ODBC, and SQL errors, are written
to this log file.
whether task submission was initiated and whether it succeeded. Provides
the scheduled page URL, the date and time executed, and a task ID.
Log fileDescription
mail.logRecords errors generated by an SMTP mail server.
mailsent.logRecords messages sent by ColdFusion MX.
flash.logRecords entries for Macromedia Flash Remoting.
Scheduled Tasks page
You use the Scheduled Tasks page to schedule the execution of local and remote web pages, to
generate static HTML pages, send mail with the
cfmail tag, update database tables, index Verity
collections, delete temporary files, and any other 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 MX renders the
static page with information generated by the scheduled event. Response time is faster because no
database transaction takes place.
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, and delete scheduled tasks. For more information,
see the online help.
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.
You 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
DeleteDeletes the probe.
interval.
Because probes run as scheduled ColdFusion tasks, they will not run if the server on which they
are hosted crashes, or if the host web server crashes or otherwise does not respond.
Debugging & Logging section31
System probes are available in ColdFusion MX Enterprise Edition only.
Code Compatibility Analyzer page
The Code Compatibility Analyzer page evaluates your ColdFusion pages for potential
incompatibilities between ColdFusion MX 7 and ColdFusion Server 5. 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 MX 7. You can use this information to determine whether the ColdFusion instances
within the subnet are licensed appropriately.
The ColdFusion MX Administrator uses universal datagram protocol (UDP) multicast to collect
license and version information from all ColdFusion instances running within the subnet.
Extensions section
You use the Extensions section of the Administrator to configure ColdFusion MX to work with
other technologies, such as Java and CORBA.
The Extensions section contains the following pages:
• Java Applets page
• CFX Tags page
• Custom Tag Paths page
• CORBA Connectors page
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, you must register
them in the Java Applets page.
When your applet is registered with ColdFusion MX, using the
code is very simple, because all parameters are predefined. Simply enter the applet source and the
form variable name that you want to use.
Note: Parameters set with the cfapplet tag override parameters defined on the Java Applets page.
For more information, see the online help.
32Chapter 2: Using the ColdFusion MX Administrator
cfapplet tag in your CFML
CFX Tags page
Before you can use a CFX tag in ColdFusion applications, you must register it. You 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
You 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
You use the CORBA Connectors page to register, edit, and delete CORBA connectors. You must
register CORBA connectors before you use them in ColdFusion applications. You must also
restart the server when you finish configuring the CORBA connector.
ColdFusion MX loads object request broker (ORB) libraries dynamically 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 MX. 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:
The following lines are an example of a CORBA connector configuration for VisiBroker:
ORB Namevisibroker
ORB Class Name coldfusion.runtime.corba.VisibrokerConnector
ORB Property Filec:\CFusionMX7\runtime\cfusion\lib\vbjorb.properties
Classpath[blank]
Extensions section33
ColdFusion includes the vbjorb.properties file, which contains the following properties that
configure the ORB:
The Event Gateways section of the Administrator lets you configure event gateway settings,
gateway types, and gateway instances.
This Event Gateways section contains the following pages:
• Event Gateway Settings page
• Gateway Types page
• Gateway Instances page
Event Gateway Settings page
The Event Gateway 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
Enable ColdFusion
Event Gateway Service
Event Gateway
Processing Threads
Maximum Number of
Events to Queue
Start/Stop 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 will not be added to
the processing queue.
Starts and stops the short message service (SMS) test server.
Gateway Types page
The Gateways Types pages lets 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 ship with ColdFusion MX:
Gateway typeDescription
CFMLUsed to trigger asynchronous events from ColdFusion.
SMSUsed to send and receive SMS messages.
SAMETIMEUsed to send and receive instant messages through Lotus SameTime.
34Chapter 2: Using the ColdFusion MX Administrator
Gateway typeDescription
XMPPUsed to send and receive instant messages through the Extensible
SamplesSample gateway types, including the following:
Messaging and Presence Protocol (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:
OptionDescription
Gateway IDA name for the event gateway instance. You use this value in the
ColdFusion
Gateway TypeThe event gateway type.
CFC PathThe absolute path to the listener CFC that handles incoming messages.
Configuration File(Optional) Configuration file, if required for the event gateway instance.
Startup ModeThe event gateway startup status, as follows:
• 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.
GetGatewayHelper and SendGatewayMessage functions.
Security section
The Security section of the Administrator lets you configure the security frameworks of
ColdFusion MX.
For more information on security, see Chapter 6, “Administering Security,” on page 85.
The Security section contains the following pages:
• CF Admin Password page
• RDS Password page
• Sandbox Security page
CF Admin Password page
You use the CF Admin Password page of the Administrator to enable and disable passwordrestricted access to the Administrator, and to change the Administrator password. You should
restrict ColdFusion MX Administrator access to trusted users.
Security section35
RDS Password page
You use the RDS Password page to enable and disable password-restricted RDS access to server
resources from Macromedia Dreamweaver MX, Macromedia HomeSite+, or the ColdFusion
Report Builder, and to change the RDS password.
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, and directories.
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
• Ta g s
• Functions
• Files and directories
• IP addresses and ports
Note: If you have enabled sandbox security and want to use the Administrator API, you must enable
access to the CFIDE/adminapi directory.
Packaging and Deployment section
The Packaging and Deployment section of the Administrator lets you create and deploy CAR files
and create J2EE EAR or WAR files that include an existing ColdFusion application and the
ColdFusion runtime system
This Packaging and Deployment section contains the following pages:
• ColdFusion Archives page
• J2EE Archives page
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 quickly and easily. The complete list of archivable information includes the
following:
• Name and file location
• Server settings
• ColdFusion mappings
• Data sources
36Chapter 2: Using the ColdFusion MX Administrator
• Verity collections
• Scheduled tasks
• Event gateway instances
• 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 MX server or to a ColdFusion MX 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 MX web application.
• Server settings, such as data sources and custom tag paths.
• Your application’s CFML pages, stored in the ColdFusion web application’s root directory.
With this EAR or WAR file, a J2EE administrator can deploy your ColdFusion MX application
to a J2EE application server.
Tip: If you are creating a cluster of server instances when running the multiserver configuration, use
this page to create the WAR or EAR file to be used when creating 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 Macromedia 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).
The Enterprise Manager section contains the following pages:
• Instance Manager page
• Cluster Manager page
Enterprise Manager section37
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 new 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
the purpose of adding these servers to a cluster. The remote JRun server instance need not be
running when you define it to the Instance Manager, however, it must be running before you can
add it to a cluster.
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 MX 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.
To 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
<head> or <body> tags.
appears in the main pane of the Administrator. If you specify any other value for the
attribute, the page appears in a new window.
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:
38Chapter 2: Using the ColdFusion MX Administrator
target
Administrator API
You can perform most ColdFusion MX Administrator tasks programmatically using the
Administrator API. 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
method of datasource.cfc to add a SQL Server data source.
The CFCs for the Administrator API are located in the cf_web_root/CFIDE/adminapi directory,
and each CFC corresponds to an area of the ColdFusion MX Administrator, as the following
table shows:
CFCDescription
administrator.cfcContains basic Administrator functionality, including login, logout, the Migration
Wizard, and the Setup Wizard. You must call the
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.
eventgateway.cfc Manage event gateways.
extensions.cfcManage custom tags, mappings, CFXs, applets, CORBA, and web services.
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.cfc Start, stop, and restart JRun servers. This CFC only works when running the
multiserver configuration.
login method before calling
setMSQL
The adminapi directory also contains an Application.cfm file and two subdirectories.
Note: If you are using sandbox security, you must enable access to the cf_web_root/CFIDE/adminapi
directory to use the Administrator API.
There are two styles of methods in the Administrator API:
• Method arguments When setting complex or varied values, the Administrator API uses
method arguments.
• 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.
Administrator API39
To use the Administrator API:
1.
Instantiate administrator.cfc:
<cfscript>
// Login is always required.
adminObj = createObject("component","cfide.adminapi.administrator");
Tip: You can instantiate administrator.cfc and call the
following example shows:
The following example adds a SQL Server data source:
<cfscript>
// Login is always required. This example uses two lines of code.
adminObj = createObject("component","cfide.adminapi.administrator");
adminObj.login("admin");
login method in a single line of code, as the
// Instantiate the data source object.
myObj = createObject("component","cfide.adminapi.datasource");
// Create a DSN.
myObj.setMSSQL(driver="MSSQLServer",
42Chapter 2: Using the ColdFusion MX Administrator
CHAPTER 3
Data Source Management
A data source is a complete database configuration that uses a JDBC driver to communicate with
a specific database. In Macromedia ColdFusion MX 7, you must 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.
This chapter describes the configuration options for ColdFusion MX 7 data sources. For basic
information on data sources and connecting to databases, see Getting Started Building ColdFusion MX Applications.
JDBC is a Java Application Programming Interface (API) that you use to execute SQL statements.
JDBC enables an application, such as ColdFusion MX 7, to interact with a variety of database
management systems (DBMSs), without using interfaces that are database- and platform-specific.
The following table describes the four types of JDBC drivers:
TypeNameDescription
1JDBC-ODBC
bridge
2Native-API/partly
Java driver
3JDBC-Net pure
Java driver
4Native-
protocol/all-Java
driver
Translates 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.
Macromedia does not recommend this driver type unless your
application requires DBMS-specific features.
Converts JDBC calls to database-specific calls.
Advantages Better performance than Type 1 driver.
Disadvantages The vendor’s client database libraries must reside on
the same computer as ColdFusion.
ColdFusion MX includes a type 2 driver for use with Microsoft Access
Unicode databases.
Translates JDBC calls to the middle-tier server, which then translates
the request to the database-specific native-connectivity interface.
Advantages No need for vendor’s database libraries to be present on
client computer. Can be tailored for small size (faster loading).
Disadvantages Database-specific code must be executed in the
middle tier.
ColdFusion MX 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 MX.
Disadvantages Many of these protocols are proprietary, requiring a
different driver for each database.
ColdFusion MX includes type 4 drivers for many popular DBMSs;
however, not all DBMSs are supported in ColdFusion MX Standard
Edition.
JDBC drivers are stored in JAR files. For example, the JDBC drivers that are supplied with
ColdFusion MX are in the macromedia_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).
44Chapter 3: Data Source Management
Supplied drivers
The following table lists the database drivers supplied with ColdFusion MX and where you can
find more information about them:
DriverType For more information
DB2 Universal Database4“Connecting to DB2 Universal Database” on page 47
DB2 OS/3904“Connecting to other data sources” on page 60
Informix4“Connecting to Informix” on page 49
Microsoft Access3“Connecting to Microsoft Access” on page 50
Microsoft Access with Unicode
support
Microsoft SQL Server4“Connecting to Microsoft SQL Server” on page 53
MySQL4“Connecting to MySQL” on page 56
ODBC Socket3“Connecting to ODBC Socket” on page 57
Oracle4“Connecting to Oracle” on page 59
Other“Connecting to other data sources” on page 60
Sybase4“Connecting to Sybase” on page 62
2“Connecting to Microsoft Access with Unicode”
on page 52
To see a list of database versions that ColdFusion MX supports, go to
www.macromedia.com/go/sysreqscf.
When running in the J2EE configuration, the ColdFusion MX 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 using
your J2EE application server. After it’s defined, ColdFusion MX 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 63.
Adding data sources
In the ColdFusion MX 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
query, the data source tells ColdFusion which database to connect to and what parameters to use
for the connection.
The ColdFusion MX Administrator organizes all the information about a ColdFusion MX
server’s database connections in a single, easy-to-manage location. In addition to adding new data
sources, you can use the Administrator to specify changes to your database configuration, such as
relocation, renaming, or changes in security permissions.
cfquery tag. During a
Adding data sources45
Adding data sources in the Administrator
You use the ColdFusion MX 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 MX includes data sources that are configured by default. You do not need the
following procedure to work with these data sources.
To add a data source:
1.
In the ColdFusion MX 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 box; 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.
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 Username and Password.
Tip: The omission of required username 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 MX 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 MX, click Verify All
Connections.
Specifying connection string arguments
The ColdFusion MX 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: As of ColdFusion MX, the cfqueryconnectstring attribute is not supported.
46Chapter 3: Data Source Management
Guidelines for data sources
When you add data sources to ColdFusion MX, keep the following guidelines in mind:
• Data source names should be all one word.
• Data source names can contain only letters, numbers, hyphens, and the underscore character
(_).
• Data source names should not contain special characters or spaces.
• Although data source names are not case-sensitive, you should use a consistent capitalization
scheme.
• Depending on the JDBC driver, connection strings and JDBC URLs might be case-sensitive.
• Ensure that you use the Administrator to verify that ColdFusion MX can connect to the data
source.
• A data source must exist in the ColdFusion MX Administrator before you use it on an
application page to retrieve data.
Connecting to DB2 Universal Database
This section discusses using the ColdFusion MX Administrator to define data sources for DB2
Universal Database (UDB). For information on defining data sources that work with DB2 for
OS/390 or iSeries, see “Connecting to other data sources” on page 60. To see a list of DB2
versions that ColdFusion MX supports, go to www.macromedia.com/go/sysreqscf.
Note: DB2 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 MX to DB2:
SettingDescription
CF Data Source
Name
DatabaseThe name of the database.
ServerThe name of the server that hosts the database that you want to use. If the
PortThe number of the TCP/IP port that the server monitors for connections.
UsernameThe user name that ColdFusion MX passes to the JDBC driver to connect to the
PasswordThe password that ColdFusion MX passes to the JDBC driver to connect to the
Description(Optional) A description for this connection.
The data source name (DSN) used by ColdFusion MX to connect to the data
source.
database is local, enclose the word local in parentheses.
data source if a ColdFusion application 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.
data source if a ColdFusion application does not supply a password (for
example, in a
cfquery tag).
cfquery tag).
Connecting to DB2 Universal Database47
SettingDescription
Connection
String
A field that passes database-specific parameters, such as login credentials, to
the data source.
For UDB on the initial connection, specify DatabaseName,
CreateDefaultPackage, ReplacePackage, and
sendStringParametersAsUnicode (with no spaces), as the following example
shows:
If the database uses Unicode, specify true for the
sendStringParametersAsUnicode parameter.
For UDB on subsequent connections, specify DatabaseName and
sendStringParametersAsUnicode (with no spaces), as the following example
shows:
Your user ID must have CREATE PACKAGE privileges on the database, or your
database administrator must create a package for you.
Limit
Connections
Specifies whether ColdFusion MX 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 To
Maintain
Connections
Specifies the maximum number of database connections for the data source. To
use this restriction, you must enable the Limit Connections option.
ColdFusion 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.
Max Pooled
Statements
Enables 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
• Unique
cfquery tags that use the cfqueryparam tag
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
If selected, suspends all client connections.
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 unchecked, ColdFusion retrieves the number of characters
specified in the Long Text Buffer setting. For UDB 7.1 and 7.2, there is a 32K
limit on CLOBs.
BLOB Select to return the entire contents of any BLOB/Image columns in the database
for this data source. If unchecked, ColdFusion retrieves the number of characters
specified in the BLOB Buffer setting. BLOBs are not supported on UDB 7.1
and 7.2.
48Chapter 3: Data Source Management
SettingDescription
LongText Buffer
(chr)
BLOB Buffer
(bytes)
Allowed SQLThe SQL operations that can interact with the current data source.
The default buffer size, used if the CLOB option is not selected. The default
value is
64000 bytes.
The default buffer size, used if the BLOB option is not selected. The default
value is
64000 bytes.
Connecting to Informix
To see a list of Informix versions that ColdFusion MX supports, go to
www.macromedia.com/go/sysreqscf. Use the settings in the following table to connect
ColdFusion MX to Informix data sources:
SettingDescription
CF Data Source
Name
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
PortThe number of the TCP/IP port that the server monitors for connections.
UsernameThe user name that ColdFusion MX passes to the JDBC driver to connect to the
PasswordThe password that ColdFusion MX passes to the JDBC driver to connect to the
Description(Optional) A description for this connection.
Connection
String
Limit
Connections
Restrict
Connections To
Maintain
Connections
Max Pooled
Statements
The data source name (DSN) used by ColdFusion MX to connect to the data
source.
the word local in parentheses.
data source if a ColdFusion application does not supply a user name (for
example, in a
data source if a ColdFusion application does not supply a password (for
example, in a
A field that passes database-specific parameters, such as login credentials, to
the data source.
Specifies whether ColdFusion MX 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.
Specifies the maximum number of database connections for the data source. To
use this restriction, you must enable the Limit Connections option.
ColdFusion MX 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.
Enables reuse of prepared statements (that is, stored procedures and queries
that use the
application, start by setting it to the sum of the following:
• Unique
• Unique
cfquery tag).
cfquery tag).
cfqueryparam tag). Although you tune this setting based on your
cfquery tags that use the cfqueryparam tag
cfstoredproc tags
Connecting to Informix49
SettingDescription
Timeout (min)The number of minutes that ColdFusion MX maintains an unused connection
Interval (min)The time (in minutes) that the server waits between cycles to check for expired
Disable
Connections
Login Timeout
(sec)
CLOBSelect to return the entire contents of any CLOB/Text columns in the database
BLOB Select to return the entire contents of any BLOB/Image columns in the database
LongText Buffer The default buffer size, used if the CLOB option is not selected. The default
BLOB BufferThe default buffer size; used if the BLOB option is not selected. The default
Allowed SQLThe SQL operations that can interact with the current data source.
before destroying it.
data source connections to close.
If selected, suspends all client connections.
The number of seconds before ColdFusion MX times out the data source
connection login attempt.
for this data source. If not selected, ColdFusion MX retrieves the number of
characters specified in the Long Text Buffer setting.
for this data source. If not selected, ColdFusion MX retrieves the number of
characters specified in the BLOB Buffer setting.
value is
64000 bytes.
value is
64000 bytes.
Connecting to Microsoft Access
Use the settings in the following table to connect ColdFusion MX to Microsoft Access data
sources:
SettingDescription
CF Data Source
Name
Database FileThe file that contains the database.
System Database
File
Use Default
Username
ColdFusion
Username
ColdFusion
Password
50Chapter 3: Data Source Management
The data source name (DSN) used by ColdFusion MX to connect to the data
source.
To secure access to the specified database file, click Browse Server to locate
and enter a database that contains database security information. The system
database is usually located in the same directory as the MDB file or in the
windows\system32\system.mdw directory.
If selected, ColdFusion MX does not pass a user name or password when
requesting a connection. The Microsoft Access driver uses the default user name
and password.
The user name that ColdFusion MX 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
The password that ColdFusion MX passes to the JDBC driver to connect to the
data source if a ColdFusion application does not supply a password (for
example, in a
cfquery tag).
cfquery tag).
SettingDescription
Description(Optional) A description for this connection.
Page TimeoutThe number of milliseconds before a request for a ColdFusion page times out.
The default is 600. If you observe excessive network activity when using this
driver, increase the page timeout value.
Max Buffer SizeThe size of the internal buffer, in kilobytes, that Access uses to transfer data to
and from the disk. The default buffer size is 2048 KB. Specify an integer value
divisible by 256.
Connection
String
Default
Username
A field that passes database-specific parameters, such as login credentials, to
the data source.
The user name that ColdFusion MX 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
cfquery tag).
Default Password The password that ColdFusion MX passes to the JDBC driver to connect to the
data source if a ColdFusion application does not supply a password (for
Return
Timestamp as
String
Limit
Connections
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
DateFormat, TimeFormat, and CreateODBCDateTime).
Specifies whether ColdFusion MX limits the number of database connections for
the data source. If you enable this option, use the Restrict Connections To field to
cfquery tag).
specify the maximum.
Restrict
Connections To
Maintain
Connections
Specifies the maximum number of database connections for the data source. To
use this restriction, you must enable the Limit Connections option.
ColdFusion MX 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
If selected, suspends all client connections.
Connections
Login Timeout
(sec)
The number of seconds before ColdFusion MX 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 MX retrieves the number of
characters specified in the Long Text Buffer setting.
BLOB Select to return the entire contents of any BLOB/Image columns in the database
for this data source. If unchecked, ColdFusion retrieves the number of characters
specified in the BLOB Buffer setting.
LongText Buffer The default buffer size, used if the CLOB option is not selected. The default
value is
64000 bytes.
Connecting to Microsoft Access51
SettingDescription
BLOB BufferThe default buffer size, used if the BLOB option is not selected. The default
Allowed SQLThe SQL operations that can interact with the current data source.
value is
64000 bytes.
Connecting to Microsoft Access with Unicode
Use the settings in the following table to connect ColdFusion MX to Microsoft Access with
Unicode data sources (this is a Type 2 driver):
SettingDescription
CF Data Source
Name
Database FileThe file that contains the database.
Description(Optional) A description for this connection.
ColdFusion
Username
ColdFusion
Password
Page TimeoutThe time (in tenths of a second) before a request for a ColdFusion page times
Max Buffer SizeThe size of the internal buffer, in kilobytes, used by Microsoft Access to transfer
Connection
String
Limit
Connections
Restrict
Connections To
Maintain
Connections
Timeout (min)The number of minutes that ColdFusion MX maintains an unused connection
Interval (min)The time (in minutes) that the server waits between cycles to check for expired
Disable
Connections
Login Timeout
(sec)
The data source name (DSN) used by ColdFusion MX to connect to the data
source.
The user name that ColdFusion MX 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
The password that ColdFusion MX passes to the JDBC driver to connect to the
data source if a ColdFusion application does not supply a password (for
example, in a
out.
data to and from the disk. Can be any integer value divisible by 256.
A field that passes database-specific parameters, such as login credentials, to
the data source.
Specifies whether ColdFusion MX 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.
Specifies the maximum number of database connections for the data source. To
use this restriction, you must enable the Limit Connections option.
ColdFusion MX 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.
before destroying it.
data source connections to close.
If selected, suspends all client connections.
The number of seconds before ColdFusion MX times out the data source
connection login attempt.
cfquery tag).
cfquery tag).
52Chapter 3: Data Source Management
SettingDescription
CLOBSelect to return the entire contents of any CLOB/Text columns in the database
BLOB Select to return the entire contents of any BLOB/Image columns in the database
LongText Buffer The default buffer size, used if the CLOB option is not selected. The default
BLOB BufferThe default buffer size, used if the BLOB option is not selected. The default
Allowed SQLThe SQL operations that can interact with the current data source.
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.
for this data source. If not selected, ColdFusion MX retrieves the number of
characters specified in the Long Text Buffer setting.
for this data source. If not selected, ColdFusion MX retrieves the number of
characters specified in the BLOB Buffer setting.
value is
64000 bytes.
value is
64000 bytes.
Connecting to Microsoft SQL Server
To see a list of SQL Server versions that ColdFusion MX supports, go to
www.macromedia.com/go/sysreqscf. Use the settings in the following table to connect
ColdFusion MX to Microsoft SQL Server:
SettingDescription
CF Data Source
Name
DatabaseThe database to which this data source connects.
ServerThe name of the server that hosts the database that you want to use. If the
PortThe number of the TCP/IP port that the server monitors for connections.
UsernameThe user name that ColdFusion MX passes to the JDBC driver to connect to the
PasswordThe password that ColdFusion MX passes to the JDBC driver to connect to the
Description(Optional) A description for this connection.
Connection
String
The data source name (DSN) used by ColdFusion MX to connect to the data
source.
database is local, enclose the word 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.
data source if a ColdFusion application does not supply a user name (for
example, in a
data source if a ColdFusion application does not supply a password (for
example, in a
A field that passes database-specific parameters, such as login credentials, to
the data source.
cfquery tag).
cfquery tag).
Connecting to Microsoft SQL Server53
SettingDescription
Select MethodDetermines whether server cursors are used for SQL queries.
• The Direct method provides more efficient retrieval of data when you retrieve
record sets 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
Connections
Specifies whether ColdFusion MX 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 To
Maintain
Connections
Specifies the maximum number of database connections for the data source. To
use this restriction, you must enable the Limit Connections option.
ColdFusion MX 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.
String FormatEnable this option if your application uses Unicode data in DBMS-specific
Unicode datatypes, such as National Character or nchar.
Max Pooled
Statements
Enables 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
• Unique
cfquery tags that use the cfqueryparam tag
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
If selected, suspends all client connections.
Connections
Login Timeout
(sec)
The number of seconds before ColdFusion MX 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 MX retrieves the number of
characters specified in the Long Text Buffer setting.
BLOB Select to return the entire contents of any BLOB/Image columns in the database
for this data source. If not selected, ColdFusion MX retrieves the number of
characters specified in the BLOB Buffer setting.
LongText Buffer The default buffer size, used if Enable Long Text Retrieval(CLOB) 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.
54Chapter 3: Data Source Management
Settings for the Northwind sample database
SQL Server ships with a sample database named Northwind. Establishing a connection to the
Northwind database can help you learn ColdFusion MX while using a familiar database.
To establish a connection to the SQL Server Northwind database, you must set up the database
int he SQL Server Enterprise manager and in the ColdFusion MX Administrator.
To 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 on the server, select Properties > Security and then select the Security tab. Ensure that
the SQL Server and Windows radio button is clicked.
8.
Click OK.
To set up the database in the ColdFusion MX Administrator:
1.
Open the ColdFusion MX 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 box.
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.
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, you must 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
username and password in the ColdFusion data source.
Connecting to Microsoft SQL Server55
• 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 MX 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 MX. To fix this problem, perform the following steps:
a
In SQL Server Enterprise Manager, right-click on the name of your SQL Server and click
Properties.
b
Click Network Configuration and the General Tab.
c
Move TCP/IP from the Disabled Protocols section to the Enabled Protocols section.
d
Click OK.
e
Restart the SQL Server services.
f
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.
Connecting to MySQL
To see a list of MySQL versions that ColdFusion MX supports, go to
www.macromedia.com/go/sysreqscf. Use the settings in the following table to connect
ColdFusion MX to MySQL data sources:
SettingDescription
CF Data Source NameThe data source name (DSN) used by ColdFusion MX 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 word local in parentheses.
PortThe number of the TCP/IP port that the server monitors for connections.
UsernameThe user name that ColdFusion MX 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 MX 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.
56Chapter 3: Data Source Management
cfquery tag).
cfquery tag).
SettingDescription
Limit ConnectionsSpecifies whether ColdFusion MX limits the number of database
Restrict Connections To Specifies the maximum number of database connections for the data
Maintain ConnectionsColdFusion MX establishes a connection to a data source for every
Timeout (min)The number of minutes that ColdFusion MX maintains an unused
Interval (min)The time (in minutes) that the server waits between cycles to check for
Disable ConnectionsIf selected, suspends all client connections.
Login Timeout (sec)The number of seconds before ColdFusion MX times out the data source
CLOBSelect to return the entire contents of any CLOB/Text columns in the
BLOB Select to return the entire contents of any BLOB/Image columns in the
LongText BufferThe default buffer size; used if Enable Long Text Retrieval(CLOB) is not
BLOB BufferThe default buffer size; used if the BLOB option is not selected. The
Allowed SQLThe SQL operations that can interact with the current data source.
connections for the data source. If you enable this option, use the Restrict
Connections To field to specify the maximum.
source. To use this restriction, you must enable the Limit Connections
option.
operation that requires one. Enable this option to improve performance by
caching the data source connection.
connection before destroying it.
expired data source connections to close.
connection login attempt.
database for this data source. If not selected, ColdFusion MX retrieves the
number of characters specified in the Long Text Buffer setting.
database for this data source. If not selected, ColdFusion MX retrieves the
number of characters specified in the BLOB Buffer setting.
selected. The default value is
default value is
64000 bytes.
64000 bytes.
Connecting to ODBC Socket
Use the settings in the following table to connect ColdFusion MX to ODBC Socket data sources
(this is a Type 3 driver):
SettingDescription
CF Data Source NameThe data source name (DSN) used by ColdFusion MX to connect to the
data source.
ODBC DSNSelect the ODBC DSN to which you want ColdFusion MX to connect.
Trusted ConnectionSpecifies whether to use domain user account access to the database.
Only valid for SQL Server.
UsernameThe user name that ColdFusion MX 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
cfquery tag).
Connecting to ODBC Socket57
SettingDescription
PasswordThe password that ColdFusion MX passes to the JDBC driver to connect
to the data source if a ColdFusion application does not supply a password
(for example, in a
cfquery tag).
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
String
Enable this option if your application retrieves Date/Time data and then
re-uses it in SQL statements without applying formatting (using functions
such as
DateFormat, TimeFormat, and CreateODBCDateTime).
Limit ConnectionsSpecifies whether ColdFusion MX 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 To Specifies the maximum number of database connections for the data
source. To use this restriction, you must enable the Limit Connections
option.
Maintain ConnectionsColdFusion MX 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 MX 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 MX retrieves the
number of characters specified in the Long Text Buffer setting.
BLOB Select to return the entire contents of any BLOB/Image columns in the
database for this data source. If not selected, ColdFusion MX 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
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.
58Chapter 3: Data Source Management
Connecting to Oracle
To see a list of Oracle versions that ColdFusion MX supports, go to
www.macromedia.com/go/sysreqscf. Use the settings in the following table to connect
ColdFusion MX to Oracle data sources:
SettingDescription
CF Data Source Name The data source name (DSN) used by ColdFusion MX 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
PortThe number of the TCP/IP port that the server monitors for connections.
UsernameThe user name that ColdFusion MX passes to the JDBC driver to connect
PasswordThe password that ColdFusion MX passes to the JDBC driver to connect
Description(Optional) A description for this connection.
Connection StringA field that passes database-specific parameters, such as login
Limit ConnectionsSpecifies whether ColdFusion MX limits the number of database
Restrict Connections To Specifies the maximum number of database connections for the data
Maintain ConnectionsColdFusion MX establishes a connection to a data source for every
Max Pooled Statements Enables reuse of prepared statements (that is, stored procedures and
Timeout (min)The number of minutes that ColdFusion MX maintains an unused
Interval (min)The time (in minutes) that the server waits between cycles to check for
Disable ConnectionsIf selected, suspends all client connections.
database is local, enclose the word local in parentheses.
to the data source if a ColdFusion application does not supply a user name
(for example, in a
to the data source if a ColdFusion application does not supply a password
(for example, in a
credentials, to the data source.
connections for the data source. If you enable this option, use the Restrict
Connections To field to specify the maximum.
source. To use this restriction, you must enable the Limit Connections
option.
operation that requires one. Enable this option to improve performance by
caching the data source connection.
queries that use the
based on your application, start by setting it to the sum of the following:
• Unique
• Unique
The default value is
connection before destroying it.
expired data source connections to close.
cfquery tag).
cfquery tag).
cfqueryparam tag). Although you tune this setting
cfquery tags that use the cfqueryparam tag
cfstoredproc tags
300.
ORCL.
Connecting to Oracle59
SettingDescription
Login Timeout (sec)The number of seconds before ColdFusion MX times out the data source
CLOBSelect to return the entire contents of any CLOB/Text columns in the
BLOB Select to return the entire contents of any BLOB/Image columns in the
LongText BufferThe default buffer size; used if Enable Long Text Retrieval (CLOB) is not
BLOB BufferThe default buffer size; used if the BLOB option is not selected. The
Allowed SQLThe SQL operations that can interact with the current data source.
connection login attempt.
database for this data source. If not selected, ColdFusion MX retrieves the
number of characters specified in the Long Text Buffer setting.
database for this data source. If not selected, ColdFusion MX retrieves the
number of characters specified in the BLOB Buffer setting.
selected. The default value is
default value is
64000 bytes.
64000 bytes.
Connecting to other data sources
Use the settings in the following table to connect ColdFusion MX to data sources through JDBC
drivers that do not appear in the drop-down list of drivers:
SettingDescription
CF Data Source Name The data source name (DSN) used by ColdFusion MX to connect to the
JDBC URLThe JDBC connection URL for this data source.
Driver ClassThe fully qualified class name of the driver. For example,
Driver Name(Optional) The name of the driver.
UsernameThe user name that ColdFusion MX passes to the JDBC driver to connect
PasswordThe password that ColdFusion MX passes to the JDBC driver to connect
Description(Optional) A description for this connection.
Connection StringA field that passes database-specific parameters, such as login
Limit ConnectionsSpecifies whether ColdFusion MX limits the number of database
Restrict Connections To Specifies the maximum number of database connections for the data
data source.
com.inet.tds.TdsDriver. The JAR file that contains this class must be in a
directory defined in the ColdFusion classpath.
to the data source if a ColdFusion application does not supply a user name
(for example, in a
to the data source if a ColdFusion application does not supply a password
(for example, in a
credentials, to the data source.
connections for the data source. If you enable this option, use the Restrict
Connections To field to specify the maximum.
source. To use this restriction, you must enable the Limit Connections
option.
cfquery tag).
cfquery tag).
60Chapter 3: Data Source Management
SettingDescription
Maintain ConnectionsColdFusion MX establishes a connection to a data source for every
Timeout (min)The number of minutes that ColdFusion MX maintains an unused
Interval (min)The time (in minutes) that the server waits between cycles to check for
Disable ConnectionsIf selected, suspends all client connections.
Login Timeout (sec)The number of seconds before ColdFusion MX times out the data source
CLOBSelect to return the entire contents of any CLOB/Text columns in the
BLOB Select to return the entire contents of any BLOB/Image columns in the
LongText BufferThe default buffer size; used if Enable Long Text Retrieval (CLOB) is not
BLOB BufferThe default buffer size; used if the BLOB option is not selected. The
Allowed SQLThe SQL operations that can interact with the current data source.
operation that requires one. Enable this option to improve performance by
caching the data source connection.
connection before destroying it.
expired data source connections to close.
connection login attempt.
database for this data source. If not selected, ColdFusion MX retrieves the
number of characters specified in the Long Text Buffer setting.
database for this data source. If not selected, ColdFusion MX retrieves the
number of characters specified in the BLOB Buffer setting.
selected. The default value is
default value is
64000 bytes.
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: If the database uses Unicode, specify true for the
parameter.
sendStringParametersAsUnicode
Connecting to other data sources61
• On subsequent connections, specify LocationName, CollectionId, and
sendStringParametersAsUnicode, as the following example shows:
LocationName=SAMPLE;CollectionId=DEFAULT;
sendStringParametersAsUnicode=false
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 47.
Connecting to Sybase
To see a list of Sybase versions that ColdFusion MX supports, go to
www.macromedia.com/go/sysreqscf. Use the settings in the following table to connect
ColdFusion MX to Sybase data sources:
SettingDescription
CF Data Source Name The data source name (DSN) used by ColdFusion MX 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
PortThe number of the TCP/IP port that the server monitors for connections.
UsernameThe user name that ColdFusion MX passes to the JDBC driver to connect
PasswordThe password that ColdFusion MX passes to the JDBC driver to connect
Description(Optional) A description for this connection.
Connection StringA field that passes database-specific parameters, such as login
Select MethodDetermines whether server cursors are used for SQL queries.
Limit ConnectionsSpecifies whether ColdFusion MX limits the number of database
database is local, enclose the 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).
to the data source if a ColdFusion application does not supply a user name
(for example, in a
to the data source if a ColdFusion application does not supply a password
(for example, in a
credentials, to the data source.
• The Direct method provides more efficient retrieval of data when you
retrieve record sets 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.
connections for the data source. If you enable this option, use the Restrict
Connections To field to specify the maximum.
cfquery tag).
cfquery tag).
62Chapter 3: Data Source Management
SettingDescription
Restrict Connections To Specifies the maximum number of database connections for the data
Maintain ConnectionsColdFusion MX establishes a connection to a data source for every
Max Pooled Statements Enables reuse of prepared statements (that is, stored procedures and
Timeout (min)The number of minutes that ColdFusion MX maintains an unused
Interval (min)The time (in minutes) that the server waits between cycles to check for
Disable ConnectionsIf selected, suspends all client connections.
Login Timeout (sec)The number of seconds before ColdFusion MX times out the data source
CLOBSelect to return the entire contents of any CLOB/Text columns in the
BLOB Select to return the entire contents of any BLOB/Image columns in the
LongText BufferThe default buffer size; used if Enable Long Text Retrieval(CLOB) is not
BLOB BufferThe default buffer size; used if the BLOB option is not selected. The
Allowed SQLThe SQL operations that can interact with the current data source.
source. To use this restriction, you must enable the Limit Connections
option.
operation that requires one. Enable this option to improve performance by
caching the data source connection.
queries that use the
based on your application, start by setting it to the sum of the following:
• Unique
• Unique
connection before destroying it.
expired data source connections to close.
connection login attempt.
database for this data source. If not selected, ColdFusion MX retrieves the
number of characters specified in the Long Text Buffer setting.
database for this data source. If not selected, ColdFusion MX retrieves the
number of characters specified in the BLOB Buffer setting.
selected. The default value is
default value is
cfquery tags that use the cfqueryparam tag
cfstoredproc tags
cfqueryparam tag). Although you tune this setting
64000 bytes.
64000 bytes.
Connecting to JNDI data sources
Use the settings in the following table to connect ColdFusion MX to JNDI data sources that have
been defined for a J2EE application server (multiserver and J2EE configurations only):
SettingDescription
CF Data Source Name The data source name (DSN) used by ColdFusion MX to connect to the
JNDI NameThe JNDI location in which the J2EE application server stores the data
UsernameThe user name that ColdFusion MX passes to JNDI to connect to JNDI if
data source.
source.
a ColdFusion application does not supply a user name (for example, in a
cfquery tag).
Connecting to JNDI data sources63
SettingDescription
PasswordThe password that ColdFusion MX passes to JNDI to connect to the data
source if a ColdFusion application does not supply a password (for
example, in a
cfquery tag).
Description(Optional) A description for this connection.
JNDI Environment
Settings
Specifies additional JNDI environment settings, if required by the JNDI
data source. Use comma separated list of name/value pair. For example if
you must specify a username and password to connect to JNDI, specify
the following:
CLOBSelect to return the entire contents of any CLOB/Text columns in the
database for this data source. If not selected, ColdFusion MX retrieves the
number of characters specified in the Long Text Buffer setting.
BLOB Select to return the entire contents of any BLOB/Image columns in the
database for this data source. If not selected, ColdFusion MX 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
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.
Note: The ColdFusion MX Administrator does not display the JNDI data source option when running
in the server configuration.
64Chapter 3: Data Source Management
CHAPTER 4
Web Server Management
You can connect Macromedia ColdFusion MX to the built-in web server and to external web
servers, such as Apache, IIS, and Sun ONE Web Server (formerly known as iPlanet). This chapter
explores common scenarios, security, and multihosting.
The information in this chapter applies 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.)
The web server is a critical component in your ColdFusion MX environment, and understanding
how ColdFusion interacts with web servers can help you administer your site. ColdFusion MX
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 “Using the built-
in web server” on page 66.
External web server A customized web server connector module that forwards requests for
ColdFusion pages from an external web server to ColdFusion MX. For more information, see
“Using an external web server” on page 67.
65
Using the built-in web server
The ColdFusion MX 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 particularly 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 MX (using the built-in web server) on the same
computer while you migrate your existing applications to ColdFusion MX.
Development If your workstation runs ColdFusion MX 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.macromedia.com and
http://www.macromedia.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 MX 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/SERVER-INF/jrun.xml file in a text editor and examine the
port attribute of the WebService service. In the multiserver configuration, the path is
jrun_root/servers/cfusion/SERVER-INF/jrun.xml.
Note: When you install ColdFusion MX 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, you should choose to configure your external web server as part of the
ColdFusion MX installation, except for the two cases mentioned at the beginning of this
section (coexistence with a previous ColdFusion version and when there is no web server on
the computer). If you select the built-in web server by mistake, you must 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 68.
• 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 MX Administrator (CFIDE directory) is under this
web root.
66Chapter 4: Web Server Management
• 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/WEB-INF/jrun-web.xml in the multiserver
configuration), as the following example shows:
Warning: If you have CFML pages under your external web server’s root, ensure that
ColdFusion MX has been configured to serve these pages through the external web server. If you
have not configured ColdFusion MX to use an external web server, your external web server will
serve ColdFusion Markup Language (CFML) source code for ColdFusion pages saved under its
web root.
Using an external web server
ColdFusion MX uses the JRun web server connector to forward requests from an external web
server to the ColdFusion MX 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 MX 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:
Web serverConnector details
ApacheThe Web Server Configuration Tool adds the following elements to the
IISThe Web Server Configuration Tool adds the following elements at either
Sun ONE Web Server,
including iPlanet and
Netscape Enterprise
Server (NES)
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.
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.
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.
Using an external web server67
Web server configuration
ColdFusion MX uses the Web Server Configuration Tool to configure an external web server with
the modules and settings that the connector needs to connect to ColdFusion MX. 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 MX 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, you must select the Configure
Web Server for ColdFusion MX Applications check box.
To run the Web Server Configuration Tool in GUI mode:
1.
Open a console window.
Tip: In Windows, you can start the Web Server Configuration Tool by selecting Start > Programs >
Macromedia > ColdFusion MX 7 > 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.
4.
Click the Add button.
5.
Select the Configure Web Server for ColdFusion MX Applications check box.
6.
In the Server drop-down list box, 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.
68Chapter 4: Web Server Management
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 builtin web server.
Using the command-line interface
You can also run the Web Server Configuration Tool through a command-line interface.
To 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
-ws
-dir
-site
-host
-server
-username
-password
-norestart
-cluster
-l
Specifies the web server, as follows:
• IIS
• Apache
• SunOne
• iPlanet
• NES
The web server name you supply is not case-sensitive.
Specifies the path to the configuration directory (Apache conf or
NES/iPlanet config).
Specifies the IIS website name (case-sensitive). Specify All or 0 to
configure the connector at a global level, which applies to all IIS
websites.
Specifies the ColdFusion server address. The default value is
localhost.
Specifies the ColdFusion server name.
Specifies a username defined to the JRun server. The default value is
guest account.
Specifies a password that corresponds to -username. The default
value is
guest account.
Specifies not to restart the web server.
Specifies the JRun cluster name. Use this option to define a
connection to a JRun cluster instead of a single server.
Enables verbose logging for the connector.
Web server configuration69
OptionDescription
-a
-map .cfm,.cfc,.cfml,.cfr,
.cfswf,.jsp,.jws
Enables native OS memory allocation.
Specifies the extension mappings list. (To use the web server
connector with ColdFusion MX, you should specify
.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 module runs as an IIS extension.
-coldfusion
Ensures that the proper ColdFusion MX mappings are set (.cfm,
.cfml, .cfc, .cfswf, .cfr, .jsp, .jws), and, if IIS,
implicitly specified.
Always use this option when configuring a web server for use
with ColdFusion MX.
-upgrade
Upgrades existing configured connectors with newer modules from a
newer wsconfig.jar file.
-service
-bin
Specifies the Apache Windows service name. The default value is
Apache.
Specifies the path to the Apache server binary file (apache.exe in
Windows, httpd on UNIX).
-script
Specifies the path to the Apache UNIX control script file (apachectl,
but slightly different with certain Apache variants, such as
Stronghold).
-v
-cfwebroot
Enables verbose output from the Web Server Configuration Tool.
Specifies the directory corresponding to cf_root/wwwroot. If you use
this option, the Web 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 MX Administrator.
-list
-list -host server-host
-remove
-uninstall
-h
Lists all configured web servers.
Lists all JRun servers on the specified host.
Removes a configuration. Requires the -ws and either the -dir or
-site options.
Uninstalls all configured connectors.
Lists all parameters.
filter-prefix-only is
Using the batch files and shell scripts
The ColdFusion MX 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.
70Chapter 4: Web Server Management
Command-line interface examples
This section provides examples of multiple use-cases for different web servers:
The -cfwebroot option allows all sites to share the ColdFusion MX Administrator that runs
under C:\Inetpub\wwwroot. This example does not automatically configure newly added sites
after the first
-site 0 run, but you can rerun with -site 0 at a later time, and the Web Server
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.
Web server configuration71
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.
PropertyDescription
bootstrapSpecifies the IP address and port on which the JRun server’s proxy service is
listening for connector requests. 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).
serverstoreSpecifies the full path and filename of the file that contains information for the
verboseCreates more detailed web server log file entries for the connector. Enabling
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
ssl(Optional) Enables secure sockets layer (SSL) between the web server and the
apiallocEnables native OS memory allocation rather than the web server’s allocator
ignoresuffixmap(IIS only) Forces the connector to use application mappings.
proxyretryintervalSpecifies the number of seconds to wait before trying to reconnect to an
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.
associated JRun server. The connector creates this file automatically. The
default filename is jrunserver.store.
this option can cause the web server’s log files to fill quickly. Specify
false; the default value is false. In Apache and Sun ONE Web 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.
message. This property is commented out by default. You must restart the web
server after enabling this setting.
JRun server. You must set this setting to
(for use on Solaris with Sun ONE, at the direction of Macromedia Support
staff).
unreachable clustered server.
false.
true or
Each time you run the Web Server Configuration Tool, it creates a new 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
To help describe the web server configuration file parameters, this section provides examples of
connector-specific web server properties. These examples assume that JRun and the web server are
on the same computer.
72Chapter 4: Web Server Management
Apache configuration file
The following is a typical httpd.conf file for an installation of ColdFusion MX on the same
computer as an Apache 2.0 web server:
"C:/CFusionMX7/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
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:
verbose=false
scriptpath=/JRunScripts/jrun.dll
serverstore=C:/CFusionMX7/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.
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.
74Chapter 4: Web Server Management
Multihoming configuration tasks include the following:
Enabling access to the ColdFusion MX Administrator If any of the applications under a
virtual host need to access the ColdFusion MX Administrator, you must 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.
Tip: 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
and any of the applications under a virtual host use the
If you do not create a web server mapping for /CFIDE,
cfform tag, you must enable the virtual
host to find the JavaScript files under the CFIDE/scripts directory. To enable access to the these
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 MX always returns pages
from the correct server, ensure that Cache Web Server Paths is disabled in t‘he Caching page of
the ColdFusion MX 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.
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.
To 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 Specify IIS for the Web Server and All from the IIS Web Site drop-down list box, and
select the Configure Web Server for ColdFusion MX 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.
Multihoming75
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.
To 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.
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:
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 MX Applications check box.
■ Command line Specify -ws apache 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 69.
The Web Server Configuration Tool updates the httpd.conf file. For a sample, see “Ap ac he ”
on page 76.
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.
76Chapter 4: Web Server Management
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), you must
create separate server instances for each site and run the Web Server Configuration Tool once for
each site.
To 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 use by
ColdFusion MX. For more information, see your Sun ONE Web Server documentation.
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 MX Applications check box.
■ Command line Specify -ws sunone 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.
Multihoming77
78Chapter 4: Web Server Management
CHAPTER 5
Deploying ColdFusion Applications
This chapter describes the archive and deployment options available in Macromedia
ColdFusion MX 7.
ColdFusion MX 7 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 “Packaging
applications in CAR files” on page 79.
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 80.
Cfcompile utility The cfcompile utility lets you precompile your application’s ColdFusion
pages 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 82.
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 MX Administrator.
Note: CAR file archiving and deployment is different from J2EE archiving and packaging through
EAR and WAR files.
79
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 MX 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 MX does not deploy Administrator and RDS passwords, nor does it unpack
archives created in previous versions of ColdFusion.
For more information on creating, building, and deploying CAR files, see ColdFusion MX
Administrator online Help.
Packaging applications in J2EE archive files
When running ColdFusion MX 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 MX 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 MX releases, your J2EE
administrator had to redo each of these steps when deploying your ColdFusion application onto a
production J2EE server.
The ColdFusion MX Administrator lets you create an EAR or WAR file that contains the entire
application. This archive file contains the ColdFusion MX web application, settings for
ColdFusion MX (such as data source definitions), and the CFM, CFC, and CFR files used by
your application.
Tip: If you are using the multiserver configuration, you can combine J2EE archiving with the instance
creation functionality of the ColdFusion MX Administrator Enterprise Manager. First, create an EAR
file that contains your application and all of its settings, and then use that EAR file in the Create From
EAR/WAR option of the Instance Manager. For more information on the Enterprise Manager, see
“Defining additional server instances” on page 93.
80Chapter 5: Deploying ColdFusion Applications
Application packaging
The J2EE Archive feature lets you quickly create an archive file that a J2EE administrator can use
to deploy your ColdFusion MX application.
To add a new archive definition and create an archive file:
1.
Open the ColdFusion MX 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 archive:
SettingDescription
Archive TypeSelect EAR or WAR.
Context Root (EAR
only)
Serial NumberSpecifies a ColdFusion MX Enterprise Edition serial number. If you do not
COM SupportIf your application doesn’t use COM support, you can reduce the size of the
DebuggingIf the current ColdFusion MX server is running with debugging enabled,
Include CFML Source You can optionally deploy Java bytecode instead of CFML source code.
ColdFusion MX
Administrator
Data SourcesSpecifies the data source definitions to include in the archive file.
Each J2EE web application running in a server is rooted at a unique base
URL, called a context root (or 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 MX 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 /.
specify a valid ColdFusion MX 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.
archive file by omitting the supporting files.
you can disable debugging in the application contained in the archive file.
For more information, see “Sourceless distribution” on page 83.
If your application does not require modification using the ColdFusion MX
Administrator, you can reduce archive size and reduce security issues by
omitting the Administrator files.
Packaging applications in J2EE archive files81
Deployment considerations
Once the archive file is created, you deploy using standard ColdFusion MX J2EE configuration
deployment techniques. For more information, see “Installing an EAR file or WAR files” in
Chapter 4, “Installing the J2EE Configuration” of Installing and Using ColdFusion MX.
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 using the ColdFusion MX Administrator or the Administrator API.
Verity You must ensure that the Verity server settings on the original computer are appropriate
for the deployment computer. If not, you must modify the Verity server settings using the
ColdFusion MX Administrator or the Administrator API.
Serial number J2EE deployment is a ColdFusion MX Enterprise feature. To upgrade to the
Enterprise Edition, enter a serial number using the ColdFusion MX Administrator or the
Administrator API.
For more information on the Administrator API, see “Administrator API” on page 39.
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 MX 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.
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:
cfcompile webroot [directory-to-compile]
82Chapter 5: Deploying ColdFusion Applications
The following table describes these parameters:
ParameterDescription
webrootFully qualified path to the web server root; for example,
C:\Inetpub\wwwroot or C:\CFusionMX7\wwwroot.
directory-to-compileFully qualified path to the directory where the files to be compiled are
located. This directory must be under the webroot directory. If not
specified, all ColdFusion templates in the webroot 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 C:\CFusionMX7\wwwroot.
directory-to-compileFully qualified path to the directory where the files to be compiled are
output-directoryFully qualified path to the directory to contain the compiled deployable
located. This directory must be under the webroot directory. This is
required for the
files. This cannot be the same directory as the source directory.
-deploy option.
After you run the
1.
Back up your original CFML files
2.
Copy the generated bytecode CFML files to the original directory
3.
Deploy the application.
Tip: The J2EE Archive screen of the ColdFusion MX Administrator lets you create an EAR or WAR
file that contains bytecode versions of your application’s CFML files.
cfcompile utility, perform the following steps:
Using the cfcompile utility83
84Chapter 5: Deploying ColdFusion Applications
CHAPTER 6
Administering Security
This chapter describes configuration options for Macromedia ColdFusion MX security. You can
secure a number of Macromedia ColdFusion MX 7 resources with password access and you can
configure sandbox security.
Security is especially important in web-based applications, such as those you develop in
ColdFusion MX. 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 implement development security by requiring a password to use the ColdFusion MX
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 MX Administrator. ColdFusion MX 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 Chapter 16, “Securing Applications,” in ColdFusion MX Developer’s Guide.
Sandbox security Using the ColdFusion MX 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 MX, you can configure multiple security
sandboxes. If you have the Standard Edition of ColdFusion MX, you can only configure a single
security sandbox.
85
The Security area in the Administrator lets you do the following tasks:
• Configure password protection for the ColdFusion MX Administrator. For more information,
see “ColdFusion MX Administrator password protection” on page 86.
• Configure password protection for RDS access. For more information, see “RDS password
protection” on page 86.
• 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 86.
Using password protection
Password protection restricts access to the ColdFusion MX Administrator and to a ColdFusion
server when you attempt access through RDS security.
ColdFusion MX Administrator password protection
Secure access to the ColdFusion MX 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 MX, and Macromedia highly recommends using passwords. You
can disable or change the Administrator password on the Security > CF Admin Password page.
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 MX from Macromedia
Dreamweaver MX 2004, Macromedia HomeSite+, or the ColdFusion Report Builder.
You can disable RDS or change the RDS password on the Security > RDS Password page.
Note: Disabling RDS also disables the applet that the ColdFusion MX Administrator uses in filerelated 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.
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.
86Chapter 6: Administering Security
To use sandbox security in the multiserver and J2EE editions, the application server must be
running a security manager (
java.lang.SecurityManager) and you must define the following
JVM arguments (for Macromedia JRun, this is the java.args line in the jrun_root/jvm.config file):
Note: Sandbox security is not enabled by default. You must 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 its
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.
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 of the
sandbox.
Note: To use the Administrator API when sandbox security is enabled, you must 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.
Using sandbox security87
For more information, see the Administrator online Help.
Note: When you run ColdFusion MX 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 of the sandbox, you specify the filename. When you
enable access to directories outside of the sandbox, you specify directoryname\indicator, where indicator is a dash or asterisk, as follows:
• 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
Adding a sandbox (Enterprise Edition only)
ColdFusion MX Enterprise Edition lets you define multiple security sandboxes.
To add a sandbox:
1.
Open the Security > Sandbox Security page in the ColdFusion MX 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.
The new sandbox appears in the list of Defined Directory Permissions.
88Chapter 6: Administering Security
Configuring 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. There is no initial list of
defined directory permissions.
To configure a sandbox:
1.
Open the Security > Sandbox Security page (Security > Resource Security page in the Standard
Edition) in the ColdFusion MX 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.
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 88.
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.
Using sandbox security89
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 88.
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, you must 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,
cfmail, cfpop, cfldap, cfhttp, and so on). You can specify an IP
address, a server name (such as www.someservername.com), or 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.
Tip: 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.
90Chapter 6: Administering Security
CHAPTER 7
Using Multiple Server Instances
When you install Macromedia ColdFusion MX 7 Enterprise Edition using the multiserver
configuration, you can use the ColdFusion MX Administrator to create multiple server instances.
Deploying ColdFusion MX on multiple server instances lets you isolate individual applications
and leverage clustering functionality.
Management of multiple server instances has changed significantly in ColdFusion MX 7:
ColdFusion MX Use a J2EE deployment, along with J2EE application server features to deploy
the ColdFusion MX application on multiple instances of the J2EE application server.
ColdFusion MX 7 Use the ColdFusion MX Administrator in the multiserver configuration to
create Macromedia JRun server instances and to automatically deploy the ColdFusion MX
application on those instances. Additionally, you can combine the Administrator-driven server
instance creation with the ColdFusion MX Administrator J2EE Archive feature to deploy a
ColdFusion MX 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 80.
Note: Although the concepts and procedures explained in the ColdFusion MX documentation still
apply, ColdFusion MX 7 incorporates multiple instance and cluster creation into the ColdFusion MX
Administrator.
Defining remote server instances to the ColdFusion MX Administrator. . . . . . . . . . . . . . . . . 101
91
About multiple server instances
The ColdFusion MX 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 MX 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 encountered by one application 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.
This chapter describes features that are available only if you have installed the multiserver
configuration. The multiserver configuration is a specialized J2EE configuration that installs
JRun and deploys ColdFusion MX 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 MX Administrator are not
available in the server configuration, nor are they available in the J2EE configuration, even if you
deploy on JRun.
Note: You can also manually deploy ColdFusion MX on multiple server instances, using your J2EE
application server’s server creation and deployment facilities, as documented in the ColdFusion
MX 6.1 documentation.
Expanded archive considerations
ColdFusion MX 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 MX in the J2EE configuration, see Installing and Using ColdFusion MX.
File location considerations
ColdFusion MX lets you store CFM pages either under the external web server root or under the
ColdFusion web application root. The discussions in this chapter assume that you store your
CFM pages under the ColdFusion web application root and that you specify a context root for
your application. This is different from ColdFusion MX 6.1 documentation, which assumed 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
this is the case, you must 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 Chapter 4, “Web
Server Management.”
92Chapter 7: Using Multiple Server Instances
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.
You use the Instance Manager area of the ColdFusion MX 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.
When you create a server instance with the Instance Manager, by default it deploys a copy of the
cfusion server’s ColdFusion enterprise application, including data sources, mappings, and
settings. Alternatively, you can create a new 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.
To define a server instance:
1.
Ensure that you have installed ColdFusion MX 7 using the multiserver configuration.
2.
Open the ColdFusion MX 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 MX 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’s 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.
■ (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 MX Administrator creates a server instance with ColdFusion MX deployed in
it and starts the server instance. The ColdFusion MX 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 MX 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).
Defining additional server instances93
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.
Note: Although this section describes using ColdFusion MX, other J2EE application servers provide
equivalent capabilities, and most of the concepts apply when deploying the ColdFusion MX 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 74.
• Individual applications can use different JVM configurations, or even different JVM
implementations. This feature is particularly useful if one application requires a particularly
large Java heap. To specify customized JVM options, start the JRun server instance from the
command line using the
jvm.config file. This is explained in the “Starting and stopping JRun servers” section in
Installing and Using ColdFusion MX.
Note: These instructions describe creating multiple server instances on a single computer. To create
multiple server instances on separate computers, each computer requires a separate license of
ColdFusion MX Enterprise Edition.
-config option of the jrun command, which specifies a customized
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 MX in the multiserver configuration. The
principles apply when running ColdFusion MX on other J2EE application servers. However, not
all J2EE application servers integrate with external web servers. For more information, see
“Multihoming” on page 74.
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.
For example, with a context root of cfmx, users access CFM pages by specifying
http://hostname/cfmx/pagename.cfm. For more information on using a context root, see Installing and Using ColdFusion MX.
Note: Although cfmx is the context root, it does not relate to your web application directory structure.
94Chapter 7: Using Multiple Server Instances
To use multiple server instances for application isolation:
1.
Create a separate server instance using the instructions in “Defining additional server instances”
on page 93. 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.
This is different for each web server; for more information, see “Multihoming” on page 74 or
consult your web server documentation.
3.
Test each virtual website to ensure that HTML pages are served correctly.
4.
Store your application’s ColdFusion files 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 “Web server configuration for
application isolation” on page 95.
6.
Test your application.
7.
Repeat these steps for each server instance.
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.
This section contains the following sections:
• Configuring application isolation in IIS
• Configuring application isolation in Apache
• Configuring application isolation in Sun ONE Web Server
Tip: 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.
This section assumes that you already created server instances and virtual websites, as described in
“Enabling application isolation” on page 94.
To 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 check box (GUI) or use the
(command-line). For more information on running the Web Server Configuration Tool, see
“Using an external web server” on page 67.
-coldfusion option
Enabling application isolation95
Configuring application isolation in Apache
When you use multiple virtual hosts with multiple server instances under Apache, you edit the
httpd.conf file manually.
This section assumes that you already created server instances and virtual websites, as described in
“Enabling application isolation” on page 94.
To 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 check box (GUI) or use the
-coldfusion option (command-
line).
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, you must 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 of your server
instances, locate the
ProxyService service, ensure that the deactivated element is set to false,
and note the value of the port element; for example:
For each VirtualHost directive that relates to a ColdFusion server instance, copy the entire
IfModule mod_jrun20.c directive from its original location outside the VirtualHost directive
to the last element in the
7.
Delete the Apialloc, Ssl, Ignoresuffixmap, and AddHandler elements in the IfModule
directive for each virtual host. Modify the
VirtualHost directive.
Serverstore and Bootstrap elements to point to
the appropriate proxy port (from the jrun.xml file) and
jrun_root/lib/wsconfig/subdirectory/jrunserver.store file, which the web server connector creates
automatically.
8.
In the original IfModule directive, remove or comment out the Serverstore and Bootstrap
lines (comments start with #). The following example shows three virtual hosts, two of which
are configured for ColdFusion MX:
(Optional) Store the application’s ColdFusion files in your 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
When using multiple virtual hosts with multiple server instances under Sun ONE Web Server,
you create multiple Sun ONE Web Server instances, one for each ColdFusion server instance.
This section assumes that you have already created server instances, as described in “Enabling
application isolation” on page 94.
To configure multiple server instances for application isolation when using Sun ONE
Web Server:
• Run the Web Server Configuration Tool multiple times, once for each Sun ONE Web Server
server instance, and specify a different configuration directory and ColdFusion server instance
each time. Ensure that you select the Configure Web Server for ColdFusion MX Applications
check box (GUI) or use the
98Chapter 7: Using Multiple Server Instances
-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 MX 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.
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, you must
purchase a separate ColdFusion MX 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, you must enable session
replication for each server instance. Session replication coordinates session information in realtime 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 configure a cluster of server instances for load balancing and failover:
1.
Create your application and the data sources required for the application.
2.
Ensure that you have installed ColdFusion MX 7 using the multiserver configuration.
3.
Open the ColdFusion MX Administrator for the cfusion server in a browser
(http://hostname:8300/CFIDE/administrator).
4.
Select Packaging & Deployment > J2EE Packaging.
5.
Use the J2EE Archives page to create an EAR file that contains the application, your
application’s 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 93. Ensure that you use the Create from EAR/WAR field to specify the archive file that
you just created.
Enabling clustering for load balancing and failover99
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 MX Administrator adds the cluster to the Configured Clusters area.
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.
Open the ColdFusion MX Administrator on each server instance using the CF Admin icon on
the Instance Manager. 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. You must do this for all server instances in the cluster.
If J2EE sessions are not enabled in the ColdFusion MX Administrator, session replication does
not function properly.
Note: Session variables are the only memory variables that support session replication. In
particular, ColdFusion components do not support session replication.
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
property.
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 check box (GUI) or use the
line). For more information, see “Web server configuration” on page 68.
21.
Open each server instance’s SERVER-INF/jrun.xml file and ensure that the ProxyService
deactivated attribute is set to false.
100Chapter 7: Using Multiple Server Instances
jrun.trusted.hosts
-coldfusion option (command-
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.