public interface SingletonContext
extends javax.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;
SingletonContext
,
ApplicationScoped
Modifier and Type | Method and Description |
---|---|
void |
invalidate()
Invalidate the context, causing all bean instances to be destroyed.
|
Copyright © 2016. All rights reserved.