I have a JSF application with a @ViewScoped
bean. It is viewScoped
because I do some ajax requests.
I load a big amount of data into the view and display it to the user.
Today I performed a load test and I ran into an OutOfMemoryException
. As it turns out, when I open the page, @PostConstruct
is called
bean created. ID = @54a35e23
Now I navigate to another page and return again (@PreDestroy
was not called) Then I get
bean created. ID = @fee0948
I do this all over again in the load test. And a few hours later I have the OutOfMemoryException
Can I somehow force JSF to destroy my ViewScoped
bean when I navigat to another page?