When you deploy ColdFusion on an existing version of JRun 4, you must expand the EAR file or WAR files manually before deployment.
If you are updating an existing deployment of ColdFusion MX, ColdFusion MX 6.1, or ColdFusion MX 7 for J2EE, you must undeploy ColdFusion MX, ColdFusion MX 6.1, or ColdFusion MX 7 for J2EE before you deploy ColdFusion 8, as described in Updating from an earlier version for J2EE.
Expand the EAR file
- Expand the EAR file by performing the following steps:
- 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)
- 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).
- In cfusion-ear, make a new directory named cfusion-war.
md cfusion-war (mkdir cfusion-war on UNIX)
- 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.
- (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)
- (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.
- 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)
- Open the cfusion-ear/META-INF/application.xml file in a text editor.
- 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.
- Save the application.xml file.
- Deploy ColdFusion 8 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.
- Review the server log (jrun_root/logs/servername-event.log) to ensure that ColdFusion 8 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 /
- Stop the JRun server that is running ColdFusion.
- Delete the jrun_root/servers/servername/default-ear directory and all subdirectories.
- Start the JRun server that is running ColdFusion.
- Ensure that the admin JRun server is running.
- 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).
- Click the server in the left pane.
- Click the cfusion Web Application.
- Change the context path to / (instead of /cfusion).
- Click Apply.
- 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 8 on JRun 4 as a WAR file
- 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.
- 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.
- 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.
- 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 cfmx_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.
- 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 cfmx_install_directory/rds.war
- 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.
- 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
- (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"
- 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.
- 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"
- To use cfregistry in Windows, to use the cfreport tag for Crystal Reports, and to use any C++ CFX custom tags, you must 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
- 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
- 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.
- Review the server log (jrun_root/logs/servername-event.log) to ensure that ColdFusion deployed successfully.
- Start the ColdFusion Administrator to run the Configuration Wizard.