Loading...

slide-dev@jakarta.apache.org

[Prev] Thread [Next]  |  [Prev] Date [Next]

RE: Content Event Listener Jim Endicott Tue Jul 26 11:17:26 2005

I guess I don't see the connection. I do something in the store method
of the Content Listener and later there is something wrong, the
transaction the call to store is a part of is rolled back and the
transaction listener rollback method is called. How do I know what is
being rolled back? I don't see where I have access to the transaction
from the Content Listener or the transaction listener.

Jim

-----Original Message-----
From: Warwick Burrows [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 26, 2005 12:32 PM
To: Slide Developers Mailing List
Subject: RE: Content Event Listener


Transaction events like start, commit and abort generate events too and
you can listen for those events. They are non-vetoable events so if you
have a listener defined you can process those events from an
eventFired() method implementation. I'm not an expert on
events/listeners but I do have a GlobalListener defined and, though I
don't process them, I have it printing out the events that trigger the
eventFired interface of my listener to be called and the tx events are
probably the only events I have seen that trigger it.

Of course if all you are doing is making additional updates to Slide
using the standard helpers then you won't need to roll these back
yourself as they will still be part of the greater slide transaction
that was started by AbstractWebdavMethod.run(). But if you are making
other calls to sync up another data store then you will need to rollback
these changes.

Warwick


> -----Original Message-----
> From: Jim Endicott [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, July 26, 2005 11:07 AM
> To: [EMAIL PROTECTED]
> Subject: Content Event Listener
> 
> 
> I have implemented a ContentEvent Listener, everything is 
> working nicely but I was wondering about notification if a 
> transaction gets rolled back.
> 
> While developing my Listener I noticed that throwing an 
> exception will cause the transaction to be rolled back (a 
> good thing), and I got to wondering if it was possible for 
> something to happen after my Listener is called that could 
> cause a rollback to happen? If it is possible how would I 
> know that it had happened?
> 
> Jim Endicott
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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


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