Class TransactionalExceptionMapper

java.lang.Object
org.glassfish.jersey.ext.cdi1x.transaction.internal.TransactionalExceptionMapper
All Implemented Interfaces:
ExceptionMapper<jakarta.transaction.TransactionalException>, ExtendedExceptionMapper<jakarta.transaction.TransactionalException>

@ApplicationScoped public class TransactionalExceptionMapper extends Object implements ExtendedExceptionMapper<jakarta.transaction.TransactionalException>
Helper class to handle exceptions thrown by JTA layer. If this mapper was not registered, no WebApplicationException thrown from a transactional CDI bean would get properly mapped to corresponding response.
Author:
Jakub Podlesak
  • Constructor Details

    • TransactionalExceptionMapper

      public TransactionalExceptionMapper()
  • Method Details

    • toResponse

      public Response toResponse(jakarta.transaction.TransactionalException exception)
      Specified by:
      toResponse in interface ExceptionMapper<jakarta.transaction.TransactionalException>
    • isMappable

      public boolean isMappable(jakarta.transaction.TransactionalException exception)
      Specified by:
      isMappable in interface ExtendedExceptionMapper<jakarta.transaction.TransactionalException>