@Inherited @InterceptorBinding @Retention(value=RUNTIME) @Target(value={TYPE,METHOD}) public @interface SRA
enableJTABridge() attribute is enabled then a JTA transaction context will be associated for the
duration of the method call so that any resources used by the method will be enlisted with the
SRA and will be committed or rolled back when the SRA finishes.
Resource methods can access the context id, if required, by injecting it via the JAX-RS @HeaderParam
annotation or via the SRAClient API. This may be useful, for example, for associating
business work with an SRA.| 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 SRA 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 SRA to cancel.
|
boolean |
delayCommit
Some annotations (such as REQUIRES_NEW) will start an SRA on entry to a method and
end it on exit.
|
boolean |
enableJTABridge
Create a local JTA transaction context such that existing transactional JavaEE code may be called
within the scope of the SRA.
|
boolean |
terminal
Normally if an SRA is present when a bean method is invoked it will not be ended when the method returns.
|
SRA.Type |
value
The Type element of the SRA annotation indicates whether a bean method
is to be executed within the context of a SRA.
|
public abstract SRA.Type value
public abstract boolean enableJTABridge
public abstract boolean delayCommit
public abstract boolean terminal
public abstract javax.ws.rs.core.Response.Status.Family[] cancelOnFamily
Response.Status.Family families that will cause cancellation of the SRACopyright © 2021 JBoss by Red Hat. All rights reserved.