[seam-commits] Seam SVN: r9108 - in trunk/examples/remoting/chatroom: src/org/jboss/seam/example/remoting/chatroom and 1 other directory.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Mon Sep 22 18:53:24 EDT 2008


Author: shane.bryzak at jboss.com
Date: 2008-09-22 18:53:24 -0400 (Mon, 22 Sep 2008)
New Revision: 9108

Modified:
   trunk/examples/remoting/chatroom/
   trunk/examples/remoting/chatroom/src/org/jboss/seam/example/remoting/chatroom/ChatroomUsers.java
Log:
cache refactorings


Property changes on: trunk/examples/remoting/chatroom
___________________________________________________________________
Name: svn:ignore
   + dist
exploded-archives


Modified: trunk/examples/remoting/chatroom/src/org/jboss/seam/example/remoting/chatroom/ChatroomUsers.java
===================================================================
--- trunk/examples/remoting/chatroom/src/org/jboss/seam/example/remoting/chatroom/ChatroomUsers.java	2008-09-22 22:51:54 UTC (rev 9107)
+++ trunk/examples/remoting/chatroom/src/org/jboss/seam/example/remoting/chatroom/ChatroomUsers.java	2008-09-22 22:53:24 UTC (rev 9108)
@@ -3,8 +3,8 @@
 import java.util.HashSet;
 import java.util.Set;
 
+import org.jboss.seam.cache.CacheProvider;
 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;
@@ -15,17 +15,18 @@
 @Scope(ScopeType.STATELESS)
 public class ChatroomUsers
 {
-   @In
-   private PojoCache pojoCache;
+   @SuppressWarnings("unchecked")
+   @In CacheProvider cacheProvider;
    
+   @SuppressWarnings("unchecked")
    @Unwrap
    public Set<String> getUsers() throws CacheException
    {
-      Set<String> userList = (Set<String>) pojoCache.get("chatroom", "userList");
+      Set<String> userList = (Set<String>) cacheProvider.get("chatroom", "userList");
       if (userList==null) 
       {
          userList = new HashSet<String>();
-         pojoCache.put("chatroom", "userList", userList);
+         cacheProvider.put("chatroom", "userList", userList);
       }
       return userList;
    }




More information about the seam-commits mailing list