@Before
public void setUpXADataSourceTest() throws NamingException, ClassNotFoundException,
IllegalAccessException, InvocationTargetException, NoSuchMethodException,
InstantiationException {
final P6TestLoadableOptions testOptions = P6TestOptions.getActiveInstance();
jndiResources = new ArrayList<Resource>();
poolingDSs = new ArrayList<PoolingDataSource>();
tm = TransactionManagerServices.getTransactionManager();
// in test DS setup
{
final XADataSource realInTestDs = (XADataSource) P6Util.forName(
testOptions.getXaDataSource().getClass().getName()).newInstance();
setXADSProperties(realInTestDs, testOptions.getUrl().replace(":p6spy", ""),
testOptions.getUser(), testOptions.getPassword());
jndiResources.add(new Resource("jdbc/realInTestDs", realInTestDs));
final PoolingDataSource inTestDs = new PoolingDataSource();
inTestDs.setClassName(P6DataSource.class.getName());
inTestDs.setUniqueName("jdbc/inTestDs");