• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

lock method

 
pramod karnani
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic