Specifying a destination

A destination is the server-side service or object that you call. You configure Data Management destinations in the data-management-config.xml file.

The destination contains the following elements:

Element

Description

destination id

The ID must be unique for each destination.

adapter-ref

The name of the adapter to use. You use the ColdFusion adapter-ref element for any ColdFusion specific destinations.

channels-ref

Use the ColdFusion configured channels that have the instantiate-types flag set to false.

component

The name or path on the ColdFusion server.

scope

The scope, which can be application, session, or request. The application value specifies that there is only one instance; request specifies that there is a new CFC for each call. ColdFusion does not support session. (Do not confuse this setting with the ColdFusion variable scope; they are not related.)

hostname

The host name or IP address of the ColdFusion host. If you are running LiveCycle Data Services as part of ColdFusion you do not specify a host name or IP address; however, if you are running LiveCycle Data Services ES remotely, specify a host name or IP address.

identity

The ID of the ColdFusion Data Management server as configured in the ColdFusion Administrator.

This is required only if you are accessing a ColdFusion server remotely using RMI and have more than one instance of ColdFusion on a machine.

remote-username

remote-password

Credentials to pass to the assembler CFC for all clients. It is preferable to use the ActionScript setRemoteCredentials() API on the client.

identity property

The property or list of properties that are the primary key in the database.

query-row-type

Optional. If the assembler fill method returns a query, define an ActionScript type for each row in the query that the ArrayCollection returned.

fill-method

Whether to update the results of a fill operation after a create or update operation.

use-fill-contains

Optional. Whether the assembler has a fill-contains method. This method is used to determine whether to refresh the fill. If the specified method returns true, the fill is re-executed after a create or update operation. Set use-fill-contains to true only when auto-refresh is set to true. The default value is false.

auto-refresh

Optional. Whether to refresh the fill after a create or update operation. The default value is true.

ordered

Optional. Whether order is important for this filled collection. Allows performance optimization when order is not important. The default value is true.

The following code shows a sample destination:

<destination id="cfcontact"> 
<!-- Use the ColdFusion adapter for any CF specific destinations--> 
    <adapter ref="coldfusion-dao" /> 
<channels> 
<channel ref="cf-polling-amf" /> 
</channels> 
 
    <properties> 
        <!--The component name or path on the CF server--> 
            <component>samples.contact.ContactAssembler</component> 
        <!--Either "application" or "request"--> 
            <scope>request</scope> 
        <!-- The hostname or IP address of the CF host. If Data Services is installed as 
            part of CF, you omit this. If Data Services runs outside of CF, you must 
            define this. <hostname>localhost</hostname>--> 
 
        <!--This is the ID of the ColdFusion Data Management service as configured in      
        the ColdFusion Administrator. Only needed if you have more than one instance of 
        CF on a machine and Data Services is not installed as part of CF. 
        <identity>default</identity> --> 
        <!--Credentials to pass to the assembler CFC for all clients. Generally better 
        to use setRemoteCredentials() API on client <remote-username></remote-username> 
        <remote-password></remote-password>--> 
    <metadata> 
        <identity property="contactId" /> 
        <!--Optional, If the Assembler fill routine returns a query,you must define an 
            Actionscript type for the rows.--> 
        <query-row-type>samples.contact.Contact</query-row-type> 
    </metadata> 
 
    <network> 
        <!--  Add network elements here--> 
    </network> 
 
    <server> 
    <!-- The method declarations are ignored for CFC Assemblers, with the exception of 
    the fill-method settings. No parameters are defined here, unlike Java. Any arguments 
    provided via the AS call are passed along to the CFC, just use optional arguments 
    when defining the CFC.--> 
    <fill-method> 
    <!--Does the assembler have a "fill-contains" method? This method is used to 
    determine whether to refresh the fill. If the specified method returns true the fill 
    is re-executed after a create or update. Auto-refresh determines if the fill is 
    always refreshed if not specified. May only be used when auto-refresh is true. 
    Optional. Default is false.--> 
    <use-fill-contains>false</use-fill-contains> 
    <!-- Determines whether to refresh the fill on updates or creates. Optional. Default 
        value is true.--> 
    <auto-refresh>true</auto-refresh> 
    <!--Determines whether order is important for this filled collection. Allows for 
    performance optimization when order is not important. Optional. Default value is 
    true.--> 
 
    <ordered>true</ordered> 
 
    </fill-method> 
    </server> 
    </properties> 
</destination>