Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

When is servlet destroyed

 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See subj.

Is that totally op to the container to decide ? - or is the servlet destroyed when the final thead is dead ?

/Rgds, Henrik
 
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Henrik,

Is that totally op to the container to decide ? - or is the servlet destroyed when the final thead is dead?


In the servlet's life cycle, one separate thread == one request and the servlet keeps alive till either the web app is redeployed or the web container shuts down. I suggest you to read HFS from page 101 and the next few ones.

Regards,

Phil.
 
Henrik Krievs
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


In the servlet's life cycle, one separate thread == one request and the servlet keeps alive till either the web app is redeployed or the web container shuts down. I suggest you to read HFS from page 101 and the next few ones.



Actually, If you read from 101 and forwards - it doesn't say anything about servlet destruction. <OUTSIDE-HF-S&JST>Can you configure the container to hold a certain amount of servlets ? I can imagine there also must be a container-memory issue here</OUTSIDE-HF-S&JST>

Anyways; I get it - it's not really important (seen from the servlet's point-of-view) - when or how the servlet is being destroyed.

Rgds, Henrik
 
reply
    Bookmark Topic Watch Topic
  • New Topic