Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8247965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T23:02:13+00:00 2026-06-07T23:02:13+00:00

I have a query regarding Spring 3 MVC @Controllers . When a request comes

  • 0

I have a query regarding Spring 3 MVC @Controllers. When a request comes in, does the container create a new instance of the controller for each request (Similar to an Action in Struts 2 – ThreadLocal ActionContext) or a single instance responds to all requests? By default are the controller beans singletons in a context?

What are the guidelines/ best practices for a Spring 3 MVC application? Are these settings configurable? Should those be configured?
Does it change much if my environment is a clustered environment – I guess it should not as the jvm/containers would be different- but some authoritative suggestion would be welcome.

I have read Spring documentation but probably I missed it. Any ‘this is how we implemented kind of’ answers/ pointers/ links would be helpful
Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T23:02:15+00:00Added an answer on June 7, 2026 at 11:02 pm

    Spring controllers are singletons (there is just one instance of each controller per web application) just like servlets. Typically there is no point in changing this behaviour (if it’s even possible). See Regarding thread safety of servlet for common pitfalls, also applying to controllers.

    If your application is clustered do as much as you can to avoid state. State in controllers will require synchronization to avoid threading issues. Also you’ll probably replicate that state across servers – very expensive and troublesome.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a query regarding the directory returned from Path.GetTempPath() function. It returns C:\Documents
I have a query regarding PLSQL exceptions and how to handle them in Java
I have a query here regarding the value given to the update attribute of
I have a few queries regarding columns in Postgres CSV Log. Query 1 Following
I am using Struts 1 framework and i have a query regarding the logic:iterate
simple question regarding HQL(Hibernate query language) so i have user class , that can
Background info I have a query regarding a questions from Sierra & Bates, SCJP
I have some problem regarding the search in mysql. Below is my query. SELECT
I am prototyping a web application using Spring MVC 3.0 with JasperReports. I have
Hello Folks I have a small query regarding Maps in Apex. I have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.