October 2017
Intermediate to advanced
396 pages
10h 2m
English
The following are the problems we have to face whenever we work with the traditional JDBC API:
public List<Account> findByAccountNumber(Long accountNumber) {
List<Account> accountList = new ArrayList<Account>();
Connection conn = null;
String sql = "select account_name, account_balance from ACCOUNT where account_number=?"; try { DataSource dataSource = DataSourceUtils.getDataSource(); conn = dataSource.getConnection(); PreparedStatement ps = conn.prepareStatement(sql); ps.setLong(1, accountNumber); ...Read now
Unlock full access