@Ignore("TODO: test used to eat its own exception and it fails")
  @Test
  public void testEffectOfBlockingTimeoutOnXAConnection() throws Exception {
    Map map = new HashMap();
    map.put("init-pool-size", "2");
    map.put("jndi-name", "TestXAPooledDataSource");
    map.put("max-pool-size", "7");
    map.put("idle-timeout-seconds", "20");
    map.put("blocking-timeout-seconds", "2");
    map.put("login-timeout-seconds", "5");
    // map.put("xa-datasource-class","org.apache.derby.jdbc.EmbeddedXADataSource");
    map.put("jdbc-driver-class", "org.apache.derby.jdbc.EmbeddedDriver");
    map.put("user-name", "mitul");
    map.put("password", "83f0069202c571faf1ae6c42b4ad46030e4e31c17409e19a");
    map.put("connection-url", "jdbc:derby:newDB;create=true");
    List props = new ArrayList();
    props.add(new ConfigProperty("databaseName", "newDB", "java.lang.String"));

    GemFireBasicDataSource gbds =
        (GemFireBasicDataSource) new DataSourceFactory().getSimpleDataSource(map);
    map.put("xa-datasource-class", "org.apache.derby.jdbc.EmbeddedXADataSource");

    map.put("connection-url", "jdbc:derby:newDB;create=true");

    GemFireTransactionDataSource gtds =
        (GemFireTransactionDataSource) new DataSourceFactory().getTranxDataSource(map, props);

    XAConnection xaconn = (XAConnection) gtds.provider.borrowConnection();
    try {
      Thread.sleep(4);
    } catch (InterruptedException e) {
      fail("interrupted");
    }
    for (int i = 0; i < 1000; ++i) {
      XAResource xar = xaconn.getXAResource();
      System.out.println("XAResource=" + xar);
      assertNotNull(xar);
    }
  }
Tests if an XAresource obtained from an XAConnection which is already closed , can return null
or not.
geode-core/src/integrationTest/java/org/apache/geode/internal/datasource/AbstractPoolCacheJUnitTest.java