Type: New Feature
Affects Version/s: 2.3.5
Fix Version/s: 2.3.6
Currently you have to use the Atomikos plugin in Grails for dealing with transactions that span multiple datasources.
However there is a more simpler approach available that's called the "best effort one phase commit" pattern.
Best Efforts 1PC pattern
The Best Efforts 1PC pattern is fairly general but can fail in some circumstances that the developer must be aware of. This is a non-XA pattern that involves a synchronized single-phase commit of a number of resources. Because the 2PC is not used, it can never be as safe as an XA transaction, but is often good enough if the participants are aware of the compromises. Many high-volume, high-throughput transaction-processing systems are set up this way to improve performance.
The basic idea is to delay the commit of all resources as late as possible in a transaction so that the only thing that can go wrong is an infrastructure failure (not a business-processing error). Systems that rely on Best Efforts 1PC reason that infrastructure failures are rare enough that they can afford to take the risk in return for higher throughput. If business-processing services are also designed to be idempotent, then little can go wrong in practice.
Grails should use the BE1PC pattern OOTB when multiple datasources are used. More advanced users can continue to use Atomikos plugin for real XA/2PC (two phase commit) support.
spring-data-commons contains a BE1PC implementation: