Hi Matt,
I've been writing some tests, and it seems that simply starting a Search enabled SessionFactory and closing it - even using some of the features - is closing all resources correctly. It's possible you're using some special feature which would lead to this issue, but will need your help to track it down.
I've found
https://issues.apache.org/jira/browse/LUCENE-2822, which is a limitation in Lucene we didn't spot before and is being used by Search if you set timeouts on full text queries. Is that possibly your problem?
Created
http://opensource.atlassian.com/project ... EARCH-1024If not, could you post a full threaddump so that I can have a look at which threads are still alive and what are they waiting for?
Another possible option is that the async indexing queue didn't finish in applying all changes, so when shutting down it has to finish writing on the index. Do you still see lot of disk activity when waiting for a shutdown? In that case it's possible that it will shutdown, given enough time to flush all changes.
Quote:
Unfortunately it appears that Hibernate Search isn't properly cleaning up after itself on undeploy - MAT is indicating that org.hibernate.search.batchindexing.impl.Executors$BlockPolicy is still in memory, which pulls the Hibernate SessionFactory with it.
I don't understand this, BlockPolicy has no reference to the SessionFactory. Are you seeing one?