Initially to start with, I am seeing memory consumption as 300MB(from weblogic console monitoring) and when I deployed and try accessing this site, memory consumption went up to 450MB. But the memory is not coming back to 300MB and it is staying at 425MB or so even after waiting for a long time after the request(more than 20min).
You referred to Entity Beans - specifically CMP. Don't forget that one of the reasons for using EJBs over lighter-weight persistence object is that the container caches them.
Create a business method in your bean that returns the map of DTOs rather than maintaining this list in your bean as an instance variable.
Programmatically loop through the list of DTOs and remove them from the list (setting the references to null).
Use soft references. This way the GC will garbage collect the DTOs as more memory is required, although they are not orphans. This of course might have other implications but is worth trying.
Isn't it a normal practice to maintain instance variables and
get/settermethods to access the instance variables in jsp.
When should I do this? There is no logout on the screen. This is a public site.
Should I soft reference the map in the java bean? What are the other
As Tim pointed out could'nt it be the weblogic entity bean cache that
Is taking up the memory ? ( I mean say a finder that has resulted in huge
number of beans getting loaded in the cache)..
Do the next thing next. That’s a pretty good rule. Read the tiny ad, that’s a pretty good rule, too.
Free, earth friendly heat - from the CodeRanch trailbosshttps://www.kickstarter.com/projects/paulwheaton/free-heat