Results 1 to 2 of 2

Thread: Two start phases

Hybrid View

  1. #1
    Join Date
    Nov 2004
    Posts
    7

    Default Two start phases

    I've singleton beans that start some subsystems and they implement a mechanism of listening, so they need to start the subsystem after everything is configured (the listener-beans were added).

    The listener-beans were added on their afterPropertiesSet method and I use the ApplicationEvent to start the subsystem. But this is not the rigth way in the case one subsystem depends on another because there is no order.

    I could implement a BeanFactoryPostProcessor and examine the dependencies... but it's possible to do it in another generic way?

    Thanks

  2. #2
    Join Date
    Aug 2004
    Location
    Montréal, Canada
    Posts
    845

    Default

    what about using a depends-on attribute on the 'dependant-on-the-other' singleton. This will enforce proper order of initialization.
    Hope this helps.
    Omar Irbouh

    Spring Modules Team
    http://irbouh.blogspot.com/

Similar Threads

  1. Is there any tutorial about Eclipse?
    By yunkun_yang in forum SpringSource Tool Suite
    Replies: 19
    Last Post: Jul 15th, 2006, 01:49 PM
  2. Replies: 6
    Last Post: Sep 29th, 2005, 04:25 AM
  3. Local vs web start differences
    By jwray in forum Swing
    Replies: 7
    Last Post: Jul 15th, 2005, 02:54 PM
  4. Transaction doesn't start!
    By niqs in forum Data
    Replies: 2
    Last Post: Jun 20th, 2005, 07:41 AM
  5. Replies: 1
    Last Post: Jun 12th, 2005, 08:46 AM

Posting Permissions

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