Class DefaultRuntimeContext

  • All Implemented Interfaces:
    RuntimeContext
    Direct Known Subclasses:
    OSGiRuntimeContext

    public class DefaultRuntimeContext
    extends Object
    implements RuntimeContext
    New behavior @since 9.2 As the runtime lifecycle changed there make no sense to unregister components by their own.

    The component registry is either reset to a clean state or shutdown.

    So methods like unregister by location used in tests make no sense. These methods are preserved yet for compatibility with some tests but may be removed in future.

    Also when a context is destroyed we unregister all the components the context deployed.

    This is also deprecated since the unregister component is deprecated too.

    The code inside destroy method was removed too since the deployedFiles map was removed.

    This map posed problems with the registry snapshot approaches since it was not kept in sync with the registry.

    If unregistering components will be removed completely don't forget to remove ComponentManager.unregisterByLocation(String) and the ComponentRegistry.deployedFiles.

    Features like studio or IDE which needs unregistering components must use their own mechanism.

    Author:
    Bogdan Stefanescu