You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by simon <sk...@apache.org> on 2007/08/18 12:01:59 UTC

[orchestra] EndConversationMethodBindingFacade

Hi,

The errorOutcome attribute allows nice handling of the case where an
action method throws an exception. However it doesn't close the current
conversation.

Wouldn't you normally want the conversation closed when an exception is
thrown from an action method?

Regards,

Simon


Re: [orchestra] EndConversationMethodBindingFacade

Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi!
> The errorOutcome attribute allows nice handling of the case where an
> action method throws an exception. However it doesn't close the current
> conversation.
>   
Yep, this is intentional.
We don't wanted to force the close of an conversation as we don't know
if the exception is one which requires it.

Even if - in the end - the user see a error-page, no one can tell you if
the webapp allows you to "go back" and retry.

In the default Orchestra installation the developer is responsible to
close the conversation when required.


For our own application I've written an ActionListener/Interceptor pair
which automatically closes the conversation when an exception happened
and some SQL has been sent to the database. I plan to open-source this
code in a different project - see myfaces-dev - but releasing Orchestra
has a higher priority.
Though, to make this work, you need access to internals of the JPA
implementation, say, the current code just works with hibernate.

Ciao,
Mario