Installing multiple versions of CFMX on JRun
Published on February 08, 2005
By Pete Freitag
By Pete Freitag
I like to setup my development machine with different versions ColdFusion, but all with the same web root. I setup a server for each instance, so I can use the same url on different ports (eg CFMX 6 on port 8600, CFMX 7 on port 8700, etc). Every time I want to setup a new version I always forget what I need to do, so I'm blogging it this time. There may be better ways to do this, but this is how I do it:
- Step one Install JRun 4, and the latest service packs
- Login to the JRun Management Console, and create a new server, set the port number you want to use for this instance.
- Delete the default-ear directory in your new server directory (eg c:\jrun\servers\cfmx\default-ear)
- Start your new server
- Delete the flash Remoting Ear (this will conflict with CFMX's flash remoting, if you want to use JRun flash remoting as well, you should do it on another server instance, or rename the context root to something other than /flashservices
- Stop your server
- Run the ColdFusion MX installer and create a new Ear file with context path / and save it into the new server directory (eg c:\jrun\servers\cfmx\cfusion.ear)
- Start your server (this may take a while)
- Click on your server, then on your Macromedia ColdFusion MX Application, then on the Macromedia Coldfusion MX Web application. Select the check boxes (if you want directory browsing, etc)
- Enter / for the context path
- Enter your shared web root under Document Root (eg c:\inetpub\wwwroot\)
- Click Apply
- Now browse to your web root, you will notice that you can click on cfm files in the web root, and they will load, but if you click on anything else, you get a 404, so we need to fix this. You will also notice a size of zero on all the files.
- Go to your jrun server directory, go in to the
SERVER-INF/temp
directory, look for a directory called something likecfusion.war1563749329
(the numbers on the end will be different for you), copy the CFIDE, and WEB-INF directories to your jrun server root. - Edit the file: cfusion.web.jrun.xml in your JRun server root
- Look for a virtual mapping
<resource-path>/</resource-path>
and change it to<resource-path>/*</resource-path>
- You also need to add mappings for /CFIDE and /WEB-INF:
<virtual-mapping> <resource-path>/CFIDE/*</resource-path> <system-path>c:\jrun\servers\cfmx\CFIDE</system-path> </virtual-mapping> <virtual-mapping> <resource-path>/WEB-INF/*</resource-path> <system-path>c:\jrun\servers\cfmx\WEB-INF</system-path> </virtual-mapping> <virtual-mapping> <resource-path>/*</resource-path> <system-path>c:\inetpub\wwwroot</system-path> </virtual-mapping>
- Now restart your JRun server, and things should be working.
Installing multiple versions of CFMX on JRun was first published on February 08, 2005.
If you like reading about jrun, coldfusion, install, or j2ee then you might also like:
- J2EE Session Cookies on ColdFusion / JRun
- SessionRotate solution for JEE Sessions
- HashDOS and ColdFusion
The Fixinator Code Security Scanner for ColdFusion & CFML is an easy to use security tool that every CF developer can use. It can also easily integrate into CI for automatic scanning on every commit.
Try Fixinator
CFBreak
The weekly newsletter for the CFML Community
Comments
Thanks for the write up! Isn't it better to explode the ear file for this?
by Douglas Knudsen on 02/10/2005 at 10:13:36 AM UTC
Douglas, the EAR file will be exploded automatically by jrun, when you place it in the jrun server directory.
by Pete Freitag on 02/10/2005 at 10:40:42 AM UTC
right, I had just read in the deployment section of the cfmx-j2ee-readme.txt file that comes with ur ear/war
* For other app servers (such as JRun and WebLogic), when you deploy,
they expand the EAR/WAR file into a temp directory and (conceptually,
at least), the EAR/WAR file is still the application. For these
application servers, you must first expand the EAR/WAR file and then
deploy the expanded directory structure.
This is righteous stuff for CF for sure. The PITA I'm having is setting up a url like http://foo.com/app to use a particular CF instance and http://foo.com/app to use a different instance all under IIS. I figure out how, but its a pain. You think this would be easier under apache?
* For other app servers (such as JRun and WebLogic), when you deploy,
they expand the EAR/WAR file into a temp directory and (conceptually,
at least), the EAR/WAR file is still the application. For these
application servers, you must first expand the EAR/WAR file and then
deploy the expanded directory structure.
This is righteous stuff for CF for sure. The PITA I'm having is setting up a url like http://foo.com/app to use a particular CF instance and http://foo.com/app to use a different instance all under IIS. I figure out how, but its a pain. You think this would be easier under apache?
by Douglas Knudsen on 02/10/2005 at 11:33:03 AM UTC
I'm trying to install one version of cf on jrun and can't make it happen. JRun is so foreign to me that I can't figure out the issue...any solutions?
by Craig on 02/22/2005 at 10:40:07 PM UTC
I'm having the same trouble. I'm doing the above to get CFMX7 on my machine. I follow all the steps, get it all working, but can't load cfms, they come up 404 null. Any thoughts?
by John on 08/25/2005 at 9:21:08 PM UTC
Hi Douglas/Pete,
How can we setup URL like http://foo.com to use the default instance and http://foo.com:8301 to use another instance? I need to set this up so it works for all our dev site (about 200).
This will allow us to run the code debugger on 8301 instance.
Thanks,
Sumit
How can we setup URL like http://foo.com to use the default instance and http://foo.com:8301 to use another instance? I need to set this up so it works for all our dev site (about 200).
This will allow us to run the code debugger on 8301 instance.
Thanks,
Sumit
by Sumit Verma on 12/16/2008 at 3:04:38 PM UTC
Too many compliments too little space, tahnks!
by Takeo on 08/21/2011 at 11:17:14 AM UTC