You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by JOSE FELIX HERNANDEZ BARRIO <jo...@isthari.com> on 2010/06/09 17:54:26 UTC

synchronous event listener

is there any way to rollback a transaction from a syncrhonous event
listener?
for example, the user insert a node the event listener is called and an
exception raise inside so we want to rollback the transaction.



-- 
Jose Hernandez
675599600
Isthari
http://www.isthari.com

Re: synchronous event listener

Posted by Ian Boston <ie...@tfd.co.uk>.
iirc you can attach the Jackrabbit Session which is an XAResource to a JTA Transaction manager, once that is done changes don't get sent by each save, but only when the transaction manager commits.

If you only have one save and its after the synchronous event, I think you can do a session.refresh() ?

Anyone remember better than I do?
Ian

BTW sync events are part of the JR impl and not above the jcr api... but you knew that :)

On 9 Jun 2010, at 11:54, JOSE FELIX HERNANDEZ BARRIO wrote:

> is there any way to rollback a transaction from a syncrhonous event
> listener?
> for example, the user insert a node the event listener is called and an
> exception raise inside so we want to rollback the transaction.
> 
> 
> 
> -- 
> Jose Hernandez
> 675599600
> Isthari
> http://www.isthari.com