1 Reply Latest reply on Mar 12, 2002 8:25 PM by Mac Rinehart

    configuration of mail service

    Mac Rinehart Newbie


      I'm running a test on the mail service against JBoss-3.0.0beta2, updated recently from CVS, with my sample application. "Not running," is a more apt description. I have my mail-service.xml setup properly (I'd post it for review, but then you'd get my password!)

      The issue is "javax.naming.NameNotFoundException: Mail not bound." Here's my jndi-name in the mail-service.xml file:


      Here's the jboss.xml file:

      &nbsp &nbsp<enterprise-beans>
      &nbsp &nbsp &nbsp &nbsp<message-driven>
      &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp<ejb-name>GenerateStatementEJB</ejb-name>
      &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp<configuration-name>Standard Message Driven Bean</configuration-name>
      &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp<destination-jndi-name>queue/testQueue</destination-jndi-name>
      &nbsp &nbsp &nbsp &nbsp</message-driven>
      &nbsp &nbsp</enterprise-beans>
      &nbsp &nbsp<resource-managers>

      &nbsp &nbsp &nbsp &nbsp<resource-manager>
      &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp<res-name>mail/MyMail</res-name>
      &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp<res-jndi-name>java:/Mail</res-jndi-name>
      &nbsp &nbsp &nbsp &nbsp</resource-manager>

      &nbsp &nbsp</resource-managers>

      and here is the entry for my ejb that uses the mail service in the ejb-jar.xml file:

      &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp<![CDATA[This message-driven bean will send email messages.]]>

      any ideas on what the issue is would be greatly appreciated. Thanks, Mac

        • 1. Re: configuration of mail service
          Mac Rinehart Newbie

          Oops. That assessment is wrong. The problem is not with my message driven bean (illustrated in the previous email)but with my client application. It's trying to get the mail Session from the server so it can extract the mail.from address for the purpose of creating some entity beans. (I want to set these beans up so that they get the mail.from address and use it as the mail.to address for the entity that are created, allowing any person to run the example and send messages to themselves after they set up the mail-service.xml file). So, the JNDI name Mail is not bound to the naming context of the client. and for jndi.properties I'm using :

          # Do NOT uncomment this line as it causes in VM calls to go over
          # RMI!

          Now that I think about it, allowing the client application to access the Mail properties on the server could be a bit of a problem in most cases. Am I encounter a security issue?

          - Mac