int clientWindowSize = entry.getValue().getClientWindowSize();
if (clientWindowSize != 0)
{
SessionConsumerFlowCreditMessage packet = new SessionConsumerFlowCreditMessage(entry.getKey(),
clientWindowSize);
sendPacketWithoutLock(packet);
}
else
{
// https://jira.jboss.org/browse/HORNETQ-522
SessionConsumerFlowCreditMessage packet = new SessionConsumerFlowCreditMessage(entry.getKey(),
1);
sendPacketWithoutLock(packet);
}
}
if ((!autoCommitAcks || !autoCommitSends) && workDone)
{
// this is protected by a lock, so we can guarantee nothing will sneak here
// while we do our work here
rollbackOnly = true;
}
if (currentXID != null)
{
sendPacketWithoutLock(new SessionXAAfterFailedMessage(currentXID));
rollbackOnly = true;
}
// Now start the session if it was already started
if (started)
{
for (ClientConsumerInternal consumer : cloneConsumers())
{
consumer.clearAtFailover();
consumer.start();
}
Packet packet = new PacketImpl(PacketImpl.SESS_START);
packet.setChannelID(channel.getID());
Connection conn = channel.getConnection().getTransportConnection();
HornetQBuffer buffer = packet.encode(channel.getConnection());
conn.write(buffer, false, false);
}
resetCreditManager = true;