{
MockedXADataSource.stop(urls[i]);
}
DataSource ds = (DataSource)new InitialContext().lookup("java:/MockedHaXaDS");
HAConnectionSession facade = (HAConnectionSession)ctx.getEJBObject();
for(int i = 0; i < 3*urls.length; ++i)
{
String url = facade.getHAConnectionURL(ds);
int urlIndex = i % urls.length;
if(!url.equals(urls[urlIndex]))
{
throw new IllegalStateException("Connected to a wrong database: " + url + ", expected " + urls[urlIndex]);