Seam SVN: r11234 - branches/enterprise/JBPAPP_5_0/examples/blog/src/actions.

View: New views
1 Messages — Rating Filter:   Alert me  

Seam SVN: r11234 - branches/enterprise/JBPAPP_5_0/examples/blog/src/actions.

by seam-commits mailing list :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

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

_______________________________________________
seam-commits mailing list
seam-commits@...
https://lists.jboss.org/mailman/listinfo/seam-commits