This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I would like that every time that I'll perform :
I spring will create new instance of this object
I set this bean in the relevant xml file as: scope="prototype"
but still spring created new instance on the first time and from then, every time that the same bean performed again
SpringUtil.lookupComponent("myObject") spring didn't generate new instance but returned the same old "MyObject" does anyone know why and how I can
force the lookup command to generate new instance for me.
I also saw in Spring documentation that the definition of scope prototype is:
Scopes a single bean definition to any number of object instances.
Which means that Spring doesn't necesseraly generate new instance every time that the same parent bean requires it.