• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

question on distributed application

 
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Assuming that the servlet container is distributed across multiple JVMs, which of the following statements are correct?
answers include a seperate instance of a non-default servlet context will be availalbe on each of the JVMs.
my questions :
1 how to undestand the answer? a instance is seperated in different JVMs or there is a instance in each JVM?
2 what is different between non-default servlet context and default servlet context ?
 
Timber Lee
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
are there any answer?
 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1) I'd say that the answer you've provided is correct. There is one instance of servlet context in every JVM (except for the default servlet context).
2) The default servlet context corresponds to the default web-application (if enabled). This one is not distributed.
Hope this helps,
Adrian Muscalu
 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From Servlet 2.3 spec,
SRV.3.2 Scope of a ServletContext Interface
There is one instance object of the ServletContext interface associated with each
web application deployed into a container. In cases where the container is
distributed over many virtual machines, a web application will have an instance of
the ServletContext for each VM.
Servlets in a container that were not deployed as part of a web application are
implicitly part of a �default� web application and have a default ServletContext.
In a distributed container, the default ServletContext is non-distributable and
must only exist in one VM.
 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am green regarding to Distributable web application. Would anyone answer my questions please?
1. Is Tomcat's ROOT is an example of default web context? If yes, it cannot be distributable.
2. If I make a new context called scwcd, is other than default? If yes, it can be made distributable.
Please clear my understanding.
---------------
Hafizur Rahman
SCJP2(94%)
 
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Hafizur Rahman:
1. Is Tomcat's ROOT is an example of default web context? If yes, it cannot be distributable.

Yes, that is my understanding. The default context is home to such facilities as the JSP servlet (which is mapped to *.jsp and translates JSP pages into proper servlets).

2. If I make a new context called scwcd, is other than default? If yes, it can be made distributable.

Yes, and yes.
- Peter
 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
What should I do in code to make web application distributable? I know that every object stored in session should implement Serializable. Are there more restrictions?
Thanks
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic