/** * @param command * @param syncHint * @return * @throws IOException */ public Location writeCommand(DataStructure command, boolean syncHint) throws IOException { return writeCommand(command, syncHint,false); }
public void addSubsciption(SubscriptionInfo subscriptionInfo, boolean retroactive) throws IOException { peristenceAdapter.writeCommand(subscriptionInfo, false); topicReferenceStore.addSubsciption(subscriptionInfo, retroactive); }
/** * @throws IOException * @see org.apache.activemq.store.TransactionStore#prepare(TransactionId) */ public void prepare(TransactionId txid) throws IOException { AMQTx tx = null; synchronized (inflightTransactions) { tx = inflightTransactions.remove(txid); } if (tx == null) { return; } peristenceAdapter.writeCommand(new JournalTransaction(JournalTransaction.XA_PREPARE, txid, false), true); synchronized (preparedTransactions) { preparedTransactions.put(txid, tx); } }
private Location writeTraceMessage(String message, boolean sync) throws IOException { JournalTrace trace = new JournalTrace(); trace.setMessage(message); return writeCommand(trace, sync); }
/** * @throws IOException * @see org.apache.activemq.store.TransactionStore#rollback(TransactionId) */ public void rollback(TransactionId txid) throws IOException { AMQTx tx = null; synchronized (inflightTransactions) { tx = inflightTransactions.remove(txid); } if (tx != null) { synchronized (preparedTransactions) { tx = preparedTransactions.remove(txid); } } if (tx != null) { if (txid.isXATransaction()) { peristenceAdapter.writeCommand(new JournalTransaction(JournalTransaction.XA_ROLLBACK, txid, false), true,true); } else { peristenceAdapter.writeCommand(new JournalTransaction(JournalTransaction.LOCAL_ROLLBACK, txid, false), true,true); } } }
peristenceAdapter.writeCommand(new JournalTransaction(JournalTransaction.XA_COMMIT, txid, wasPrepared), true,true); } else { peristenceAdapter.writeCommand(new JournalTransaction(JournalTransaction.LOCAL_COMMIT, txid, wasPrepared), true,true);
final Location location = peristenceAdapter.writeCommand(message, message.isResponseRequired()); if (!context.isInTransaction()) { if (debug) {
remove.setDestination(destination); remove.setMessageAck(ack); final Location location = peristenceAdapter.writeCommand(remove, ack.isResponseRequired()); if (!context.isInTransaction()) { if (debug) {
ack.setClientId(clientId); ack.setTransactionId(context.getTransaction() != null ? context.getTransaction().getTransactionId() : null); final Location location = peristenceAdapter.writeCommand(ack, false); final SubscriptionKey key = new SubscriptionKey(clientId, subscriptionName); if (!context.isInTransaction()) {