users@glassfish.java.net

Re: _at_Resource for MailSession in JSF Container

From: <glassfish_at_javadesktop.org>
Date: Sun, 16 Dec 2007 07:35:46 PST

Hi Dmitry,

Did you map the resource reference name mail/testmail (as specified in the name attr) to the global jndi name mail/testmail (as seen in the jndi browser)?

You can try:
@Resource(name = "mail/testmail", mappedName="mail/testmail")
javax.mail.Session mailSession;

Or you can map it in sun-web.xml

-cheng
[Message sent by forum member 'cf126330' (cf126330)]

http://forums.java.net/jive/thread.jspa?messageID=250287