6. Bean Scopes
6. Bean Scopes
Use Prototype scope when you want a new instance each time,
like for stateful beans where each instance should have its own
data.
Bean Scopes
You might create a custom scope for special business needs, like
a scope that lasts for a user's shopping cart session or a scope
tied to a specific workflow.