You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Richard Frazer <Ri...@sas.com> on 2008/01/29 22:30:49 UTC

synchronous item/node listeners

So, I'm implementing my own access manager and am storing my access control
info in a db.  I'd like to be able to clean up the access control info at
the time that a node is deleted within the same XA transaction as the node
being deleted.  My ideal solution would be a synchronous listener that would
be fired at the time of the delete, in which I can abort the delete if the
access control info for some reason couldn't be deleted from the db.  So
far, the only listeners I have found are asynchronous and occur outside the
transaction boundary.  Any help would be appreciated.

Thanks,
Richard


Re: synchronous item/node listeners

Posted by Marcel Reutegger <ma...@gmx.net>.
Richard Frazer wrote:
> So, I'm implementing my own access manager and am storing my access control
> info in a db.  I'd like to be able to clean up the access control info at
> the time that a node is deleted within the same XA transaction as the node
> being deleted.  My ideal solution would be a synchronous listener that would
> be fired at the time of the delete, in which I can abort the delete if the
> access control info for some reason couldn't be deleted from the db.  So
> far, the only listeners I have found are asynchronous and occur outside the
> transaction boundary.  Any help would be appreciated.

if your listener implements 
org.apache.jackrabbit.core.observation.SynchronousObservationListener it will be 
notified synchronously *after* the transaction has been committed. please note 
that the listener cannot veto the change, since it has already been committed.

regards
  marcel