In one thread, the embedding application starts the local JDBC driver for its own access.
/* loading the client driver boots the client driver only*/ Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance(); Connection conn = DriverManager.getConnection( "jdbc:derby:sample");
In another thread, the same application starts the server framework to allow remote access. Starting the server framework from within the application allows both the server and the application to run in the same JVM.