Here you can find the source of getConnection(final DataSource ds, final boolean autoCommit)
public static Connection getConnection(final DataSource ds, final boolean autoCommit) throws SQLException
//package com.java2s; //License from project: Open Source License import java.sql.Connection; import java.sql.SQLException; import javax.sql.DataSource; public class Main { public static Connection getConnection(final DataSource ds, final boolean autoCommit) throws SQLException { final Connection conn = ds.getConnection(); if (conn.getAutoCommit() != autoCommit) { conn.setAutoCommit(autoCommit); }//from w ww. java 2s.co m return conn; } }