4 Replies Latest reply on Apr 9, 2004 8:09 AM by Mike Shoemaker

    Mail Service

    Mike Shoemaker Newbie

      Currently I am using a WebApplication that requires a Mail Service to be at jndi location java:comp/env/Mail. By
      default JBOSS Mail is at java:/Mail. How can I change this to be at java:comp/env/Mail. I tried making the
      change directly to the element in mail-service.xml to no avail. Am I missing something?

        • 1. Re: Mail Service
          Adrian Brock Master

          You need to add a resource-ref to you web.xml and jbossweb.xml

          Regards,
          Adrian

          • 2. Re: Mail Service
            Mike Shoemaker Newbie

            Thanks for the reploy Adrian. I posted this after the fact in the JMX categories thinking it may be more on target there.

            http://www.jboss.org/index.html?module=bb&op=viewtopic&t=48274

            I do have the references you refer to.


            <jboss-web>
             <context-root>/myApp</context-root>
             <virtual-host>www.mydomain.com</virtual-host>
             <resource-ref>
             <res-ref-name>mail/Session</res-ref-name>
             <res-type>javax.mail.Session</res-type>
             <res-auth>Container</res-auth>
             <jndi-name>java:comp/env/Mail</jndi-name>
             </resource-ref>
            </jboss-web>
            


            <resource-ref>
             <res-ref-name>mail/Session</res-ref-name>
             <res-type>javax.mail.Session</res-type>
             <res-auth>Container</res-auth>
             </resource-ref>
            


            Do they look correct?

            • 3. Re: Mail Service
              Raja Master

               

              "javamac" wrote:

              <jboss-web>
               <context-root>/myApp</context-root>
               <virtual-host>www.mydomain.com</virtual-host>
               <resource-ref>
               <res-ref-name>mail/Session</res-ref-name>
               <res-type>javax.mail.Session</res-type>
               <res-auth>Container</res-auth>
               <jndi-name>java:comp/env/Mail</jndi-name>
               </resource-ref>
              </jboss-web>
              



              Try Changing the jndi-name to be java:/Mail
              Thats the original JNDI Name.

              -Raja

              • 4. Re: Mail Service
                Mike Shoemaker Newbie

                The web app im installing requires that the jndi name start with java:comp/env. Why doesn't the jndi name show up in the jndi browser when I change it to that?