Skip to content

Commit

Permalink
SearchFactory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanne authored and maniksurtani committed Jun 17, 2011
1 parent cdb8127 commit 25d0369
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -140,13 +140,14 @@ public void cacheStopping(ComponentRegistry cr, String cacheName) {
//TODO move this to cacheStopped event (won't work right now as the ComponentRegistry is half empty at that point: ISPN-1006)
SearchFactoryIntegrator searchFactoryImplementor = cr.getComponent(SearchFactoryIntegrator.class);
if (searchFactoryImplementor != null) {
cr.registerComponent(NoOpSearchFactory.INSTANCE, SearchFactoryIntegrator.class);
searchFactoriesToShutdown.put(cacheName, searchFactoryImplementor);
}
}

@Override
public void cacheStopped(ComponentRegistry cr, String cacheName) {
SearchFactoryIntegrator searchFactoryIntegrator = searchFactoriesToShutdown.get(cacheName);
SearchFactoryIntegrator searchFactoryIntegrator = searchFactoriesToShutdown.remove(cacheName);
if (searchFactoryIntegrator != null) {
searchFactoryIntegrator.close();
}
Expand Down

0 comments on commit 25d0369

Please sign in to comment.