Top Description Methods
org.hibernate.resource.transaction.backend.jta.internal.synchronization

public Interface ExceptionMapper

extends Serializable
Known Direct Implementers
org.hibernate.internal.ExceptionMapperStandardImpl, org.hibernate.jpa.internal.ExceptionMapperLegacyJpaImpl
Imports
java.io.Serializable, jakarta.transaction.SystemException, org.hibernate.engine.spi.SessionImplementor

A pluggable strategy for defining how the jakarta.transaction.Synchronization registered by Hibernate handles exceptions.
Author
Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public RuntimeException

Returns:

The appropriate exception to throw
mapManagedFlushFailure
(String
The message to use for the returned exception
message
,
RuntimeException
The causal exception
failure
,
SessionImplementor session)

Map an exception encountered during a managed flush to the appropriate runtime-based exception.

public RuntimeException

Returns:

The appropriate exception to throw
mapStatusCheckFailure
(String
The message to use for the returned exception
message
,
SystemException
The causal exception
systemException
,
SessionImplementor sessionImplementor)

Map a JTA jakarta.transaction.SystemException to the appropriate runtime-based exception.

Method Detail

mapManagedFlushFailureback to summary
public RuntimeException mapManagedFlushFailure(String message, RuntimeException failure, SessionImplementor session)

Map an exception encountered during a managed flush to the appropriate runtime-based exception.

Parameters
message:String

The message to use for the returned exception

failure:RuntimeException

The causal exception

Returns:RuntimeException

The appropriate exception to throw

mapStatusCheckFailureback to summary
public RuntimeException mapStatusCheckFailure(String message, SystemException systemException, SessionImplementor sessionImplementor)

Map a JTA jakarta.transaction.SystemException to the appropriate runtime-based exception.

Parameters
message:String

The message to use for the returned exception

systemException:SystemException

The causal exception

Returns:RuntimeException

The appropriate exception to throw