|
To fully implement this approach we need to:
-
enlist the JMS message publication in the transaction (and not via autocommit)
-
move the execution of the backend from afterTransaction to beforeTransaction but after Hibernate ORM's flush so that the list of changes are complete but that the JMS messages are sent in the transaction.
-
offer an option of the JMS backend to use this transactional approach
-
make sure that if the transactional approach is used, all messages are sent in the same thread used by the main application (risk of transaction problems otherwise).
|