Annotation Type PreDestroy

public @interface PreDestroy

The PreDestroy annotation is used on methods as a callback notification to signal that the beanlet instance is in the process of being removed by the container. Such methods are so-called pre-destroy methods This annotation is also supported for interceptor methods, further referred to as pre-destroy lifecycle methods.

Pre-destroy methods are typically used to release resources that the beanlet has been holding.

Method Constraints

The method on which the PreDestroy annotation is applied MUST fulfill all of the following criteria:

XML Representation

The following xml-fragment shows how to express this annotation in xml. The italic attribute of the 'pre-destroy' tag is used to identify the element to which this annotation is applied.
<beanlets xmlns=""
  <beanlet name="foo" type="com.acme.Foo">
    <pre-destroy method="bar"/>

Copyright © 2006-2012. All Rights Reserved.