TransactionServiceSpring

Default implementation of TransactionService , which delegates to Spring’s own transaction management framework, such as PlatformTransactionManager .

API

TransactionServiceSpring.java
class TransactionServiceSpring {
  TransactionServiceSpring(List<PlatformTransactionManager> platformTransactionManagers, List<PersistenceExceptionTranslator> persistenceExceptionTranslators, Provider<InteractionLayerTracker> interactionLayerTrackerProvider, ConfigurableListableBeanFactory configurableListableBeanFactory)
  Try<T> callTransactional(TransactionDefinition def, Callable<T> callable)
  void flushTransaction()
  Optional<TransactionId> currentTransactionId()
  TransactionState currentTransactionState()
  void onOpen(CausewayInteraction interaction)     (1)
  void requestRollback(CausewayInteraction interaction)     (2)
  void onClose(CausewayInteraction interaction)     (3)
}
1 onOpen(CausewayInteraction)

For use only by org.apache.causeway.core.runtimeservices.session.InteractionServiceDefault , sets up the initial transaction automatically against all available PlatformTransactionManager s.

2 requestRollback(CausewayInteraction)

For use only by org.apache.causeway.core.runtimeservices.session.InteractionServiceDefault , if org.apache.causeway.applib.services.iactnlayer.InteractionService#run(InteractionContext, ThrowingRunnable) or org.apache.causeway.applib.services.iactnlayer.InteractionService#call(InteractionContext, Callable) (or their various overloads) result in an exception.

3 onClose(CausewayInteraction)

For use only by org.apache.causeway.core.runtimeservices.session.InteractionServiceDefault , to close the transaction initially set up in #onOpen(CausewayInteraction) against all configured PlatformTransactionManager s.

Members

onOpen(CausewayInteraction)

For use only by org.apache.causeway.core.runtimeservices.session.InteractionServiceDefault , sets up the initial transaction automatically against all available PlatformTransactionManager s.

requestRollback(CausewayInteraction)

For use only by org.apache.causeway.core.runtimeservices.session.InteractionServiceDefault , if org.apache.causeway.applib.services.iactnlayer.InteractionService#run(InteractionContext, ThrowingRunnable) or org.apache.causeway.applib.services.iactnlayer.InteractionService#call(InteractionContext, Callable) (or their various overloads) result in an exception.

onClose(CausewayInteraction)

For use only by org.apache.causeway.core.runtimeservices.session.InteractionServiceDefault , to close the transaction initially set up in #onOpen(CausewayInteraction) against all configured PlatformTransactionManager s.