среда, 15 августа 2012 г.

There is bug in jetty-session-redis, version 2.3.ga
Class com.ovea.jetty.session.redis.RedisSessionIdManager
method

  1. @Override  
  2. protected List scavenge(final List clusterIds) {  
  3.     List expired = new LinkedList<String>();  
  4.     List status = jedisExecutor.execute(new JedisCallback>() {  
  5.         @Override  
  6.         public List execute(Jedis jedis) {  
  7.             return jedis.multi(new TransactionBlock() {  
  8.                 @Override  
  9.                 public void execute() throws JedisException {  
  10.                     for (String clusterId : clusterIds) {  
  11.                         exists(REDIS_SESSION_KEY + clusterId);  
  12.                     }  
  13.                 }  
  14.             });  
  15.         }  
  16.     });  
  17.     for (int i = 0; i < status.size(); i++)  
  18.         if (Boolean.FALSE.equals(status.get(i)))   // HERE WAS:  " ZERO.equals
  19.             expired.add(clusterIds.get(i));  
  20.     if (LOG.isDebugEnabled() && !expired.isEmpty())  
  21.         LOG.debug("[RedisSessionIdManager] Scavenger found {} sessions to expire: {}", expired.size(), expired);  
  22.     return expired;  
  23. }  

Sessions were not deleting due to this invalid comparison. 

среда, 6 июня 2012 г.

Jetty remote debug:

java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -jar target/your-server.jar