[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2011-10-18
10
Medium Priority
?
1,091 Views
Last Modified: 2013-11-24
Hi ,

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

I want a full example

0
Comment
Question by:lovely_rosa
  • 6
  • 4
10 Comments
 
LVL 10

Expert Comment

by:Pramod Kumar
ID: 36985312
0
 

Author Comment

by:lovely_rosa
ID: 36985398
Thank you pramodkrjsr:

 I saw  this  page many times ,

 it was not useful

I want full example  in servlet and jsp
0
 
LVL 10

Expert Comment

by:Pramod Kumar
ID: 36985428
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:lovely_rosa
ID: 36986106

thank you pramodkrjsr ,

please  I  need  a full actual code in jsp and servlet
0
 

Author Comment

by:lovely_rosa
ID: 36991094
pramodkrjsr  can u help me please
0
 

Author Comment

by:lovely_rosa
ID: 36991709
where are the experts ?
0
 
LVL 10

Expert Comment

by:Pramod Kumar
ID: 36991748
give me few min, i m preparing the files for you
0
 
LVL 10

Accepted Solution

by:
Pramod Kumar earned 500 total points
ID: 36991889
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
 

Author Comment

by:lovely_rosa
ID: 36992535
thank you   pramodkrjsr   thankyou very much ,  it was helpful  
0
 

Author Closing Comment

by:lovely_rosa
ID: 36992538
thankyou pramodkrjsr:
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month19 days, 9 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question