shutdownRequested = true;
// Send responses to any operations in the pending queue to indicate that
// they won't be processed because the server is shutting down.
CancelRequest cancelRequest = new CancelRequest(true, reason);
ArrayList<Operation> pendingOperations = new ArrayList<Operation>();
opQueue.removeAll(pendingOperations);
for (Operation o : pendingOperations)
{