|
Spring Integration | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PseudoTransactionalMessageSource<T,V>
MessageSource
s implementing this sub-interface can participate in
a Spring transaction. While the underlying resource is not strictly
transactional, the final disposition of the resource will be
synchronized with any encompassing transaction. For example, when
a message source is used with a transactional poller, if any upstream
activity causes the transaction to roll back, then the afterRollback(Object)
method will be called, allowing the message source to reset the state of
whatever. If the transaction commits, the afterCommit(Object)
method
is called.
Method Summary | |
---|---|
void |
afterCommit(V resource)
Invoked via TransactionSynchronization when the
transaction commits. |
void |
afterReceiveNoTx(V resource)
Called when there is no transaction and the receive() call completed. |
void |
afterRollback(V resource)
Invoked via TransactionSynchronization when the
transaction rolls back. |
void |
afterSendNoTx(V resource)
Called when there is no transaction and after the message was sent to the channel. |
V |
getResource()
Obtain the resource on which appropriate action needs to be taken. |
Methods inherited from interface org.springframework.integration.core.MessageSource |
---|
receive |
Method Detail |
---|
V getResource()
void afterCommit(V resource)
TransactionSynchronization
when the
transaction commits.
resource
- The resource to be "committed"void afterRollback(V resource)
TransactionSynchronization
when the
transaction rolls back.
resource
- void afterReceiveNoTx(V resource)
resource
- void afterSendNoTx(V resource)
resource
-
|
Spring Integration | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |