if(_resumedMessage)
{
if(_unsettledMap.containsKey(_messageDeliveryTag))
{
Outcome outcome = _unsettledMap.get(_messageDeliveryTag);
boolean settled = ReceiverSettleMode.FIRST.equals(getReceivingSettlementMode());
getEndpoint().updateDisposition(_messageDeliveryTag, (DeliveryState) outcome, settled);
if(settled)
{
_unsettledMap.remove(_messageDeliveryTag);
}
}
else
{
System.err.println("UNEXPECTED!!");
System.err.println("Delivery Tag: " + _messageDeliveryTag);
System.err.println("_unsettledMap: " + _unsettledMap);
}
}
else
{
MessageMetaData_1_0 mmd = null;
List<ByteBuffer> immutableSections = new ArrayList<ByteBuffer>(3);
mmd = new MessageMetaData_1_0(fragments.toArray(new ByteBuffer[fragments.size()]),
_sectionDecoder,
immutableSections);
StoredMessage<MessageMetaData_1_0> storedMessage = _vhost.getMessageStore().addMessage(mmd);
boolean skipping = true;
int offset = 0;
for(ByteBuffer bareMessageBuf : immutableSections)
{
storedMessage.addContent(offset, bareMessageBuf.duplicate());
offset += bareMessageBuf.remaining();
}
storedMessage.flushToStore();
Message_1_0 message = new Message_1_0(storedMessage, fragments, getSession().getConnection().getReference());
MessageReference<Message_1_0> reference = message.newReference();
Binary transactionId = null;
org.apache.qpid.amqp_1_0.type.DeliveryState xfrState = xfr.getState();
if(xfrState != null)
{
if(xfrState instanceof TransactionalState)
{
transactionId = ((TransactionalState)xfrState).getTxnId();
}
}
ServerTransaction transaction = null;
if(transactionId != null)
{
transaction = getSession().getTransaction(transactionId);
}
else
{
Session_1_0 session = getSession();
transaction = session != null ? session.getTransaction(null) : new AutoCommitTransaction(_vhost.getMessageStore());
}
Outcome outcome = _destination.send(message, transaction);
DeliveryState resultantState;
if(transactionId == null)
{