give me an example of deadlock that happen in java web application

Hi ,

 please  I want an example to explain the deadlock in Servlet and jsp   with full code  

I want a full example

lovely_rosaAsked:
Who is Participating?
 
Pramod KumarConnect With a Mentor Commented:
Please find below running web application sample code:
1. DeadLockServlet.java
2. lock.txt - change the extension to .JSP
3. web.xml

In this application, there are two objects "student" and "employee". From browser user may either add employee or student. The dead lock situation may occur when at the same time one user has requested to add student and at the same time another user requested for adding employee.

To reproduce the exact situation, you may call these two functions from two different threads.
DeadLockServlet.java
lock.txt
web.xml
screen.JPG
0
 
lovely_rosaAuthor Commented:
Thank you pramodkrjsr:

 I saw  this  page many times ,

 it was not useful

I want full example  in servlet and jsp
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
Pramod KumarCommented:
The above link describes about the basics of deadlock at root level. So same can be there in any application including web application.

You may treat the given code is in some servlet which initiated on client's request.

Let me know if u still need actual code in jsp/servlet?
0
 
lovely_rosaAuthor Commented:

thank you pramodkrjsr ,

please  I  need  a full actual code in jsp and servlet
0
 
lovely_rosaAuthor Commented:
pramodkrjsr  can u help me please
0
 
lovely_rosaAuthor Commented:
where are the experts ?
0
 
Pramod KumarCommented:
give me few min, i m preparing the files for you
0
 
lovely_rosaAuthor Commented:
thank you   pramodkrjsr   thankyou very much ,  it was helpful  
0
 
lovely_rosaAuthor Commented:
thankyou pramodkrjsr:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.