Multiple ColdFusion Versions and Engines on Adobe ColdFusion with JRUN

June 13, 2010 by Mike Henke    9 Comments
Posted under: ColdFusion · jrun · OpenBD · Railo

This tutorial will show how using Adobe ColdFusion server with Multiserver configuration, so you can have multiple ColdFusion engines / version running. I think the approach is useful since most Adobe ColdFusion developers probably have Adobe ColdFusion setup as Multiple Instances.

This approach allows easier ability to get started with a different CF version or engine without adding Apache or another application server like Tomcat or Resin.

Another feature is with JRUN, I am able to point the instances to one code base. Essentially, JRUN4 has a feature that I can't duplicate with Tomcat allowing me to point to one codebase folder.

There are other blog entries on using JRUN with other CFML versions and engines:

http://www.andreacfm.com/post.cfm/installing-railo-on-jrun4

http://corfield.org/entry/Railo__ColdFusion_on_JRun

This approach differs slightly by using the JRUN administrator and not exploding the war file manually.

Prep

Install Adobe ColdFusion 8 (ACF 8) or Adobe ColdFusion 9 (ACF 9) as Multiserver Configuration.

Review the Installing Multiple Versions of ColdFusion Together slides if you aren't familar with the installation wizard up to slide 12.

Depending on if you installed ACF 8 or ACF 9, run the other version installation process and select J2EE configation and war file. See slide 13 but select war.

Okay, so we have one version of Adobe ColdFusion running using a port, example: http://localhost:830X , and a war file for the other ACF version.

Adding New JRUN instance

Now go to the JRUN4 admin page http://localhost:8000

If the page doesn't load, make sure you have the instance started. For me, I go to my Services window and start "Macromedia JRun Admin Server".

Create New Server

After logged in, Select "Create New Server" along the top of the home page. My case, I had ACF 8 installed as Multiserver configuration, so I am creating a new jrun instance for ACF 9.

Select "Create Server, then  jot down the port number for this new jrun instance, select "Finish".

Now, copy the ACF war for the other ACF version you created and paste it in the JRun server path you created. In my example it is C:\JRun4\servers\cf9. We can delete the default-ear created by JRUN.

Next within the JRUN administration page, press the start button near the instance we just created. Once started, the row will turn white from orange. Select the name link, our example is CF9. When we started our cf9 instance, it automatically deploy the war we moved into C:\JRun4\servers\cf9.

Now, select the link in the Web Applications section. On the next page  in the "Context Path" field, place / . And "Document Root" field put in your code base location. For me, I put in "C:\Users\Owner\Desktop\github\cfwheels".

Now, select Apply. You may get an deployment error but it seems to be a false error message. Now in your browser put in "http://localhost:830X/CFIDE/administrator/index.cfm" and finish the installation process for this version of Adobe ColdFusion.

Summary of what we have now. We have two versions of ACF running on different ports.

Railo

Download the Railo war file and repeat the process for Create New Server.

I noticed I need the index.cfm for Railo on JRUN4. If used http://localhost:830X/ I would get a 403 Forbidden message.

OpenBD

The process should work for OpenBD but some reason (download the OpenBD war here), OpenBD doesn't respect the document root set in the jrun administion page so it goes to C:\JRun4\servers\openbd . Also the cfm pages get an error. I created a ticket for the issue.

Conclusion

Next post I will explain how to add Apache to this so we don't have to use the ports. We will be able to go to http://cf9.local, http://railo.local, etc. If you don't want to wait, there is plenty of information on regarding virtual hosts with Apache.

9 Comments + Add Comment

  • Mike Henke

    I forgot to mention, if you wanted to point the original ACF instance created to a different source than C:/jrun4/servers/[original]/cfusion.ear/cfusion.war

    Within the JRUN Admin, change the context path and document root for the original instance.

  • Mike Henke

    Also, if you are on windows and want services for your jrun instances run these commands in your command prompt:

    cd c:\jrun4\bin

    jrunsvc -install cf9 "Adobe ColdFusion 9 AS cf9" "Adobe ColdFusion 9 AS cf9" -config jvm.config

    Switch out cf9 with the jrun instance name. and the information in between the quotes can be modified.

  • Paul

    Hey Mike,

    I spoke briefly with you at CFUnited during the CFWheels Presentation. I followed these instructions. I have railo and cf9 installed. I cannot get either if them to display with out /index.cfm. I'm also having issues with images not being displayed. I get a file not found error even though I know the file is there. Any ideas?

    Thanks,
    Paul

  • Mike Henke

    Hi Paul, I submitted an ticket for Railo about jrun and the 403 permissions error without index.cfm. I remember a response but not what it was :-) Seems like it is jrun issue.

    As for the images, can you see via your debugging information the actual path coldfusion is running the files? I wonder if the document root isn't "holding" even through it is set in the jrun admin.

  • Paul

    Hey Mike,

    Thanks for the reply. After much searching and fiddling. I ended up uninstalling and reinstalling using Apache as the web server. I made virtual hosts in the .conf file and everything seems to be working fine now. Except for the index.cfm files. I'm not sure if I needed to but I made the Doc Root changes in JRun Admin too.

    Thanks again,
    Paul

  • Joe Bernard

    For whatever reason I had to restart the CF Admin service after I started my new CF instance in the JRUN administrator. That was the only way I could get it to start. FWIW.

  • Martin

    Hey Mike

    Did you write the next the follow up article about connecting through Apache?

    Cheers
    Martin

  • Mike Henke
  • Martin

    Thanks Mike.
    I guess I was specifically looking at JRun (as opposed to Tomcat) on my localhost machine - I see Sean Corfield had a post too http://corfield.org/blog/index.cfm/do/blog.entry/entry/Railo__ColdFusion_on_JRun

    I keep getting caught out by the fact that Railo a)tries to create a Web-inf folder for every site plus/so b)It somehow needs to have it's own web config in addition to Apache. ie Setting up Wildcard domains in Apache works for CF but not for Railo.

    Cheers
    Martin

  • Got anything to say? Go ahead and leave a comment!