org.mule.transport.jms
Class JmsClientAcknowledgeTransaction

java.lang.Object
  extended by org.mule.transaction.AbstractTransaction
      extended by org.mule.transaction.AbstractSingleResourceTransaction
          extended by org.mule.transport.jms.JmsClientAcknowledgeTransaction
All Implemented Interfaces:
Transaction

public class JmsClientAcknowledgeTransaction
extends AbstractSingleResourceTransaction

JmsClientAcknowledgeTransaction is a transaction implementation of performing a message acknowledgement. There is no notion of rollback with client acknowledgement, but this transaction can be useful for controlling how messages are consumed from a destination.


Field Summary
 
Fields inherited from class org.mule.transaction.AbstractSingleResourceTransaction
committed, key, resource, rollbackOnly, rolledBack, started, txStatusMappings
 
Fields inherited from class org.mule.transaction.AbstractTransaction
id, logger, muleContext
 
Fields inherited from interface org.mule.api.transaction.Transaction
STATUS_ACTIVE, STATUS_COMMITTED, STATUS_COMMITTING, STATUS_MARKED_ROLLBACK, STATUS_NO_TRANSACTION, STATUS_PREPARED, STATUS_PREPARING, STATUS_ROLLEDBACK, STATUS_ROLLING_BACK, STATUS_UNKNOWN
 
Constructor Summary
JmsClientAcknowledgeTransaction(MuleContext muleContext)
           
 
Method Summary
 void bindResource(Object key, Object resource)
           
protected  void doBegin()
          Really begin the transaction.
protected  void doCommit()
          Commit the transaction on the underlying resource
protected  void doRollback()
          Rollback the transaction on the underlying resource
 void setMessage(Message message)
           
 boolean supports(Object key, Object resource)
           
 
Methods inherited from class org.mule.transaction.AbstractSingleResourceTransaction
begin, commit, getKeyType, getResource, getResourceType, getStatus, hasResource, rollback, setRollbackOnly, toString
 
Methods inherited from class org.mule.transaction.AbstractTransaction
fireNotification, getId, isBegun, isCommitted, isRollbackOnly, isRolledBack, isXA, resume, suspend, unbindTransaction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JmsClientAcknowledgeTransaction

public JmsClientAcknowledgeTransaction(MuleContext muleContext)
Method Detail

setMessage

public void setMessage(Message message)

doBegin

protected void doBegin()
                throws TransactionException
Description copied from class: AbstractTransaction
Really begin the transaction. Note that resources are enlisted yet.

Specified by:
doBegin in class AbstractTransaction
Throws:
TransactionException

doCommit

protected void doCommit()
                 throws TransactionException
Description copied from class: AbstractTransaction
Commit the transaction on the underlying resource

Specified by:
doCommit in class AbstractTransaction
Throws:
TransactionException

doRollback

protected void doRollback()
                   throws TransactionException
Description copied from class: AbstractTransaction
Rollback the transaction on the underlying resource

Specified by:
doRollback in class AbstractTransaction
Throws:
TransactionException

bindResource

public void bindResource(Object key,
                         Object resource)
                  throws TransactionException
Specified by:
bindResource in interface Transaction
Overrides:
bindResource in class AbstractSingleResourceTransaction
Throws:
TransactionException

supports

public boolean supports(Object key,
                        Object resource)
Specified by:
supports in interface Transaction
Overrides:
supports in class AbstractSingleResourceTransaction
Parameters:
key - transactional resource key (i.e jdbc DataSource or jms Connection)
resource - transactional resource (i.e. jdbc Connection or jms Session)
Returns:
true if the current transaction supports to bind transactional resources key and resource


Copyright © 2003-2014 MuleSoft, Inc.. All Rights Reserved.