RE: Monitoring session memory usage
04/02/08 10:37 AM
Another idea would be to write a SessionAttributeListener which computes the amount of memory used by any attributes being added or removed from a session, and then adds or subtracts that value from a running total.
Computing the amount of memory used by a given attribute is (I think) the tricky part. Serializing it to a file and then computing the size of that file is one technique that comes to mind. of course that would only work for attributes that are serializable.