Package com.jsgalactic.axiom.jta
Class JtaLookupService
java.lang.Object
com.jsgalactic.axiom.jta.JtaLookupService
- All Implemented Interfaces:
JtaTransactionLookup
The service-loaded implementation of
JtaTransactionLookup.
It consults the Jta instances built in this class loader, each of which answers only
for the request context it was given. Applications normally use Jta.context(Context)
directly; integrations that must not depend on this module can load this service by name and call
it with JDK types only. The service never begins, completes or mutates a transaction.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReports whether a transaction is currently associated with the request represented bycontext.booleanrollbackOnly(Object context) Reports whether the request's active transaction has been marked rollback-only.Returns the request's transaction status as a plain name:ACTIVE,MARKED_ROLLBACK,COMMITTED,ROLLED_BACK,INACTIVEorUNKNOWN.
-
Constructor Details
-
JtaLookupService
public JtaLookupService()Creates the service instance used byServiceLoader.
-
-
Method Details
-
active
Description copied from interface:JtaTransactionLookupReports whether a transaction is currently associated with the request represented bycontext.- Specified by:
activein interfaceJtaTransactionLookup- Parameters:
context- the request's Axiom context, or any object to answerfalse- Returns:
- true while a transaction is active for that request
-
status
Description copied from interface:JtaTransactionLookupReturns the request's transaction status as a plain name:ACTIVE,MARKED_ROLLBACK,COMMITTED,ROLLED_BACK,INACTIVEorUNKNOWN.- Specified by:
statusin interfaceJtaTransactionLookup- Parameters:
context- the request's Axiom context- Returns:
- one of the six status names
-
rollbackOnly
Description copied from interface:JtaTransactionLookupReports whether the request's active transaction has been marked rollback-only.- Specified by:
rollbackOnlyin interfaceJtaTransactionLookup- Parameters:
context- the request's Axiom context- Returns:
- true when rollback-only was set by the handler or the provider
-