How it works...

Most of the time, developers prefer to load Singleton objects because they consume memory efficiently rather than having several Prototype objects across the platform.

When it comes to the post-processing clean up, Spring will not have a hard time managing the resources used by Singleton since the entire application uses only one bean object during its request-response transactions. In the case of Prototype beans, the container must implement a post-processor that will clean up all the garbage and some bulk of resources consumed by the series of instantiations every fetch.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.220.16