11.2.5. Persistence event handler

This handler intercepts error notifications raised by the service persistence component. Apart from notifying the user or logging errors, there is no way for an application to handle this error. The handler signature:

void onPersistenceFailed(ServicePersistenceFailedEvent e)

Parameter ‘e’ of type ServicePersistenceFailedEvent contains a field exception. It can be an instance of one of the following exception classes that derive from PersistenceSoftnetException:

  • PersistenceIOSoftnetException – SPL-2 (service persistence level 2) encountered an I/O error and the endpoint switched to SPL-1 (service persistence level 1);
  • PersistenceDataFormatSoftnetException – SPL-2 encountered a data format error when reading events stored in storage. This error causes the storage to be cleared. The endpoint continues to use SPL-2;
  • PersistenceStorageFullSoftnetException – an attempt to serialize a new event into persistence storage caused it to overflow. As a result, the oldest serialized events are removed to make room.

TABLE OF CONTENTS