A reset might also be needed before running a job elsewhere such as on a remote server.
As of version 1.4 of Oddjob, this job can now also be used to force
jobs that are org.oddjob.Forceable
by specify 'force' as level.
This job is not Serializable and so won't be persisted itself.
See also the state:resets job.
job | Job to reset. |
level | The reset level, hard or soft |
name | A name, can be any text. |
stop | This flag is set by the stop method and should be examined by any Stoppable jobs in their processing loops. |
Example 1 | Using reset in explorer.xml. |
Example 2 | Force a job to complete. |
Configured By | ATTRIBUTE |
Access | READ_WRITE |
Required | Yes. |
Job to reset.
Configured By | ATTRIBUTE |
Access | READ_WRITE |
Required | No, defaults to soft. |
The reset level, hard or soft
Configured By | ATTRIBUTE |
Access | READ_WRITE |
Required | No. |
A name, can be any text.
Access | READ_ONLY |
Required | Read Only. |
This flag is set by the stop method and should be examined by any Stoppable jobs in their processing loops.
Using reset in explorer.xml.
Look at the explorer.xml file in Oddjob's home directory. This file is loaded by the default oddjob.xml file when Oddjob first runs. The explorer.xml configuration is run with a file-persister persister that persists the Explorers state when it completes. When Oddjob is run again the Explorer will be loaded with it's previous COMPLETE state and so won't run. The reset is necessary to set it back to READY.
Force a job to complete.
<oddjob> <job> <sequential> <jobs> <reset job="${echo}" level="force"/> <echo id="echo">You will never see this!</echo> </jobs> </sequential> </job> </oddjob>