2016-07-14 8:09 GMT+02:00 sreekanth <sreekanth.n...@egovernments.org>:
> Hi Lukazs,
>                Yesterday we have tried to check the source code and found
> its implementing SoftReference, its true that it will get garbage collected
> before OOM kicks in, right now we allocated Xmx 24 GB  so i doubt if we
> throw more memory will solve the issue, but my gut feeling is, from
> SoftReference javadoc, *As long as the referent of a soft reference is
> strongly reachable, that is, is actually in use, the soft reference will not
> be cleared*.
>
> We have no idea, why objects in cache grows even if we refresh the same
> page, on each refresh its creating new cache and adding similar set of
> object again, it seems like the cache holder itself is getting created
> multiple time even for the same page up on refresh (or reopen).

Just to clarify one thing, actions in Struts2 are created per each
request, so it means you must implement hashCode/equals for each
action to allow cache to properly distinguish new object from the same
object. Just to be sure your hashCode/equals implementations are using
all the fields that's gonna change during request.


Regards
-- 
Ɓukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
For additional commands, e-mail: dev-h...@struts.apache.org

Reply via email to