This is the difference between regular transactions and XA transactions.
XA transactions can actually cover not only JDBC requests to different targets, but more general mechanisms as well.
As for XA in Spring, it's supported, but I've never been called on to use it. I have a book on my shelf that's dedicated to nothing but
Java transactions, and I'm not even sure it got into Spring.