Results 1 to 2 of 2

Thread: bean destroy order

  1. #1
    Join Date
    Jun 2009
    Posts
    26

    Default bean destroy order

    Hi,
    I was wondering if there's any way to define "bean destroy order"; say, to force a DisposableBean to be destroyed after another bean ( or, be the last bean to be destroyed)
    thanks in advance

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,632

    Default

    Beans are destroyed in the reverse order as they are created (at least that is what spring tries to do). So if your bean is the first to be created it should be the last one destroyed.

    Also why is this ordering so important, spring already does a best effort to resolve the order of bean destruction.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Tags for this Thread

Posting Permissions

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