You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Current »

Introduction

Transactional behavior covers the situation where a group of files can only be processed when all the files in a group have been successfully transferred.

Feature Description

Transactional behavior specifies whether a transfer should be processed within a single transaction - i.e. whether all objects the objects specified are to be successfully transferred or none at all.

Should an error occur during a transfer operation when Transactional Behavior is specified then all transfers already completed will be rolled back.

Note that Atomic Transfer has to be specified with transactional behavior. This causes a suffix or prefix such as "~" to be temporarily added to the names of target files as long as the file transfer has not been completed. The suffix or prefix will then be removed once transfer has been successful. This approach means that in situations where the transfer duration could be significant (e.g. with larger files) files will only become visible to directory watchers once they have been fully transferred.

If any of the files in the transaction cannot be transferred successfully then no files will be renamed, instead the temporarily created files will be removed from the target system.

The remove_files parameter, which causes files on the source to be removed after successful transfer, will only be executed after all the files have been successfully transferred. Otherwise no source files will be removed.

JADE JITL Job Example

The following example shows the use of the Transactional Behavior transactional parameter together with Atomic Transfer in the JobScheduler JADE JITL job.

<job
     title = "API Job for JobScheduler Advanced Data Exchange"
     order = "yes"  stop_on_error = "no" >

     <description>
       <include file = "jobs/JADE-Job.xml" />
     </description>
    
     <params>
       <param name = "transactional" value = "true" />       
       <param name = "atomic_prefix" value = "~" />
       <param name = "atomic_suffix" value = "~" />
       <param name = "file_spec"     value = "^report\.csv$" />
       <param name = "host"          value = "ftp.example.com" />
       <param name = "local_dir"     value = "." />
       <param name = "operation"     value = "copy" />
       <param name = "passive_mode"  value = "false" />
       <param name = "password"      value = "top-secret" />       
       <param name = "remote_dir"    value = "." />       
     </params>

     <script language   = "java"
             java_class = "sos.scheduler.jade.JadeJob" >
     </script>
 </job>
  • No labels