>>> "Doshi, Gunjan" <[EMAIL PROTECTED]> 22-May-00 4:23:52 PM >>>

>Can some one tell what are distributable servlets and
>how are they different from 2.1 servlets.

A distributable servlet is one which can be run across many
webservers but use the same data (primarily context and session
data).

For exampe... you might have an e-commerce application which allows
uses to add items they have purchased from your on-line shop to a
session.

You run the application (which includes several servlets) on 3
webservers using DNS to share load between them.

User A makes a request to server1 and server1 creates a session for
the user.

User B then makes a request which is passed to server2 - how does
server2 obtain the session data which was created on server1?


Unless the servlet is marked distributed the session data will only
be available on one JVM, the one the user was using when the session
was created.

With a distributed servlet the session would be available on all JVMs
that the servlet container was running on.


You should note that this isn't really a function of a servlet...
it's more to do with the servlet engine.

In a dsitributed environment the servlet engine has to ensure that:

- it has some way of communicating with the other servlet engines
taking part in the environment
- it ensures that other servlet engines are aware when a change to a
session (which is shared) occurs
- it ensures that other servlet engines are aware when a change to
the context (which is shared) occurs

Not all servlet engines support this functionality.


Nic Ferrier

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to