public class XARequestProcessor
extends java.lang.Object
xaRequestProcessor
.Modifier and Type | Class and Description |
---|---|
private static class |
XARequestProcessor.XARequestCallable
Class to furnish
|
private static class |
XARequestProcessor.XAResponse |
Modifier and Type | Field and Description |
---|---|
private java.util.concurrent.ConcurrentMap<javax.transaction.xa.Xid,XAThreadPool.MultiRunner> |
executorMap |
private EhcacheXAResourceImpl |
resourceImpl |
private static XAThreadPool |
xaProcessorPool |
Constructor and Description |
---|
XARequestProcessor(EhcacheXAResourceImpl resourceImpl)
Constructor
|
Modifier and Type | Method and Description |
---|---|
private void |
cleanupThread(javax.transaction.xa.Xid xid)
Removes the ExecutorService from the map and shuts it down
|
private XAThreadPool.MultiRunner |
getOrCreateThread(javax.transaction.xa.Xid xid)
Gets the executor service for a Transaction, either by creating a new one if none exists, or returning the
existing one
|
int |
process(XARequest request)
Process a XARequest
|
static void |
shutdown()
Release resources shared by all XARequestProcessors
|
private static volatile XAThreadPool xaProcessorPool
private final java.util.concurrent.ConcurrentMap<javax.transaction.xa.Xid,XAThreadPool.MultiRunner> executorMap
private EhcacheXAResourceImpl resourceImpl
public XARequestProcessor(EhcacheXAResourceImpl resourceImpl)
resourceImpl
- The EhcacheXAResourceImpl instance this processor will perform againstpublic static void shutdown()
public int process(XARequest request) throws javax.transaction.xa.XAException
request
- the XARequestjavax.transaction.xa.XAException
- the XAException thrown by the XAResourceprivate XAThreadPool.MultiRunner getOrCreateThread(javax.transaction.xa.Xid xid)
xid
- The Xid of the Transactionprivate void cleanupThread(javax.transaction.xa.Xid xid)
xid
- The Xid of the Transaction