Implementation

The framework provides a number of default implementations for JPA and JDO, to recognise:

  • data already exists (uniqueness constraints)

  • object not found

  • related data exists (foreign key constraints preventing change)

  • unable to save data (foreign key constraints not met)

  • other data access problem based on a particular type that they throw, ExceptionRecognizerForType and its subclass in turn, ExceptionRecognizerForRecoverableException

Configuration Properties

The following configuration property is relevant:

Property Value
(default value)
Description

causeway.core.runtime-services.
exception-recognizer.dae.disable

true,false
(false)

whether any DataAccessException exceptions should be recognized.+

If Spring encounters a data access problem (either JPA or JDO) then it will throw a subclass of DataAccessException.

This recogniser catches this exception class and throws a suitable recognition based on the subtype.

By default, this is enabled. Disable it only if you need to fine-tune the built-in behaviour.