package dao; import java.sql.Connection; import java.sql.SQLException; import org.h2.jdbcx.JdbcConnectionPool; /** * * @author Mark George <mark.george@otago.ac.nz> */ public class JdbcConnection { private static final String url = MarkingProperties.jdbcUri(); private static final String username = "sa"; private static final String password = ""; private static final JdbcConnectionPool pool = JdbcConnectionPool.create(url, username, password); public static Connection getConnection() { try { return pool.getConnection(); } catch (SQLException ex) { throw new RuntimeException(ex); } } }