Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Spring Bean Life Cycle  RSS feed

 
vivek dhiman
Ranch Hand
Posts: 155
Netbeans IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I was trying to check the the life cycle of Spring Bean, but stuck at the point where destroy function didn't execute.Below is my code, please check where i am missing something.

Thanks .

Bean File

Configuration File

Output is :
 
Surendra Kumar
Ranch Hand
Posts: 236
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
destroy is called only when the Spring context is closing.
Please see this on the usage.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!