Annotation Type ExecuteInJTATransaction

public @interface ExecuteInJTATransaction

An annotation that marks a Job class as one that will have its execution wrapped by a JTA Transaction.

If this annotation is present, Quartz will begin a JTA transaction before calling the execute() method, and will commit the transaction if the method does not throw an exception and the transaction has not had setRollbackOnly() called on it (otherwise the transaction will be rolled-back by Quartz).

This is essentially the same behavior as setting the configuration property org.quartz.scheduler.wrapJobExecutionInUserTransaction to true - except that it only affects the job that has the annotation, rather than all jobs (as the property does). If the property is set to true and the annotation is also set, then of course the annotation becomes redundant.


Optional Element Summary
 int timeout
          The JTA transaction timeout.


public abstract int timeout
The JTA transaction timeout.

If set then the UserTransaction timeout will be set to this value before beginning the transaction.

the transaction timeout.
See Also:

Copyright 2001-2019, Terracotta, Inc.