RunBackgroundCommandsJobListener

Listens to the processing of the org.apache.causeway.extensions.commandlog.applib.job.RunBackgroundCommandsJob .

API

RunBackgroundCommandsJobListener.java
interface RunBackgroundCommandsJobListener {
  void executed(List<String> commandInteractionIds)     (1)
}
1 executed(List)

The CommandDto#getInteractionId() interactionId s of the CommandDto s that were executed.

Members

executed(List)

The CommandDto#getInteractionId() interactionId s of the CommandDto s that were executed.

The commands thus identified may or may not have executed successfully; indeed if there was a deadlock then the transaction will have been rolled back and so the command may not even have been executed at all.

Implementation note: the CommandDto s are not passed in, instead only the command’s CommandDto#getInteractionId() interactionId , to avoid issues and complications with the state of the in-memory CommandDto ; is it in sync with the database if a deadlock occurred for example? Passing in just the identifier means that it’s the responsibility of the listener to determine the state, typically by refetching the CommandLogEntry (that CommandLogEntry#getCommandDto() contains the CommandDto ) in a separate transaction.