Author:
norman.richards@...
Date: 2009-06-25 19:52:56 -0400 (Thu, 25 Jun 2009)
New Revision: 11215
Modified:
branches/community/Seam_2_2/examples/blog/resources/META-INF/persistence.xml
branches/community/Seam_2_2/examples/blog/src/actions/IndexerService.java
Log:
JBSEAM-4257
Modified: branches/community/Seam_2_2/examples/blog/resources/META-INF/persistence.xml
===================================================================
--- branches/community/Seam_2_2/examples/blog/resources/META-INF/persistence.xml 2009-06-25 20:25:20 UTC (rev 11214)
+++ branches/community/Seam_2_2/examples/blog/resources/META-INF/persistence.xml 2009-06-25 23:52:56 UTC (rev 11215)
@@ -18,10 +18,6 @@
value="org.hibernate.search.store.FSDirectoryProvider"/>
<!-- directory where the indexes will be stored -->
<property name="hibernate.search.default.indexBase" value="./blogindexes"/>
- <!-- Not needed with HA 3.3 -->
- <property name="hibernate.ejb.event.post-insert" value="org.hibernate.search.event.FullTextIndexEventListener"/>
- <property name="hibernate.ejb.event.post-update" value="org.hibernate.search.event.FullTextIndexEventListener"/>
- <property name="hibernate.ejb.event.post-delete" value="org.hibernate.search.event.FullTextIndexEventListener"/>
</properties>
</persistence-unit>
</persistence>
Modified: branches/community/Seam_2_2/examples/blog/src/actions/IndexerService.java
===================================================================
--- branches/community/Seam_2_2/examples/blog/src/actions/IndexerService.java 2009-06-25 20:25:20 UTC (rev 11214)
+++ branches/community/Seam_2_2/examples/blog/src/actions/IndexerService.java 2009-06-25 23:52:56 UTC (rev 11215)
@@ -13,6 +13,7 @@
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.Startup;
+import domain.BlogEntry;
/**
* Index Blog entry at startup
@@ -29,10 +30,12 @@
@Create
public void index() {
+ entityManager.purgeAll( BlogEntry.class );
List blogEntries = entityManager.createQuery("select be from BlogEntry be").getResultList();
for (Object be : blogEntries) {
entityManager.index(be);
}
+ entityManager.flushToIndexes();
}
@Remove
_______________________________________________
seam-commits mailing list
seam-commits@...
https://lists.jboss.org/mailman/listinfo/seam-commits