Interface SingletonContext

  • All Superinterfaces:
    jakarta.enterprise.context.spi.AlterableContext, jakarta.enterprise.context.spi.Context

    public interface SingletonContext
    extends jakarta.enterprise.context.spi.AlterableContext

    The built in singleton context, associated with Singleton. It is always active (not managed) and is backed by an application scoped singleton.

    Weld comes with one Singleton context which can be injected using:

     @ Inject SingletonContext singletonContext;
     
    Author:
    Pete Muir
    See Also:
    SingletonContext, ApplicationScoped
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void invalidate()
      Invalidate the context, causing all bean instances to be destroyed.
      • Methods inherited from interface jakarta.enterprise.context.spi.AlterableContext

        destroy
      • Methods inherited from interface jakarta.enterprise.context.spi.Context

        get, get, getScope, isActive
    • Method Detail

      • invalidate

        void invalidate()
        Invalidate the context, causing all bean instances to be destroyed.