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

css - I want to align grid in center -

Contact Form PHP Email Script -

python - SWIG function not printing output -