You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by "ross.cohen" <ro...@gmail.com> on 2018/11/13 19:41:57 UTC
MailSession resource name
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"
</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