wood burning stoves 2.0*
The moose likes JBoss/WildFly and the fly likes When is a servletcontext destroyed? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "When is a servletcontext destroyed?" Watch "When is a servletcontext destroyed?" New topic
Author

When is a servletcontext destroyed?

Adam Zedan
Ranch Hand

Joined: Jun 10, 2011
Posts: 124

I wanted to know under what circumstances is a servlet context destroyed ??

Don’t look where you fall, but where you slipped
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61106
    
  66

When the web app is taken out of service.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Madangopal Venkatesan
Greenhorn

Joined: Jun 19, 2011
Posts: 16
Ideally, the ServletContext gets destroyed when the App server (Tomcat or JBoss) is shut down or sometimes even restarted.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61106
    
  66

Madangopal Venkatesan wrote:Ideally, the ServletContext gets destroyed when the App server (Tomcat or JBoss) is shut down or sometimes even restarted.

Well that will certainly cause all the applications within it to be taken out of service, but web applications can be taken out of service without having to shut down or restart the container itself.
Suhas Mandrawadkar
Ranch Hand

Joined: Jul 21, 2007
Posts: 72

Bear Bibeault wrote:
Madangopal Venkatesan wrote:Ideally, the ServletContext gets destroyed when the App server (Tomcat or JBoss) is shut down or sometimes even restarted.

Well that will certainly cause all the applications within it to be taken out of service, but web applications can be taken out of service without having to shut down or restart the container itself.


True, But what about the scenario when the web app is deployed and yet not started to service requests ?
So I would say when web app is undeployed or the server goes down


Regards, Suhas S. Mandrawadkar.
Certifications: SCJP 6, SCWCD 5, Oracle WebLogic Server Administrator, OCE Java EE 6 EJB Developer
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61106
    
  66

Suhas Mandrawadkar wrote:True, But what about the scenario when the web app is deployed and yet not started to service requests ?

What about it? If there's no app, there's no context to worry about at all. There's no point to this observation.
Shyam Ramath
Greenhorn

Joined: Jun 24, 2005
Posts: 21
Bear Bibeault wrote:
Suhas Mandrawadkar wrote:True, But what about the scenario when the web app is deployed and yet not started to service requests ?

What about it? If there's no app, there's no context to worry about at all. There's no point to this observation.


Is there anyway to re-start the servlet container with out restarting the app server ?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61106
    
  66

Which app server?
Shyam Ramath
Greenhorn

Joined: Jun 24, 2005
Posts: 21
Bear Bibeault wrote:Which app server?

JBoss or Tomcat
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

I know of no way to restart the servlet container without restarting all of JBoss AS.


JBoss In Action
Shyam Ramath
Greenhorn

Joined: Jun 24, 2005
Posts: 21
Peter Johnson wrote:I know of no way to restart the servlet container without restarting all of JBoss AS.

thanks Peter .
 
Consider Paul's rocket mass heater.
 
subject: When is a servletcontext destroyed?