Knut Anders Hatlen wrote:
d the createObject() method and rewritten
> createJDBC40FactoryImpl() like this:
>
> private static ClientJDBCObjectFactory createJDBC40FactoryImpl() {
> final String factoryName =
> "org.apache.derby.jdbc.ClientJDBCObjectFactoryImpl40";
> try {
> return (ClientJDBCObjectFactory)
> Class.forName(factoryName).newInstance();
> } catch (ClassNotFoundException cnfe) {
> return createJDBC40FactoryImpl();
> } catch (Exception e) {
> RuntimeException rte = new RuntimeException(e.getMessage());
> if (JVMInfo.JDK_ID >= JVMInfo.J2SE_14) {
> rte.initCause(e);
> }
> throw rte;
It's not typical to throw RuntimeExceptions as the above code does. I
assume we think this will never happpen. Would a better approach be
using the non-jdbc40 factory if the 4.0 can't be loaded?
Dan.