Skip to content

Commit

Permalink
Inverted the logic of the stop() method.
Browse files Browse the repository at this point in the history
When stopping, stop first all the dependent components and then mark itself as offline.
  • Loading branch information
jpkrohling committed Nov 14, 2013
1 parent 1e85650 commit dccd4d9
Showing 1 changed file with 3 additions and 4 deletions.
Expand Up @@ -594,8 +594,10 @@ public void start()
@Override
public synchronized void stop()
{
RepositoryImpl repository = (RepositoryImpl)getComponentInstanceOfType(RepositoryImpl.class);
super.stop();
super.unregisterAllComponents();

RepositoryImpl repository = (RepositoryImpl)getComponentInstanceOfType(RepositoryImpl.class);
try
{
repository.setState(ManageableRepository.OFFLINE);
Expand All @@ -604,9 +606,6 @@ public synchronized void stop()
{
log.error("Can not switch repository to OFFLINE", e);
}

super.stop();
super.unregisterAllComponents();
}

/**
Expand Down

0 comments on commit dccd4d9

Please sign in to comment.