[weld-dev] PostConstruct & PreDestroy in Java SE

Kristoffer Sjögren stoffe at gmail.com
Fri Sep 6 08:09:31 EDT 2013


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?

Cheers,
-Kristoffer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/weld-dev/attachments/20130906/56caf24f/attachment.html 


More information about the weld-dev mailing list