posted 15 years ago
I am about to write my first multi threaded Java application. The task basically is to create sales report for a set of products; the products and the inputs to the report generator class are completely independent.
I believe we can create multiple threads (I would like to control the number of threads to create from a properties files based on number of CPUs in the target machine). to use them generate reports asynchronously. Currently this is what I do in my single threaded program.
I wish Java gurus give me some inputs on the design. Thanks in advance.
Structure of Report Generator class
My current implementation which I would like to perform in a multi threaded approach.
I would like to know what is the best way to first create a set of threads and make them pick a product and generate report.
Thanks.