[jboss-cvs] jboss-seam/examples/remoting/chatroom/src/org/jboss/seam/example/remoting/chatroom ...

Gavin King gavin.king at jboss.com
Mon Feb 26 22:38:21 EST 2007


  User: gavin   
  Date: 07/02/26 22:38:21

  Modified:    examples/remoting/chatroom/src/org/jboss/seam/example/remoting/chatroom 
                        ChatroomUsers.java
  Log:
  simpler
  
  Revision  Changes    Path
  1.3       +6 -7      jboss-seam/examples/remoting/chatroom/src/org/jboss/seam/example/remoting/chatroom/ChatroomUsers.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ChatroomUsers.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/remoting/chatroom/src/org/jboss/seam/example/remoting/chatroom/ChatroomUsers.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- ChatroomUsers.java	26 Feb 2007 21:01:27 -0000	1.2
  +++ ChatroomUsers.java	27 Feb 2007 03:38:21 -0000	1.3
  @@ -4,7 +4,6 @@
   import java.util.Set;
   
   import org.jboss.cache.CacheException;
  -import org.jboss.cache.Fqn;
   import org.jboss.cache.aop.PojoCache;
   import org.jboss.seam.ScopeType;
   import org.jboss.seam.annotations.In;
  @@ -17,20 +16,20 @@
   public class ChatroomUsers
   {
      @In
  -   private transient PojoCache pojoCache;
  +   private PojoCache pojoCache;
      
      @Unwrap
      public Set<String> getUsers()
      {
         try
         {
  -         Set<String> users = (Set<String>) pojoCache.get( new Fqn("chatroom"), "users" );
  -         if (users==null) 
  +         Set<String> userList = (Set<String>) pojoCache.get("chatroom", "userList");
  +         if (userList==null) 
            {
  -            users = new HashSet<String>();
  -            pojoCache.put( new Fqn("chatroom"), "users", users );
  +            userList = new HashSet<String>();
  +            pojoCache.put("chatroom", "userList", userList);
            }
  -         return users;
  +         return userList;
         }
         catch (CacheException ce)
         {
  
  
  



More information about the jboss-cvs-commits mailing list