Re: WO instance locks up and won't die - part 2
Re: WO instance locks up and won't die - part 2
- Subject: Re: WO instance locks up and won't die - part 2
- From: Denis Stanton <email@hidden>
- Date: Fri, 21 Nov 2003 08:05:43 +1300
<continued>
>> No, I'm not locking any EC. I use only
>> session().defaultEditingContext, except in the Direct Actions.
>>
> You really ought to lock them in direct actions too, but if you create
> one
> per call to a direct action that is not the cause of the deadlock (if,
> in
> fact, that is what is happening). It is sounding more like a session
> is
> not getting checked back in due to an exception. Have you overridden
> handle... in Application?
I haven't overridden anything in Application as far as I recall.
> If so, make sure that each one can NOT throw an
> exception. WO really does not like that:
>
> public WOResponse handleException(Exception anException,
> WOContext aContext) {
> try {
> // your exception handling code here
> } catch (Throwable t) {
> // We're in deep trouble here, see if super can help
> try {
> return super.handleException(anException, aContext);
> } catch (Throwable t) {
> // OK, this is really not good, suicide time
> Runtime.getRuntime().exit(1);
> }
> }
> }
I'm not sure what the above code will do. Are you recommending I add
this to Application?
My application code reads as below.
public class Application extends WOApplication {
public static void main(String argv[]) {
WOApplication.main(argv, Application.class);
}
public Application() {
super();
System.out.println("Welcome to " + this.name() + "!");
System.out.println(" SMTPHost = " + this.SMTPHost());
/* ** Put your application initialization code here ** */
setAllowsConcurrentRequestHandling(true);
}
public WOResponse handleSessionRestorationErrorInContext(WOContext
context){
Main nextPage = (Main)pageWithName("Main",context);
// nextPage.doOrShowSomethingBecauseSessionTimedOut();
//display message to user, etc...
WOResponse response = nextPage.generateResponse();
if(response == null){
response =
super.handleSessionRestorationErrorInContext(context);
}
return response;
// return nextPage;
}
}
Denis Stanton
Denis Stanton
email@hidden
Home: (09) 533 0391
mobile: 021 1433622
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.