Author: rareddy
Date: 2009-04-14 18:07:44 -0400 (Tue, 14 Apr 2009)
New Revision: 774
Modified:
trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java
Log:
TEIID-479: providing a way to use non-delegating class loader if need. This will be used
by the Designer until the dependency issues are resolved in Designer.
Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java 2009-04-14
18:00:23 UTC (rev 773)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java 2009-04-14
22:07:44 UTC (rev 774)
@@ -375,7 +375,13 @@
}
URL[] dqpClassPath = runtimeClasspath.toArray(new
URL[runtimeClasspath.size()]);
- this.classLoader = new URLClassLoader(dqpClassPath,
Thread.currentThread().getContextClassLoader(), new MetaMatrixURLStreamHandlerFactory());
+ boolean useNondelegation =
Boolean.parseBoolean(info.getProperty("dqp.useNonDelegateClassloader",
"false")); //$NON-NLS-1$ //$NON-NLS-2$
+ if (useNondelegation) {
+ this.classLoader = new NonDelegatingClassLoader(dqpClassPath,
Thread.currentThread().getContextClassLoader(), new MetaMatrixURLStreamHandlerFactory());
+ }
+ else {
+ this.classLoader = new URLClassLoader(dqpClassPath,
Thread.currentThread().getContextClassLoader(), new MetaMatrixURLStreamHandlerFactory());
+ }
String logMsg =
BaseDataSource.getResourceMessage("EmbeddedDriver.use_classpath");
//$NON-NLS-1$
DriverManager.println(logMsg);
for (int i = 0; i < dqpClassPath.length; i++) {
Show replies by date