Author: rareddy
Date: 2009-06-16 14:50:47 -0400 (Tue, 16 Jun 2009)
New Revision: 1059
Modified:
trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java
trunk/client/src/main/java/com/metamatrix/dqp/embedded/DQPEmbeddedProperties.java
Log:
TEIID-672: Added the "deploy" directory to the classpath, so that it will pickup
"log4j.properties" or any other configuration.
Modified:
trunk/client/src/main/java/com/metamatrix/dqp/embedded/DQPEmbeddedProperties.java
===================================================================
---
trunk/client/src/main/java/com/metamatrix/dqp/embedded/DQPEmbeddedProperties.java 2009-06-16
18:49:45 UTC (rev 1058)
+++
trunk/client/src/main/java/com/metamatrix/dqp/embedded/DQPEmbeddedProperties.java 2009-06-16
18:50:47 UTC (rev 1059)
@@ -36,6 +36,7 @@
public static final String COMMON_EXTENSION_CLASPATH =
"dqp.extension.CommonClasspath"; //$NON-NLS-1$
public static final String DQP_KEYSTORE = "dqp.keystore"; //$NON-NLS-1$
public static final String DQP_WORKDIR = "dqp.workdir"; //$NON-NLS-1$
+ public static final String DQP_LIBDIR = "dqp.lib"; //$NON-NLS-1$
//derived properties
public static final String DQP_IDENTITY = "dqp.identity"; //$NON-NLS-1$
Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java 2009-06-16
18:49:45 UTC (rev 1058)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java 2009-06-16
18:50:47 UTC (rev 1059)
@@ -347,7 +347,7 @@
// a non-delegating class loader will be created from where all third party
dependent jars can be loaded
ArrayList<URL> runtimeClasspathList = new ArrayList<URL>();
- String libLocation = props.getProperty("dqp.lib",
"./lib/"); //$NON-NLS-1$ //$NON-NLS-2$
+ String libLocation = props.getProperty(DQPEmbeddedProperties.DQP_LIBDIR,
"./lib/"); //$NON-NLS-1$
if (!libLocation.endsWith("/")) { //$NON-NLS-1$
libLocation = libLocation + "/"; //$NON-NLS-1$
}
@@ -358,6 +358,16 @@
runtimeClasspathList.addAll(libClassPath(dqpURL, libLocation,
MMURLConnection.DATE));
}
+ try {
+ String configLocation =
props.getProperty(DQPEmbeddedProperties.VDB_DEFINITION, "./deploy/");
//$NON-NLS-1$
+ if (!configLocation.endsWith("/")) { //$NON-NLS-1$
+ configLocation = configLocation + "/"; //$NON-NLS-1$
+ }
+ runtimeClasspathList.add(URLHelper.buildURL(dqpURL, configLocation));
+ } catch(IOException e) {
+ // ignore..
+ }
+
URL[] dqpClassPath = runtimeClasspathList.toArray(new
URL[runtimeClasspathList.size()]);
this.classLoader = new PostDelegatingClassLoader(dqpClassPath,
this.getClass().getClassLoader(), new MetaMatrixURLStreamHandlerFactory());
Show replies by date