lucene & jdbc resource are closed properly