J2EE Archives
ColdFusion is a certified J2EE application capable of being deployed as an EAR or WAR file on J2EE application servers. Deploying earlier versions of ColdFusion on J2EE application servers required multiple administration steps, including creating the ColdFusion application server instance, configuring data sources, deploying application code, and more. ColdFusion MX 7 introduces the capability to package the ColdFusion server and application code into a single J2EE archive for deployment from within the ColdFusion Administrator.This J2EE archive feature is different from the J2EE configuration option of the ColdFusion MX 7 installer. The installer's J2EE configuration option will only create a base ColdFusion MX 7 application server as an EAR or WAR file. The J2EE archive feature, in contrast, allows you to package your ColdFusion application code (CFM, CFC, and CFR files) in an archive file with a configured ColdFusion MX 7 application server. In this way, it combines parts of the installer's J2EE configuration with the ColdFusion archive feature. However, unlike the ColdFusion archive feature, you can create J2EE archives in all ColdFusion MX 7 editions.
Defining J2EE Archives
Following are the steps to define a J2EE archive:
1. | Open the ColdFusion Administrator. Expand the Packaging and Deployment section (if necessary) in the left navigation frame, and click the J2EE Archives (.ear/.war) link. | |
2. | In the J2EE Archives (.ear/.war) window, enter the name for your archive in the Archive Name text field in the Add New Archive section (Figure 6.7). Archive names must be alphanumeric. You cannot use any nonalphanumeric characters such as punctuation, currency symbols, etc. When you're done, click Add.Figure 6.7. The J2EE Archives (.ear/.war) window.[View full size image] ![]() | |
3. | In the Add/Edit J2EE Archive window that appears (Figure 6.8), specify settings for your archive. These include the application code directory, a destination directory for the compiled archive file, the archive type, a context root (if necessary), ColdFusion data sources to include, and so on. Table 6.2 describes the available options.Figure 6.8. Use the J2EE Archives Add/Edit window to create or modify the archive definition.ColdFusion Compiler" section later in this chapter. | No |
Include CF Admin | Indicate whether you want to include the ColdFusion Administrator (the CFIDE directory). Including ColdFusion Administrator adds approximately 2 MB to the archive size and increases security risks. See the section "Securing the CFIDE Directory" Chapter 10, "Security in Shared and Hosted Environments," for details on securing the ColdFusion Administrator. | No |
Configure Data Sources to Be Included in Archive | The ColdFusion data sources to include in the J2EE archive. ODBC Socket data sources are not available. | No |