Skip to content

openConnection stepthrough

laurenceforshaw edited this page Mar 24, 2017 · 3 revisions
  1. Class.forName(JDBC_DRIVER); This loads the JDBC embedded driver class for Derby. Specifically the relevant is in the initialization functions for the class org.apache.derby.jdbc.EmbeddedDriver
  2. conn = DriverManager.getConnection(DATABASE_URL_OPEN); This actually opens up the driver.
  3. Error handling. Errors are caught and logged. Note that errors are logged rather than stopping the program or retrying; this function might return null because of an error. Calling methods should be able to handle this.

Note that no more than one connection should be open at once.

Clone this wiki locally