db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@apache.org>
Subject Re: [jira] Updated: (DERBY-796) jdbc 4.0 specific Blob and Clob method support
Date Thu, 16 Feb 2006 15:42:56 GMT
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.


Mime
View raw message