Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 668269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:01:17+00:00 2026-05-14T00:01:17+00:00

I need a little push in the right direction. Here’s my problem: I have

  • 0

I need a little push in the right direction. Here’s my problem: I have to create an ultra-reliable service that sends email messages to clients whose addresses are stored in txt file on FTP server. Single txt file may contain unlimited number of entries. Most often the file contains about 300,000 entries.

Service exposes interface with just two simple methods:

TaskHandle sendEmails(String ftpFilePath);
ProcessStatus checkProcessStatus(TaskHandle taskHandle);

Method sendEmails() returns TaskHandle by which we can ask for ProcessStatus.

For such a service to be reliable clustering is necessary.
Processing single txt file might take a long time. Restarting one node in a cluster should have no impact on sending emails.

We use JBoss AS 4.2.0 which comes with a nice HASingletonController that ensure one instance of service is running at given time.

But once a fail-over happens, the second service should continue work from where the first one stopped.

How can I share state between nodes in a cluster in such a way that leaves no possibility of sending some emails twice?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T00:01:17+00:00Added an answer on May 14, 2026 at 12:01 am

    You could use messaging to decouple the file reading from the mail sending. Have one process read the file and send JMS messages, containing 1 to N email addresses, and have MDB receiving the messages and send the emails. Another option is to synchronize directly with the Database, let the reading process insert addresses and a status in the DB and have your service read the addresses from the database send emails and update status…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I am in need of a little nudge or push in the right
I am writing a website using Django. I need to push the web site
I'm looking to build my first web service and I would like to be
I've worked with mysql for some time but have never had to do anything
I need to quickly wrap some security around an existing ASP.Net 2.0 web app.
So I'm making a Load.c file, that basically will load a bunch of students
I'm sifting through some of my old bugs and while reviewing some nasty code
I'm implementing a few graph algorithms at the moment and am wanting a container
Perhaps it doesn't matter to the compiler once it optimizes, but in C/C++, I
I am using an unsigned char to store 8 flags. Each flag represents the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.