Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet replacement

 
senthil rajan
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Frnds,

I'm having a concern abt servlets ability. I would like to get suggestions from u.

The problem is simple. I want to replace the servlet, without stopping the server. I guess there is a option in the web.xml file to do this(I don't know what exactly it is !?!). My doubt is , If I replace the servlet what will happen to the already created threds. The user may be in between his tansaction. Should I force the user to close his thread? Or it'll exist until the user close it?

Thanks,
Senthilrajan.
 
peter john greaves
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

i guess there's two things here:

1. what the container is required to do, by the servlet specification, wrt. reloading servlets. there's stuff in the 2.4 spec in section 3.7 on this. and it seems to be vendor specific once the single class loader issue is resolved. this is pretty much all you get:

"Although a Container Provider implementation of a class reloading scheme for ease of development is not required, any such implementation must ensure that all servlets, and classes that they may use, are loaded in the scope of a single class loader."

2. what this means for a user. frankly i think not much : reloading servlets generally speaking is not something that hurts many sites. http is stateless, remember - most of the time yr web app. will be sitting around in the container, reading a book and waiting to service requests, and doing not much at all. when you talk about a thread and a user, there's little connection really between a thread (in the sense of something the container spawns to handle a request) and the user experience. for example, i have been writing this for >2 mins and the thread that served the request to me, is long gone. if the servlet has been taken out of service and reloaded, i wouldnt know unless i was unlucky enough to be POSTing back to the server at the same time. and even then, the container might well have time to reload and reinitialised the application while i wait.

does this help?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic