5 Replies Latest reply on Aug 19, 2010 11:19 AM by peterj

    Mail service in Jboss. Jboss Instance VS Application

    melgosa

      Hello, I have been reading documentation about the jboss mail service and focused on the /deploy/mail-service.xml file to configure it(Cause i was not able to modify it through the jmx-console, and error ocurred every time i was trying to apply changes). I understand all configuring parameters but i have a question, imagine i need different applications to have different configuration for this purpose so one application could send mails to one user, another could use a different pop3 host etc, is there an specific file inside the applications to configure this feature?

       

      Thank you and regards.

        • 1. Re: Mail service in Jboss. Jboss Instance VS Application
          peterj

          Try this: copy the mail-service.xml file as altMail-service.xml and in that file change the JNDIName attribibute to something else, such as:

           

          <attribute name="JNDIName">java:/altMail</attribute>

           

          And of course change the rest of the file to mathc the second email config. Then in your apps that need to use that config, lookup java:/altMail in JNDI.

          1 of 1 people found this helpful
          • 2. Re: Mail service in Jboss. Jboss Instance VS Application
            melgosa

            Ok. where should I config the application to look up that new mail configuration file?

             

            Is it enough to deploy that file in the application folder?

             

            Than you very much.

            • 3. Re: Mail service in Jboss. Jboss Instance VS Application
              peterj

              Raul Melgosa wrote:

               

              Ok. where should I config the application to look up that new mail configuration file?

              I already answered that - have your app use the new JNDI name. (Or am I not understdanding your question?)

              • 4. Re: Mail service in Jboss. Jboss Instance VS Application
                melgosa

                Mmmm, i think i was not clear in my explanation, let my try it again:

                 

                Ok the mail-service.xml file is in /server/default/deploy/ folder. So I will make a copy of this file but changing its parameters, ok. Now i have my altMail-service.xml. How do i make the application to use that file or that conifiguration?.

                 

                I simply uploaded my WAR application via AdminConsole, but found no way to check something about the mail-service configuration it will use or similar.

                 

                I suppose that mail-service.xml in that folder is the configuration for the hole instance and all applications installed in it, so i need an specific configuration for my concrete application, if its possible.

                 

                Hope you understand me now.

                Thank you very much.

                • 5. Re: Mail service in Jboss. Jboss Instance VS Application
                  peterj

                  OK, let me ask this in another way - how does your app go about looking up the mail service?