[federate-commits] Federate SVN: r27 - trunk/federate-client-jdbc/src/main/java/com/metamatrix/jdbc.
federate-commits at lists.jboss.org
federate-commits at lists.jboss.org
Mon Nov 24 13:11:15 EST 2008
Author: rareddy
Date: 2008-11-24 13:11:15 -0500 (Mon, 24 Nov 2008)
New Revision: 27
Modified:
trunk/federate-client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDataSource.java
trunk/federate-client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java
Log:
Fixing the driver code to correctly find the VDB based on the classpath deployment profile.
Modified: trunk/federate-client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDataSource.java
===================================================================
--- trunk/federate-client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDataSource.java 2008-11-24 18:10:14 UTC (rev 26)
+++ trunk/federate-client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDataSource.java 2008-11-24 18:11:15 UTC (rev 27)
@@ -102,6 +102,9 @@
if (this.getBootstrapFile() != null && this.getBootstrapFile().trim().length() != 0) {
try {
+ if (this.getBootstrapFile().equals(this.driver.getDefaultConnectionURL())) {
+ props.put("vdb.definition", getDatabaseName() +".vdb"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
props.put(EmbeddedDataSource.DQP_BOOTSTRAP_FILE, URLHelper.buildURL(this.getBootstrapFile().trim()));
} catch (MalformedURLException e) {
// we can safely ignore as this will would have caught in validate..
@@ -116,7 +119,7 @@
// we do not have bootstrap file, make sure we have a default one.
if (getBootstrapFile() == null && getDatabaseName() != null) {
- setBootstrapFile(this.driver.getDefaultConnectionURL(getDatabaseName()));
+ setBootstrapFile(this.driver.getDefaultConnectionURL());
}
String reason = reasonWhyInvalidConfigFile(this.bootstrapFile);
Modified: trunk/federate-client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java
===================================================================
--- trunk/federate-client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java 2008-11-24 18:10:14 UTC (rev 26)
+++ trunk/federate-client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java 2008-11-24 18:11:15 UTC (rev 27)
@@ -189,7 +189,8 @@
// jdbc:metamatrix:<vdbName>@classpath:<vdbName>/mm.properties;...
String connectionURL = jdbcURL.getConnectionURL();
if (connectionURL == null) {
- connectionURL = getDefaultConnectionURL(jdbcURL.getVDBName());
+ connectionURL = getDefaultConnectionURL();
+ info.setProperty("vdb.definition", jdbcURL.getVDBName()+".vdb"); //$NON-NLS-1$ //$NON-NLS-2$
}
// Set the dqp.properties file properties
@@ -230,8 +231,8 @@
* @param jdbcURL
* @return default connection URL
*/
- String getDefaultConnectionURL(String vdbName) {
- return "classpath:"+vdbName+"/mm.properties"; //$NON-NLS-1$ //$NON-NLS-2$
+ String getDefaultConnectionURL() {
+ return "classpath:/mm.properties"; //$NON-NLS-1$
}
/**
More information about the federate-commits
mailing list