【发布时间】:2016-02-23 01:19:35
【问题描述】:
我已遵循 JBoss Web - JNDI 资源 HOW-TO,但在邮件/会话上仍然收到无效的 JNDI 绑定错误。以下是相关文件中的条目。 网络应用程序名称是 goDog。 jboss-web.xml:
<jboss-web>
<context-root>goDog</context-root>
</jboss-web>
WEB-INF/web.xml sn-p:
<resource-ref>
<description>
Resource reference to a factory for javax.mail.Session
instances that may be used for sending electronic mail
messages, preconfigured to connect to the appropriate
SMTP server.
</description>
<res-ref-name>
mail/Session
</res-ref-name>
<res-type>
javax.mail.Session
</res-type>
<res-auth>
Container
</res-auth>
</resource-ref>
META-INF/context.xml:
<?xml version="1.0" encoding="UTF-8"?>
<Context>
<Resource name="mail/Session" auth="Container" type="javax.mail.Session" mail.smtp.host="<themailserver>" />
</Context>
感谢任何指导。 最后一个毛刺卡在我的袜子上以成功部署。
【问题讨论】:
标签: jboss jndi context.xml