Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring Bean Life Cycle

 
vivek dhiman
Ranch Hand
Posts: 153
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