code: @Override
      public Connection getConnection(DataSource dataSource) throws SQLException {
          for (ConnInfo p : list)
              if (p.ds == dataSource)
                  return p.conn;
          Connection conn = dataSource.getConnection();
          // System.out.printf("=> %s\n", conn.toString());
          boolean restoreAutoCommit = false;
          if (conn.getAutoCommit()) {
              conn.setAutoCommit(false);
              restoreAutoCommit = true;
          }
          // Store conn, it will set the trans level
          list.add(new ConnInfo(dataSource, conn, getLevel(), restoreAutoCommit));
          return conn;
      }
docs: 从数据源获取连接