views:

277

answers:

0

I'm working on an AJAX application using GWT, Spring and Hibernate. I'm keeping some configuration data on the client side, which is almost never changed, but when it is changed, I have to notify all clients about the changes via a data change event using GWTEventService.

All of this is already working, but I noticed a problem concerning transactions. I use Spring's Transaction demarcation annotations on my service objects. Now, if I change data in these objects, the event is thrown and propagated to the clients, but I won't notice if a rollback occurs which would make the propagated data invalid.

What is the best solution to ensure that only current data is send to the client? Should I use programmatic transaction handling and only fire the event if the transaction succeeded? Unfortunatly, this would be a pretty major change, because currently the events are fired by my low level DAOs.

Any help would be greatly appreciated.