You will be redirected in 30 seconds or close now.

ColdFusion Authors: Yakov Fain, Jeremy Geelan, Maureen O'Gara, Nancy Y. Nee, Tad Anderson

Related Topics: ColdFusion

ColdFusion: Article

CFDJ Feature — It Is Possible!

Simultaneous development with CF7 and CF8

Now that Scorpio is here (at least in beta), it is time to start figuring out all the new tricks of the trade, right? However, as most of your clients will not be switching immediately, you will still have to be doing ColdFusion 7 work for some time.

How do you run both ColdFusion 7 to support your current clients and ColdFusion 8 to keep your development skills sharp? You could run one using the built-in Web server, but that's not really the same as your production systems. Instead, let's take a look at using the multiserver configuration option to run both CF7 and CF8 instances simultaneously and under your choice of Web server. The problem is, the system requirements for CF7 and CF8 are not compatible with each other, right? Yes and no...it's not quite out of the box, but it is possible to have complete working copies of each, running in complete parallel. The key is using the multiserver configuration and the JVM config.

ColdFusion Multiserver Configuration
For those who have never worked with the multiserver configuration (myself included until a few months ago), what is it? During the installation process for ColdFusion, the installer prompts you to select a server configuration option (see Figure 1). There are three options: single server (default), multi-server, and J2EE deployment. The single server option allows you to install a single copy of ColdFusion on your development workstation and connect it to your Web server of choice. This was always the route I took and I expect many did as well.

The J2EE deployment option gives you the ability to set up ColdFusion as an EAR or WAR file that can then be deployed to a Java application server such as JRun or Tomcat. If this went straight over your head, you probably need to know more about Java servers and this option won't be a lot of use to you - who needs a Java server if you can use the single self-contained server option, right?

The second option - multiserver deployment - is the one we are going to look at here. This option installs a full copy of Adobe's JRun 4 application server and then installs an instance of ColdFusion as a Web application on that Java application server. Adobe has set this up so that you can manage the different server instances deployed (including ColdFusion) through the ColdFusion administrator and never have to log into the JRun administrator. This is very nice for those of us who don't want to or don't have the time to become Java application server experts.

What Multiple Instances Give You
There are many benefits to setting up ColdFusion in a multiserver configuration. By going this route, you can deploy multiple instances of ColdFusion on the same server - hence the "multi-server" configuration. There are many benefits from a production standpoint including adding additional security between applications in the form of sandboxes and fine-tuning the JVM settings to boost the performance of different applications.

From a developer's standpoint, especially on our own development workstations, a multi-instance deployment of ColdFusion also provides several benefits. First, we can configure different settings including ColdFusion mappings and data sources for different applications. Have you ever had two applications that use the same framework but different versions? Both require the same mapping to be set up, but the mapping points to different file system locations. With a multi-instance deployment of ColdFusion you can put each application in its own ColdFusion instance, as you can configure the mappings and any other settings uniquely for each application.

The second and more important benefit in this case is that you can set different instances of ColdFusion to run using different JVMs. This is critical when trying to set up both ColdFusion 7, which only supports up to JVM 1.4.2, and ColdFusion 8, which will support JVM 1.4.2 but is better suited and performs better on the latest JVM (1.6).

The Install
Let's walk through the process of setting up a ColdFusion development workstation with both ColdFusion 7 and ColdFusion 8 deployed side-by-side. First a bit of background as to how I am putting together these instructions: my workstation does not have ColdFusion installed at all, so I am starting clean. Also, my workstation is running Windows Vista, so it already prefers the latest JVM, and, last, I am using IIS 7 for my Web server. This is not a big deal, although there are still a few issues regarding the JVM that we will walk through at that point.

Since I am running Windows Vista, I'm going to start with the ColdFusion 8 installer. You could easily do this process in reverse, but the ColdFusion 7 installer and Windows Vista don't play as nicely together as it is an "unsupported operating system." The first step is to run the ColdFusion 8 installer, agree to the license, and select the Developer Install (in my case). At this point, you will be prompted to select the installer configuration (see Figure 1).

For this install, select the multiserver configuration option. As mentioned previously, this will install a copy of Adobe's JRun 4 server, then install and deploy ColdFusion as a Web application on that server. By going this route, we can install an instance of ColdFusion 8 side-by-side with an instance of ColdFusion 7, which is our end goal.

At this point, the installation goes pretty much the same way as a single server configuration would. There are two things to take note of, however. When the installer asks for different path names (i.e., the CF Administrator location), remember that we will be installing both ColdFusion 7 and ColdFusion 8, which will utilize different CFIDE folders. My recommendation, and what has worked for me thus far, is instead of putting the CFIDE folder in c:\inetpub\wwwroot, put it in c:\inetpub\cfmx8root or c:\inetpub\cfmx7root. This way it is obvious later on which CFIDE folder belongs to which version.

The other thing to take note of is when the installer asks which Web site(s) to configure for use with ColdFusion. Again, in my case I am using IIS, so this may look a bit different based on your choice of Web server. With IIS, the installer gives you the option of installing to all Web sites, selecting one or more Web sites, or using the built-in Web server (see Figure 2).

On my first attempt, I selected "All IIS Websites" and this caused me quite a few headaches down the road. On my second attempt, I wised up and specified to only install and configure ColdFusion for the Default Web Site. By selecting this option, it's much easier to configure new Web sites down the road to communicate different instances of ColdFusion.

At this point, you should be good to go with the rest of the ColdFusion installation.

Your First ColdFusion Instance
When you log into the ColdFusion administrator after the installation, you should see a new menu item on the left-hand navigation menu called "Enterprise Manager" with a sub-link of "Instance Manager" (see Figure 3).

This screen is where you will add and remove instances of ColdFusion without having to use the JRun management console. Let's take a quick moment to look at the process of adding a new ColdFusion instance. First, click on the "Instance Manager" link under "Enterprise Manager." Then, click the "Add New Instance" button. You should see a screen similar to Figure 4 prompting you for information about the new instance/server.

More Stories By Jeff Chastain

Jeff Chastain has been developing software applications using object-oriented programming for over 12 years and has been developing Web applications in ColdFusion for over 8 years. He has experience in a variety of industries, from Fortune 500 companies to his own consulting practice. Currently, Jeff is an applications architect and systems developer for Alagad, Inc., and contributes to the blog at http://www.doughughes.net.

Comments (7) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.

Most Recent Comments
marc_44 09/19/09 06:06:00 AM EDT

I tried to install Coldfusion 8.01 and Coldfusion 9Beta on Windows 7 as described in this article. I succeeded to install the ear file in Jrun4 but I cannot get IIS7 or Apache (2.28) to recognize the installed Aplication server. In IIS 7 I make a website and use the Adobe Webserver connector to install the connector, in Apache I use Virtual Hosts and add the modified lines about serverstore and bootstrap. Did anyone succeed?

Gabriel Rose 04/29/08 10:10:20 PM EDT

I was also getting the service-specific error 2 - it appears the installer for JVM 1.4.2 overwrote the version of the JVM in the Jrun4/jre directory. The original version was Version 6 which has been changed to 1.4.2. I had backed up the JRun4 directory before installing so copied the original jre folder back. Now all the services are starting happily.

David Brown 01/11/08 08:25:49 PM EST

Hi Eric, We have the same issue with our 2 servers that are running the multi instances. I have not tried to worry about it since I really don't need to start them that often. I hope someone can help.

Eric Davis 01/11/08 05:58:42 PM EST

I've got 2 cf8 instances and 2 cf7 instances installed. The odd thing is that the jrun launcher and cf administrator don't recognize that the cf7 instances are running. I can stop and restart them just fine using the JRun Launcher, but only after I use the Windows Service MMC to stop the services. Any ideas on why this is happening?

Drew 11/27/07 10:13:28 AM EST

This doesn't *actually* work. There is a bug in CF8 where it doesn't know where the CFIDE is mapped to. You must set this in neo-runtime.xml. I couldn't figure out where to put the tag and only after putting it inside every did it actually work. Here's the line:

After coldfusion loads administrator control correctly, it destroys the nice formatting of this file and it becomes one long line.

Marc 09/03/07 05:14:50 AM EDT

Thanks, This helped a lot. I figured out how to use CF7/CF8 on Apache/Jrun4. Interested? Mail me.

David Brown 08/12/07 09:40:28 PM EDT

I have followed the steps of this article, but continue to get a error every time I try to start the Adobe ColdFusion 7 as CF7 service added from the command prompt. In Jrun Console I can see the CF7 server running and I did copy the config file and changed home to java.home=c:/j2sdk1.4.2_15/jre
The service installs fine, but when I try to start it in services I get the following error.

The Adobe ColdFusion 7 AS CF7 service terminated with service-specific error 2 (0x2).

Any suggestions?

IoT & Smart Cities Stories
CloudEXPO | DevOpsSUMMIT | DXWorldEXPO are the world's most influential, independent events where Cloud Computing was coined and where technology buyers and vendors meet to experience and discuss the big picture of Digital Transformation and all of the strategies, tactics, and tools they need to realize their goals. Sponsors of DXWorldEXPO | CloudEXPO benefit from unmatched branding, profile building and lead generation opportunities.
DXWorldEXPO LLC announced today that Big Data Federation to Exhibit at the 22nd International CloudEXPO, colocated with DevOpsSUMMIT and DXWorldEXPO, November 12-13, 2018 in New York City. Big Data Federation, Inc. develops and applies artificial intelligence to predict financial and economic events that matter. The company uncovers patterns and precise drivers of performance and outcomes with the aid of machine-learning algorithms, big data, and fundamental analysis. Their products are deployed...
All in Mobile is a place where we continually maximize their impact by fostering understanding, empathy, insights, creativity and joy. They believe that a truly useful and desirable mobile app doesn't need the brightest idea or the most advanced technology. A great product begins with understanding people. It's easy to think that customers will love your app, but can you justify it? They make sure your final app is something that users truly want and need. The only way to do this is by ...
Digital Transformation and Disruption, Amazon Style - What You Can Learn. Chris Kocher is a co-founder of Grey Heron, a management and strategic marketing consulting firm. He has 25+ years in both strategic and hands-on operating experience helping executives and investors build revenues and shareholder value. He has consulted with over 130 companies on innovating with new business models, product strategies and monetization. Chris has held management positions at HP and Symantec in addition to ...
Dynatrace is an application performance management software company with products for the information technology departments and digital business owners of medium and large businesses. Building the Future of Monitoring with Artificial Intelligence. Today we can collect lots and lots of performance data. We build beautiful dashboards and even have fancy query languages to access and transform the data. Still performance data is a secret language only a couple of people understand. The more busine...
The challenges of aggregating data from consumer-oriented devices, such as wearable technologies and smart thermostats, are fairly well-understood. However, there are a new set of challenges for IoT devices that generate megabytes or gigabytes of data per second. Certainly, the infrastructure will have to change, as those volumes of data will likely overwhelm the available bandwidth for aggregating the data into a central repository. Ochandarena discusses a whole new way to think about your next...
Cell networks have the advantage of long-range communications, reaching an estimated 90% of the world. But cell networks such as 2G, 3G and LTE consume lots of power and were designed for connecting people. They are not optimized for low- or battery-powered devices or for IoT applications with infrequently transmitted data. Cell IoT modules that support narrow-band IoT and 4G cell networks will enable cell connectivity, device management, and app enablement for low-power wide-area network IoT. B...
The hierarchical architecture that distributes "compute" within the network specially at the edge can enable new services by harnessing emerging technologies. But Edge-Compute comes at increased cost that needs to be managed and potentially augmented by creative architecture solutions as there will always a catching-up with the capacity demands. Processing power in smartphones has enhanced YoY and there is increasingly spare compute capacity that can be potentially pooled. Uber has successfully ...
SYS-CON Events announced today that CrowdReviews.com has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5–7, 2018, at the Javits Center in New York City, NY. CrowdReviews.com is a transparent online platform for determining which products and services are the best based on the opinion of the crowd. The crowd consists of Internet users that have experienced products and services first-hand and have an interest in letting other potential buye...
When talking IoT we often focus on the devices, the sensors, the hardware itself. The new smart appliances, the new smart or self-driving cars (which are amalgamations of many ‘things'). When we are looking at the world of IoT, we should take a step back, look at the big picture. What value are these devices providing. IoT is not about the devices, its about the data consumed and generated. The devices are tools, mechanisms, conduits. This paper discusses the considerations when dealing with the...