Deploying ColdFusion 9 on JRun 4



When you deploy ColdFusion on an existing version of JRun 4, expand the EAR file or WAR files manually before deployment.

If you are updating an existing deployment of any previous versions of ColdFusion, undeploy them before you deploy ColdFusion 9, as described in Updating from an earlier version for J2EE.

Expand the EAR file

  1. Expand the EAR file by performing the following steps:

    1. Open a console window, navigate to the directory that contains the EAR file, and make a new directory named cfusion-ear:

      md cfusion-ear (mkdir cfusion-ear on 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 cfusion.war and rds.war (rds.war is not included if you specified a context root of / when you ran the installation wizard).

    3. In cfusion-ear, make a new directory named cfusion-war.

      md cfusion-war (mkdir cfusion-war on UNIX)
    4. Change to the cfusion-war directory and expand the cfusion.war file with the jar command:

      cd cfusion-war 
      java_root/bin/jar -xvf ../cfusion.war

      This expands the cfusion.war file.

    5. (If rds.war exists) Go up one level to cfusion-ear, make a new directory named rds-war.

      cd .. 
      md rds-war (mkdir rds-war on UNIX)
    6. (If rds.war exists) Change to the rds-war directory and expand rds.war with the jar command:

      cd rds-war 
      java_root/bin/jar -xvf ../rds.war

      This expands rds.war.

    7. Go up one level to the cfusion-ear file, and delete the cfusion.war and rds.war files:

      cd .. 
      del cfusion.war (rm cfusion.war on UNIX) 
      del rds.war (rm rds.war on UNIX)
    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). Change the web-uri element for rds.war to rds-war. A directory name in the web-uri element cannot contain a dot.

    10. Save the application.xml file.

  2. Deploy ColdFusion 9 by copying the cfusion-ear directory structure to the jrun_root/servers/servername directory. If auto deploy is enabled, JRun 4 either deploys the application immediately (if the JRun server is running), or when you start the JRun server.

  3. Review the server log (jrun_root/logs/servername-event.log) to ensure that ColdFusion 9 deployed successfully.

    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. By setting the context root to slash (/), you do not have to include the context root in the URL when accessing CFM pages.

Set the context root to /

  1. Stop the JRun server that is running ColdFusion.

  2. Delete the jrun_root/servers/servername/default-ear directory and all subdirectories.

  3. Start the JRun server that is running ColdFusion.

  4. Ensure that the admin JRun server is running.

  5. Start the JRun server instance "admin" and browse to http://localhost:8000 from a browser on the computer where JRun is installed to access the JRun Management Console (JMC).

  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.

    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.

Deploy ColdFusion 9 on JRun 4 as a WAR file

  1. Create a directory named cfusion.

    The directory can have any name, but these instructions assume a directory name of cfusion under your JRun server instance. This directory becomes the context root into which ColdFusion is deployed. For example, if you are installing ColdFusion in the default JRun server, the directory is /opt/jrun4/servers/default/cfusion.

  2. Create a directory named CFIDE.

    This directory is the context root into which the remote development service (RDS) application is deployed, for example, /opt/jrun4/servers/default/CFIDE.

  3. Stop the JRun server to which you want to deploy ColdFusion by using 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, by using the following commands:

    cd jrun_root/jrun4/servers/servername/cfusion  
    java_home/bin/jar -xvf cfusion_install_directory/cfusion.war 

    The directory jrun_root refers to 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. For example, if you installed ColdFusion in the default JRun server, replace servername with default.

  5. Navigate to the CFIDE directory and use the jar utility to uncompress the rds.war file, using the following commands:

    cd jrun_root/jrun4/servers/servername/CFIDE (or cd ../CFIDE) 
    java_home/bin/jar -xvf cfusion_install_directory/rds.war
  6. Configure JVM settings through the Settings panel of the JRun Management Console (JMC) or by using a text editor to modify the jrun_root/bin/jvm.config file. Ensure that the following entries are in the JVM classpath (java.class.path):

    WEB-INF/flex/jars
  7. To enable COM support (Windows only), add the following jIntegra binary directories to the JVM’s native library path (java.library.path):

    WEB-INF/cfusion/jintegra/bin 
    WEB-INF/cfusion/jintegra/bin/international
  8. (optional) To enable CORBA support, copy the vbjorb.jar file to the WEB-INF/cfusion/lib directory and define the following argument:

    -Xbootclasspath/a:"cf_webapp_root/WEB-INF/cfusion/lib/vbjorb.jar"
  9. To enable charting (UNIX only), define the following argument:

    -Djava.awt.graphicsenv=com.gp.java2d.ExGraphicsEnvironment"

    and specify

    com.gp.java2d.ExHeadlessGraphicsEnvironment

    instead of

    com.gp.java2d.ExGraphicsEnvironment.

  10. In addition to enabling sandbox security in the ColdFusion Administrator, the application server must be running a security manager (java.lang.SecurityManager) and you must define the following JVM arguments:

    -Djava.security.manager  
    -Djava.security.policy="cf_webapp_root/WEB-INF/cfusion/lib/coldfusion.policy"  
    -Djava.security.auth.policy="cf_webapp_root/WEB-INF/cfusion/lib/neo_jaas.policy"
  11. To use cfregistry in Windows, to use the cfreport tag for Crystal Reports, and to use any C++ CFX custom tags, add cfusion/lib to the Java library path. Add the following directory to the JVM’s native library path (java.library.path):

    WEB-INF/cfusion/lib
  12. If you are running Solaris without X Windows, to use the cfdocument tag, you must set the headless switch to true in the jvm.config file, as follows:

    java.awt.headless=true
  13. Start the JRun server the way you stopped it in step 3, either by 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.

  14. Review the server log (jrun_root/logs/servername-event.log) to ensure that ColdFusion deployed successfully.

  15. Start the ColdFusion Administrator to run the Configuration Wizard.