{
outcome = null;
}
ServerTransaction txn = _link.getTransaction(transactionId);
if(outcome instanceof Accepted)
{
txn.dequeue(_queueEntry.getOwningResource(), _queueEntry.getMessage(),
new ServerTransaction.Action()
{
public void postCommit()
{
if(_queueEntry.isAcquiredBy(getConsumer()))
{
_queueEntry.delete();
}
}
public void onRollback()
{
}
});
txn.addPostTransactionAction(new ServerTransaction.Action()
{
public void postCommit()
{
//_link.getEndpoint().settle(_deliveryTag);
_link.getEndpoint().updateDisposition(_deliveryTag, (DeliveryState)outcome, true);
_link.getEndpoint().sendFlowConditional();
}
public void onRollback()
{
if(Boolean.TRUE.equals(settled))
{
final Modified modified = new Modified();
modified.setDeliveryFailed(true);
_link.getEndpoint().updateDisposition(_deliveryTag, modified, true);
_link.getEndpoint().sendFlowConditional();
}
}
});
}
else if(outcome instanceof Released)
{
txn.addPostTransactionAction(new ServerTransaction.Action()
{
public void postCommit()
{
_queueEntry.release();
_link.getEndpoint().settle(_deliveryTag);
}
public void onRollback()
{
_link.getEndpoint().settle(_deliveryTag);
}
});
}
else if(outcome instanceof Modified)
{
txn.addPostTransactionAction(new ServerTransaction.Action()
{
public void postCommit()
{
_queueEntry.release();