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, CausewayObservationIntegration observationIntegration)
  Try<T> callTransactional(TransactionDefinition def, Callable<T> callable)
  void flushTransaction()
  Optional<TransactionId> currentTransactionId()
  TransactionState currentTransactionState()
  void onOpen(Interaction interaction)     (1)
  void requestRollback(Interaction interaction)     (2)
  void onClose(Interaction interaction)     (3)
}
1 onOpen(Interaction)

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

2 requestRollback(Interaction)

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

3 onClose(Interaction)

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

Members

onOpen(Interaction)

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

requestRollback(Interaction)

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

onClose(Interaction)

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