java - what happens to objects once application terminates -


in java when have application running in appserver glassfish, application deployed ejb. when undeploy ejb happens to sigletone classes loaded memory. understand until restart container present there , can garbage collected not sure , when happen, if deploy ejb once again may pick old objects jvm, ?

each deployed app loaded own separate classloader. since classloader part of class's identity, same class can loaded multiple times (with different configuration) without different instances interfering each other.

this isolates different applications within app server each other , allows same application run twice in parallel.

when application undeployed, objects (including classloader , classes themselves) garbage collected, if no references them remain. unfortunately, can happen references remain in system class , prevent garbage collection - called classloader leak.


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -