public void moveMessages(final long fromMessageId, final long toMessageId, String toQueue)
throws IOException, JMException
{
if ((fromMessageId > toMessageId) || (fromMessageId < 1))
{
throw new OperationsException("\"From MessageId\" should be greater than 0 and less than \"To MessageId\"");
}
VirtualHost<?,?,?> vhost = _queue.getParent(VirtualHost.class);
final Queue<?> destinationQueue = vhost.getChildByName(Queue.class, toQueue);
if (destinationQueue == null)
{
throw new OperationsException("No such queue \""+ toQueue +"\"");
}
vhost.executeTransaction(new VirtualHost.TransactionalOperation()
{
public void withinTransaction(final VirtualHost.Transaction txn)