I have DB1, DB2. I config two DataSource
and two PlatformTransactionManager
for two database (within the same physical machine).
I have this code:
@Transaction("DB1")
public void A() {
B();
}
@Transaction("DB2")
public void B() {
}
When B()
has an SqlException
, data in DB1 did not rollback. How to implement rollback DB1?
Thank very much.