Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

## org.quartz
Annotation Type ExecuteInJTATransaction

    @Documented
    @Retention(value=RUNTIME)
    @Target(value=TYPE)
    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.

Author:
  jhouse

Optional Element Summary
`int` | `timeout` The JTA transaction timeout.

### 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.

  Returns:
    the transaction timeout.
  See Also:
    `UserTransaction#setTransactionTimeout(int)`
  Default:
    -1

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

Copyright 2001-2013, Terracotta, Inc.