Announcement Announcement Module
Collapse
No announcement yet.
Implementing Lifecycle interface - start() method never gets called Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Implementing Lifecycle interface - start() method never gets called

    Hello,

    I wrote a simple command line application to verify this. When I create an ApplicationContext containing a single bean which implements the Lifecycle interface, the start() method never gets called. When shutting down though, the isRunning() method does get called. If true, stop() gets called as well.

    Any idea why start() never gets called?

    As an aside, if I implement the SmartLifecycle interface (which extends Lifecycle), the start() method does get called. Not sure why this works when the start() method is actually inherited from the Lifecycle interface.

    Can anyone help me better understand what is happening here?

    Thanks!
Working...
X