MailSession resource name

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

MailSession resource name

ross.cohen
In tomee.xml I have defined mail resource as follows:

        <Resource id="mail/mailsession" type="javax.mail.Session">
                mail.smtp.host=<some-mail-host>
            mail.transport.protocol=smtp
                mail.smtp.port=25
                mail.smtp.auth=false
                mail.smtp.user="DoNotReplyTestLiferay@<some.domain.x&quot;
        &lt;/Resource>

However:

@Resource(mappedName = "java:comp/env/mail/mailsession")

results in a fine healthy MailSession, while

@Resource(name = "mail/mailsession")

results in a null MailSession.   What gives?   I prefer not to used the
mappedName.

Thanks,
Ross









--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html