To upgrade the JAW Motors application to send email messages using JavaMail, we need to do the following:
Add Java Code:
Call the JavaMail utility class from the MDB .
Write a utility class to encapsulate sending an email message with JavaMail.
Factor out JNDI calls into the ServiceLocator.
Add JavaMail-based JNDI reference settings to the EJB-based deployment descriptors (ejb-jar.xml and jboss.xml).
Automate JavaMail-based JNDI reference settings with XDoclet.
Configure JavaMail on JBoss with an MBean.