O'Reilly logo

Apache Derby—Off to the Races: Includes Details of IBM® Cloudscape™ by Dan Scott, George Baklarz, Paul C. Zikopoulos

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Exit Routine

The final routine that is called when exiting the YMLD system is the exitYMLD() method, which closes the application.

public void exitYMLD() throws Exception {
  try {
    conn.close();
  }
  catch (Exception se) {
  }
  System.exit(0);
}

The database connection is closed before we exit the system. This ensures that any statements are properly terminated, especially if a transaction was started and no COMMIT statement was issued. Developers should make sure that all of their SQL statements are autocommitted, or that transactions, once complete, are committed explicitly.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required