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