Package org.apache.camel.component.sjms
Interface TransactionCommitStrategy
-
- All Known Implementing Classes:
BatchTransactionCommitStrategy
,DefaultTransactionCommitStrategy
public interface TransactionCommitStrategy
Provides a entry point into the transactionSynchronization
workflow that will allow a user to control when theSession
commit operation is executed.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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
-
-