Announcement Announcement Module
Collapse
No announcement yet.
Two start phases Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    what about using a depends-on attribute on the 'dependant-on-the-other' singleton. This will enforce proper order of initialization.
    Hope this helps.

    Comment

    Working...
    X