One of our application tasks is sending bulk SMS.
The application is built with Hibernate/Spring/Wicket
The user chooses which groups to be sent to and then submit the form via Ajax.
The flow is as the following:
- Sending the SMS to each contact in the group.
- Save the SMS to the DB.
- Update the group status.
- Handle the next group.
Sending the SMS could be a lengthy operation so I'm thinking to create a multiple thread (say each thread handle 100 contact), but I'm not sure if this will has an impact on the DB transaction.
How do you advice me to implement this functionality? do suggest any technique?
Are threads necessary?