Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

PersistenceExceptionTranslationPostProcessor Class

Object post-processor that automatically applies persistence exception translation to any bean that carries the RepositoryAttribute attribute, adding a corresponding PersistenceExceptionTranslationAdvisor to the exposed proxy (either an existing AOP proxy or a newly generated proxy that implements all of the target's interfaces).

For a list of all members of this type, see PersistenceExceptionTranslationPostProcessor Members .

System.Object
   ProxyConfig
      PersistenceExceptionTranslationPostProcessor

[Visual Basic]
Public Class PersistenceExceptionTranslationPostProcessor
    Inherits ProxyConfig
    Implements IObjectPostProcessor, IObjectFactoryAware, IOrdered
[C#]
public class PersistenceExceptionTranslationPostProcessor : ProxyConfig, IObjectPostProcessor, IObjectFactoryAware, IOrdered

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Translates native resource exceptions to Spring's DataAccessException hierarchy. Autodetects object that implement the IPersistenceExceptionTranslator interface, which are subsequently asked to translate candidate exceptions.

All of Spring's applicable resource factories implement the

IPersistenceExceptionTranslator
interface out of the box. As a consequence, all that is usually needed to enable automatic exception translation is marking all affected objects (such as DAOs) with the
Repository
annotation, along with defining this post-processor in the application context.

Requirements

Namespace: Spring.Dao.Attributes

Assembly: Spring.Data (in Spring.Data.dll)

See Also

PersistenceExceptionTranslationPostProcessor Members | Spring.Dao.Attributes Namespace | PersistenceExceptionTranslationAdvisor | RepositoryAttribute | DataAccessException | IPersistenceExceptionTranslator