Announcement Announcement Module
Collapse
No announcement yet.
Spring Scope Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Scope

    If a class A has a reference to B and class C is also having the same composite reference to B,but by default bean scope is singleton so in the session if we want to access the two objects then both A & C will be holding the same object of B because its singleton.since it has no meaning why this is taking the singleton scope.Is it make sense.?

  • #2
    If you need sessionwise different objects then you can use Session scope instead default singleton

    Comment


    • #3
      Thanks for the reply Mr.Rohan

      My Question is in the same transaction if i use these two objects by default it will be singleton so both will hold the same copy rite.then my both objects will be holding the same copy ,then we have to manually force this to be prototype or something else rite. why did they defined it as singleton..they would have made it as prototype itself.

      Thanks
      Rathi
      Last edited by Rathi; Dec 12th, 2011, 11:29 AM.

      Comment

      Working...
      X