JTDSDataSourceFactory implements DataSourceFactory { @Override public JtdsDataSource createXADataSource(Properties props) throws SQLException { try { return setProperties(new JtdsDataSource(), props); } catch (Exception ex) { throw new SQLException(ex); } } JTDSDataSourceFactory(); @Override JtdsDataSource createDataSource(Properties props); @Override JtdsDataSource createConnectionPoolDataSource(Properties props); @Override JtdsDataSource createXADataSource(Properties props); @Override Driver createDriver(Properties props);  }
@Test public void testXADS() throws SQLException { JTDSDataSourceFactory dsf = new JTDSDataSourceFactory(); Properties props = testProps(); JtdsDataSource ds = dsf.createXADataSource(props); validateDS(ds); }