It wasn't a waste. I found a concurrency bug while looking at it. :-/
The invalidated field is @GuardedBy("invalidLock"), so all access to the field must be done with the lock held. The invalidateIfNeeded() method, however, tests the field outside of any synchronization.
Quickest fix would be to make the field volatile.
--tim
Roger Desroches wrote:
Oh blast it, never mind. It's still invalidating itself base on the time when getAttribute is called. I guess I'm just going to create another level of indirection and store all my attributes in another store hashed by session id.
sorry for the wasted bandwidth.
Roger