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 6067997
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:40:07+00:00 2026-05-23T09:40:07+00:00

Below are the definitions of prototype and request scope in Spring. prototype Scopes a

  • 0

Below are the definitions of prototype and request scope in Spring.

prototype
Scopes a single bean definition to any number of object instances.

request
Scopes a single bean definition to the lifecycle of a single HTTP request; that is each and every HTTP request will have its own
instance of a bean created off the back of a single bean definition. Only valid in the context of a web-aware Spring ApplicationContext.

As per my understanding In case of prototype scope , some pool will be maintained by core container. It will serve the bean instance from that pool.
In case of request scope, new bean will be served for each http request. Please correct me if there is some dicrepency in understanding?

If above statements are true, then if bean is holding some state then the scope should not be defined as prototype rather it should be defined
as request. Correct?

  • 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-05-23T09:40:07+00:00Added an answer on May 23, 2026 at 9:40 am

    You are off. Prototype is described in the docs here as

    “The non-singleton, prototype scope of
    bean deployment results in the
    creation of a new bean instance every
    time a request for that specific bean
    is made.”

    Your description of request scoped beans is accurate.

    Probably just got the wires crossed vis-a-vis prototype vs singleton.

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

Sidebar

Related Questions

Whats wrong in below JSON Object definition I am trying to create a new
Is there any difference in between the two method definitions below? Eclipse does not
Below is the definition of sockaddr_storage structure ( rfc2553 ). According rfc2553, the sockaddr_storage
I'm getting the error T does not contain a definition for Id below in
Ok, I have a ResourceDictionary definition that I used for a WPF app below:
Below code instantiates a derived singleton object based on environment variable. The compiler errors
I have been asked Given the definitions of a, b and c below, select
For the program below i get the following error- Potential leak of an object
I am using John Resig's JavaScript class definition style . Below is an example
I have three tables (definitions below). My question is there can be multiple bar

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.