[seam-commits] Seam SVN: r11234 - branches/enterprise/JBPAPP_5_0/examples/blog/src/actions.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Wed Jul 1 18:32:40 EDT 2009


Author: manaRH
Date: 2009-07-01 18:32:40 -0400 (Wed, 01 Jul 2009)
New Revision: 11234

Modified:
   branches/enterprise/JBPAPP_5_0/examples/blog/src/actions/IndexerService.java
Log:
back port of JBSEAM-4257

Modified: branches/enterprise/JBPAPP_5_0/examples/blog/src/actions/IndexerService.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/blog/src/actions/IndexerService.java	2009-07-01 15:18:10 UTC (rev 11233)
+++ branches/enterprise/JBPAPP_5_0/examples/blog/src/actions/IndexerService.java	2009-07-01 22:32:40 UTC (rev 11234)
@@ -14,6 +14,8 @@
 import org.jboss.seam.annotations.Scope;
 import org.jboss.seam.annotations.Startup;
 
+import domain.BlogEntry;
+
 /**
  * Index Blog entry at startup
  *
@@ -29,10 +31,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