Solved

Multi threaded mailing application

Posted on 2004-09-27
6
181 Views
Last Modified: 2010-03-31
Dear All

I am supposed to develop a Multi Threaded mailing application in java. It has function as mentioned below:

There will be a thread which will scan the table in a database for the records having the status as Pending. Suppose the query returns 100 records. Each record contains an email id.Then first 15 records will be fetched in a Vector. Now 3 threads will be spawned. Each thread will work on 5 records. The 1st thread will send mail to  the email id of those 5 records.  2nd thread will send mail to  the email id of next 5 records and so on. Once the mail has been sent to 15 mail ids corresponding to 15 records, the status of those 15 records will be updated to Success in database.

This process will continue till all the records have been processed.

Can somebody help me in this application. I am not good at using threads.

Warm Regards

U can reach out to me at nikhil.bansal@tcs.com

Nikhil
0
Comment
Question by:nikhilbansal
  • 3
6 Comments
 
LVL 35

Accepted Solution

by:
girionis earned 250 total points
ID: 12159832
Why do you need three more threads to send the messages? Just one separate thread will do as well.
0
 
LVL 35

Expert Comment

by:girionis
ID: 12159843
For a tutorial have a look here: http://www.didimusic.gr/
0
 
LVL 35

Expert Comment

by:girionis
ID: 12159852
0
 
LVL 12

Assisted Solution

by:Giant2
Giant2 earned 250 total points
ID: 12160315
0

Featured Post

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
java stored proc example 9 30
servlet example 11 40
Which non-HTML GUI front end to use with Java? 3 22
Java Restore security prompts not working 10 12
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question