code: protected Connection getConnection() throws SQLException {
  		logger.finest("Entering: " + CLASSNAME + ".getConnection");
  		Connection connection = null;
  
  		if(!batchConfig.isJ2seMode()) {
  			logger.finest("J2EE mode, getting connection from data source");
  			connection = dataSource.getConnection();
  			logger.finest("autocommit="+connection.getAutoCommit());
  		} else {
  			try {
  				Class.forName(driver);
  			} catch (ClassNotFoundException e) {
  				throw new PersistenceException(e);
  			}
  			logger.finest("JSE mode, getting connection from " + url);
  			connection = DriverManager.getConnection(url, userId, pwd);
  			logger.finest("autocommit="+connection.getAutoCommit());
  		}
  		setSchemaOnConnection(connection);
  
  		logger.finest("Exiting: " + CLASSNAME + ".getConnection() with conn =" + connection);
  		return connection;
  	}
docs: @return the database connection and sets it to the default schema JBATCH or the schema defined in batch-config.
  
  @throws SQLException