• 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: James Cicenia <email@hidden>
  • Date: Wed, 4 Jan 2006 15:08:31 -0600

Hmmm... where is performAction?

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.




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





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

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