aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Can be deadlock a missing timeout? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Can be deadlock a missing timeout?" Watch "Can be deadlock a missing timeout?" New topic
Author

Can be deadlock a missing timeout?

Maciej Miklas
Ranch Hand

Joined: Feb 12, 2007
Posts: 61
Hi ranchos!
Do I need to care about situations like below:
1. Thread A obtains the lock and does not release it at all
2. Thread B waits forever to obtain the lock, because it was not released by thread A

This is easy to build in the time out, but do I need it? Could be that treated as deadlock?
At least I could easily take care about case 1.

Thanks,
Maciej
Lucy Hummel
Ranch Hand

Joined: Apr 07, 2005
Posts: 232
Hi Maciej,

If you have a thread like you mentioned below

Originally posted by Maciej Miklas:
Hi ranchos!
Do I need to care about situations like below:
1. Thread A obtains the lock and does not release it at all


then you have a deadlock.

A thread has to release a lock. So that is why you can find a release of a lock in finally blocks.

Br, Lucy


----------------------------------<br />| SCJP, SCWCD, SCBCD, SCEA, SCJD |<br />----------------------------------
Maciej Miklas
Ranch Hand

Joined: Feb 12, 2007
Posts: 61
HI!
Implementation in my code will release the lock always.
But sun is using automatic testing on Data class. Their software can produce sytuation like that and call it deadlock. The question is, if I have to take care aout this.

Thanks,
Maciej
[ February 25, 2007: Message edited by: Maciej Miklas ]
Khaled Mahmoud
Ranch Hand

Joined: Jul 15, 2006
Posts: 361
As far as i know is that this issue belongs to an issue called "Client Crashes".This is issue,as I read through this forum, is out of the scope of the assignment.
Mention it in your choice.txt.
That's what I did.I am still waiting for the results.


SCJP, SCJD,SCWCD,SCDJWS,SCEA 5 MCP-C#, MCP-ASP.NET - http://www.khaledinho.com/
Life is the biggest school
 
 
subject: Can be deadlock a missing timeout?