File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes web application question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "web application question" Watch "web application question" New topic

web application question

kalyen kumar
Ranch Hand

Joined: Sep 18, 2008
Posts: 53

I am developing a web application which sells books online.
Once an user buys a books from this site then 2 things should happen,

1) An Email confirming the order details, amount and shipping details should be sent to the user.
2) Also an SMS confirming the same order details, amount and shipping details should be sent to the user.

If i do it like first email and next sms then any problem in sending email is not allowing the sms sending to trigger.

Question: What is the better approach (apart from thread based approach) to make sure, the sending email and sending sms are independent of each other ?
Failure in one should not obstruct the other.

Thanks in advance
Anoop Pillai

Joined: Oct 05, 2008
Posts: 9

Hi Kalyen,

You can surround the code for sending email and sms with 2 different try-catch blocks.

The Next Best Thing To Knowing Something Is Knowing Where To Find It.
I agree. Here's the link:
subject: web application question
jQuery in Action, 3rd edition