ColdFusion 8 is the first version to fully support running on a 64-bit JVM, on a 64-bit operating system, with a 64-bit webserver, albeit Solaris only. Out of the box, when installing ColdFusion 8 on Solaris the default option is 32-bit JVM. To enable ColdFusion for a 64-bit JVM, you must choose the option during the installation:

ColdFusion 8 Installation Option

view plain print about
1Solaris configuration
4Choose if you will need 32 bit or 64 bit configuration. If 32 bit is selected, 32 bit webserver will be configured and vice-vera.
6 ->
1- 32 bit configuration
7 2- 64 bit configuration

Sun JVMs have two types of application modes, Server or Client. In 32-bit JVMs the default is Client. ColdFusion has historically used the 32-bit JVM everywhere, and the default Client mode is not appropriate for server applications, so this is why the "-server" jvm switch has been present in the jvm.config file. With 64-bit the -server option is no longer required because Server mode is the default.

When you select the option for 32 or 64-bit during installation, this will also determine the type of webserver you must use. If you select 64-bit during CF 8 installation, then you must use a 64-bit webserver if you choose to configure a webserver during installation. If you decline to configure an external webserver such as Apache or Sun Webserver during CF 8 installation, then later you can use the wsconfig switch -ws64, ... more on this in a moment.

The webserver connector module is a binary file that will run in the webserver's process, so both binaries must be in the same mode. The connector module proxies requests between the webserver and the ColdFusion server, and it is installed with the utility wsconfig.jar.

How do you know if you have a 32-bit or 64-bit webserver? You can use the file command to check the webserver binary.

Checking webserver mode

view plain print about
1# cd /opt/apache2.2.4/bin
2# ls -l httpd
3-rwxr-xr-x 1 root root 1850056 Aug 23 17:10 httpd
4# file httpd
5httpd: ELF 32-bit MSB executable SPARC Version 1...

If you elect to configure a webserver later, after the installation of CF 8, then when using the wsconfig utility on the commandline you again have the option to choose a 32-bit connector or a 64-bit connector. To install a 64-bit connector for a 64-bit webserver on Solaris, use the wsconfig commandline option -ws64. Without this option, a 32-bit connector is installed.

If you are checking out a ColdFusion 8 installation that is already configured for a webserver, you view the {coldfusion8}/lib/wsconfig/ file to see which webservers are configured and where the connector is installed.

The file
view plain print about
1# pwd
3# cat<br/><br/>#JRun/ColdFusion MX Web Server Configuration File
4#Mon Aug 27 17:09:42 EDT 2007

For each webserver configured -- a single CF server can be configured to connect to multiple webserver's simultaneously -- a numbered directory will be created in {coldfusion8}/runtime/lib/wsconfig/ starting with the number 1. The lines in wsconfig begin with a number corresponding to the numbered directory and to a particular webserver instance.

In this example, the connector module for Apache is at /opt/coldfusion8/runtime/lib/wsconfig/1 and here it is a 32-bit version.

Examining the connector module
view plain print about
1# pwd
3# ls -l
4-rwxr-xr-x 1 root root 82216 Jun 21 14:47
5# file ELF 32-bit MSB dynamic lib SPARC Version 1,...

What happens when you try run a webserver with an incorrect mode for the connector? It won't start, and here's the error:

Connector mode mismatch
view plain print about
1# ./apachectl start
2httpd: Syntax error on line 408 of /opt/apache2.2.4/conf/httpd.conf: Cannot load /opt/coldfusion8/runtime/lib/ wsconfig/1/ wrong ELF class: ELFCLASS64