[seam-commits] Seam SVN: r11215 - in branches/community/Seam_2_2/examples/blog: src/actions and 1 other directory.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Thu Jun 25 19:52:56 EDT 2009


Author: norman.richards at jboss.com
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




More information about the seam-commits mailing list