public static Connection openSpatialDataBase ( String dbName ) throws SQLException , ClassNotFoundException { String dbFilePath = getDataBasePath ( dbName ) ; String databasePath = "jdbc:h2:" + dbFilePath + H2_PARAMETERS ; org . h2 . Driver . load ( ) ; // Keep a connection alive to not close the DataBase on each unit test return DriverManager . getConnection ( databasePath , "sa" , "sa" ) ; }
Open the connection to an existing database