• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

duplication of ServletContext !!!

 
Niranjan Deshpande
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this statement true ???

"In distributed applications, context parameters are duplicated between JVMs"

As is said in HFSJ, except HttpSession all others stuff like ServletContext and ServletConfig ( for each servlet ) are replicated in all JVMs in which the web app is distributed. Since ServletContext is replicated, the parameters must also get replicated, isnt it ? so the above statement must be true, but David Bridgewater book (page 231) says-

"...an important limitation of servlet context inforamtion is that there is no mechanism to duplicate parameter informationfrom one JVM to another in distributed apps(Of course chances are you have identical DDs with same parameters declared in other JVMs supporting the distributed application - so effectively the data is available wherever the application runs. However, that doesnt make the above statement true"

So, guys please help me out !! :roll:
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, this is very true of the ServletContext. What works fine on a single JVM can quite quickly cause problems on a distributed system.

Content places in the ServletContext of a distributed applications should be largely read, and infrequently written to, other wise, things can get out of sync.

Cheers!

-Cameron McKenzie
 
Niranjan Deshpande
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so the ServletContext is distributed, but the parameters arent ?
doesnt it sound absurd ? the ServletContext duplication is useles if its parameters arent duplcaited to be used by the other JVM ( same web - app )
that means, EMPTY DUPLICATION ??? :roll:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic