File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes duplication of ServletContext !!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "duplication of ServletContext !!!" Watch "duplication of ServletContext !!!" New topic

duplication of ServletContext !!!

Niranjan Deshpande
Ranch Hand

Joined: Oct 16, 2005
Posts: 1277
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-

" 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:

SCJP 1.4 - 95% [ My Story ] - SCWCD 1.4 - 91% [ My Story ]
Performance is a compulsion, not a option, if my existence is to be justified.
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968

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.


-Cameron McKenzie
Niranjan Deshpande
Ranch Hand

Joined: Oct 16, 2005
Posts: 1277
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:
I agree. Here's the link:
subject: duplication of ServletContext !!!
It's not a secret anymore!