private static final Logger LOG = Loggers.get(ProjectScanContainer.class);
private final AnalysisProperties props;
+ private ProjectLock lock;
public ProjectScanContainer(ComponentContainer globalContainer, AnalysisProperties props) {
super(globalContainer);
@Override
protected void doBeforeStart() {
addBatchComponents();
- getComponentByType(ProjectLock.class).tryLock();
+ lock = getComponentByType(ProjectLock.class);
+ lock.tryLock();
addBatchExtensions();
Settings settings = getComponentByType(Settings.class);
if (settings != null && settings.getBoolean(CoreProperties.PROFILING_LOG_PROPERTY)) {
return super.startComponents();
} catch (Exception e) {
// ensure that lock is released
- ProjectLock lock = getComponentByType(ProjectLock.class);
if (lock != null) {
lock.stop();
}