| Author |
lock method
|
pramod karnani
Ranch Hand
Joined: May 22, 2007
Posts: 88
|
|
when I am calling lock(recNo) on locked record my code is blocking for some time and after some time it throws
java.lang.OutOfMemoryError: Java heap space .Like it goes in infinite loop in lock method .
Is it okay when we call lock method on already locked record it should block the code.
let me know
|
 |
mohamed sulibi
Ranch Hand
Joined: Sep 04, 2005
Posts: 169
|
|
hi;
Is it okay when we call lock method on already locked record it should block the code.
I think the answer is yes for this question, the current thread will be blocked when you call the wait or aWait on some object or lock .
but for
when I am calling lock(recNo) on locked record my code is blocking for some time and after some time it throws
java.lang.OutOfMemoryError: Java heap space .Like it goes in infinite loop in lock method .
actually i don't know why you received it.
Best Regards.
Mohamed Darim
SCJP, SCJD in progress ... (from 1/8/2007 - till now ....)
|
 |
Alecsandru Cocarla
Ranch Hand
Joined: Feb 29, 2008
Posts: 158
|
|
|
You'll probably have to post some code in order to see why it's going out of memory. Otherwise we can't tell what is wrong with your code. It should not behave like this.
|
SCJP 1.4 100%
SCJD 99.5%
|
 |
 |
|
|
subject: lock method
|
|
|