[seam-commits] Seam SVN: r8762 - in trunk/examples/blog: src/actions and 1 other directory.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Thu Aug 21 09:51:08 EDT 2008


Author: pete.muir at jboss.org
Date: 2008-08-21 09:51:08 -0400 (Thu, 21 Aug 2008)
New Revision: 8762

Modified:
   trunk/examples/blog/resources/WEB-INF/components.xml
   trunk/examples/blog/src/actions/PostAction.java
Log:
Changes to example as a result of CacheProvider changes

Modified: trunk/examples/blog/resources/WEB-INF/components.xml
===================================================================
--- trunk/examples/blog/resources/WEB-INF/components.xml	2008-08-21 13:50:33 UTC (rev 8761)
+++ trunk/examples/blog/resources/WEB-INF/components.xml	2008-08-21 13:51:08 UTC (rev 8762)
@@ -4,12 +4,14 @@
             xmlns:persistence="http://jboss.com/products/seam/persistence"
             xmlns:security="http://jboss.com/products/seam/security"
             xmlns:theme="http://jboss.com/products/seam/theme"
+            xmlns:cache="http://jboss.com/products/seam/cache"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation=
                 "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.1.xsd
                  http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.1.xsd
                  http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.1.xsd
                  http://jboss.com/products/seam/theme http://jboss.com/products/seam/theme-2.1.xsd
+                 http://jboss.com/products/seam/cache http://jboss.com/products/seam/cache-2.1.xsd
                  http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.1.xsd">
 
     <core:init debug="true"/>

Modified: trunk/examples/blog/src/actions/PostAction.java
===================================================================
--- trunk/examples/blog/src/actions/PostAction.java	2008-08-21 13:50:33 UTC (rev 8761)
+++ trunk/examples/blog/src/actions/PostAction.java	2008-08-21 13:51:08 UTC (rev 8762)
@@ -5,12 +5,11 @@
 
 import javax.persistence.EntityManager;
 
-import org.jboss.cache.CacheException;
-import org.jboss.cache.aop.PojoCache;
 import org.jboss.seam.ScopeType;
 import org.jboss.seam.annotations.In;
 import org.jboss.seam.annotations.Name;
 import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.cache.CacheProvider;
 import org.jboss.seam.faces.FacesMessages;
 
 import domain.Blog;
@@ -31,14 +30,14 @@
    
    @In(required=false) BlogEntry blogEntry;
    
-   @In PojoCache pojoCache;
+   @In CacheProvider cacheProvider;
    
-   public void post() throws IOException, CacheException
+   public void post() throws IOException
    {
       blogEntry.setDate( new Date() );
       blog.getBlogEntries().add(blogEntry);
       entityManager.persist(blogEntry);
-      pojoCache.remove("pageFragments", "index");
+      cacheProvider.remove("pageFragments", "index");
    }
    
    public void invalid()




More information about the seam-commits mailing list