Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Multi threaded mailing application

Posted on 2004-09-27
6
Medium Priority
?
187 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
6 Comments
 
LVL 35

Accepted Solution

by:
girionis earned 1000 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 1000 total points
ID: 12160315
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

721 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