Actually there's no singleton scope and corresponding built-in context
defined in the CDI spec. Though Weld API contains
org.jboss.weld.context.SingletonContext. Also the docs are outdated
(chapter 5.4. The singleton pseudo-scope). I think relevant classes
should be deprecated and the docs updated.
With regard to lifecycle callbacks - Weld only invalidates application
context during shutdown right now .
Dne 6.9.2013 14:09, Kristoffer Sjögren napsal(a):
> _______________________________________________> Hi
> We're running Weld 2.0.3.Final in a Java SE environment and have
> encountered a precarious situation where it seems like Weld is not
> consistent in handling the lifecycle of singleton beans.
> We have singleton beans with @PostConstruct and @PreDestroy methods.
> During Weld.initialize() all @PostConstruct methods are called. But
> during @PreDestroy methods are never called during Weld.shutdown().
> @PreDestroy is only called on beans which are @ApplicationScoped.
> Is this according to specification or a bug?
> weld-dev mailing list