Re: Where is the deadlock culprit?
Re: Where is the deadlock culprit?
- Subject: Re: Where is the deadlock culprit?
- From: Chuck Hill <email@hidden>
- Date: Wed, 3 Dec 2008 13:02:05 -0800
On Dec 3, 2008, at 12:59 PM, Kieran Kelleher wrote:
BTW, ERXSession.sleep() does not have this .... should it have this
technique too?
Probably, just to be safe. I did not see much in there that might
throw, but better safe than sorry.
Chuck
On Dec 3, 2008, at 3:48 PM, Chuck Hill wrote:
Nooooooo. I am thinking of something else. Sorry, my bad.
sleep() MUST... NOT... THROW...
What Ken said was correct:
public void sleep() {
try {
// your code here
} (Exception e) {
logger.error("Exception thrown in sleep code", e);
} finally {
super.sleep();
}
}
Chuck
On Dec 3, 2008, at 12:38 PM, Chuck Hill wrote:
On Dec 3, 2008, at 12:33 PM, Kieran Kelleher wrote:
OK. thanks. I have implemented that in sleep and my Session
subclasses. .... except I added a catch and log.error aswell so
we will get an email if I get an error in sleep() So we will
see ........ it might be a year before I see this error again .....
if you have no catch statement as shown in your example won't
this throw anyway?
It will throw, but the important part is that super.sleep() will
be called whether it throws or not.
Chuck
Kieran
On Dec 3, 2008, at 3:17 PM, Chuck Hill wrote:
On Dec 3, 2008, at 12:15 PM, Kieran Kelleher wrote:
You mean wrap contents of sleep and terminate with try/catch
and don't throw, just log it?
That is what I started doing long ago. I think this is a better
solution:
public void sleep() {
try {
// your code here
} finally {
super.sleep();
}
}
Chuck
On Dec 3, 2008, at 2:55 PM, Chuck Hill wrote:
I can confidently claim to be completely unsure. ;-) If the
MultiECLockManager still had it locked, it may not be able
to. I don't use ERXEC so I really don't know. Check your
Sessions() sleep() and terminate() methods (and any super
class you have) to ensure that they can't throw an exception.
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve
specific problems.
http://www.global-village.net/products/practical_webobjects
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve
specific problems.
http://www.global-village.net/products/practical_webobjects
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden