protected void onStompCommit(StompFrame command) throws ProtocolException { checkConnected(); Map<String, String> headers = command.getHeaders(); String stompTx = headers.get(Stomp.Headers.TRANSACTION); if (stompTx == null) { throw new ProtocolException("Must specify the transaction you are committing"); } TransactionId activemqTx = transactions.remove(stompTx); if (activemqTx == null) { throw new ProtocolException("Invalid transaction id: " + stompTx); } for (Iterator<StompSubscription> iter = subscriptionsByConsumerId.values().iterator(); iter.hasNext();) { StompSubscription sub = iter.next(); sub.onStompCommit(activemqTx); } TransactionInfo tx = new TransactionInfo(); tx.setConnectionId(connectionId); tx.setTransactionId(activemqTx); tx.setType(TransactionInfo.COMMIT_ONE_PHASE); sendToActiveMQ(tx, createResponseHandler(command)); }
protected void onStompCommit(StompFrame command) throws ProtocolException { checkConnected(); Map<String, String> headers = command.getHeaders(); String stompTx = headers.get(Stomp.Headers.TRANSACTION); if (stompTx == null) { throw new ProtocolException("Must specify the transaction you are committing"); } TransactionId activemqTx = transactions.remove(stompTx); if (activemqTx == null) { throw new ProtocolException("Invalid transaction id: " + stompTx); } for (StompSubscription sub : subscriptionsByConsumerId.values()) { sub.onStompCommit(activemqTx); } pedingAcks.clear(); TransactionInfo tx = new TransactionInfo(); tx.setConnectionId(connectionId); tx.setTransactionId(activemqTx); tx.setType(TransactionInfo.COMMIT_ONE_PHASE); sendToActiveMQ(tx, createResponseHandler(command)); }
protected void onStompCommit(StompFrame command) throws ProtocolException { checkConnected(); Map<String, String> headers = command.getHeaders(); String stompTx = headers.get(Stomp.Headers.TRANSACTION); if (stompTx == null) { throw new ProtocolException("Must specify the transaction you are committing"); } TransactionId activemqTx = transactions.remove(stompTx); if (activemqTx == null) { throw new ProtocolException("Invalid transaction id: " + stompTx); } for (StompSubscription sub : subscriptionsByConsumerId.values()) { sub.onStompCommit(activemqTx); } pedingAcks.clear(); TransactionInfo tx = new TransactionInfo(); tx.setConnectionId(connectionId); tx.setTransactionId(activemqTx); tx.setType(TransactionInfo.COMMIT_ONE_PHASE); sendToActiveMQ(tx, createResponseHandler(command)); }
protected void onStompCommit(StompFrame command) throws ProtocolException { checkConnected(); Map<String, String> headers = command.getHeaders(); String stompTx = headers.get(Stomp.Headers.TRANSACTION); if (stompTx == null) { throw new ProtocolException("Must specify the transaction you are committing"); } TransactionId activemqTx = transactions.remove(stompTx); if (activemqTx == null) { throw new ProtocolException("Invalid transaction id: " + stompTx); } for (StompSubscription sub : subscriptionsByConsumerId.values()) { sub.onStompCommit(activemqTx); } pedingAcks.clear(); TransactionInfo tx = new TransactionInfo(); tx.setConnectionId(connectionId); tx.setTransactionId(activemqTx); tx.setType(TransactionInfo.COMMIT_ONE_PHASE); sendToActiveMQ(tx, createResponseHandler(command)); }