Re: Reporting Java Client EC save exceptions
Re: Reporting Java Client EC save exceptions
- Subject: Re: Reporting Java Client EC save exceptions
- From: Florijan Stamenkovic <email@hidden>
- Date: Fri, 2 May 2008 15:21:01 -0400
I have a server side EC delegate class which has a method:
editingContextShouldPresentException() which isn't being called
when my exception occurs.
On which context did you put that delegate? On the
EODistributionContext's editing context? That is where it should go,
and I find it very weird that the delegate should not be performing...
Neither of: Application.handleException() or
Application.handleActionRequestError() are being called.
In my Application.dispatchRequest() I wrap super.dispatchRequest()
in a try..catch, but the exception is not getting back to that point.
Here is the stack trace between the dispatchRequest() and the
saveChanges() on my server process. Somewhere I need to get a
handle on the exception that is coming back through saveChanges()
as it doesn't get all the way back to dispatchRequest()
This all makes sense, since a design decision was made that
exceptions are just another form of a return value, and are therefore
treated as such. It would be my assumption that the
EODistributionContext takes care of catching it's editing context's
exception, and translating it into a response. I know of no way you
could get your server to use a custom EODistributionContext subclass.
Considering this, I see no way for catching the exception on the
server, except doing what you though of: with an ec delegate.
So, assuming you did deal with EODistributionContext's ec till now,
I'd say your options are:
1. Do the RMI as I first suggested.
2. Scan the WOResponse of the dispatchRequest() in your WOApp
subclass. This could be painful however...
Hope this helps,
Flor
_______________________________________________
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