A new sub directory is created for each nested Oddjob with an id. The job of the nested Oddjob are persisted to the sub directory. Thus the directory structure mirrors the structure of the Oddjobs.
dir | The directory in which the files will be created. |
path | A '/' delimited path to the location for the persister. |
Example 1 | Using a file persister with Oddjob. |
Configured By | ATTRIBUTE |
Access | READ_WRITE |
Required | No. |
The directory in which the files will be created.
Configured By | ATTRIBUTE |
Access | WRITE_ONLY |
Required | No. |
A '/' delimited path to the location for the persister. Normally this is set by nested persisters to be the id of the Oddjob that created them.
Using a file persister with Oddjob. The persist directory is passed in as an argument from the command line. The state of child jobs will be saved in a child directory relative to the given directory of the name 'important-jobs'.
<oddjob id="this"> <job> <oddjob id="important-jobs" file="${this.dir}/FilePersisterExampleInner.xml"> <persister> <file-persister dir="${this.args[0]}"/> </persister> </oddjob> </job> </oddjob>