LiveCycle® Data Services Developer's Guide |
|||
| Developing Data Services Applications > Configuring Data Management on the Server > About Data Management Service configuration | |||
The most common tasks that you perform when configuring the Data Management Service are defining Data Management Service destinations, applying security to destinations, and modifying logging settings. A Data Management Service destination is the endpoint that you send data to and receive data from when you use the Data Management Service to provide data distribution and synchronization in your applications. You configure Data Management Service destinations in the data service section of the services-config.xml file or a file which that file includes by reference. By default, the services-config.xml file is located in the WEB_INF/flex directory of the web application that contains Adobe LiveCycle Data Services. In the services-config.xml files that ship with LiveCycle Data Services, Adobe references individual configuration files for the Data Management Service, Message Service, Remoting Service, and Proxy Service. You can also dynamically configure services by using the run-time configuration feature; for more information, Chapter 23, "Using Runtime Configuration," on page 337.
The following example shows a basic Data Management Service configuration. It contains one destination that uses the Java adapter to interact with a data resource. The ActionScript object adapter is configured as the default adapter.
<service id="data-service" class="flex.data.DataService">
<adapters>
<adapter-definition id="actionscript"
class="flex.data.adapters.ASObjectAdapter" default="true"/>
<adapter-definition id="java-adapter"
class="flex.data.adapters.JavaAdapter"/>
</adapters>
<default-channels>
<channel ref="my-rtmp"/>
</default-channels>
<destination id="contact">
<adapter ref="java-adapter" />
<properties>
<source>dev.contacts.ContactAssembler</source>
<scope>application</scope>
<cache-items>true</cache-items>
<metadata>
<identity property="contactId"/>
</metadata>
<network>
<session-timeout>20</session-timeout>
<paging enabled="false"/>
<throttle-inbound policy="ERROR" max-frequency="500"/>
<throttle-outbound policy="REPLACE" max-frequency="500"/>
</network>
<server>
<fill-method>
<name>loadContacts</name>
</fill-method>
<fill-method>
<name>loadContacts</name>
<params>java.lang.String</params>
</fill-method>
<sync-method>
<name>syncContacts</name>
</sync-method>
</server>
</properties>
</destination>
</service>
A Data Management Service destination references one or more message channels that transport messages, and contains network- and server-related properties. It can also reference a data adapter, which is server-side code that lets the destination work with data through a particular type of interface, such as a Java object. You can also configure a specific data adapter as the default data adapter, in which case you do not have to reference it inside the destination. A destination can also reference or define security constraints for a destination.
To use the Java adapter, you write an assembler class or use the HibernateAssembler or SQLAssembler class. An assembler class is a Java class that interacts indirectly or directly with a data resource. When you use either the HibernateAssembler class or the SQLAssembler class, you typically start with the existing Assembler class and only need to write Java code if you want to extend the functionality they provide. A common design pattern is for the assembler to call a data access object (DAO) that calls a data resource.
A Data Management Service destination references one or more message channels, which are defined elsewhere in the configuration files. The two most common channels that you use for publish-subscribe messaging are the Realtime Message Protocol (RTMP) channel, and the Action Message Format (AMF) channel with message polling enabled.
The Realtime Message Protocol (RTMP) channel maintains a connection between the client and the server, so the client does not have to poll the server. The Action Message Format (AMF) channel with polling enabled polls the server for new messages. For more information about messaging channels, see "Securing destinations" on page 485.
A data adapter provides the infrastructure for interacting with data resources. You specify data adapters in a destination. You can also specify adapter-specific settings.
For general information about destinations, see Configuring Data Management Service destinations. For detailed information about data adapters, see Working with Data Adapters and Assemblers.
You can secure a destination by using a security constraint, which defines the access privileges for the destination. You use a security constraint to authenticate and authorize users before letting them access a destination. You can specify whether to use basic or custom authentication, and indicate the roles required for authorization.
You can declare a security constraint inline in a destination, or you can declare it globally and reference it by its id value in a destination.
For more information about security, see "Securing destinations" on page 485.
LiveCycle Data Services ES 2.5
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/lcds/data_manage_config_2.html