Index Changes
This is version 3. It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]
Beta Document for v2.1

Table of Contents



Implementing the File Binding Component in a Cluster

The only configuration requirement for implementing the File BC in a cluster is that the input and output file addresses in the WSDL document need to point to an NFS location. The output files need to be named using a pattern that includes either a UUID or sequence number in the filename to prevent the files from being overwritten. You can also configure the locking mechanism of the File BC to prevent inbound files from being picked up by more than one instance. There is a new property named deleteFileOnRead that allows you to specify that a file be removed from the directory when it is read. You should also configure the BC to archive files if you have them removed.

In inbound mode, files are distributed evenly across instances and each file is delivered to only one instance. In on-demand read mode, each file is available to read either from all the instances (configuration mode) or from only one instance (payload mode). In outbound mode, all instances write to either one file (append mode) or to independent files, depending on how the BC is configured.

The File BC is dependent on the following shared library:

  • Sun Encoder Library

To Add the File Binding Component to the Cluster

  1. Add the following shared library to the cluster as described in To Add a Shared Library to a Cluster:
    • sun-encoder-library
  2. Add the File BC to the cluster as described in To Add a GlassFish ESB Component to a Cluster.
    The name of the File BC node is sun-file-binding.
  3. Before you click OK on the Manage Targets page, enter the number of threads for the outbound processor.

Note - If you need to modify the number of outbound threads once the File BC is added to a cluster, you need to make the changes using the GlassFish Admin Console and you need to update the property for each instance in the cluster.

To Configure the File BC WSDL for Clustering

The File BC has no runtime configuration requirements for clustering, but there are a few requirements and options for configuring the properties in any File BC WSDL documents deployed to the cluster. These options assist with concurrency issues, load balancing, and failover. For more information about the properties discussed below, see the following topics in Using the File Binding Component:

  1. For outbound messages, do the following:
    1. In the File BC WSDL document, scroll to the input message definition under Bindings (named file:message, by default).
    2. Select file:message.
      The Properties panel displays the properties for the message.
    3. In the FileName property, enter a name for the output file using either %u to assign a unique UUID number to each output file or %{seq_name} for persisted sequence number creation. For example, output%u.txt.
      Note - Do not use %d in the file name because files might be overwritten.
    4. In the fileNameIsPattern property, enter true.
    5. Save and close the WSDL file.
  2. For inbound on-demand, read-only messages, you can configure any of the following options:
    1. In the File BC WSDL document, scroll to the input message under Bindings (named file:message, by default).
    2. Select file:message.
      The Properties panel displays the properties for the message.
    3. Do one of the following:
      • To allow multiple instances and processes to access the input file, set the value of the deleteFileOnRead property to false.
      • To ensure only one thread and one process accesses the file, set the value of the deleteFileOnRead property to true.
        This deletes inbound on-demand messages once they are read.
    4. If deleteFileOnRead is set to true, do one of the following:
      • To retain a copy of the deleted files, set the value of the archive property to true and specify an archive directory.
        The files are removed from the input directory and are copied to the archive directory with a UUID appended to the name to ensure it is unique. This retains a history of the files that have been processed.
      • To simply delete the files once they are read, set the value of the archive property to false.
  3. For inbound messages, you can use the file locking mechanism of the File BC to ensure that each inbound file is picked up only once by one instance in the cluster, and to ensure that the outbound files are not overwritten.
    For more information, see Configuring File BC WSDL Attributes (under File Address Element) and Inbound Message Processing.

Previous Next
Return to GlassFish ESB Documentation Home

JSPWiki v2.4.100
[RSS]
« Home Index Changes Prefs
This particular version was published on 12-May-09 17:31 PM, -0700 by CarolT