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 7014865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:34:37+00:00 2026-05-27T22:34:37+00:00

I need to develop a simple daemon in java that takes files from a

  • 0

I need to develop a simple daemon in java that takes files from a folder, analyse their contents and stores some info in a database. There are inevitably bursts of activity (for instance when files have accumulated whilst the demon was not running) and I am looking for the most efficient threading model to process this backlog as quickly as possible.

I’m currently considering several options.

  1. JBoss AS (v7 ?) with Quartz.
  2. JBoss AS (v7 ?) with just JBoss threads
  3. Pure java 5 task execution framework (ThreadPoolExecutor)

Can someone comment on the pros and cons of these options.

On a side note, I’m also interested in the following related consideration

  • Respective merits regarding how IBM/Sun JDK really manage to make the best of multi core processors. I’m planning to run on either an IBM or a Sun java 7 jvm.
  • Whether JBoss uses or not (and since what version) the java 5 threading model.

EDIT A few remarks following Enno Shioji’s kind answer.

  1. The reason why JBoss in the picture is because the data stored in the DB is made available through a webapp. So that my customer might ask “why is the file parsing not in the AS as well?”.
  2. I agree that the process is probably IO bound rather than CPU bound. However, what I’m eager to avoid is a situation whereby a poor thread scheduling logic across the whole os/pthread/jvm/javalib multi-layers vanilla slice would slow down the acquisition of incoming files.
  • 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-27T22:34:38+00:00Added an answer on May 27, 2026 at 10:34 pm

    JBoss AS is just an application server. Unless you want to use its service (like JMS, WS, EJB, JPA etc.) you don’t want to involve JBoss at all. It would just make things complicated and likely slower.

    Using Quartz may be a good idea depending on what you want to do. This is not because of performance though — just because it might make your implementation easier. If your app is functionally simple, just using ThreadPoolExecutor is fine (and is as performant as it gets on JVM).

    Unless you do really heavy number crunching when you analyze your files, CPU isn’t going to be the bottleneck of your app. My (wild) bet is it would be the DB access. So I wouldn’t worry about CPU efficiency (or on what JVM the app. runs) unless you test the app. and determine that is being a bottleneck.

    UPDATE:
    Oh ok. My recommendation in that case would be having a periodic check using EJB Timer, which submits messages/jobs to JMS with Message Driven Bean or the new light weight asynchronous service which was added in EJB 3.1. As long as you do that (as opposed to spawn a bunch of threads on your own etc.), I really wouldn’t worry about thread scheduling because JBoss will take care of the proper threading design (primarily how many thread to spawn and how to share them among tasks etc.).

    In fact, you probably want to first try letting the Timer do all the job (as opposed to using the fancy JMS with MDB/async service stuff) unless you test and find out that it doesn’t perform enough. That’s way simpler, and usually sufficiently performant.

    Almost all thread scheduling problems comes from bad concurrency design (i.e. programmer’s mistake). Unless you are fine tuning a CPU intensive parallel computation or something like that I really wouldn’t worry about JVM’s scheduling mechanism. That would be like worrying if the bridge will hold when you are about to do a bungee jump from there with an experimental equipment… (you wanna worry about the equipment first)

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

Sidebar

Related Questions

I need to develop a simple application that allows the user to write some
I need some help! Please. I am trying to develop a very very simple
I need to develop simple game that will be using peer to peer connection
I need to develop a simple webapp that allows the user to highlight a
I need to develop an iOS app that implements this simple (I hope) functionality:
I need to develop a simple portable C++ program Billing_Unit. It reads some parameters
I am develop a simple iPhone app. I need a font that looks like
I want to develop a simple java based application that can connect to facebook
I need to develop a simple form (intended only for printing) to be filled
I need to develop an application which stores data in a SQL Server 2005

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.