[jsr-314-open-mirror] [jsr-314-open] [2.0RevA-C071] none scoped beansand at PostConstruct

Simon Lessard simon_lessard at dmr.ca
Fri May 28 09:49:51 EDT 2010


Re: [jsr-314-open] [2.0RevA-C071] none scoped beansand at PostConstruct
 Hi all,

I thought a bit more about this, and while I still think @PostConstruct
should be called for none scoped bean, I think we should document
@PreDestroy better as we won't have many way to call the annotated method
for none scoped bean. Of course, the managed bean engine could be made very
intelligent and know in what context the none scoped bean is getting used.
If injected into another bean, it could add the none scoped bean in an
hidden map in the same scope to detect destruction, but if the none scoped
bean is used directly, which is rare but possible, then I cannot think of
any way to enforce @PreDestroy.


Regards,

~ Simon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jsr-314-open-mirror/attachments/20100528/7a6062e4/attachment-0002.html 


More information about the jsr-314-open-mirror mailing list