Accessibility
 
Home / Products / ColdFusion / Support
J2EE Support

Installing and Deploying ColdFusion MX 6.1 on Macromedia JRun 4

Macromedia ColdFusion MX 6.1 supports both a server configuration (which includes an embedded version of JRun) and J2EE configuration (which lets you deploy ColdFusion MX as a Java application running on a Java 2 Enterprise Edition (J2EE) application server.) When you run ColdFusion MX 6.1 in the J2EE configuration, you use the application server's deployment mechanism to deploy ColdFusion MX on a J2EE 1.3 compliant application server. The Installation Wizard lets you install ColdFusion MX as either an enterprise application or a web application. Macromedia JRun 4 supports either of these options.

About this document

Installing, deploying, and configuring ColdFusion MX 6.1

Usage notes

About this document

This document provides instructions for deploying ColdFusion MX in the J2EE configuration on JRun 4. It refers to overview information in Installing and Using ColdFusion MX, which is available on LiveDocs (English and Japanese only).

These instructions contain application server-specific instructions on installing a new copy of ColdFusion MX. For instructions on updating an existing ColdFusion MX J2EE Server installation to ColdFusion MX 6.1, and for configuration information that is common to all J2EE servers, see "Enabling and Using ColdFusion MX Features on Your J2EE Server" before continuing.

The discussions in this document describes ColdFusion MX enterprise application (EAR) deployment, web application (WAR) deployment, and configuration on JRun 4. Before continuing, you should read the ColdFusion MX 6.1 Release Notes.

Conventions in this document

This document uses the following conventions to reference JRun and ColdFusion directories:

  • cfmx_install_directory - The directory that contains the files extracted by the ColdFusion MX for J2EE installer; for example, C:\cfmx or /opt/cfmx.
  • jrun_root - The directory that contains JRun 4; for example, C:\JRun4 or /opt/jrun4.
  • cf_root - The directory into which you deployed ColdFusion MX web application; for example, C:\JRun4\servers\default\cfusion-ear\cfusion-war (enterprise application deployment) or C:\JRun4\servers\default\cfusion (web application deployment).
  • java_home - The root directory of your Java 2 software development kit (J2SDK); for example, C:\j2sdk1.4.1.

Installing, deploying, and configuring ColdFusion MX 6.1

You can deploy ColdFusion MX 6.1 on JRun 4 using either an EAR file or WAR files:

  • EAR file - Deploy ColdFusion MX 6.1 as an enterprise application with the ColdFusion web application located at the context root specified when running the Installation Wizard. Because EAR deployment automatically manages the context root, Macromedia recommends this option.
  • WAR files - Deploy ColdFusion MX 6.1 as one or more web applications.

The following procedures explain how to run the ColdFusion MX Installation Wizard, how to deploy ColdFusion MX 6.1 using an EAR file, how to deploy ColdFusion MX 6.1 using WAR files, and how to configure JRun Java virtual machine (JVM) settings for ColdFusion MX.

Note: If you are updating a currently deployed version of ColdFusion MX on JRun, see the instructions in Enabling and Using ColdFusion MX Features on Your J2EE Server before continuing.

To install ColdFusion MX 6.1 on JRun 4:

  1. Run the ColdFusion MX 6.1 Installation Wizard, downloading and executing the platform-specific installer:
    • Windows - coldfusion-61-win.exe
    • Linux - coldfusion-61-lin.bin
    • Solaris - coldfusion-61-sol.bin
    • Other platforms - coldfusion-61-other.jar (run with java_home/bin/java -jar coldfusion-61-other.jar -i console)

    These installers are available from the CD or on the Macromedia website. There is no JRun-specific installer; you can download any version that matches your platform.

  2. Answer the questions. When prompted, do the following:
    1. Select Enterprise Edition, Developer Edition, Trial, or upgrade, as appropriate.
    2. Select J2EE configuration/WAR file
    3. Specify the installation directory
    4. Specify a password for use with the ColdFusion MX Administrator.

    The Installation Wizard places the EAR file or WAR files in the install directory.

  3. Deploy ColdFusion MX through either Deploying ColdFusion MX 6.1 as an enterprise application or Deploying ColdFusion MX 6.1 as a web application, as appropriate.

Deploying ColdFusion MX 6.1 as an enterprise application

When you deploy ColdFusion MX as an enterprise application, you expand the cfusion.ear file manually, expand the web applications it contains, and then deploy the expanded directory structure.

To deploy ColdFusion MX 6.1 on JRun 4 as an EAR file:

  1. Expand the EAR file by doing the following:
    1. Open a console window, navigate to the directory that contains the EAR file, and make a new directory named cfusion-ear:
      cd cfmx_install_directory
      md cfusion-ear (Windows)
      or
      mkdir cfusion-ear (UNIX)
      
    2. Change to the cfusion-ear directory and expand the cfusion.ear file with the jar command:
      cd cfusion-ear
      java_home/bin/jar -xvf ../cfusion.ear
      

      This expands the cfusion.ear file into the cfusion.war and rds.war files. The rds.war file is not included if you specified a context root of / when running the Installation Wizard.

    3. In the cfusion-ear directory, make a new directory named cfusion-war.
      md cfusion-war (Windows)
      or
      mkdir cfusion-war (UNIX)
      
    4. Change to the cfusion-war directory and expand the cfusion.war file with the jar command:
      cd cfusion-war
      java_home/bin/jar -xvf ../cfusion.war
      
    5. (If the rds.war file exists) Go up one level to the cfusion-ear directory, make a new directory named rds-war. Skip this step if the Installation Wizard did not create an rds.war file:
      cd ..
      md rds-war (mkdir rds-war on UNIX)
      
    6. (If the rds.war file exists) Change to the rds-war directory and expand the rds.war file with the jar command Skip this step if the Installation Wizard did not create an rds.war file:
      cd rds-war
      java_home/bin/jar -xvf ../rds.war
      
    7. Go up one level to the cfusion-ear directory, and delete the cfusion.war and rds.war files:
      cd ..
      del cfusion.war (on UNIX, use rm instead of del)
      del rds.war
      
    8. Open the cfusion-ear/META-INF/application.xml file in a text editor.
    9. A directory name in the web-uri element cannot contain a dot. Change the web-uri element from cfusion.war to cfusion-war (or the name of the directory that contains the expanded cfusion.war file).
    10. If there is a web-uri element for rds.war, change it to rds-war (or the name of the directory that contains the expanded rds.war file).
    11. Save the application.xml file.
  2. Stop the JRun server to which you will deploy ColdFusion MX. Use the JRun Launcher (jrun_root/bin/jrun) or type jrun_root/bin/jrun stop servername in a console window.
  3. Copy the cfusion-ear directory structure to the jrun_root/servers/servername directory.
  4. Configure JVM settings, as described in Configuring JVM settings.
  5. Start the JRun server using the JRun Launcher or by typing jrun_root/bin/jrun start server_name in a console window. If autodeploy is enabled, JRun 4 deploys the application automatically when you start the JRun server.
  6. Review the server log (jrun_root/logs/servername-event.log) to ensure that ColdFusion MX deployed successfully.
  7. Start the ColdFusion MX Administrator and run the Configuration Wizard. You start the Administrator using a URL of the form http://hostname:portnumber/context-root/CFIDE/administrator/index.cfm, as follows:
    • hostname - The machine name, IP address, localhost, or 127.0.0.1.
    • portnumber - The port number of the JRun web server. For the default JRun server, this is 8100.
    • context-root - The context root specified when running the Installation Wizard.
  8. Code and test ColdFusion MX (CFM) pages. Store these pages in the cfusion-war web application root directory. For example, to display a CFM file located at jrun_root/servers/default/cfusion-war/eisapp/index.cfm, with a context root of cfusion, you could specify the URL as http://127.0.0.1:8100/cfusion/eisapp/index.cfm.

Deploying ColdFusion MX 6.1 as a web application

When you deploy ColdFusion MX as a web application, you expand the cfusion.war and rds.war files manually and then deploy the expanded directory structures. When deploying ColdFusion MX as a web application, note the following related to the context root:

  • When using WAR deployment, JRun uses the directory name of the expanded cfusion.war file as the context root. You can optionally modify the context root, as described in Setting the context root to slash.
  • You must deploy the rds.war file to a context root of /CFIDE (all uppercase). When deploying on JRun, this means that you should expand the rds.war file into a directory named CFIDE.

To deploy ColdFusion MX 6.1 on JRun 4 as a WAR file:

  1. Create a new directory named cfusion (it can be any name, but these instructions assume a directory name of cfusion) under your JRun server instance. This directory will become the context root into which ColdFusion MX is deployed; for example, if you are installing ColdFusion MX in the default JRun server, the directory might be /opt/jrun4/servers/default/cfusion.
  2. Create a new directory named CFIDE (all uppercase) under your server instance. This directory will become the context root into which the remote development service (RDS) redirectory application is deployed; for example, /opt/jrun4/servers/default/CFIDE.
  3. Stop the JRun server to which you will deploy ColdFusion MX. Use the JRun Launcher (jrun_root/bin/jrun) or type jrun_root/bin/jrun stop server_name in a console window.
  4. If you haven't done so already, open a console window, navigate to the cfusion directory, and use the jar utility to uncompress the cfusion.war file:
    cd jrun_root/jrun4/servers/servername/cfusion 
    java_home/bin/jar -xvf cfmx_install_directory/cfusion.war 
    

    Note: In these instructions, replace jrun_root with the directory in which you installed JRun 4; for example, C:\JRun 4 or /opt/jrun4. Replace servername with the name of the server to which you are deploying ColdFusion MX; for example, if you installed ColdFusion MX in the default JRun server, replace server_name with default.

  5. Navigate to the CFIDE directory and use the jar utility to uncompress the rds.war file:
    cd jrun_root/jrun4/servers/servername/CFIDE (or cd ../CFIDE)
    java_home/bin/jar -xvf cfmx_install_directory/rds.war
    
  6. Configure JVM settings, as described in Configuring JVM settings.
  7. Start the JRun server using the JRun Launcher or by typing jrun_root/bin/jrun start server_name in a command window. If autodeploy is enabled, JRun 4 deploys the application automatically when you start the JRun server.
  8. Review the server log (jrun_root/logs/servername-event.log) to ensure that ColdFusion MX deployed successfully.
  9. Start the ColdFusion MX Administrator and run the Configuration Wizard. You start the Administrator using a URL of the form http://hostname:portnumber/context-root/CFIDE/administrator/index.cfm, as follows:
    • hostname - The machine name, IP address, localhost, or 127.0.0.1.
    • portnumber - The port number of the JRun web server. For the default JRun server, this is 8100.
    • context-root - The context root, which is typically the same as the ColdFusion web application directory name.
  10. Code and test ColdFusion MX CFM pages. Store these pages in the ColdFusion web application root directory. For example, to display a CFM file located at jrun_root/servers/default/cfusion/eisapp/index.cfm, you could specify the URL as http://127.0.0.1:8100/cfusion/eisapp/index.cfm.

Configuring JVM settings

Although you can deploy ColdFusion MX without configuring JVM arguments, it's best to perform this step before deploying for the first time. ColdFusion MX requires this configuration because certain types of ColdFusion MX functionality require server-specific environment settings. Additionally certain ColdFusion MX features use platform-specific binary files (that is, compiled C++ files, not Java bytecode), which are provided for Windows, Solaris, and Linux.

Note: If your JRun version runs on an operating system other than Windows, Solaris, or Linux, you can still run ColdFusion MX, but platform-specific functionality is unavailable.

In JRun, you define JVM arguments through the JRun Management Console (JMC) or by modifying the java.library.path, java.class.path, and java.args lines in the jrun_root/bin/jvm.config file, as follows:

  • Specify platform-specific items through the java.library.path line.
  • Add directories and JAR files to the JRun classpath through the java.class.path line.
  • Specify Java arguments through the java.args line.

Classpath configuration

You must add ColdFusion MX classes to the JRun classpath. Use either of the following methods:

  • Using the JMC - Under Settings, enter the following directories in the New Classpath field, then click Add:
    cf_root/WEB-INF/cfusion/lib
    

    Click Update at the bottom of the Settings page.

  • Modifying the jvm.config file - Using a text editor, modify the jrun_root/bin/jvm.config file with the following entry for java.class.path:
    cf_root/WEB-INF/cfusion/lib
    

ColdFusion MX includes version 1.4.2 of the tools.jar file in the cf_root/WEB-INF/cfusion/lib directory. If the version of the tools.jar file in your application server's Jave runtime environment (JRE) is different from the version of the tools.jar file in cf_root/WEB-INF/cfusion/lib, you should rename or delete cf_root/WEB-INF/cfusion/lib/tools.jar to ensure that your application server's tools.jar file is used.

Charting

You must configure settings to enable use of the cfchart tag. You specify the following arguments:

  • -Xbootclasspath - Specify the path to webchartsJava2D.jar.
  • (UNIX only) -Djava.awt.graphicsenv - Specify either com.gp.java2d.ExGraphicsEnvironment (JDK 1.4.0 and lower) or com.gp.java2d.ExHeadlessGraphicsEnvironment (JDK 1.4.1 and higher)

Use either of the following methods:

  • Using the JMC - Under Settings, enter the following path in the VM arguments field:

    -Xms32m -Xbootclasspath/a:cf_root/WEB-INF/cfusion/lib/webchartsJava2D.jar -Djava.awt.graphicsenv=com.gp.java2d.ExGraphicsEnvironment
    

    Click Update at the bottom of the Settings page.

  • Modifying the jvm.config file - Using a text editor, modify the jrun_root/bin/jvm.config file with the following entry for java.args:

    java.args=-Xmx128M -Xms32m -Xbootclasspath/a:cf_root/WEB-INF/cfusion/lib/webchartsJava2D.jar -Djava.awt.graphicsenv=com.gp.java2d.ExGraphicsEnvironment 
    

Note: For JDK 1.4.1 and later versions, specify com.gp.java2d.ExHeadlessGraphicsEnvironment instead of com.gp.java2d.ExGraphicsEnvironment.

Verity

Add Verity binary directories to the JVM's native library path (java.library.path). Use either of the following methods

  • Using the JMC - Under Settings, enter each of the following paths in the New JNI Library Path field, then click Add:
    cf_root/cfusion/WEB-INF/cfusion/lib
    cf_root/cfusion/WEB-INF/cfusion/lib/platform/bin
    

    Replace platform with _nti40, _solaris, or _ilnx21, as appropriate for your platform.

    Click Update at the bottom of the Settings page.

  • Modifying the jvm.config file - Using a text editor, modify the jrun_root/bin/jvm.config file, appending the following entry for java.library.path (all on one line):
    cf_root/WEB-INF/cfusion/lib,cf_root/WEB-INF/cfusion/lib/platform/bin 
    

    Replace platform with _nti40, _solaris, or _ilnx21, as appropriate for your platform.

COM (Windows only)

Add jIntegra binary directories to the JVM's native library path (java.library.path). Use either of the following methods:

  • Using the JMC - Under Settings, enter each of the following paths in the New JNI Library Path field, then click Add:
    cf_root/WEB-INF/cfusion/jintegra/bin
    cf_root/WEB-INF/cfusion/jintegra/bin/international
    

    Click Update at the bottom of the Settings page.

  • Modifying the jvm.config file - Using a text editor, modify the jrun_root/bin/jvm.config file, appending the following entry for java.library.path (all on one line):

    cf_root/WEB-INF/cfusion/jintegra/bin,cf_root/WEB-INF/cfusion/jintegra/bin/international
    

You must also define JVM arguments. Use either of the following methods:

  • Using the JMC - Under Settings, add the following (all on one line) in the VM arguments field, then click Add:
    -DJINTEGRA_NATIVE_MODE -DJINTEGRA_PREFETCH_ENUMS
    

    Click Update at the bottom of the Settings page.

  • Modifying the jvm.config file - Using a text editor, modify the jrun_root/bin/jvm.config file, appending the following entry for java.args (all on one line):
    -DJINTEGRA_NATIVE_MODE -DJINTEGRA_PREFETCH_ENUMS
    

Security

If your application uses sandbox security, you must enable sandbox security in the ColdFusion MX Administrator, the application server must be running a security manager (java.lang.SecurityManager), and you must define JVM arguments. Use either of the following methods to define JVM arguments:

  • Using the JMC - Under Settings, add the following (all on one line) in the VM arguments field, then click Add:

    -Djava.security.manager "-Djava.security.policy=cf_root/WEB-INF/cfusion/lib/coldfusion.policy" "-Djava.security.auth.policy=cf_root/WEB-INF/cfusion/lib/neo_jaas.policy"
    

    Ensure that you click Update at the bottom of the Settings page.

  • Modifying the jvm.config file - Using a text editor, modify the jrun_root/bin/jvm.config file, appending the following entry for java.args (all on one line):

    -Djava.security.manager "-Djava.security.policy=cf_root/WEB-INF/cfusion/lib/coldfusion.policy" "-Djava.security.auth.policy=cf_root/WEB-INF/cfusion/lib/neo_jaas.policy"
    

CORBA

If your ColdFusion MX application uses CORBA, copy the vbjorb.jar file to cf_root/WEB-INF/cfusion/lib, and define JVM arguments. Use either of the following methods:

  • Using the JMC - Under Settings, append the following (all on one line) in the VM arguments field, then click Add:
    -Xbootclasspath/a:cf_root/WEB-INF/cfusion/lib/vbjorb.jar
    

    Click Update at the bottom of the Settings page.

  • Modifying the jvm.config file - Using a text editor, modify the jrun_root/bin/jvm.config file, appending the following entry for java.args (all on one line):
    -Xbootclasspath/a:cf_root/WEB-INF/cfusion/lib/vbjorb.jar
    

Usage notes

This section describes issues related to running ColdFusion MX 6.1 on JRun 4.

Disabling RDS

For security reasons, Macromedia recommends that you disable RDS on a production server.

To disable RDS:

  1. Disable the ColdFusion MX web module RDS Servlet, as described in Enabling and Using ColdFusion MX Features on Your J2EE Server.
  2. If your ColdFusion MX application context root is not /, delete the RDS web application from the JRun server by stopping the JRun server, deleting the jrun_root/servers/server_name/CFIDE directory, and starting the JRun server.

If RDS is disabled, the Browse Server button does not work in the ColdFusion MX Administrator (for example, on the ColdFusion Mappings page).

Undeploying ColdFusion MX 6.1

To undeploy ColdFusion MX:

  1. Stop the JRun server.
  2. Make a backup copy of the jrun_root/bin/jvm.config file.
  3. Open the jrun_root/bin/jvm.config file in a text editor and remove all ColdFusion MX specifications from the java.args, java.library.path, and java.class.path lines.
  4. (Windows only) If you installed ODBC support, remove the ODBC Windows services by navigating to the cf_root\WEB_INF\cfusion\db\SequeLink Setup directory and executing the RemoveSequeLink.bat file.
  5. Delete the jrun_root/servers/server_name/cfusion and jrun_root/servers/server_name/CFIDE directories.
  6. Start the JRun server.

Setting the context root to slash

By setting the context root to slash (/), you do not have to include the context root in the URL when accessing CFM pages.

To set the context root to /:

  1. Stop the JRun server that is running ColdFusion MX.
  2. Delete the jrun_root/servers/servername/default-ear directory and all subdirectories.
  3. Start the JRun server that is running ColdFusion MX.
  4. Ensure that the admin JRun server is running.
  5. Start the JMC (http://localhost:8000).
  6. Click the server in the left pane.
  7. Click the cfusion Web Application.
  8. Change the context path to / (instead of /cfusion).
  9. Click Apply.
  10. Restart the JRun server that is running ColdFusion MX.