}
public QueueBrowser getMessages(Connection connection, String storeId, Destination destination, MessageFactory messageFactory,
MessageStore.HeaderPolicy headerPolicy) throws SQLException, JMSException
{
final QueryRunner runner = new QueryRunner();
final PreparedStatement stmt = createPreparedStatement(
connection,
"select stores.destination, stores.domain, messages.message, messages.messageid from stores, messages where stores.storeId=? and destination=? and stores.messageid = messages.messageid order by messages.messageid",
new Object[] { storeId, messageFactory.getDestinationName(destination) });