BlazeDS Developer Guide

Configuration elements

The following table describes the XML elements of the services-config.xml file. The root element is the services-config element.

XML element

Description

services

Contains definitions of individual data services or references to other XML files that contain service definitions. It is a best practice to use a separate configuration file for each type of standard service. These services include the Proxy Service, Remoting Service, and and Messaging Service.

The services element is declared at the top level of the configuration as a child of the root element, services-config.

For information about configuring specific types of services, see the following topics:

default-channels

Sets the application-level default channels to use for all services. The default channels are used when a channel is not explicitly referenced in a destination definition. The channels are tried in the order in which they are included in the file. When one is unavailable, the next is tried.

Default channels can also be defined individually for each service, in which case the application-level default channels are overwritten by the service level default channels. Application-level default channels are necessary when a dynamic component is created using the run-time configuration feature and no channel set has been defined for the component. In that case, application-level default channels are used to contact the destination.

For more information about channels and endpoints, see Channels and endpoints.

service-include

Specifies the full path to an XML file that contains the configuration elements for a service definition.

Attributes:

  • file-path Path to the XML file that contains a service definition.
service

Contains a service definition.

(Optional) You can use the service-include element to include a file that contains a service definition by reference instead of inline in the services-config.xml file.

In addition to standard data services, you can define custom bootstrap services here for use with the run-time configuration feature; bootstrap services dynamically create services, destinations, and adapters at server startup. For more information, see Run-time configuration.

properties

Contains service properties.

adapters

Contains service adapter definitions that are referenced in a destination to provide specific types of functionality.

adapter-definition

Contains a service adapter definition. Each type of service has its own set of adapters that are relevant to that type of service. An adapter-definition has the following attributes:

  • id Identifier of an adapter, which you use to reference the adapter inside a destination definition.
  • class Fully qualified name of the Java class that provides the adapter functionality.
  • default Boolean value that indicates whether this adapter is the default adapter for service destinations. The default adapter is used when you do not explicitly reference an adapter in a destination definition.
default- channels

Contains references to default channels. The default channels are used when a channel is not explicitly referenced in a destination definition. The channels are tried in the order in which they are included in the file. When one is unavailable, the next is tried.

channel

Contains a reference to the id of a channel definition. A channel element contains the following attribute:

  • ref The id value of a channel definition.

For more information about channels and endpoints, see Channels and endpoints.

destination

Contains a destination definition.

adapter

Contains a reference to a service adapter. If this element is omitted, the destination uses the default adapter.

properties

Contains destination properties.

The properties available depend on the type of service, which the specified service class determines.

channels

Contains references to the channels that the service can use for data transport. The channels are tried in the order in which they are included in the file. When one is unavailable, the next is tried.

The channel child element contains references to the id value of a channel. Channels are defined in the channels element at the top level of the configuration as a child of the root element, services-config.

security

Contains a reference to a security constraint definition and login command definitions that are used for authentication and authorization.

This element can also contain complete security constraint definitions instead of references to security constraints that are defined globally in the top-level security element.

For more information, see Security.

The security-constraint child element contains references to the id value of a security constraint definition or contains a security constraint definition.

Attributes:

  • ref The id value of a security-constraint element defined in the security element at the top level of the services configuration.
  • id Identifier of a security constraint when you define the actual security constraint in this element.

The login-command child element contains a reference to the id value of a login command definition that is used for performing authentication.

Attributes:

  • ref The id value of a login command definition.
security

Contains security constraint definitions and login command definitions for authentication and authorization.

For more information, see Security.

security-constraint

Defines a security constraint.

login-command

Defines a login command that is used for custom authentication.

Attributes:

  • class Fully qualified class name of a login command class.
  • server Application server on which custom authentication is performed.
  • per-client-authentication You can only set this attribute to true for a custom login command and not an application-server-based login command. Setting it to true allows multiple clients sharing the same session to have distinct authentication states. For example, two windows of the same web browser could authenticate users independently. This attribute is set to false by default.
channels

Contains the definitions of message channels that are used to transport data between the server and clients.

For more information about channels and endpoints, see Channels and endpoints.

channel- definition

Defines a message channel that can be used to transport data.

Attributes:

  • id Identifier of the channel definition.
  • class Fully qualified class name of a channel class.
endpoint

Specifies the endpoint URI and the endpoint class of the channel definition.

Attributes:

  • uri Endpoint URI.
  • class Fully qualified name of the channel class used on the client.
properties

Contains the properties of a channel definition. The properties available depend on the type of channel specified.

clusters

Contains cluster definitions, which configure software clustering across multiple hosts.

For more information, see Clustering.

flex-client

 

timeout- minutes

Each Flex application that connects to the server triggers the creation of a FlexClient instance that represents the remote client application. I the value of the timeout-minutes element is left undefined or set to 0 (zero), FlexClient instances on the server are shut down when all associated FlexSessions (corresponding to connections between the client and server) are shut down. If this value is defined, FlexClient instances are kept alive for this amount of idle time.

For HTTP connections/sessions, if the remote client application is polling, the FlexClient is kept alive.

If the remote client is not polling and a FlexClient instance is idle for this amount of time. it is shut down even if an associated HttpSession is still valid. This is because multiple Flex client applications can share a single HttpSession. A valid HttpSession does not indicate that a specific client application instance is still running.

logging

Contains server-side logging configuration. For more information, see Logging.

target

Specifies the logging target class and the logging level.

Attributes:

  • class Fully qualified logging target class name.
  • level The logging level.
system

System-wide settings that do not fall into a previous category. In addition to locale information, it also contains redeployment and watch file settings.

locale

(Optional) Locale string; for example, "en", "de", "fr", and "es" are valid locale strings.

default- locale

The default locale string.

If no default-locale element is provided, a base set of English error messages is used.

redeploy

Support for web application redeployment when configuration files are updated. This feature works with J2EE application server web application redeployment.

The touch-file value is the file used by your application server to force web redeployment.

Check the application server to confirm what the touch-file value should be.

enabled

Boolean value that indicates whether redeployment is enabled.

watch- interval

Number of seconds to wait before checking for changes to configuration files.

watch-file

A data services configuration file watched for changes. The watch-file value must start with {context.root} or be an absolute path. The following example uses {context.root}:

{context.root}/WEB-INF/flex/data-management-config.xml
touch-file

The file that the application server uses to force redeployment of a web application. The value of the touch-file element must start with {context.root} or be an absolute path. Check the application server documentation to determine the touch-file value. For Tomcat, the touch-file value is the web.xml file, as the following example shows:

{context.root}/WEB-INF/web.xml


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/blazeds/1/blazeds_devguide/lcarch_5.html