Service lifecycles
Last updated
Last updated
Your services may behave differently during runtime, depending on their actual stage. Using DiVine, you can specify certain methods that will be invoked by the container, upon a set of events.
Using lifecycles can ensure that your services are correctly initialized and gracefully shut down. No need to worry about unexpected behaviour if you forget to call your init method, or forget to close a connection.