@Override public void doAddMessageReference(TransactionContext c, long sequence, MessageId messageID, ActiveMQDestination destination, long expirationTime, String messageRef) throws SQLException, IOException { PreparedStatement s = c.getAddMessageStatement(); try { if (s == null) { s = c.getConnection().prepareStatement(this.statements.getAddMessageStatement()); if (this.batchStatements) { c.setAddMessageStatement(s); } } s.setLong(1, messageID.getBrokerSequenceId()); s.setString(2, messageID.getProducerId().toString()); s.setLong(3, messageID.getProducerSequenceId()); s.setString(4, destination.getQualifiedName()); s.setLong(5, expirationTime); s.setString(6, messageRef); if (this.batchStatements) { s.addBatch(); } else if (s.executeUpdate() != 1) { throw new SQLException("Failed add a message"); } } finally { if (!this.batchStatements) { s.close(); } } }
s = c.getConnection().prepareStatement(this.statements.getAddMessageStatement()); if (this.batchStatements) { c.setAddMessageStatement(s);
public void doAddMessageReference(TransactionContext c, long sequence, MessageId messageID, ActiveMQDestination destination, long expirationTime, String messageRef) throws SQLException, IOException { PreparedStatement s = c.getAddMessageStatement(); cleanupExclusiveLock.readLock().lock(); try { if (s == null) { s = c.getConnection().prepareStatement(this.statements.getAddMessageStatement()); if (this.batchStatments) { c.setAddMessageStatement(s); } } s.setLong(1, messageID.getBrokerSequenceId()); s.setString(2, messageID.getProducerId().toString()); s.setLong(3, messageID.getProducerSequenceId()); s.setString(4, destination.getQualifiedName()); s.setLong(5, expirationTime); s.setString(6, messageRef); if (this.batchStatments) { s.addBatch(); } else if (s.executeUpdate() != 1) { throw new SQLException("Failed add a message"); } } finally { cleanupExclusiveLock.readLock().unlock(); if (!this.batchStatments) { s.close(); } } }
@Override public void doAddMessageReference(TransactionContext c, long sequence, MessageId messageID, ActiveMQDestination destination, long expirationTime, String messageRef) throws SQLException, IOException { PreparedStatement s = c.getAddMessageStatement(); try { if (s == null) { s = c.getConnection().prepareStatement(this.statements.getAddMessageStatement()); if (this.batchStatements) { c.setAddMessageStatement(s); } } s.setLong(1, messageID.getBrokerSequenceId()); s.setString(2, messageID.getProducerId().toString()); s.setLong(3, messageID.getProducerSequenceId()); s.setString(4, destination.getQualifiedName()); s.setLong(5, expirationTime); s.setString(6, messageRef); if (this.batchStatements) { s.addBatch(); } else if (s.executeUpdate() != 1) { throw new SQLException("Failed add a message"); } } finally { if (!this.batchStatements) { s.close(); } } }
s = c.getConnection().prepareStatement(this.statements.getAddMessageStatement()); if (this.batchStatments) { c.setAddMessageStatement(s);
@Override public void doAddMessageReference(TransactionContext c, long sequence, MessageId messageID, ActiveMQDestination destination, long expirationTime, String messageRef) throws SQLException, IOException { PreparedStatement s = c.getAddMessageStatement(); try { if (s == null) { s = c.getConnection().prepareStatement(this.statements.getAddMessageStatement()); if (this.batchStatements) { c.setAddMessageStatement(s); } } s.setLong(1, messageID.getBrokerSequenceId()); s.setString(2, messageID.getProducerId().toString()); s.setLong(3, messageID.getProducerSequenceId()); s.setString(4, destination.getQualifiedName()); s.setLong(5, expirationTime); s.setString(6, messageRef); if (this.batchStatements) { s.addBatch(); } else if (s.executeUpdate() != 1) { throw new SQLException("Failed add a message"); } } finally { if (!this.batchStatements) { s.close(); } } }
@Override public void doAddMessageReference(TransactionContext c, long sequence, MessageId messageID, ActiveMQDestination destination, long expirationTime, String messageRef) throws SQLException, IOException { PreparedStatement s = c.getAddMessageStatement(); try { if (s == null) { s = c.getConnection().prepareStatement(this.statements.getAddMessageStatement()); if (this.batchStatements) { c.setAddMessageStatement(s); } } s.setLong(1, messageID.getBrokerSequenceId()); s.setString(2, messageID.getProducerId().toString()); s.setLong(3, messageID.getProducerSequenceId()); s.setString(4, destination.getQualifiedName()); s.setLong(5, expirationTime); s.setString(6, messageRef); if (this.batchStatements) { s.addBatch(); } else if (s.executeUpdate() != 1) { throw new SQLException("Failed add a message"); } } finally { if (!this.batchStatements) { s.close(); } } }
s = c.getConnection().prepareStatement(this.statements.getAddMessageStatement()); if (this.batchStatements) { c.setAddMessageStatement(s);
s = c.getConnection().prepareStatement(this.statements.getAddMessageStatement()); if (this.batchStatements) { c.setAddMessageStatement(s);
s = c.getConnection().prepareStatement(this.statements.getAddMessageStatement()); if (this.batchStatements) { c.setAddMessageStatement(s);