@Override public void acknowledge(ConnectionContext context, String clientId, String subscriptionName, MessageId messageId, MessageAck ack) throws IOException { if (ack != null && ack.isUnmatchedAck()) { if (LOG.isTraceEnabled()) { LOG.trace("ignoring unmatched selector ack for: " + messageId + ", cleanup will get to this message after subsequent acks."); } return; } TransactionContext c = persistenceAdapter.getTransactionContext(context); try { long[] res = getCachedStoreSequenceId(c, destination, messageId); if (this.isPrioritizedMessages()) { adapter.doSetLastAckWithPriority(c, destination, context != null ? context.getXid() : null, clientId, subscriptionName, res[0], res[1]); } else { adapter.doSetLastAck(c, destination, context != null ? context.getXid() : null, clientId, subscriptionName, res[0], res[1]); } if (LOG.isTraceEnabled()) { LOG.trace(clientId + ":" + subscriptionName + " ack, seq: " + res[0] + ", priority: " + res[1] + " mid:" + messageId); } } catch (SQLException e) { JDBCPersistenceAdapter.log("JDBC Failure: ", e); throw IOExceptionSupport.create("Failed to store acknowledgment for: " + clientId + " on message " + messageId + " in container: " + e, e); } finally { c.close(); } }
public void commitLastAck(ConnectionContext context, long xidLastAck, long priority, ActiveMQDestination destination, String subName, String clientId) throws IOException { TransactionContext c = getTransactionContext(context); try { getAdapter().doSetLastAck(c, destination, null, clientId, subName, xidLastAck, priority); } catch (SQLException e) { JDBCPersistenceAdapter.log("JDBC Failure: ", e); throw IOExceptionSupport.create("Failed to commit last ack with priority: " + priority + " on " + destination + " for " + subName + ":" + clientId + ". Reason: " + e,e); } finally { c.close(); } }
public void acknowledge(ConnectionContext context, String clientId, String subscriptionName, MessageId messageId, MessageAck ack) throws IOException { if (ack != null && ack.isUnmatchedAck()) { if (LOG.isTraceEnabled()) { LOG.trace("ignoring unmatched selector ack for: " + messageId + ", cleanup will get to this message after subsequent acks."); } return; } TransactionContext c = persistenceAdapter.getTransactionContext(context); try { long[] res = adapter.getStoreSequenceId(c, destination, messageId); if (this.isPrioritizedMessages()) { adapter.doSetLastAckWithPriority(c, destination, clientId, subscriptionName, res[0], res[1]); } else { adapter.doSetLastAck(c, destination, clientId, subscriptionName, res[0], res[1]); } if (LOG.isTraceEnabled()) { LOG.trace(clientId + ":" + subscriptionName + " ack, seq: " + res[0] + ", priority: " + res[1] + " mid:" + messageId); } } catch (SQLException e) { JDBCPersistenceAdapter.log("JDBC Failure: ", e); throw IOExceptionSupport.create("Failed to store acknowledgment for: " + clientId + " on message " + messageId + " in container: " + e, e); } finally { c.close(); } }
public void commitLastAck(ConnectionContext context, long xidLastAck, long priority, ActiveMQDestination destination, String subName, String clientId) throws IOException { TransactionContext c = getTransactionContext(context); try { getAdapter().doSetLastAck(c, destination, null, clientId, subName, xidLastAck, priority); } catch (SQLException e) { JDBCPersistenceAdapter.log("JDBC Failure: ", e); throw IOExceptionSupport.create("Failed to commit last ack with priority: " + priority + " on " + destination + " for " + subName + ":" + clientId + ". Reason: " + e,e); } finally { c.close(); } }
@Override public void acknowledge(ConnectionContext context, String clientId, String subscriptionName, MessageId messageId, MessageAck ack) throws IOException { if (ack != null && ack.isUnmatchedAck()) { if (LOG.isTraceEnabled()) { LOG.trace("ignoring unmatched selector ack for: " + messageId + ", cleanup will get to this message after subsequent acks."); } return; } TransactionContext c = persistenceAdapter.getTransactionContext(context); try { long[] res = getCachedStoreSequenceId(c, destination, messageId); if (this.isPrioritizedMessages()) { adapter.doSetLastAckWithPriority(c, destination, context != null ? context.getXid() : null, clientId, subscriptionName, res[0], res[1]); } else { adapter.doSetLastAck(c, destination, context != null ? context.getXid() : null, clientId, subscriptionName, res[0], res[1]); } if (LOG.isTraceEnabled()) { LOG.trace(clientId + ":" + subscriptionName + " ack, seq: " + res[0] + ", priority: " + res[1] + " mid:" + messageId); } } catch (SQLException e) { JDBCPersistenceAdapter.log("JDBC Failure: ", e); throw IOExceptionSupport.create("Failed to store acknowledgment for: " + clientId + " on message " + messageId + " in container: " + e, e); } finally { c.close(); } }
public void commitLastAck(ConnectionContext context, long xidLastAck, long priority, ActiveMQDestination destination, String subName, String clientId) throws IOException { TransactionContext c = getTransactionContext(context); try { getAdapter().doSetLastAck(c, destination, null, clientId, subName, xidLastAck, priority); } catch (SQLException e) { JDBCPersistenceAdapter.log("JDBC Failure: ", e); throw IOExceptionSupport.create("Failed to commit last ack with priority: " + priority + " on " + destination + " for " + subName + ":" + clientId + ". Reason: " + e,e); } finally { c.close(); } }
@Override public void acknowledge(ConnectionContext context, String clientId, String subscriptionName, MessageId messageId, MessageAck ack) throws IOException { if (ack != null && ack.isUnmatchedAck()) { if (LOG.isTraceEnabled()) { LOG.trace("ignoring unmatched selector ack for: " + messageId + ", cleanup will get to this message after subsequent acks."); } return; } TransactionContext c = persistenceAdapter.getTransactionContext(context); try { long[] res = getCachedStoreSequenceId(c, destination, messageId); if (this.isPrioritizedMessages()) { adapter.doSetLastAckWithPriority(c, destination, context != null ? context.getXid() : null, clientId, subscriptionName, res[0], res[1]); } else { adapter.doSetLastAck(c, destination, context != null ? context.getXid() : null, clientId, subscriptionName, res[0], res[1]); } if (LOG.isTraceEnabled()) { LOG.trace(clientId + ":" + subscriptionName + " ack, seq: " + res[0] + ", priority: " + res[1] + " mid:" + messageId); } } catch (SQLException e) { JDBCPersistenceAdapter.log("JDBC Failure: ", e); throw IOExceptionSupport.create("Failed to store acknowledgment for: " + clientId + " on message " + messageId + " in container: " + e, e); } finally { c.close(); } }
public void commitLastAck(ConnectionContext context, long xidLastAck, long priority, ActiveMQDestination destination, String subName, String clientId) throws IOException { TransactionContext c = getTransactionContext(context); try { getAdapter().doSetLastAck(c, destination, null, clientId, subName, xidLastAck, priority); } catch (SQLException e) { JDBCPersistenceAdapter.log("JDBC Failure: ", e); throw IOExceptionSupport.create("Failed to commit last ack with priority: " + priority + " on " + destination + " for " + subName + ":" + clientId + ". Reason: " + e,e); } finally { c.close(); } }
@Override public void acknowledge(ConnectionContext context, String clientId, String subscriptionName, MessageId messageId, MessageAck ack) throws IOException { if (ack != null && ack.isUnmatchedAck()) { if (LOG.isTraceEnabled()) { LOG.trace("ignoring unmatched selector ack for: " + messageId + ", cleanup will get to this message after subsequent acks."); } return; } TransactionContext c = persistenceAdapter.getTransactionContext(context); try { long[] res = getCachedStoreSequenceId(c, destination, messageId); if (this.isPrioritizedMessages()) { adapter.doSetLastAckWithPriority(c, destination, context != null ? context.getXid() : null, clientId, subscriptionName, res[0], res[1]); } else { adapter.doSetLastAck(c, destination, context != null ? context.getXid() : null, clientId, subscriptionName, res[0], res[1]); } if (LOG.isTraceEnabled()) { LOG.trace(clientId + ":" + subscriptionName + " ack, seq: " + res[0] + ", priority: " + res[1] + " mid:" + messageId); } } catch (SQLException e) { JDBCPersistenceAdapter.log("JDBC Failure: ", e); throw IOExceptionSupport.create("Failed to store acknowledgment for: " + clientId + " on message " + messageId + " in container: " + e, e); } finally { c.close(); } }