@Inherited @Retention(value=RUNTIME) @Target(value={TYPE,METHOD}) public @interface LRA
LRAClient.LRA_HTTP_HEADER.
The implementation (of the LRA specification) is expected to manage this context
and the application developer is expected to declaratively control the creation,
propagation and destruction of LRAs using the @LRA annotation. When a JAX-RS bean
method is invoked in the context of an LRA any JAX-RS client requests that it
performs will carry the same header so that the receiving resource knows that it
is inside an LRA context (typically achieved using JAX-RS client filters).
Resource methods can access the context id, if required, by injecting it via
the JAX-RS @HeaderParam annotation. This may be useful, for example, for
associating business work with an LRA.| Modifier and Type | Optional Element and Description |
|---|---|
javax.ws.rs.core.Response.Status[] |
cancelOn
The cancelOn element can be set to indicate which HTTP response
codes will cause the LRA to cancel
|
javax.ws.rs.core.Response.Status.Family[] |
cancelOnFamily
The cancelOnFamily element can be set to indicate which families of
HTTP response codes will cause the LRA to cancel.
|
boolean |
delayClose
Some annotations (such as REQUIRES_NEW) will start an LRA on entry to
a method and end it on exit.
|
boolean |
join
If true then the annotated class will be checked for participant
annotations and when present the class will be enlisted with any LRA
that is associated with the invocation
|
boolean |
terminal
Normally if an LRA is present when a bean method is executed it will not
be ended when the method returns.
|
LRA.Type |
value
The Type element of the LRA annotation indicates whether a bean method
is to be executed within a compensatable LRA context.
|
public abstract LRA.Type value
public abstract boolean delayClose
public abstract boolean terminal
public abstract boolean join
public abstract javax.ws.rs.core.Response.Status.Family[] cancelOnFamily
Response.Status.Family families that will cause
cancellation of the LRACopyright © 2018 Eclipse Foundation. All rights reserved.