• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Bad DirectAction freezes instance...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bad DirectAction freezes instance...


  • Subject: Re: Bad DirectAction freezes instance...
  • From: Chuck Hill <email@hidden>
  • Date: Wed, 4 Jan 2006 13:35:20 -0800


On Jan 4, 2006, at 1:08 PM, James Cicenia wrote:

Hmmm... where is performAction?

WODirectAction, you might have to manually override it in DirectAction.


I have the following in Application:

public WOResponse handleActionRequestError(WORequest aRequest, Exception exception, String reason, WORequestHandler aHandler, String actionClassName, String actionName, Class actionClass, WOAction actionInstance) {
if (actionInstance != null) {
if(actionInstance.context().hasSession()) actionInstance.context().session().terminate();
com.hb.pages.Home home = (com.hb.pages.Home) pageWithName ("Home", actionInstance.context());
return home.generateResponse();
} else {
return handleException(exception, null);
}
}


this traps the error and sends them back to the homepage, however, it freezes the instance.


The first thing that I would do is to follow the advice that Gary Teter just posted and get a thread dump after it deadlocks. That should point to where the actual problem is.


Chuck


On Jan 4, 2006, at 2:20 PM, Chuck Hill wrote:


On Jan 4, 2006, at 12:14 PM, James Cicenia wrote:

Anyone have any obvious ideas why a bad directAction would freeze an instance?

I noticed this from a bad link going to a non-existent DirectAction.


It might vary by version :-(, but in at least some versions, if performAction throws and there is a session, the session will not get checked in which deadlocks that session. If the app is not dispatching requests concurrently, that will deadlock the entire app.


The solution to that one is to wrap performAction in a try..catch block and pass the exception off to Application.handleException.


--
Coming in 2006 - an introduction to web applications using WebObjects and Xcode http://www.global-village.net/wointro


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






--
Coming in 2006 - an introduction to web applications using WebObjects and Xcode http://www.global-village.net/wointro


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
  • Follow-Ups:
    • Re: Bad DirectAction freezes instance...
      • From: James Cicenia <email@hidden>
References: 
 >Bad DirectAction freezes instance... (From: James Cicenia <email@hidden>)
 >Re: Bad DirectAction freezes instance... (From: Chuck Hill <email@hidden>)
 >Re: Bad DirectAction freezes instance... (From: James Cicenia <email@hidden>)

  • Prev by Date: Re: Bad DirectAction freezes instance...
  • Next by Date: Re: Frameworks and versioning
  • Previous by thread: Re: Bad DirectAction freezes instance...
  • Next by thread: Re: Bad DirectAction freezes instance...
  • Index(es):
    • Date
    • Thread