This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spawning multiple threads inside a Servlet

 
Sheenu Pillai
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

We have a situtation where we need to crawl various sites/databases for information to perform a search. The most efficient way is to multithread the application as we all know. Since J2EE discourages custom Multithreading, we had to search for alternatives to accomplish this task.

We came across few interesting solutions using JMS/MDB. Other than using these is there a simpler way to accomplish this. Any help is appreciated...

Thanks,
Srini
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64854
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's the tie-in to Servlets?
 
Sheenu Pillai
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The search request comes from a JSP to the servlet...
 
dema rogatkin
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you consider concurrent package in JDK 1.5 and above? I use it in application similar what you described. Check last link in my signature.
 
Sheenu Pillai
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Dema, But we are using Jdk1.4 and do not have the option to upgrade to 1.5 (atleast for now)... Is there a 3rd party package I could use similar to the package available in Jdk1.5
 
dema rogatkin
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a backport of concurrent package and we use it with a great success on JDk 1.4.
Use JSR166 backport version from:
http://www.mathcs.emory.edu/dcl/util/backport-util-concurrent/
 
Sheenu Pillai
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Appreciate your help... I will have a look at it...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic