@Override public void doSetLastAck(TransactionContext c, ActiveMQDestination destination, XATransactionId xid, String clientId, String subscriptionName, long seq, long priority) throws SQLException, IOException { PreparedStatement s = c.getUpdateLastAckStatement(); try { if (s == null) {
@Override public void doSetLastAckWithPriority(TransactionContext c, ActiveMQDestination destination, XATransactionId xid, String clientId, String subscriptionName, long seq, long priority) throws SQLException, IOException { PreparedStatement s = c.getUpdateLastAckStatement(); try { if (s == null) {
public void doSetLastAckWithPriority(TransactionContext c, ActiveMQDestination destination, String clientId, String subscriptionName, long seq, long prio) throws SQLException, IOException { PreparedStatement s = c.getUpdateLastAckStatement(); cleanupExclusiveLock.readLock().lock(); try { if (s == null) { s = c.getConnection().prepareStatement(this.statements.getUpdateLastPriorityAckRowOfDurableSubStatement()); if (this.batchStatments) { c.setUpdateLastAckStatement(s); } } s.setLong(1, seq); s.setString(2, destination.getQualifiedName()); s.setString(3, clientId); s.setString(4, subscriptionName); s.setLong(5, prio); if (this.batchStatments) { s.addBatch(); } else if (s.executeUpdate() != 1) { throw new SQLException("Failed update last ack with priority: " + prio + ", for sub: " + subscriptionName); } } finally { cleanupExclusiveLock.readLock().unlock(); if (!this.batchStatments) { close(s); } } }
public void doSetLastAck(TransactionContext c, ActiveMQDestination destination, String clientId, String subscriptionName, long seq, long priority) throws SQLException, IOException { PreparedStatement s = c.getUpdateLastAckStatement(); cleanupExclusiveLock.readLock().lock(); try { if (s == null) { s = c.getConnection().prepareStatement(this.statements.getUpdateDurableLastAckStatement()); if (this.batchStatments) { c.setUpdateLastAckStatement(s); } } s.setLong(1, seq); s.setString(2, destination.getQualifiedName()); s.setString(3, clientId); s.setString(4, subscriptionName); if (this.batchStatments) { s.addBatch(); } else if (s.executeUpdate() != 1) { throw new IOException("Could not update last ack seq : " + seq + ", for sub: " + subscriptionName); } } finally { cleanupExclusiveLock.readLock().unlock(); if (!this.batchStatments) { close(s); } } }
@Override public void doSetLastAckWithPriority(TransactionContext c, ActiveMQDestination destination, XATransactionId xid, String clientId, String subscriptionName, long seq, long priority) throws SQLException, IOException { PreparedStatement s = c.getUpdateLastAckStatement(); try { if (s == null) {
@Override public void doSetLastAckWithPriority(TransactionContext c, ActiveMQDestination destination, XATransactionId xid, String clientId, String subscriptionName, long seq, long priority) throws SQLException, IOException { PreparedStatement s = c.getUpdateLastAckStatement(); try { if (s == null) {
@Override public void doSetLastAckWithPriority(TransactionContext c, ActiveMQDestination destination, XATransactionId xid, String clientId, String subscriptionName, long seq, long priority) throws SQLException, IOException { PreparedStatement s = c.getUpdateLastAckStatement(); try { if (s == null) {
@Override public void doSetLastAck(TransactionContext c, ActiveMQDestination destination, XATransactionId xid, String clientId, String subscriptionName, long seq, long priority) throws SQLException, IOException { PreparedStatement s = c.getUpdateLastAckStatement(); try { if (s == null) {
@Override public void doSetLastAck(TransactionContext c, ActiveMQDestination destination, XATransactionId xid, String clientId, String subscriptionName, long seq, long priority) throws SQLException, IOException { PreparedStatement s = c.getUpdateLastAckStatement(); try { if (s == null) {
@Override public void doSetLastAck(TransactionContext c, ActiveMQDestination destination, XATransactionId xid, String clientId, String subscriptionName, long seq, long priority) throws SQLException, IOException { PreparedStatement s = c.getUpdateLastAckStatement(); try { if (s == null) {