Section 8.9. Testing the Credit Check Notification Email

8.9. Testing the Credit Check Notification Email

Now that we've developed and deployed JavaMail code to send an email notification message to the user, let's test our application to ensure that everything still works properly. Here are the steps to build and deploy the application:

  • Type ant in the root directory of ch08 to build the project.

  • Shut down JBoss so the Ant script can clean up the JBoss deployment area.

  • Type ant colddeploy to deploy the EAR file (jaw.ear) to the $JBOSS_HOME/server/default/deploy directory.

  • Start JBoss back up.

  • Visit http://localhost:8080/jaw in a web browser.

Click on the "Run Credit Check" link on the JAW Motors home page, enter data on the "Run Credit Check" form, and press the "Submit Credit Info" button. You should be routed back to the main page, and in a minute or two you should see a message that looks like this in your email client's Inbox:

 From: To:      yourName@host.domain Subject: Credit Check Result Pass Credit Check 

The credit check randomly passes or fails, so you could also see "Fail Credit Check" in the email message body.

JBoss at Work. A Practical Guide
JBoss at Work: A Practical Guide
ISBN: 0596007345
EAN: 2147483647
Year: 2004
Pages: 197

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: