Accessibility
 
Home / Products / ColdFusion / Support
J2EE Support

Installing and Deploying ColdFusion MX 6.1 on BEA WebLogic 7 and 8

Macromedia ColdFusion MX 6.1 supports a 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 an enterprise application or as a web application.

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 BEA WebLogic 7 and 8. It refers to overview information in Installing and Using ColdFusion MX, which is available on LiveDocs (English and Japanese only).

Before continuing, you should read the ColdFusion MX 6.1 Release Notes.

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.

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.
  • wl_root - The directory that contains WebLogic; for example, C:\bea.
  • wldomain_root - The directory that contains the WebLogic domain into which ColdFusion MX is deployed.
  • cf_root - The directory into which WebLogic deployed the ColdFusion MX web application; for example, C:\bea\user_projects\cfdomain\applications\cfusion-ear\cfusion-war.
  • 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 BEA WebLogic 7 or 8 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. These instructions do not cover WAR-file deployment.

The following procedures explain how to run the ColdFusion MX Installation Wizard, how to deploy ColdFusion MX 6.1 using an EAR file, 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 WebLogic 7 or 8:

  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 WebLogic-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/EAR file.
    3. Specify the installation directory.
    4. Specify a password for use with the ColdFusion MX Administrator.

    The Installation Wizard places the EAR file in the install directory.

  3. Determine the domain in which to deploy ColdFusion MX. Optionally, create a domain.
  4. Because ColdFusion MX must run out of an expanded directory structure, expand the cfusion.ear file manually, and expand the web applications it contains by doing the following:
    1. Open a console window, navigate to the directory that contains the EAR file, and create a 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, create a 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
      

      If the Installation Wizard did not create an rds.war file, skip to step g.

    5. (If the rds.war file exists) Go up one level to the cfusion-ear directory, make a new directory named rds-war:
      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:
      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. Change the web-uri element from cfusion.war to cfusion-war (or the name of the directory that contains the expanded cfusion.war file), because a directory name in the web-uri element cannot contain a dot.
    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.
  5. Open the wl_root/weblogic700/server/lib/weblogic.policy file (the path to this file is different in WebLogic 8) in a text editor, comment out the restrictive permissions, and add permission java.security.AllPermission; to the default permissions section, as the following example shows:

    ...
    
    // Default permissions that need to be granted to applications at this point
    grant {
      permission java.security.AllPermission;
      /*
      permission java.io.SerializablePermission "enableSubstitution";
    ...
      permission java.util.PropertyPermission "*", "read,write";
      */
    };
    ...
    

  6. Deploy the cfusion-ear directory structure using your site-specific WebLogic deployment method. For example, you might stop the WebLogic server, copy the cfusion-ear directory structure to the wldomain_root/applications directory, and restart the server. You can also deploy the cfusion-ear enterprise application through the WebLogic Console.
  7. Review the console messages and server log to ensure that ColdFusion MX deployed successfully.
  8. 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 WebLogic web server. For example, 7001.
    • context-root - The context root that you specified in the Installation Wizard.
  9. Successful login to the ColdFusion MX Administrator is a confirmation that the install procedure was successful. However, you must perform the tasks described in Editing the server startup script before complete ColdFusion MX functionality is available.
  10. 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 wl_root/user_projects/domain1/applications/cfusion-ear/cfusion-war/eisapp/index.cfm, with a context root of cfusion, you could specify the URL as http://127.0.0.1:7001/cfusion/eisapp/index.cfm.

Editing the server startup script

To enable full ColdFusion MX functionality, you must customize JVM arguments in the WebLogic server startup script. 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.

To enable support for Verity, COM, graphing, and sandbox security:

  1. Locate the startup script for the WebLogic domain. This is typically wldomain_root/startWebLogic.cmd (Windows) or wldomain_root/startWebLogic.sh (UNIX).
  2. Make a backup copy of this file.
  3. Open the startup script.
  4. Establish the following basic variables at the beginning of the script:
    • CF_WEB_INF
    • CF_SHARED_LIB_DIR

    For example:

    Windows:

    SET CF_WEB_INF=cf_root\%CF_HOME%\WEB-INF
    SET CF_SHARED_LIB_DIR=%CF_WEB_INF%\cfusion\lib
    

    UNIX:

    CF_WEB_INF=cf_root/WEB-INF
    CF_SHARED_LIB_DIR=${CF_WEB_INF}/cfusion/lib
    
  5. Enable access to Verity binary files through the following variables:
    • CF_SHARED_LIBS
    • LD_LIBRARY_PATH (UNIX only)

    For example:

    Windows:

    @rem Set up shared library path for CFMX to pick up Verity
    @rem shared libs. Use path syntax - entries separated by colon.
    SET CF_SHARED_LIBS=%CF_SHARED_LIB_DIR%;%CF_SHARED_LIB_DIR%\_nti40\bin
    

    UNIX:

    # Set up shared library path for CFMX to pick up Verity
    # shared libs. Use path syntax - entries separated by colon.
    # Use _solaris/bin for Solaris and _ilnx21/bin for Linux
    # CF_SHARED_LIBS="${CF_SHARED_LIB_DIR}:${CF_SHARED_LIB_DIR}/_solaris/bin"
    CF_SHARED_LIBS="${CF_SHARED_LIB_DIR}:${CF_SHARED_LIB_DIR}/_ilnx21/bin"
    LD_LIBRARY_PATH="${CF_SHARED_LIBS}:${LD_LIBRARY_PATH}"
    

  6. (Windows only) Enable ColdFusion MX Jintegra COM support by establishing the following variables:
    • JINTEGRA_PATH
    • PRE_CLASSPATH
    • PRE_PATH

    For example:

    SET JINTEGRA_PATH= %CF_WEB_INF%\cfusion\jintegra\bin; %CF_WEB_INF%\cfusion\jintegra\bin\international
    SET PRE_CLASSPATH=%CF_SHARED_LIB_DIR%\jintegra.jar
    SET PRE_PATH=%CF_SHARED_LIBS%;%JINTEGRA_PATH%
    

    Note: Alternatively, you can use WebLogic JCOM support instead of ColdFusion MX JIntegra COM support. To use WebLogic JCOM support, see Enabling WebLogic jCOM support (Windows only).

  7. Enable ColdFusion MX security and graphing support by establishing or appending to the following variables:
    • CF_SECURITY_JVM_OPTIONS
    • CF_GRAPHING_JVM_OPTIONS
    • MEM_ARGS (append -Xms32m -Xmx256m -Xss64k -XX:MaxPermSize=128m to the existing MEM_ARGS line of the startup script)
    • JAVA_OPTIONS (append the CF_SECURITY_JVM_OPTIONS and CF_GRAPHING_JVM_OPTIONS variables to the existing JAVA_OPTIONS line of the startup script)

    For example:

    Windows:

    @rem Security options are only required if enabling sandbox security
    SET CF_SECURITY_JVM_OPTIONS="-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"
    SET CF_GRAPHING_JVM_OPTIONS=
      "-Xbootclasspath/a:%CF_SHARED_LIB_DIR%\webchartsJava2D.jar"
    @rem You must append %CF_SECURITY_JVM_OPTIONS% and %CF_GRAPHING_JVM_OPTIONS% 
    @rem to the existing JAVA_OPTIONS value.
    @rem You must append the following to the existing MEM_ARGS value.
    @rem -Xms32m -Xmx256m -Xss64k -XX:MaxPermSize=128m
    

    UNIX:

    # Security options are only required if enabling sandbox security
    CF_SECURITY_JVM_OPTIONS="-Djava.security.manager"
    # For CF_GRAPHING_JVM_OPTIONS, on JDK 1.4.1 and higher, specify
    # com.gp.java2d.ExHeadlessGraphicsEnvironment instead of
    # com.gp.java2d.ExGraphicsEnvironment
    CF_GRAPHING_JVM_OPTIONS="\
      -Xbootclasspath/a:${CF_SHARED_LIB_DIR}/webchartsJava2D.jar \
      -Djava.awt.graphicsenv=com.gp.java2d.ExGraphicsEnvironment \
    "
    # You must append ${CF_SECURITY_JVM_OPTIONS} and ${CF_GRAPHING_JVM_OPTIONS}
    # to the existing JAVA_OPTIONS value.
    # JAVA_OPTIONS="default java options ${CF_SECURITY_JVM_OPTIONS} ${CF_GRAPHING_JVM_OPTIONS}"
    # You must append the following to the MEM_ARGS variable coded
    # in the server startup file:
    # "-Xmx512m -XX:MaxPermSize=128m"
    

  8. Save the startup script and restart the WebLogic Server.

Usage notes

This section describes issues related to running ColdFusion MX 6.1 on WebLogic 7 and 8.

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 /, disable the RDS web application by commenting out the RDS web application in the cfusion-ear/META-INF/application.xml file or by modifying the enterprise application deployment descriptor in the WebLogic Console.

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

Enabling WebLogic jCOM support (Windows only)

ColdFusion MX includes jIintegra COM support, which you enable through the WebLogic Server startup script. Alternatively, you can use WebLogic jCOM.

Note: ColdFusion MX jIntegra COM support uses native mode, which disables COM objects that use DCOM. WebLogic jCOM supports DCOM or native mode, however, ColdFusion MX COM functionality requires native mode.

To use WebLogic jCOM as the ColdFusion MX Java to COM bridge:

  1. Omit the COM support step in "Editing the server startup script".
  2. Enable jCOM support by opening the WebLogic Administrator, navigating to domainname > Servers > servername > connections >JCOM, and selecting enable COM, enable Native Mode, and Prefetch ENums.
  3. Open a console window, navigate to wl_root\weblogic700\server\bin (the path to this file is different in WebLogic 8), and execute the regjvmcmd tool to register the JVM for COM, as the following example shows:
    regjvmcmd /native servername
    

Undeploying ColdFusion MX 6.1

To undeploy ColdFusion MX:

  1. (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.
  2. Open the WebLogic Administrator.
  3. Open the WebLogic Administration Console (http://hostname:portnumber/console) and go to domainname > Deployments > Applications.
  4. Click the trash can to the right of the ColdFusion MX application.
  5. Click Yes.
  6. The WebLogic Administrator undeploys the web application.
  7. Open the startup script for the WebLogic domain and remove ColdFusion MX-specific entries, as follows:
    • CF_WEB_INF
    • CF_SHARED_LIB_DIR
    • CF_SHARED_LIBS (also remove CF_SHARED_LIBS from PRE_PATH)
    • LD_LIBRARY_PATH (UNIX only, remove ${CF_SHARED_LIBS})
    • (Windows only) JINTEGRA_PATH (also remove JINTEGRA_PATH from PRE_PATH)
    • (Windows only) Remove jintegra.jar from PRE_CLASSPATH
    • CF_SECURITY_JVM_OPTIONS
    • CF_GRAPHING_JVM_OPTIONS
    • Remove ColdFusion MX arguments from MEM_ARGS
    • Remove CF_SECURITY_JVM_OPTIONS and CF_GRAPHING_JVM_OPTIONS from JAVA_OPTIONS

    For more information, see Editing the server startup script.

  8. Stop and restart the WebLogic Server.
  9. Delete the cf_root directory.