[jboss-user] [JBoss Seam] - About the new chapter Caching in documentation.
Seto
do-not-reply at jboss.com
Tue Feb 27 03:47:09 EST 2007
I read the 18.1 chapter . And I don't understand.
I think the example maybe should be changed as below.
@Name("chatroom")
public class Chatroom {
@In PojoCache pojoCache;
public void join(String username) {
try
{
Set userList = (Set) pojoCache.get("chatroom", "userList");
if (userList==null)
{
userList = new HashSet();
}
userList.add(username);
pojoCache.put("chatroom", "userList", userList);
}
catch (CacheException ce)
{
throw new RuntimeException(ce);
}
}
}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4022921#4022921
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4022921
More information about the jboss-user
mailing list