public class GenericRemoteInvocationRpcServiceImpl extends AbstractGenericRemoteInvocationRpcService
AbstractGenericRemoteInvocationRpcService
with transaction support via
TransactionExecutor
.AbstractGenericRemoteInvocationService.RequestContext
Modifier and Type | Field and Description |
---|---|
private TransactionExecutor |
transactionExecutor |
Constructor and Description |
---|
GenericRemoteInvocationRpcServiceImpl()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doInitialize()
This method performs the actual
initialization . |
protected TransactionExecutor |
getTransactionExecutor() |
protected GenericRemoteInvocationTransactionalResults |
processCallsInTransaction(GenericRemoteInvocationTransactionalCalls<GenericRemoteInvocationRpcCall> transactionalCalls,
AbstractGenericRemoteInvocationService.RequestContext context)
This method calls
AbstractGenericRemoteInvocationService.processTransactionalCalls(GenericRemoteInvocationTransactionalCalls, RequestContext) in a new
transaction. |
void |
setTransactionExecutor(TransactionExecutor transactionExecutor) |
callServices, createResponse, getHandlerId, registerService, setServices
doSecurityCheck, getExceptionUtil, getHandler, getHandlerCount, getMaximumCallsPerRequest, getMaximumCallsPerTransaction, getMaximumTransactionsPerRequest, getSecurityDetector, getValidator, getXsrfTokenManager, handleCallFailure, handleLoginOperation, handleTxCallsFailure, logFailure, processCall, processRequest, processTransactionalCalls, registerHandler, setExceptionUtil, setMaximumCallsPerRequest, setMaximumCallsPerTransaction, setMaximumTransactionsPerRequest, setSecurityDetector, setValidator, setXsrfTokenManager
createLogger, getLogger
doInitialized, getInitializationState, initialize
private TransactionExecutor transactionExecutor
getTransactionExecutor()
public GenericRemoteInvocationRpcServiceImpl()
protected TransactionExecutor getTransactionExecutor()
TransactionExecutor
.@Inject public void setTransactionExecutor(TransactionExecutor transactionExecutor)
transactionExecutor
- is the TransactionExecutor
to Inject
.protected GenericRemoteInvocationTransactionalResults processCallsInTransaction(GenericRemoteInvocationTransactionalCalls<GenericRemoteInvocationRpcCall> transactionalCalls, AbstractGenericRemoteInvocationService.RequestContext context) throws Exception
AbstractGenericRemoteInvocationService.processTransactionalCalls(GenericRemoteInvocationTransactionalCalls, RequestContext)
in a new
transaction. @Transactional
you need to be aware that
you have to keep the annotated method out of this class as spring-aop uses dynamic proxies by default
that only support transactions when a method is called from outside the class and not for method calls
within a class. This is a typical pitfall and one of the reasons why we are using
mmm-transaction
by default.processCallsInTransaction
in class AbstractGenericRemoteInvocationService<GenericRemoteInvocationRpcCall,GenericRemoteInvocationRpcRequest,GenericRemoteInvocationRpcResponse,GenericRemoteInvocationRpcCallHandler<?>>
transactionalCalls
- is the GenericRemoteInvocationTransactionalCalls
.context
- is the AbstractGenericRemoteInvocationService.RequestContext
to pass.GenericRemoteInvocationTransactionalResults
.Exception
- if anything goes wrong.protected void doInitialize()
initialization
. It is called when AbstractComponent.initialize()
is
invoked for the first time. super.
AbstractComponent.doInitialize()
.Copyright © 2001–2016 mmm-Team. All rights reserved.