This chapter describes how to configure Coherence*Web for use with ColdFusion applications. ColdFusion is a rapid application development platform designed to make it easier to connect simple HTML pages to a database. ColdFusion applications can use Coherence*Web for session management regardless of whether the application server is running the SPI or non-SPI version of Coherence*Web.
This chapter contains the following sections:
If your ColdFusion applications run on WebLogic Server, you can use Coherence*Web for session management. To enable the SPI version of Coherence*Web for ColdFusion applications running on the WebLogic Server:
In the ColdFusion installer, create a WAR version of ColdFusion.
Follow the provided instructions for configuring WebLogic Server for ColdFusion.
Extract the WAR file into a directory for exploded directory deployment to WebLogic Server.
Create a weblogic.xml
file in the /WEB-INF
directory of the exploded ColdFusion WAR file. Specify the Coherence SPI as a <library-ref>
attribute.
<?xml version="1.0"?>
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-web-app http://www.bea.com/ns/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd">
<library-ref>
<library-name>coherence-web-spi</library-name>
</library-ref>
</weblogic-web-app>
Copy the coherence.jar
file to the WEB-INF/lib
directory of the exploded application.
Copy the cfusion.jar
file from the WEB-INF/cfusion/lib
directory to the WEB-INF/
directory.
Start the WebLogic Server instance. Deploy the Coherence*Web SPI to the WebLogic Server. The SPI is located at coherence\lib\coherence-web-spi.war
in the Coherence distribution.
Deploy the ColdFusion application to the WebLogic Server instance.
Configure ColdFusion MX to use Java EE session management.
Access the ColdFusion administration page at the following URL:
http://<host>:<port>/coldfusion-context-root/CFIDE/administrator.
Select Memory Variables under Server Sessions and enable the Use Java EE session variables checkbox.
Add your ColdFusion application under the exploded ColdFusion WAR file.
The application must have an Application.cfm
file that specifies sessionmanagement="Yes"
, but should not configure the session using ColdFusion configuration (otherwise, exceptions are thrown). The Application.cfm
file should contain the following line:
<cfapplication sessionmanagement="Yes">
Note:
This section applies only to application servers that do not use the SPI version of Coherence*Web.
To enable the non-SPI version of Coherence*Web with for your application server.
In the ColdFusion installer, create a WAR version of ColdFusion.
Follow the provided instructions for configuring your Java EE container for ColdFusion.
If you run Caucho Resin as your application server, run the Coherence*Web WebInstaller on the container. See "Installing on Caucho Resin 3.1.n" for more information.
Instrument the generated cfusion.war
file using the Coherence*Web WebInstaller.
See "General Instructions for Installing Coherence*Web Session Management Module" for the additional steps to install Coherence*Web for a Java EE application.
Deploy the cfusion.war
file to the Web container.
Configure ColdFusion MX to use Java EE session management:
Access the ColdFusion administration page at the following URL:
http://<host>:<port>/coldfusion-context-root/CFIDE/administrator
Select Memory Variables under Server Sessions and enable the Use J2EE session variables check box.
Add your ColdFusion application.
The application must have an Application.cfm
file that specifies sessionmanagement="Yes"
, but should not configure the session using ColdFusion configuration (otherwise, exceptions are thrown). The Application.cfm
file should contain the following line:
<cfapplication sessionmanagement="Yes">