Found out that, this should be implemented using XA datasources.
Each persistence unit should use a XA datasource, and then take part on a two-phase commit.
I now have:
- 2 datasources with driver: oracle.jdbc.xa.client.OracleXADataSource and the credentials to login on both databases
- each persistence unit is called on a ejb facade, and those ejb facades are called on the global transaction.