Class SessionTransactionSynchronization
- java.lang.Object
-
- org.apache.camel.support.SynchronizationAdapter
-
- org.apache.camel.component.sjms.tx.SessionTransactionSynchronization
-
- All Implemented Interfaces:
org.apache.camel.Ordered
,org.apache.camel.spi.Synchronization
,org.apache.camel.spi.SynchronizationRouteAware
,org.apache.camel.spi.SynchronizationVetoable
public class SessionTransactionSynchronization extends org.apache.camel.support.SynchronizationAdapter
SessionTransactionSynchronization is called at the completion of eachExchange
. The commit or rollback on theSession
must be performed from the same thread that consumed the message.
-
-
Constructor Summary
Constructors Constructor Description SessionTransactionSynchronization(javax.jms.Session session, TransactionCommitStrategy commitStrategy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allowHandover()
void
onComplete(org.apache.camel.Exchange exchange)
void
onFailure(org.apache.camel.Exchange exchange)
-
-
-
Constructor Detail
-
SessionTransactionSynchronization
public SessionTransactionSynchronization(javax.jms.Session session, TransactionCommitStrategy commitStrategy)
-
-
Method Detail
-
onFailure
public void onFailure(org.apache.camel.Exchange exchange)
- Specified by:
onFailure
in interfaceorg.apache.camel.spi.Synchronization
- Overrides:
onFailure
in classorg.apache.camel.support.SynchronizationAdapter
-
onComplete
public void onComplete(org.apache.camel.Exchange exchange)
- Specified by:
onComplete
in interfaceorg.apache.camel.spi.Synchronization
- Overrides:
onComplete
in classorg.apache.camel.support.SynchronizationAdapter
-
allowHandover
public boolean allowHandover()
- Specified by:
allowHandover
in interfaceorg.apache.camel.spi.SynchronizationVetoable
- Overrides:
allowHandover
in classorg.apache.camel.support.SynchronizationAdapter
-
-