Results 1 to 2 of 2
  1. #1
    james12 is offline Member
    Join Date
    Jun 2014
    Posts
    37
    Rep Power
    0

    Default How do beans become 'singleton' or prototype?

    How do beans become 'singleton' or prototype?

  2. #2
    Join Date
    Apr 2014
    Location
    http://www.roytuts.com
    Posts
    51
    Rep Power
    0

    Default Re: How do beans become 'singleton' or prototype?

    by default spring beans are singleton means for the whole application there will be only one instance for a class. prototype means for each request a new instance will be created and for this you have to use scope="prototype" in xml configuration or if you want to use annotation then you can declare it in annotation how the bean will behave.

Similar Threads

  1. New to Java looking for a strategic approach..for a prototype
    By andydowthwaite in forum New To Java
    Replies: 1
    Last Post: 03-14-2012, 10:43 AM
  2. Replies: 1
    Last Post: 09-07-2011, 07:08 AM
  3. Replies: 2
    Last Post: 10-06-2008, 10:06 PM
  4. Replies: 0
    Last Post: 03-29-2008, 01:41 PM
  5. Replies: 0
    Last Post: 09-26-2007, 09:32 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
  •