From the course: Spring: Framework in Depth

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

The use phase

The use phase

From the course: Spring: Framework in Depth

Start my 1-month free trial

The use phase

- [Instructor] Now, back to our lifecycle. Once all of the beans are initialized, configured, and instantiated we enter the use phase of the lifecycle. Now, the use phase is the most boring of all of the phases of the lifecycle, but it's the one that actually pays the bills, 'cause this is where the real work of the application gets done. Most of our time is spent in this phase. Assuming an application stays up for any amount of time anyway. The ApplicationContext serves proxies to the original classes. So again, everything goes through proxies. The ApplicationContext also maintains a handle to each bean, assuming it's of type singleton. And I keep mentioning that because it's so important to remember. These beans don't get garbage collected. The ApplicationContext maintains that handle throughout the entire lifecycle of the application. Now, there is a special type of bean that you can create called a context-aware…

Contents