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: Checking for required classes from within Derby?
Date Tue, 01 Aug 2006 18:35:58 GMT
Army wrote:

> As part of my work for DERBY-688 I've made some slight changes to the
> XML operators that were added in DERBY-334 and I've also added a new
> operator, XMLQUERY.
> While this works, I can't help but wonder if Derby has some sort of
> existing mechanism/utilities to check for the existence of required
> classes in a cleaner (and perhaps more correct?) way.
> Does anyone know if such a utility/mechanism exists, and if so, can I
> get some pointers to code/documentation?  I admit I haven't done much
> searching of the code yet; I figured I'd start with the list and maybe
> save some time...
Derby's loading of modules from modules.properties has a mechanism where
a module is not loaded if its declared list of classes are not loadable.



Only load the org.apache.derby.jdbc.Driver20 module if java.sql.Driver
is loadable.

So maybe you could look at that code to see if it helps.

Otherwise the utility class
org.apache.derby.iapi.services.loader.ClassInspector  has some methods,
you could add a new utility method there.

Tthis code comment is technically incorrect, JDBC 3 has nothing to
do with JAXP, JAXP api is driven by the JDK level not the JDBC level.

                 * Note: The JAXP API and implementation are
                 * provided as part the JVM if it is JDBC 3.0 or
                 * greater.

View raw message