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.

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:

Setting Description

Archive Type

Select EAR or WAR.

Context Root (EAR only)

Each J2EE web application running in a server is rooted at a unique base URL, called a context root (or 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 /.

Serial Number

Specifies a ColdFusion MX Enterprise Edition serial number. If you do not 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.

COM Support

If your application doesn't use COM support, you can reduce the size of the archive file by omitting the supporting files.

Debugging

If the current ColdFusion MX server is running with debugging enabled, you can disable debugging in the application contained in the archive file.

Include CFML Source

You can optionally deploy Java bytecode instead of CFML source code. For more information, see Sourceless distribution.

ColdFusion MX Administrator

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.

Data Sources

Specifies the data source definitions to include in the archive file.

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 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.


View comments in LiveDocs