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.

YADE JITL Job Example

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

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

       <include file = "jobs/JADE-Job.xml" />
       <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 = "" />
       <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 = "." />       

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