org.apache.camel.component.sjms
Interface TransactionCommitStrategy

All Known Implementing Classes:
BatchTransactionCommitStrategy, DefaultTransactionCommitStrategy

public interface TransactionCommitStrategy

Provides a entry point into the transaction Synchronization workflow that will allow a user to control when the Session commit operation is executed.


Method Summary
 boolean commit(org.apache.camel.Exchange exchange)
          Should returns true to allow the commit to proceed.
 boolean rollback(org.apache.camel.Exchange exchange)
          Should returns true to allow the commit to proceed.
 

Method Detail

commit

boolean commit(org.apache.camel.Exchange exchange)
               throws Exception
Should returns true to allow the commit to proceed. If false, the commit will be skipped. The default should always be true to avoid messages remaining uncommitted.

Parameters:
exchange - Exchange
Returns:
true if the Session should be committed, otherwise false
Throws:
Exception

rollback

boolean rollback(org.apache.camel.Exchange exchange)
                 throws Exception
Should returns true to allow the commit to proceed. If false, the commit will be skipped. The default should always be true to avoid messages remaining uncommitted.

Parameters:
exchange - Exchange
Returns:
true if the Session should be committed, otherwise false
Throws:
Exception


Apache Camel