void commit(KahaTransactionStore transactionStore) throws IOException {
for (int i = 0; i < list.size(); i++) {
TxCommand command = list.get(i);
MessageStore ms = transactionStore.getStoreById(command.getMessageStoreKey());
if (command.isAdd()) {
ms.addMessage(null, (Message)command.getCommand());
}
}
for (int i = 0; i < list.size(); i++) {
TxCommand command = list.get(i);
MessageStore ms = transactionStore.getStoreById(command.getMessageStoreKey());