-
Sub-task
-
Resolution: Done
-
Major
-
4.0.0.Final, 4.1.0.Final, 4.2.0.ALPHA2
-
None
For a test application, see the attachment of parent issue (ISPN-697).
Hibernate Search needs to be stopped or background threads will prevent the JVM from closing properly.
In the integration with Hibernate, org.hibernate.search.event.FullTextIndexEventListener is invoked during SessionFactory close as it implements org.hibernate.event.Destructible
The listener then calls into org.hibernate.search.impl.ImmutableSearchFactory.close() which actually stops all additional threads.
It seems that org.infinispan.query.impl.LifecycleManager should be completed; it's work was blocked by HSEARCH-397 but this was solved, so the Search/Infinispan integration should be updated.