MULE-7128: Using ReadWriteLock for better synchronization