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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to