OK, the code should be:
@Name("chatroom")
| public class Chatroom {
| @In PojoCache pojoCache;
|
| public void join(String username) {
| try
| {
| Set<String> userList = (Set<String>) pojoCache.get("chatroom",
"userList");
| if (userList==null)
| {
| userList = new HashSet<String>();
| pojoCache.put("chatroom", "userList", userList);
| }
| userList.put(username);
| }
| catch (CacheException ce)
| {
| throw new RuntimeException(ce);
| }
| }
| }
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4023161#4023161
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4023161
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user