Results 1 to 2 of 2

Thread: Equivlent of destroy-method attribute

  1. #1

    Default Equivlent of destroy-method attribute

    Here is an XML config sample:

    <bean id="exampleInitBean" class="examples.ExampleBean"
    destroy-method="cleanup"/>

    Is there any java-based annotation that does the exact same thing as the "destroy-method" bean attribute?

    For example:

    @Configuration
    public class SimpleConfig
    {
    @Bean
    @???????????
    public ExampleBean exampleBean()
    {
    return new ExampleBean();
    }
    }


    Thanks.
    Last edited by zollen; Dec 30th, 2009 at 12:59 PM.

  2. #2
    Join Date
    Apr 2007
    Posts
    307

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •