Data & Services section

The Data & Services section of the Administrator is the interface for ColdFusion, data sources, and search and indexing features. The following table describes some common tasks that you can perform in the Data & Services section of the Administrator:

Task

Description

Create and manage JDBC data sources

The Data Sources page lets you establish, edit, and delete JDBC data source connections for ColdFusion. For more information, see Data Source Management.

Create and maintain ColdFusion collections

The ColdFusion Collections page lets you create and delete Solr collections and perform maintenance operations on collections that you create. For more information, see ColdFusion Collections page.

Define mappings for web services

The Web Services page lets you produce and consume remote application functionality over the Internet. For more information, see Web Services page.

Specify settings to integrate with Adobe® Flex™ applications

The Flex Integration page lets you specify which Flex integration features to enable and which IP addresses can perform data service operations. For more information, see Flex Integration page.

Data Sources page

ColdFusion lets you quickly deliver dynamic database content to the web. A data source is the entry point for database operations.

The Data Sources page lets you create, edit, and delete JDBC data sources. Before you can use a database in a ColdFusion application, you register the data source in the ColdFusion Administrator. For more information, see Data Source Management.

Before you can access a database with a ColdFusion application, you must do the following:
  1. Understand and determine the database driver required to interact with the data source. ColdFusion uses JDBC database drivers to communicate with data sources.

  2. Configure the database as a ColdFusion data source by specifying a driver, adding data source information, and connecting to a database.

  3. Verify the data source.

For more information on adding data sources, see Adding data sources.

ColdFusion Collections page

Use this page to create and manage your Solr collections.

ColdFusion lets you manage your collections from the Administrator. You can index, optimize, purge, or delete Solr collections that are connected to ColdFusion. You use the icons in the Actions column to perform the following actions:

Action

Description

Index

Analyzes the files in a collection and assembles metadata and pointers to the files.

Optimize

Reclaims space left by deleted and changed files by consolidating collection indexes for faster searching. You should optimize collections regularly.

Purge

Deletes all documents in a collection, but not the collection itself. Leaves the collection directory structure intact.

Delete

Deletes a collection.

ColdFusion includes Solr, which provides indexing and searching technology. This enables creating, populating, and managing collections of indexed data that are optimized for fast and efficient site searches.

A collection is a logical group of documents and metadata about the documents. The metadata includes word indexes, an internal documents table of document field information, and logical pointers to the document files.

For more information about building search interfaces, see Building a Search Interface and Solr search support in the Developing ColdFusion Applications.

If the ColdFusion Collections page is unable to retrieve collections, ensure that Solr Search Server is running.

Populate a Solr collection

After you create a collection, use the Solr Collections section to populate (or index) it, with data from text and binary files, in a directory that you specify. A collection comprises metadata that describes indexed documents. Data from a ColdFusion query can be indexed only by using the ColdFusion cfindex tag.To populate (index) a collection,
  1. In the list of Solr Collections, click the name of the collection or its Index Collection button. The Index Solr Collections page appears.

  2. Review the extensions in the File Extensions field. You can add, edit, or remove extensions for files in the collection.

  3. In the Directory Path field, enter the path to a directory to index. To locate and enter a path, click Browse Server.

  4. To include subdirectories of the specified directory, select the Recursively Index Sub Directories option.

  5. (Optional) In the Return URL field, enter the URL prefix used to display documents found in the search in a browser.

    For example, if you index the ColdFusion documentation directory, the directory you index could be C:\ColdFusion9\wwwroot\cfdocs.

    You would enter the return URL as http://localhost:8500/cfdocs/. This assumes that you are using the built-in web server on port 8500.

  6. Click Submit. ColdFusion populates the collection with data from the specified directory. Then the ColdFusion Collections page appears.

To close the page without saving changes, click Cancel.

Rename or create an alias for a Solr collection

  1. Click the ColdFusion collection that you need to rename from the ColdFusion Collections page. The Manage Collection page is displayed.

  2. In the Rename Collection section, enter a new name in the New Name for Collection field and click Submit.

  3. To specify an alias for the collection, enter the alias in the Collection Alias field and click Submit.

Solr Server page

The Solr server instance runs as a separate server, which you can start or stop as a service. You can configure your Solr collection for indexing and search capabilities using ColdFusion Administrator.

Solr collections

You can create Solr collections using ColdFusion Administrator or by using <cfcollection> tag.

The ColdFusion Administrator implements Solr support using the following panels in the Data & Services area:

ColdFusion Collections
Select the Solr collection option when creating a collection. Once a Solr collection is created, use the Index, Optimize, Purge, or Delete Actions under the Solr Collection area at the bottom of the panel.

You can also rename and alias a Solr collection in ColdFusion Administrator. To do this,

  1. Click the ColdFusion collection that you need to rename from the ColdFusion Collections page. The Manage Collection page is displayed.

  2. In the Rename Collection section, enter a new name in the New Name for Collection field and click Submit.

  3. To specify an alias for the collection, enter the alias in the Collection Alias field and click Submit.

Solr Server
Configure the Solr server host name, home directory, and other advance settings using the Solr Server page.

Solr server

You can install and configure the Solr search service on a local or remote host. For a remote server, you can configure the host that ColdFusion uses when performing search operations.

Use the Solr Server page to specify the Solr server host name and home directory. You can also configure advance settings including the admin port, web application name, and buffer limit.

Web Services

Web Services overview

Web services let you publish and consume remote application functionality over the Internet. With a web service, you can make a request to the remote application to perform an action. You can use the ColdFusion Administrator to register web services so that clients do not have to specify the entire WSDL URL when they reference the web service. For more information on publishing and consuming web services through ColdFusion, see ColdFusion Developer's Guide.

Add a web service

  1. In the Web Service Name box, enter the name of the web service.

  2. In the WSDL URL box, enter the URL for the Web Services Description Language (WSDL).

  3. Enter a user name and password.

  4. (If applicable) Specify the proxy server details and credentials.

  5. (Optional) Specify the timeout value for the web-service request in seconds.

  6. Click Add Web Service. Your Web Service Name appears in the list of Active ColdFusion Web Services.

Edit a web service

  1. In the Active ColdFusion Web Services area, click the web service name.

    The ColdFusion Administrator displays the web service in the top portion of the window.

  2. Modify settings.

  3. Click Update Web Service.

View WSDL for a web service

 In the Active ColdFusion Web Services area, click the WSDL URL.

The ColdFusion Administrator opens the WSDL in a new browser window.

Web Services page

You can use web services to produce and consume remote application functionality over the Internet. The ColdFusion Administrator lets you register web services so that you do not have to specify the entire Web Services Description Language (WSDL) URL when you reference the web service. The first time you reference a web service, ColdFusion automatically registers it in the Administrator.

When you register a web service, you can shorten your code and change a web service URL without editing your code. For more information, see Using Web Services in the Developing ColdFusion Applications.

REST Services page

After you create the CFC you want to REST-enable, specify the folder for registering as web service in the ColdFusion Administrator.

Note: Nested REST applications cannot be registered.

When you specify a folder, all CFCs in that folder or subfolders for which you have specified rest or restPath are registered.

  1. Browse and select the application path or root folder where ColdFusion would search for CFCs.

  2. (Optional) In the Service Mapping section, specify virtual mapping in place of application name.

    If the folder has an Application.cfc and an application name, then the service is identified with the application name. You can override this by specifying the service mapping. In this case, the service is identified with the service mapping that is provided. If there is no Applicaiton.cfc in the folder, then it is mandatory to specify the Service mapping.

  3. (Optional) Specify an application as default REST service. Only one application can be set as default for a server instance. You can change the default application at any time. Check Set the default application and then click Add Service. To remove the service as default, uncheck it.

  4. After you specify the details, click Add Service to register.

    The Active ColdFusion REST Services section specifies the details of all registered web services.

After you register, all CFCs are published as RESTful services. On subsequent startups, the registered services automatically get published.

Note: Refresh the application whenever there is a change in REST-related component in the application.

ColdFusion 11 now supports site-level REST applications and enables pluggable serializer and deserializer.

Site-level REST application support

In ColdFusion 11, multiple applications cannot have the same name, even if the applications are residing in different hosts. With the enhanced ColdFusion 11 REST feature, you can have multiple applications with the same name but available in different hosts. Also, you can set one default application (containing the REST service) for each virtual host. 
You can register the directory containing the REST service by using any one of the following options:

  • autoregister Application Setting
  • ColdFusion Administrator console
  • ColdFusion Admin API
  • restInitApplication method

Option 1: autoregister Application Setting

A new Application setting autoregister is introduced in ColdFusion 11.

  • You can set the auto register to true if you want to enable the auto registration for the application: 

<cfset this.restsettings.autoregister="true"/> 

  • Specifying the servicemapping is optional. If servicemapping is not specified, the "this.name"/application name will be taken as default.

<cfset this.restsettings.servicemapping="testmapping"/>                                                                                                                                          

  • Specify the usehost or hostname, If usehost attribute is set to true, then the host name is parsed from the URL and it is used:

<cfset this.restsettings.usehost=true/>                                                                                                                                                          

  • Explicitly naming the host name will make the host name. If the host name is not mentioned, then the usehost name will be defaulted.

<cfset this.restsettings.host="www.adobe.com"/> 

  • Set isDefault to true and the application will be made as default app. 

<cfset this.restsettings.isDefault=true/>

If both usehost and host are not specified, the apps will be registered without host name. When the first request comes to the application and if that request is non-REST request, the application will be started and registered.

If the first request itself is a REST request, then the application will not get started.

Option 2: Registering a REST application using ColdFusion Administrator console

  • Use the Administrator console to register a directory containing REST-enabled CF components. Select Adobe ColdFusion 11 Administrator console > Data & Services > REST services.
  • Browse and select the root path (or the application path) where ColdFusion will search for the directory containing a set of REST enabled CF components.
    (Optional) In the Service Mapping section, specify the virtual mapping in place of application name. If the folder has an Application.cfc file and an application name, use the application name to identify the REST services in the directory.
    (Optional) Enter the Host Name. This will enable the mapping of the selected application with the host. Each host can have a default application and multiple applications with the same application name can be mapped to different hosts.
  • Set the REST application as a default application by selecting the option Set as default application. By selecting this option, you omit the need to specify the service mapping or the application name in the URI.
  • Click the Add Service button to complete registration of the directory.
  • View the Active ColdFusion REST Services display table to view the list of active service mappings. You can use the same to edit or delete the service mappings in future.


Option 3: Registering a REST application using the ColdFusion Admin API
You can use functions defined in CFIDE.adminapi.extensions CFC to manage a REST application. The functions are:

  • registerRESTService(path[,serviceMapping[,host[,isdef]]]: This function registers the REST application. The root path specifies the directory containing REST-enabled CF component. Optionally, the service mapping for the REST application, host name, and isdefault can be specified.
  • getRESTServices():This function returns an array of REST services registered with the ColdFusion Administrator.
  • deleteRESTService(rootPath):This function deletes the specified REST application registered with the ColdFusion Administrator.
  • refreshRESTService(rootPath):If you make any changes to the REST-enabled CF component, you can refresh the registered application by calling this function.
  • getDefaultRestService():Returns the server wide default REST application.
  • getAllDefaultRESTServices: Returns all the default REST services. It is an array of path – host pair.

Option 4: Registering a REST application using the restInitApplication method
You can also register a REST application by calling the method restInitApplication
The syntax is:
restInitApplication(rootPath[,serviceMapping[,options]])

The options are an optional argument. In the options struct you can pass the:

  • Host
  • useHost
  • isDefault

For registering by specifying the host explicitly:

<cfset str=structNew()>
<cfset str.host = "www.site1.com:82">
<cfset str.isDefault = "true">
<cfscript>
     RestInitApplication("C:\dev\ColdFusion\cf_main\cfusion\wwwroot\withhostAndDefault",  "withhostAndDefault", str);
     </cfscript>
<cfoutput> App registered </cfoutput>



For registering by specifying the UseHost attribute: The host name will be extracted from the request URL and will be used for registration.

<cfset str=structNew()>
<cfset str.useHost = "true">
<cfset str.isDefault = "true">
<cfscript>
     RestInitApplication("C:\dev\ColdFusion\cf_main\cfusion\wwwroot\withhostAndDefault",  "withhostAndDefault", str);
     </cfscript>
<cfoutput> App registered </cfoutput>

 


You do not need Administrator privileges to perform the task. The syntax is: 
restInitApplication(rootPath[,serviceMapping[,options]])

  • In the options you can specify host, useHost and isDefault. The option usage is same as autoRegister feature.
  • If you have already registered the application using the Administrator module, call restInitApplication to refresh the REST service.
  • Use the restDeleteApplication function to delete the REST service. The syntax is restDeleteApplication(rootPath)

Support pluggable serializer and deserializer

In the application.cfc, you can register your own handler for serializing and deserializing the complex types. If the serializer is not specified, ColdFusion uses the default mechanism for serialization.
Example: If you have a phone directory to be serialized on the following parameters:

  • The main data structure is an Array. 
  • Each element of the array is a struct. 
  • The Struct contains 2 elements. 
  • The first is the name of the contact and the second is the struct which contains the code and the phone number.

 

Array
Struct
[
name(String],
phoneNo(Struct)
[
code(String),
no(String)
]
]
Struct
[
name(String],
phoneNo(Struct)
[
code(String),
no(String)
]
]



The default ColdFusion serialized data is displayed as follows:
<Array size="1"> <Item index="1"> <Struct> <Entry> <Key>Name</Key> <Value>Paul</Value> </Entry> <Entry> <Key>PhoneNo</Key> <Value> <Struct> <Entry> <Key>Code</Key> <Value>080</Value> </Entry> <Entry> <Key>No</Key> <Value>411150326</Value> </Entry> </Struct> </Value> </Entry> </Struct> </Item> </Array>

And in this example, you want to serialize only struct in a simple format and want the result as follows:
<Array size="1"> <Item index="1"> <root> <Name>Paul</Name> <PhoneNo> <root> <Code>080</Code> <No>411150326</No> </root> </PhoneNo> </root> </Item> </Array>

With the enhanced ColdFusion 11 REST feature, the user can use the plugged-in custom serializer instead of using the default serialization function. The custom serializer has four functions:

  • canSerialize - Returns a boolean value and takes the "Accept Type" of the request as the argument. You can return true if you want the customserialzer to serialize the data to the passed argument type. 
  • Serialize - The main serialization logic must be implemented in this function. If canSerialize returns "True" for a request, then ColdFusion will use this function to serialize. If canSerialize returns false, then ColdFusion will use the default serialization to serialize.
  • CanDeserialize - Returns a boolean value and takes the "Content Type" of the request as the argument. You can return true if you want the customserialzer to deserialize the data.
  • DeSerialize- The main deserialization logic must be implemented in this function. If canDeSerialize returns "True" for a request, then ColdFusion will use this function to deserialize. If canDeSerialize returns false, then ColdFusion will use the default de-serialization to deserialize.

The below CustomSerializer code sample will help you to achieve the result for the scenario explained above (Customizing serialization/deserialization of phone directory):

 

<cfcomponent>
<cffunction  name="serializeData" access="remote"  returntype="String">
<cfargument name="arg" type="any" hint="The  object to be serialized"/>
<cfargument name="type" type="string"
     hint="The accept header of the request in array format. The order  of types in the array is according to the priority of the MIME types in the  header."/>
<cfif  #type# eq "XML">
<cfif  isStruct(#arg#)>
<cfset var result =  "<root>">
<cfset var key = "">
<cfloop collection=#arg# item="key">
<cfset var result = result & "<" & #key# &  ">">
<cfset var result = result & serializeXML(#arg[key]#, true)>
<cfset var result = result & "</" & #key# &  ">">
</cfloop>
<cfset var result = result & "</root>">
<cfreturn result>
<cfelse>
<cfreturn serializeXML(#arg#)>
</cfif>
<cfelseif  #type# eq "JSON">
<cfdump var="#arg.getClass().getName()#"  output="console">
<cfif arg.getClass().getName() eq  "java.lang.String">
<cfreturn "test" & #arg#>
<!---<cfelseif isStruct(#arg#)>
<cfdump var="#arg#" output="console" >
<cfset var kresult = "{">
<cfset var kkey = "">
<cfloop collection=#arg# item="key">
<cfset var kresult = kresult & "__" & #kkey# &  "__">
<cfset var kresult = kresult & serializeJSON(#arg[kkey]#)>
<cfset var kresult = kresult & "</" & #kkey#  & ">">
</cfloop>
<cfset var kresult = kresult & "}">
<cfreturn kresult>--->
<cfelse>
<cfreturn  serializeJSON(#arg#)>
</cfif>
<cfelse>
<cfreturn serialize(#arg#, #type#)>
</cfif>
</cffunction>
<cffunction  name="canSerialize" access="remote"  returntype="boolean">
<cfargument name="type" type="string"/>
<cfif  #type# eq "XML">
<cfreturn true>
<cfelseif  #type# eq "JSON">
<cfreturn true>
<cfelse>
<cfreturn false>
</cfif>
</cffunction>
<cffunction  name="canDeserialize" access="remote"  returntype="boolean">
<cfargument name="type" type="string"/>
<cfif  #type# eq "XML">
<cfreturn true>
<cfelseif  #type# eq "JSON">
<cfreturn true>
<cfelse>
<cfreturn false>
</cfif>
</cffunction>
<cffunction  name="deserializeData" access="remote"  returntype="any">
<cfargument name="arg" type="String"  hint="The string to be deserialized"/>
<cfargument name="type" type="String"  hint="The content-type header of the request."/>
<cfargument name="returntype" type="String"  required="false" defaultvalue="any"
     hint="The expected type of data. It could be any for the contents  of complex types such as Struct, array etc."/>
<cfif #type# equals "XML" and  isXml(arg)>
<cfset  var xmlDoc = xmlParse(arg)>
<cfif  #xmlDoc.XmlRoot.XmlName# equals "root">
<cfset var result = StructNew()>
<cfset var numEntries = ArrayLen(xmlDoc.root.XMLChildren)>
<cfloop index="i" from="1" to=#numEntries#>
<!--- <cfdump  var="#xmlDoc.root.XMLChildren[i].XMLChildren#"  output="console" > --->
<cfset var key = xmlDoc.root.XMLChildren[i].XmlName>
<cfif "" eq Trim(xmlDoc.root.XMLChildren[i].XMLText)>
<cfset var value =  deserializeXML(ToString(xmlDoc.root.XMLChildren[i].XMLChildren[1]), true)>
<cfelse>
<cfset var value =  deserializeXML(xmlDoc.root.XMLChildren[i].XMLText, true)>
</cfif>
<cfset result[key] = value>
</cfloop>
<cfreturn result>
<cfelse>
<cfreturn  deserializeXML(#arg#, true)>
</cfif>
<cfelse>
<cfreturn deserializeXML(#arg#, true)>
</cfif>
</cffunction>
</cfcomponent>

 


The CustomSerializer that you have implemented can be specified through application.cfc.  
<cfset this.customSerializer="CustomSerializer">

Note: This new pluggable Serializer/Deserializer is not restricted to RESTful web services. ColdFusion has provided new APIs which can use this pluggable Serializer/Deserializer. Refer to the list below.

PDF Service page

Using the remote PDF service manager

You need to use a remote PDF service manager instead of the local PDF service manager due to the following reasons:

  • When the ColdFusion Server is running on an OS not supported by the local PDF service manager
  • When performance of the local ColdFusion Server is critical as PDF generation is a CPU intensive operation.
  • When you want to distribute the load of generating the PDFs for maximum throughput.

Adding and editing the PDF service manager

From the Administrator console, click Data & Services > PDF Service.
You can add or edit a PDF service manager by providing the name, host name, port, and other configuration details. 
 
To add or edit a remote service manager, you need to provide the details of Jetty service running on local or remote machine over which the service manager is deployed. Follow the instructions below to complete this process: 

  1. Enter the Name. A unique name representing the PDF service manager.
  2. Enter the Host Name. This is the host name of the remote PDF service manager.
  3. Enter the Port number. This is the port number of the PDF service manager. By default, the port is set to 8987.
  4. Enter the Weight detail of the PDF  service manager. Weight is the load balancing factor and determines the amount of PDF conversions that the service manager can handle. Set this based on the configuration of your system. 
  5. If the PDF service manager is running on HTTPS protocol, select the HTTPS Enabled check box.
  6. Click Add PDF Service Manager button to complete the process.

Local Service Manager: You can edit, enable, disable, and verify the service manager. Note that a local service manager cannot be added or deleted and it's host name cannot be changed. 

Using the remote service manager, you can add, edit, delete, enable, disable, and verify the service manager.  

Working with the PDF service manager

PDF Service Managers section lists all the available PDF service managers.  

The description for each Action button (in the above image) is as follows: 


Button

 Button Description

Action

Edit

Enables users to edit the settings of the existing service manager.

Verify

Enables users to verify the current connection status of service manager.

Delete

Enables users to delete the PDF service. 

Note: Verify All Service Manager button is used to verify all the listed PDF Service Managers.

Configuring the PDF service manager

To configure the PDF service manager, use the configuration file (web.xml) located at <cf_install_root>/<CF Instance>/jetty/webapps/PDFgServlet/WEB-INF/. The available configuration settings are:

  • minService = Minimum number of services running in process pool. Default value is 1.
  • maxService = Maximum number of services that can run in the process pool. Default value is 2. As PDF Conversion is a CPU intense operation, it  should be appropriately configured based on the number of processors in the system. Ideally, keep this value lesser than or equal to the number of CPUs in the machine.
  • idlePDFGServiceTimeout = Idle timeout for services in the process pool. After timeout, the services are removed. Default value is 2 minutes. Creation and initialization of service is  a costly operation. Also the service consumes memory for conversion. Based on the conversion frequency and load, this parameter must be tuned.
  • waitingQueueSize = The number of PDF conversion requests which can wait in the service manager queue. Default value is 10. Once the available services are engaged in the conversion process,  upcoming conversion requests are queued up. Based on the load on the service manager at the given point of time, the queue size must be configured.
  • waitingQueueTimeout = Timeout (in seconds) for queued PDF task in the service manager queue.  Default value is 60 seconds. This value needs to be tuned considering the following parameters:
    • The average PDF generation time.
    • Total number of service managers configured with the Server. If more than one service manager is configured with the Server, having a high value for waitingQTimeout may result in unnecessary wait for conversion task, even though the other service managers have idle service which can take up the task.
  • maxPDFConversionForService = Maximum PDF conversion allowed per service. Default value is 1000.Once service does the specified number of  PDF conversions, the service will be restarted. Note: Based on how large or small PDF your application generates, this value needs to be tuned. For large PDFs, the memory usage of the service increases at faster rate than the smaller PDFs. Hence the maxPDFConversionForService value needs to be lower.
  • startScanPort = Start scanning port used by the services. Default value is 1600.
  • endScanPort  = End scanning port used by services. Default value is 1800.
  • enableLogging =By default logging for PDF service manager is disabled. To enable logging, set the flag to true. Use this option only for debugging purpose.

About logging audit log details

PDF service manager logging is used to track service manager related issues  and generates verbose log that contains complete details about the service and conversion request lifecycle. Use it to track the PDF conversion request.


Note: Logging should not be used for an extended period of time in a production environment. Extended use will produce large logs and impact performance.

The following sections describe the enhancements made to the PDF generation process.
The PDFG service logs will be available at <cf_install_root>\cfusion\jetty\webapps\PDFgServlet\.

 

Flex Integration page

Use this page to specify which Flex integration features to enable and which IP addresses can perform data-service operations. If you enable Adobe LiveCycle Data Services ES support, but do not specify any IP addresses, only processes on the local computer can connect to the LiveCycle Data Services ES server in ColdFusion.

Option

Description

Enable Flash Remoting Support

Specifies whether to enable Flash clients to connect to this ColdFusion server and invoke methods in ColdFusion components (CFCs).

Enable Remote LiveCycle Data Management Access

Specifies whether to enable a LiveCycle Data Services ES server to connect to this ColdFusion server and invoke methods in CFCs to fill, sync, get, or count records in a result set used in a Flex application. Enable this option only if you are running LiveCycle Data Services ES remotely.

Server Identity

Specifies the ColdFusion server on which you want to enable Flex Data Management Support.

Enable RMI Over SSL For Data Management

To encrypt communication between ColdFusion and Flex, enable Secure Sockets Layer (SSL).

Select IP Addresses Where LiveCycle Data Services Are Running

Specifies which LiveCycle Data Services ES servers can connect to the LiveCycle Data Services ES support in ColdFusion. If you do not specify a list of allowed IP addresses, only processes on the local computer can connect to the LiveCycle Data Services ES support in ColdFusion

To use SSL, create a keystore file. The keystore is a self-signed certificate. (You do not need a certificate signed by a Certificate Authority, although if you do use one, you do not need to configure Flex as indicated in the following steps.) The information in the keystore is encrypted and can be accessed only with the password that you specify. To create the keystore, use the Java keytool utility, which is included in the Java Runtime Environment (JRE).

Enable SSL

  1. Create the keystore.

  2. Configure Flex.

  3. Enable SSL in the ColdFusion Administrator.

Create the keystore

 To generate the SSL server (ColdFusion) keystore file, use the keytool utility, with a command similar to the following:
keytool -genkey -v -alias FlexAssembler -dname "cn=FlexAssembler" -keystore cf.keystore -keypass mypassword -storepass mypassword

The following table describes the parameters of the keytool utility:

Parameter

Description

-alias

The name of the keystore entry. You can use any name for this, as long as you are consistent when referring to it.

-dname

The Distinguished Name, which contains the Common Name (cn) of the server.

-keystore

The location of the keystore file.

-keypass

The password for your private key.

-storepass

The password for the keystore. The encrypted storepass is stored in ColdFusion configuration files.

-rfc

Generates the certificate in the printable encoding format.

-file

The name of the keystore file.

-v

Generates detailed certificate information

Place the certificate you created in the file that the JVM uses to determine what certificates to trust. The file in which you place the certificate (usually named cacerts), is located in the JRE, in the lib/security folder.

Configure Flex

  1. To export the keystore to a certificate, use the keytool utility, with a command similar to the following:

    keytool -export -v -alias FlexAssembler -keystore cf.keystore -rfc -file cf.cer
  2. To import the certificate into the JRE cacerts file for your server, use the keytool utility, with a command similar to the following:

    keytool -import -v -alias FlexAssembler -file cf.cer -keystore C:\fds2\UninstallerData\jre\lib\security\cacerts

Enable SSL in the ColdFusion Administrator

  1. Select Data & Services > Flex Integration, and specify the keystore file in the Full Path To Keystore box.

  2. Specify the keystore password in the Keystore Password box.

  3. Select Enable RMI Over SSL For Data Management, and then click Submit Changes.

If you specify an invalid keystore file or password, ColdFusion does not enable SSL, and disables LiveCycle Data Management Support.