|
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.
All MessageSource
s can have success/failure expressions evaluated either as part
of a transaction with a <transactional/> poller or after success/failure when
running in a <pseudo-transactional/> poller. This interface is for those
message sources that need additional flexibility than that provided by SpEL expressions.
Method Summary | |
---|---|
void |
afterCommit(java.lang.Object object)
Invoked via TransactionSynchronization when the
transaction commits. |
void |
afterReceiveNoTx(V resource)
Called when there is no transaction and the receive() call completed. |
void |
afterRollback(java.lang.Object object)
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(java.lang.Object object)
TransactionSynchronization
when the
transaction commits.
object
- The resource to be "committed"void afterRollback(java.lang.Object object)
TransactionSynchronization
when the
transaction rolls back.
object
- 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 |