use of com.alibaba.druid.pool.xa.DruidXADataSource in project seata by seata.
the class XAModeTest2 method testXADataSourceNormal.
@Test
@Disabled
public void testXADataSourceNormal() throws Throwable {
DruidXADataSource druidDataSource = new DruidXADataSource();
druidDataSource.setUrl(oracle_jdbcUrl);
druidDataSource.setUsername(oracle_username);
druidDataSource.setPassword(oracle_password);
druidDataSource.setDriverClassName(oracle_driverClassName);
XAConnection xaConnection = druidDataSource.getXAConnection();
XAResource xaResource = xaConnection.getXAResource();
Xid xid = XAXidBuilder.build("127.0.0.1:8091:1234", 1235L);
// Since issue of Druid(https://github.com/alibaba/druid/issues/3707), XA start will fail.
xaResource.start(xid, XAResource.TMNOFLAGS);
}
Aggregations