Project: mule
Issue MULE-7588: LifeCycle is inconsistent across registries
Because the LifeCycle manager handles individual objects instead of the mule context as a whole, there're differences in how the life cycle is applied to objects in the TransientRegistry in opposition to the ones in the SpringRegistry: * Objects in the TransientRegistry have a correct life cycle * Objects in the Spring registry that were registered by Mule's bootstrap, receive the Start and Stop phases correctly. They don't receive the dispose phase and the init one is invoked by Spring directly as an init-method, not through the life cycle execution. * Because default Spring registry objects don't receive the init through standard life cycle phase, they cannot be started before the TransientRegistry * Objects manually added to the spring registry by an app, don't receive the initialise nor dispose phases * LifeCycle is applied on Spring registry objects once they're all available in the application context. However, objects in the TransientRegistry get their lifecycle as they're registered, making it impossible for component A to reference component B if A is not registered first. This issue greatly depends on MULE-7587
Story points: 13