@Override
  public Object getConnection(Subject arg0, ConnectionRequestInfo arg1) throws ResourceException {
    if (!initialized || isCacheClosed()) {
      init();
    }
    LogWriter logger = cache.getLogger();
    if (logger.fineEnabled()) {
      logger.fine("JCAManagedConnection:getConnection. Returning new Connection");
    }

    GFConnectionImpl connection = new GFConnectionImpl(this);
    connections.add(connection);
    return connection;
  }
Invalidate and remove the {@link GFConnectionImpl} from the connections collection.
The approach to use removeAll instead of Iterator.remove is purely a performance optimization
to avoid creating all the intermediary collections that will be created when using the single
remove operation.
geode-core/src/jca/java/org/apache/geode/internal/ra/spi/JCAManagedConnection.java