|
Java API Reference for Oracle Infrastructure Web Services 11 Release 1 (11.1.1) E10654-04 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Retention(value=RUNTIME)
@Target(value={TYPE,METHOD})
public @interface Retry
This annotation is used to control the behavior of the retry mechanism while processing the asynchronous request from the queue. In case of abnormal termination of the request processing, it may or may not be safe to retry the operation depending on whether it has any side effects or not.
If the method is not idempotent, the retry mechanism should be disabled by setting "enable=false".
The absence of this annotation implies that the method is idempotent. By default, all methods are idempotent.
If the method is idempotent, it implies that there is no side effect of calling this method more than once. In case the execution of this method results in an abnormal termination, system will retry this method from the beginning as it is safe to do so.
If the method can participate in a global transaction, the system can achieve the non-idempotent behavior in the most reliable way. The execution of the method and the posting of the response, both are done under one global transaction. If any of the steps result in an abnormal termination, the transaction will be rolled back and the method will be executed again in a new transaction. In this case it is guaranteed that the method will be executed only once in a completed transaction and the result of the execution will always be posted only once to the response queue.
If the method cannot participate in a global transaction, then the system will guarantee that the non-idempotent method is executed "at most once". If the method execution does not complete because of some abnormal termination, a fault response will be sent to the callback service. If there is an abnormal termination after completely executing the method but before/while posting the response to the queue then also a fault message will be sent to the callback service.
If this annotation is applied to the class, all the methods inherit the setting. If a method has its own annotation, then the class level annotation ignored.
Optional Element Summary | |
---|---|
boolean |
enable Indicates if this method can be safely retried in case of abnormal termination during the execution of this method. |
boolean |
supportsGlobalTransaction Indicates if this method is capable of participating in the global transaction or not. |
public abstract boolean enable
public abstract boolean supportsGlobalTransaction
|
Java API Reference for Oracle Infrastructure Web Services 11 Release 1 (11.1.1) E10654-04 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |