我遵循了JBoss Web - JNDI資源操作方法,但仍然在郵件/會話中收到無效的JNDI綁定錯誤。以下是關聯文件中的條目。 網絡應用名稱是goDog。 的jboss-web.xml中:jboss JNDI設置失敗 - 沒有有效的JNDI綁定
<jboss-web>
<context-root>goDog</context-root>
</jboss-web>
WEB-INF/web.xml文件片段:
<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>
我明白任何指導。 上次毛刺卡在我的襪子上,以便成功部署。