Author: shane.bryzak(a)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;
}
Show replies by date