de.cau.cs.kieler.synccharts.listener
Class FailSafeTriggerListener
java.lang.Object
org.eclipse.emf.transaction.ResourceSetListenerImpl
org.eclipse.emf.transaction.TriggerListener
de.cau.cs.kieler.synccharts.listener.FailSafeTriggerListener
- All Implemented Interfaces:
- EventListener, ResourceSetListener, ResourceSetListener.Internal
- Direct Known Subclasses:
- FireOnceTriggerListener
public abstract class FailSafeTriggerListener
- extends TriggerListener
An abstract TriggerListener, that catches all Exceptions and logs them.
Problem with TriggerListeners is that in case of an Exception, the whole
corresponding transaction will be rolled back. Even commands that have not
much to do with the trigger listener will be undone. Subclasses of this class
can throw any exceptions which get only logged (to get some not annoying fail
silent behavior) and still return a null Command, which will be correctly
processed by the transaction service. Hence the original transaction can be
executed correctly and will not be disturbed by this TriggerListener.
- Rating

Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FailSafeTriggerListener
public FailSafeTriggerListener()
FailSafeTriggerListener
public FailSafeTriggerListener(NotificationFilter filter)
transactionAboutToCommit
public Command transactionAboutToCommit(ResourceSetChangeEvent event)
throws RollbackException
- Specified by:
transactionAboutToCommit
in interface ResourceSetListener
- Overrides:
transactionAboutToCommit
in class TriggerListener
- Throws:
RollbackException