Hi Valdemaras,

That looks like bug to me. I think the way to go is catching alle
exceptions-that-are-not-really-exceptions and commit in that case.

I'll test it and put it in the repo, then. It's not looking like great code,
but the Tapestry way of redirecting per exception is not so beautiful either
;-).

> -----Original Message-----
> From: =?ISO-8859-13?Q?b=EBgantis_debesis?= [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, June 13, 2006 10:51 AM
> To: Tapestry users
> Subject: honeycomb does not commit on redirect
> 
> Hi,
> 
> I changed my listener method that saves information to 
> database to perform * redirect-after-post*. My listener 
> method now returns an instance of  ILink (I  changed it 
> because of refresh-after-submit problem).  And honeycomb 
> stopped commiting  the database changes.
> 
> It is because the TransactionDirectService on honeycomb 
> catches the RedirectException and rolls back the transaction:
> 
>         try {
>             super.triggerComponent(cycle, direct, parameters);
>             svc.commit();
>         } catch ( StaleObjectStateException e ){
>             svc.rollback();
>             cycle.activate("StaleObject");
>         } catch ( RuntimeException e ) {
>             svc.rollback();
>             throw e;
>         }**
> 
> Is it a bug or maybe I missed something? How do i fix this, 
> maybe commit on catch(RedirectException)?
> 
> Thanks,
> Valdemaras Repšys
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to