I’m trying to use an imbedded Derby database from within a war file deployed on WebSphere for Z/OS. When I use code like the following to create a database I wind up creating a derby version 10.3 database using the derby.jar included with WebSphere server 7.0 instead of the version 10.5 derby.jar I include in my WEB-INF/lib directory.
Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
Connection conn = DriverManager.getConnection("jdbc:derby:testDB;create=true");
DatabaseMetaData dbmd = conn.getMetaData();
String productName = dbmd.getDatabaseProductName();
String productVersion = dbmd.getDatabaseProductVersion();
How can I force WebSphere to use the org.apache.derby.jdbc.EmbeddedDriver class included in the derby.jar file I package in my war file?