Executing a Method When a Bean Is Destroyed
来源:互联网 发布:slax linux中文版 编辑:程序博客网 时间:2024/06/05 23:50
- Using JSR-250 @PreDestroy Annotation
- Implementing the DisposableBean Interface
specify the name of the methodin the destroy-method attribute of the bean’s <bean> tag.
Spring calls it just before it destroys the singleton instance of the bean (as stated before, Spring will not call this method for those beans with prototype
scope).
The only drawback of the destruction callbacks in Spring is that they are not fired automatically; you need
to remember to call AbstractApplicationContext.destroy() before your application is closed.
AbstractApplicationContext’s registerShutdownHook() automatically instructs
Spring to register a shutdown hook of the underlying JVM runtime.
- Executing a Method When a Bean Is Destroyed
- Execute a Method When a Bean Is Created
- Event Method Sequences when a Form is Opened
- When executing a query what a callback function should be
- when a child is born
- When a child is born
- when a child is born
- When is a destructor called?
- When is a destructor called?
- When is a singleton not a singleton?
- The quadratic hash method when the table size is a power of 2
- What Is a Native Method?
- What Is a Session Bean?
- expreiment to see what a callback function should be When executing a query
- Executing A Jira Filter
- Performing a Completion Block When a Task Is Done (!!!)
- When is a CDATA section necessary within a script tag?
- 053-7 When executing a SQL workload, you choose to generate execution plans only, without collecting
- hbase与cassandra比较
- delphi 对象方法的调用
- Ubuntu 12.04安装QQ2012
- 堆排序
- U-Boot如何向内核传递Flash的分区信息
- Executing a Method When a Bean Is Destroyed
- 系统工程师资格认证
- 程序员从初级到中级10个秘诀
- android 公开静态内部类BroadcastReceiver
- Linux学习笔记1—Linux文件权限及目录配置
- 枚举Enum
- 对象树构建自我总结
- 修改 unity“显示桌面”快捷键的方法
- typedef用法和理解