Author: epbernard
Date: 2010-07-14 10:21:00 -0400 (Wed, 14 Jul 2010)
New Revision: 19945
Modified:
search/trunk/hibernate-search/src/main/java/org/hibernate/search/event/FullTextIndexEventListener.java
search/trunk/hibernate-search/src/main/java/org/hibernate/search/impl/SearchFactoryBuilder.java
Log:
HSEARCH-560 Make sure Version.touch() is used by all entry points
With the SearchFactory refactoring, this was no longer the case.
Modified:
search/trunk/hibernate-search/src/main/java/org/hibernate/search/event/FullTextIndexEventListener.java
===================================================================
---
search/trunk/hibernate-search/src/main/java/org/hibernate/search/event/FullTextIndexEventListener.java 2010-07-13
16:53:46 UTC (rev 19944)
+++
search/trunk/hibernate-search/src/main/java/org/hibernate/search/event/FullTextIndexEventListener.java 2010-07-14
14:21:00 UTC (rev 19945)
@@ -57,6 +57,7 @@
import org.hibernate.event.PostInsertEventListener;
import org.hibernate.event.PostUpdateEvent;
import org.hibernate.event.PostUpdateEventListener;
+import org.hibernate.search.Version;
import org.hibernate.search.backend.Work;
import org.hibernate.search.backend.WorkType;
import org.hibernate.search.backend.impl.EventSourceTransactionContext;
@@ -87,6 +88,10 @@
PostCollectionRecreateEventListener, PostCollectionRemoveEventListener,
PostCollectionUpdateEventListener, FlushEventListener, Initializable, Destructible {
+ static {
+ Version.touch();
+ }
+
private static final Logger log = LoggerFactory.make();
protected boolean used;
Modified:
search/trunk/hibernate-search/src/main/java/org/hibernate/search/impl/SearchFactoryBuilder.java
===================================================================
---
search/trunk/hibernate-search/src/main/java/org/hibernate/search/impl/SearchFactoryBuilder.java 2010-07-13
16:53:46 UTC (rev 19944)
+++
search/trunk/hibernate-search/src/main/java/org/hibernate/search/impl/SearchFactoryBuilder.java 2010-07-14
14:21:00 UTC (rev 19945)
@@ -51,6 +51,7 @@
import org.hibernate.annotations.common.reflection.java.JavaReflectionManager;
import org.hibernate.search.Environment;
import org.hibernate.search.SearchException;
+import org.hibernate.search.Version;
import org.hibernate.search.annotations.AnalyzerDef;
import org.hibernate.search.annotations.AnalyzerDefs;
import org.hibernate.search.annotations.Factory;
@@ -102,6 +103,11 @@
* @author Hardy Ferentschik
*/
public class SearchFactoryBuilder {
+
+ static {
+ Version.touch();
+ }
+
private static final Logger log = LoggerFactory.make();
private SearchConfiguration cfg;
private MutableSearchFactory rootFactory;