0

In "Pro Spring 2.5" it is said that

Spring doesn’t manage the life cycles of beans that are configured as nonsingletons.

So how do we manage the life cycle of non-singleton beans?

skaffman
  • 398,947
  • 96
  • 818
  • 769
Jyotirup
  • 2,882
  • 9
  • 30
  • 38
  • possible duplicate of [Spring: How to cleanly terminate prototype-scoped beans?](http://stackoverflow.com/questions/8154736/spring-how-to-cleanly-terminate-prototype-scoped-beans) – skaffman Jan 16 '12 at 07:57
  • Also http://stackoverflow.com/questions/2809773/spring-beans-destroy-method-attribute-and-web-application-prototyped-bean – skaffman Jan 16 '12 at 07:57

1 Answers1

0

Check the spring reference, it says

The client code must clean up prototype-scoped objects and release expensive resources that the prototype bean(s) are holding. To get the Spring container to
release resources held by prototype-scoped beans, try using a custom bean post-processor, which holds a reference to beans that need to be cleaned up.

skaffman
  • 398,947
  • 96
  • 818
  • 769
Aravind A
  • 9,507
  • 4
  • 36
  • 45