public class GenericRemoteInvocationCommandServiceImpl extends AbstractGenericRemoteInvocationCommandService
GenericRemoteInvocationCommandService
using TransactionExecutor
.AbstractGenericRemoteInvocationService.RequestContext
Modifier and Type | Field and Description |
---|---|
private TransactionExecutor |
transactionExecutor |
Constructor and Description |
---|
GenericRemoteInvocationCommandServiceImpl()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doInitialize()
This method performs the actual
initialization . |
TransactionExecutor |
getTransactionExecutor() |
protected GenericRemoteInvocationTransactionalResults |
processCallsInTransaction(GenericRemoteInvocationTransactionalCalls<RemoteInvocationCommand<?>> transactionalCalls,
AbstractGenericRemoteInvocationService.RequestContext context)
This method calls
AbstractGenericRemoteInvocationService.processTransactionalCalls(GenericRemoteInvocationTransactionalCalls, RequestContext) in a new
transaction. |
void |
setTransactionExecutor(TransactionExecutor transactionExecutor) |
callCommands, createResponse, getHandlerId, setCommandHandlers
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 GenericRemoteInvocationCommandServiceImpl()
protected void doInitialize()
initialization
. It is called when AbstractComponent.initialize()
is
invoked for the first time. super.
AbstractComponent.doInitialize()
.public TransactionExecutor getTransactionExecutor()
TransactionExecutor
.@Inject public void setTransactionExecutor(TransactionExecutor transactionExecutor)
transactionExecutor
- is the TransactionExecutor
to Inject
.protected GenericRemoteInvocationTransactionalResults processCallsInTransaction(GenericRemoteInvocationTransactionalCalls<RemoteInvocationCommand<?>> 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<RemoteInvocationCommand<?>,GenericRemoteInvocationCommandRequest,GenericRemoteInvocationCommandResponse,GenericRemoteInvocationCommandCallHandler>
transactionalCalls
- is the GenericRemoteInvocationTransactionalCalls
.context
- is the AbstractGenericRemoteInvocationService.RequestContext
to pass.GenericRemoteInvocationTransactionalResults
.Exception
- if anything goes wrong.Copyright © 2001–2016 mmm-Team. All rights reserved.