• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating Threads in a Web Based Application

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Experts say that creating Threads in a web based Application is not at all good , as its the responsibility of the Container to manage all this stuff.

But please tell me what if my requirement is such that i need to make the current Thread sleep for some seconds .


Thanks in advance.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does making the current thread sleep have to do with creating new threads? What is the actual problem you're trying to address?
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please excuse .

It has nothing to do with my requirement . Just asking for Knowledge Transfer . My Actual question is

what if i want to use Threads in my servlets ??
 
Ninad Kulkarni
Ranch Hand
Posts: 802
Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@ Ravi

Servlet container can handle all request comming in to servlet by creating separate thread for each request.
So you are already using threads indirectly.

Tell us what you want to know with respect to threads.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what if i want to use Threads in my servlets ?

You'd simply use them.
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic