LibraryToggle FramesPrintFeedback

The transacted() DSL command is not required in a route that starts with a transactional endpoint. Nevertheless, assuming that the default transaction policy is PROPAGATION_REQUIRED (see Propagation Policies), it is usually harmless to include the transacted() command, as in this example:

from("jmstx:queue:giro")
    .transacted()
    .to("jmstx:queue:credits")
    .to("jmstx:queue:debits");

However, it is possible for this route to behave in unexpected ways—for example, if a single TransactedPolicy bean having a non-default propagation policy is created in Spring XML (see Default transaction manager and transacted policy)—so it is generally better not to include the transacted() DSL command in routes that start with a transactional endpoint.

Comments powered by Disqus