• Post Reply Bookmark Topic Watch Topic
  • New Topic

How can we create deadlock condition on our servlet?  RSS feed

 
chhotu jha
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
How can we create deadlock condition on our servlet?
Does calling doGet() from doPost() and vice versa really cause a deadlock? Or, does it cause a StackOverflowException?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What happened when you tried it?
 
chhotu jha
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When i tried it then after some time it gives StackoverflowException.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A deadlock has nothing to do with methods mutually calling one another, it is a problem that can happen in multi-threaded code under certain conditions: https://en.wikipedia.org/wiki/Deadlock
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!