java - Lifetime of JSP created Objects -


i playing around jboss @ moment, creating few applications, , have quick query.

if passing off execution problems , storing variables in class' kept elsewhere in application, changes stay present until jboss shutdown/restarted, or there internal garbage collection process reset these after time?

they should not collected garbage collection not design.

  1. you'll lose stored data if application/server crushes
  2. you risk memory leak
  3. you have careful thread safety.

what stored in application context static reference variables , singletons (e.g. if use spring framework, topic altogether). almoust else should not stored in application context.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -