Hi,
Having read the page on transactions, I am left with a number of
questions, so perhaps we can discuss these and push the answers back
onto the site.
My understanding is that using the Seda flow, transactions are
propagated between components utilising synchronous calls, making it
possible to roll back a series of steps. Since the message exchanges are
non-persistent, failure of the container will lead to loss of data.
Does the transaction have to be created programmatically, or can
components be configured to generate declarative transactions?
ST and JMS flows don't support transactions.
The JCA flow is using JMS to provide message persistence, so effectively
each message exchange is a JMS queue. This implies a JMS-style
transactional contract, so a message may be placed into an exchange as
part of the transaction of component A, but that transaction must commit
before the exchange can proceed. Component B may then receive the
message however this will not be within a transaction unless one is
somehow created declaratively by the container?
Assuming this were the case, if Component B threw an exception, would
the message be rolled back to the MessageExchange and then subsequently
be re-delivered as part of a new transaction?
If the container fails during a transaction, are messages heuristically
rolled back and re-delivered upon restart?
(I assume messages are only persistent if marked Robust?)
If Component B is stateful (say an orchestration component that passes a
message through several external processes), then that state must be
persisted and recovered in concert with the exchanges. Is there any
example of this behaviour within the ServiceMix source?
Many thanks,
Terry