@Resource for MailSession in JSF Container
I'm trying to use the @Resource annotation to inject the Mail Session pre created in Glassfish.
The JNDI name is mail/testmail (as it shown in the JNDI Browser under mail node).
annotation in Managed Bean used like this:
@Resource(name = "mail/testmail")
The mailSession is never initialized, looks like the @Resource annotation is ignored by JSF Container.
I tried to use the JNDI Lookup for name java:comp/env/mail/testmail but null is returned..
Is it implemented in Glassfish?