Results 1 to 2 of 2

Thread: Threading Question

  1. #1
    Join Date
    Aug 2004
    Posts
    8

    Default Threading Question

    I saw most of the samples set the load-on-startup to 2 for the DispatcherServlet.

    Why we need more than one DispatcherServlet instances?
    If all the instances have the same values, does multiple DispatcherServlets can handle requests faster than one DispatcherServlet.doService()?


    thanks :?

  2. #2
    Join Date
    Aug 2004
    Location
    Montréal, Canada
    Posts
    845

    Default

    Well, load-on-startup determines when the servlet should be loaded and not how many thread (copies) to load
    Quote Originally Posted by a description I found somewhere
    The load-on-startup element indicates that a servlet should be loaded on the startup of the web application. This element can take an integer value which indicates the order in which the servlet should be loaded.

    If the value is negative, or if this element is not present, the container is at its will as to when it should load the servlet. If the value is a positive integer or 0, the container must load and initialize the servlet when the application is deployed.

    Generally the servlets marked with lower integers are loaded before servlets marked with higher integers. The container may choose the order of loading of servlets with the same load-on-start-up value.
    Hope this makes it clear.
    Omar Irbouh

    Spring Modules Team
    http://irbouh.blogspot.com/

Similar Threads

  1. Forgot password (e.g. secret question) using Acegi
    By lowerymb77 in forum Security
    Replies: 1
    Last Post: Oct 16th, 2005, 10:46 PM
  2. design question: passing context
    By Alarmnummer in forum Management
    Replies: 0
    Last Post: Oct 3rd, 2005, 01:20 PM
  3. ApplicationContext and threading.
    By arrow_us_dc in forum Container
    Replies: 2
    Last Post: May 4th, 2005, 02:46 PM
  4. Threading question
    By dfischer in forum Container
    Replies: 13
    Last Post: Mar 21st, 2005, 08:13 AM
  5. Replies: 6
    Last Post: Oct 8th, 2004, 02:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •