tag:blogger.com,1999:blog-35897879.post986279550521462415..comments2023-11-02T21:16:09.308+11:00Comments on Java-Success Blog: Java 5 Executor Framework - why use thread pools?Anonymoushttp://www.blogger.com/profile/00869496028596976417noreply@blogger.comBlogger39125tag:blogger.com,1999:blog-35897879.post-25583824353655041932014-09-11T21:59:57.224+10:002014-09-11T21:59:57.224+10:00Please correct the for loop in Runnable. Make it a...Please correct the for loop in Runnable. Make it as below<br />for(int i =0; i <= maxNumber; i++)<br /><br />instead of for (int i = 0; i = maxNumber; i++)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-35897879.post-41672324497338282752014-09-10T16:14:54.955+10:002014-09-10T16:14:54.955+10:00Simply Brilliant. Simply Brilliant. Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-35897879.post-9322307921397352432014-05-09T17:22:27.998+10:002014-05-09T17:22:27.998+10:00It is recommended to implement number of threads=n...It is recommended to implement number of threads=number of processors+1<br /><br />Ex:ExecutorService executorService=Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors()+1);Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-35897879.post-6247297862171783842014-04-17T23:08:29.309+10:002014-04-17T23:08:29.309+10:00No. That is why performance testing is important. ...No. That is why performance testing is important. You can get some guidance to start with using Amdahl's law.Anonymoushttps://www.blogger.com/profile/00869496028596976417noreply@blogger.comtag:blogger.com,1999:blog-35897879.post-36537637861729472252014-04-17T21:50:54.897+10:002014-04-17T21:50:54.897+10:00Hi Arulkumaran,
Is there any calculation to decide...Hi Arulkumaran,<br />Is there any calculation to decide no of threads feasible for one CPU Core.<br /><br />Thanks,<br />Amar GoudAmar goudhttps://www.blogger.com/profile/03600944038909954961noreply@blogger.comtag:blogger.com,1999:blog-35897879.post-63432343752653021342014-04-15T17:52:23.085+10:002014-04-15T17:52:23.085+10:00It depends on how may CPU cores your machine has. ...It depends on how may CPU cores your machine has. It is not recommended to have too many threads. There is cachedThreadPool as well that you can use instead of the fixed thread pool. You need to make this value configurable in a properties file, and also need to conduct performance testing to monitor CPU and memory usage.Anonymoushttps://www.blogger.com/profile/00869496028596976417noreply@blogger.comtag:blogger.com,1999:blog-35897879.post-23620454865693151022014-04-15T17:22:06.635+10:002014-04-15T17:22:06.635+10:00Hi,
In sample code the thread pool size is fixed n...Hi,<br />In sample code the thread pool size is fixed no i.e 3. I want to know is there any memory issues if i use thread pool size as 100. How can i decide thread pool size for avoiding memory issues.<br /><br />Thanks,<br /><br />Amar GoudAmar goudhttps://www.blogger.com/profile/03600944038909954961noreply@blogger.comtag:blogger.com,1999:blog-35897879.post-17501738476587641702014-03-08T18:51:59.154+11:002014-03-08T18:51:59.154+11:00Thanks Santhanu for your valuable feedback, and it...Thanks Santhanu for your valuable feedback, and it has been fixed.Anonymoushttps://www.blogger.com/profile/00869496028596976417noreply@blogger.comtag:blogger.com,1999:blog-35897879.post-22826678824108894692014-03-06T06:15:28.764+11:002014-03-06T06:15:28.764+11:00Hi Arulkumaran,
Overall your explanation is good. ...Hi Arulkumaran,<br />Overall your explanation is good. But few places I see there are some fundamental mistake. If you please correct those places that it will be good for beginners. <br />The first line of this page says,"A thread pool is a collection of runnables with a work queue." I think that is not correct. Essentially a ThreadPool consists of a collection of Worker Thread. The Anonymoushttps://www.blogger.com/profile/07023232929671397250noreply@blogger.comtag:blogger.com,1999:blog-35897879.post-8740810042497353812014-02-28T00:30:56.629+11:002014-02-28T00:30:56.629+11:00I stumbled on your blogs by chance and can't s...I stumbled on your blogs by chance and can't speak enough about how good , explanatory they are. You have done an amazing job in putting complex stuff in such a simple way. Thanks a lot and keep up the good work !Unknownhttps://www.blogger.com/profile/18178125491332342994noreply@blogger.comtag:blogger.com,1999:blog-35897879.post-84567693458303862212014-02-10T04:06:27.359+11:002014-02-10T04:06:27.359+11:00very informative articles.... thanks.very informative articles.... thanks.Jigyasahttps://www.blogger.com/profile/16592959474412855077noreply@blogger.comtag:blogger.com,1999:blog-35897879.post-11052665706407410822013-11-11T04:07:58.285+11:002013-11-11T04:07:58.285+11:00Nice Article Appreciate your efforts !!!! Nice Article Appreciate your efforts !!!! Anonymoushttps://www.blogger.com/profile/05848498534045023460noreply@blogger.comtag:blogger.com,1999:blog-35897879.post-51606769627859752372013-10-17T22:43:52.186+11:002013-10-17T22:43:52.186+11:00Hello sir..very nice blog i have ever found.Hello sir..very nice blog i have ever found.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-35897879.post-86224858182026974662013-09-21T23:52:51.026+10:002013-09-21T23:52:51.026+10:00good article .. thank you.good article .. thank you.Anilnoreply@blogger.comtag:blogger.com,1999:blog-35897879.post-31925474375438000382013-09-12T21:20:18.725+10:002013-09-12T21:20:18.725+10:00perfect explanation.........perfect explanation.........Anonymoushttps://www.blogger.com/profile/00467976194912491842noreply@blogger.comtag:blogger.com,1999:blog-35897879.post-74828464944957164602013-02-25T04:23:11.458+11:002013-02-25T04:23:11.458+11:00Fantastic article... I am a newbie to multithreadi...Fantastic article... I am a newbie to multithreading / executors and was wondering what they were... This article is very good... thanks...Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-35897879.post-26980918582793752342013-01-19T05:34:10.107+11:002013-01-19T05:34:10.107+11:00very nice article. good understanding on thread po...very nice article. good understanding on thread pools using concurrency package.Rajasekharnoreply@blogger.comtag:blogger.com,1999:blog-35897879.post-25749182498170185752013-01-16T05:47:08.861+11:002013-01-16T05:47:08.861+11:00Very good work. I need to send about 100,000 email...Very good work. I need to send about 100,000 emails (no spam) html with attachment. You can do it with thread pool? Also need to know their status, is this possible?<br /><br />Thanks in advanceAnonymoushttps://www.blogger.com/profile/15020635184548599131noreply@blogger.comtag:blogger.com,1999:blog-35897879.post-39150615666795681412013-01-08T20:19:48.909+11:002013-01-08T20:19:48.909+11:00Very Nice work...really appriciated...Very Nice work...really appriciated...Ashishhttps://www.blogger.com/profile/05263825025185680085noreply@blogger.comtag:blogger.com,1999:blog-35897879.post-87503874778076526982012-12-28T23:50:03.664+11:002012-12-28T23:50:03.664+11:00Good Article ... Good Article ... Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-35897879.post-13933732875887977332012-12-04T03:45:15.035+11:002012-12-04T03:45:15.035+11:00Good article. gave a good high level understanding...Good article. gave a good high level understanding of the executor framework. Can you please let me know what does spring use? I believe it uses the executor framework. Does the Executor framework used only for execution part? as in is it only a meeting point for a supplier and consumer OR does it handle the intricacies of thread handling?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-35897879.post-723694804204948732012-11-15T03:29:38.656+11:002012-11-15T03:29:38.656+11:00Hi Blogger,I think this is good online tutorial fo...Hi Blogger,I think this is good online tutorial for learning totally java related technologies for freshers as well as experience candidates...U doing good job.One small doubt regarding web services...what is the use of web services in real time projects can you post one good example.<br /><br />Thanks<br /><br />ChanduAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-35897879.post-46453363111293947282012-10-23T15:53:23.323+11:002012-10-23T15:53:23.323+11:00Spawning your own thread within a JEE container is...Spawning your own thread within a JEE container is discouraged because all resources within the environment are meant to be managed, and potentially monitored, by the server. There are ways to do this "correctly", but it is dependent on the platform being used. For example, The commonj WorkManager can be used for WebSphere and WebLogic JEE container as well as othersAnonymoushttps://www.blogger.com/profile/00869496028596976417noreply@blogger.comtag:blogger.com,1999:blog-35897879.post-58259638987388954842012-10-23T15:30:48.869+11:002012-10-23T15:30:48.869+11:00Hi ,
Is it safe to use Executor framework within J...Hi ,<br />Is it safe to use Executor framework within J2EE container?<br /><br />Thanks<br />RamRamhttps://www.blogger.com/profile/12169443646554255482noreply@blogger.comtag:blogger.com,1999:blog-35897879.post-10915877061547391192012-10-04T12:05:05.511+10:002012-10-04T12:05:05.511+10:00Not sure what you mean. Can you please clarify it ...Not sure what you mean. Can you please clarify it a bit more? Anonymoushttps://www.blogger.com/profile/00869496028596976417noreply@blogger.com