1 Reply Latest reply on Jun 21, 2006 1:16 PM by trautw

    how  to create mail session in JNDI

    sony3002

      hello all

      in tomcat we can use global naming resource in server.xml
      to create mail session in JNDI

      <Resource name="mail/testMail"
       auth="Container"
       type="javax.mail.Session"
       mail.smtp.host="mail.mycompany.com"
       mail.smtp.port="25"
       mail.transport.protocol="smtp"
       mail.smtp.auth="true"
       mail.smtp.user="sony"
       password="12345678"/>




      how to do this in J Boss ????

      thanks
      Sony George

        • 1. Re: how  to create mail session in JNDI

          Put this in a jboss-web.xml:

          <?xml version="1.0" encoding="UTF-8"?>
          <jboss-web>
          <resource-ref>
          <res-ref-name>mail/Session</res-ref-name>
          <res-type>javax.mail.Session</res-type>
          <jndi-name>java:/Mail</jndi-name>
          </resource-ref>
          </jboss-web>