Code example for Connection

Methods: setTransactionIsolation

0
        return EntityManager.class; 
    } 
 
    protected Connection getDBConnection() throws SQLException {
        Connection c = dataSource.getConnection();
        c.setTransactionIsolation(2);
        return c;
    } 
 
    protected void close(Connection con) {
        if (con != null) {
            try { 
                con.close();
            } catch (Exception e) {
                log.warn("Exception while closing connection", e);
            } 
        } 
    } 
 
    protected DatabaseType determineDbType() { 
        Connection con = null;