try {
lock.lock();
SequenceMediator sequence
= (SequenceMediator) getSynapseConfiguration().getSequence(sequenceName);
if (sequence != null) {
sequence.disableStatistics();
persistSequence(sequence);
return sequenceName;
} else {
handleException("No defined sequence with name " + sequenceName
+ " found to disable statistics in the Synapse configuration");