Author: norman.richards(a)jboss.com
Date: 2009-07-06 16:16:17 -0400 (Mon, 06 Jul 2009)
New Revision: 11245
Modified:
branches/community/Seam_2_2/examples/blog/src/actions/IndexerService.java
Log:
JBSEAM-4257
Modified: branches/community/Seam_2_2/examples/blog/src/actions/IndexerService.java
===================================================================
--- branches/community/Seam_2_2/examples/blog/src/actions/IndexerService.java 2009-07-05
11:54:30 UTC (rev 11244)
+++ branches/community/Seam_2_2/examples/blog/src/actions/IndexerService.java 2009-07-06
20:16:17 UTC (rev 11245)
@@ -13,6 +13,7 @@
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.Startup;
+import org.jboss.seam.annotations.Transactional;
import domain.BlogEntry;
/**
@@ -29,13 +30,13 @@
private FullTextEntityManager entityManager;
@Create
+ @Transactional
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
Show replies by date