Use different datasource for schema update


It’s possible to configure a different datasource to be used for schema update?

We are having problems with mysql and XA transactions.

java.sql.SQLException: XAER_RMFAIL: The command cannot be executed when global transaction is in the ACTIVE state

According to

If an XA transaction is in the ACTIVE state, you cannot issue any statements that cause an implicit commit. That would violate the XA contract because you could not roll back the XA transaction

So if we understand this correctly it’s not possible to execute create/alter tables in mysql using a XA transaction.

Thanks in advance.

No, you’d have to create the schema once using a datasource that does allow the creation of the tables (and then swap to the other datasource).