[teiid-commits] teiid SVN: r578 - trunk/client-jdbc/src/main/java/com/metamatrix/jdbc.
teiid-commits at lists.jboss.org
teiid-commits at lists.jboss.org
Wed Mar 18 15:33:17 EDT 2009
Author: rareddy
Date: 2009-03-18 15:33:17 -0400 (Wed, 18 Mar 2009)
New Revision: 578
Modified:
trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDataSource.java
trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java
trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDriver.java
Log:
TEIID-426: Changed the names of the Driver to "Teiid" and also hooked the driver versions to be derived from the ApplicationInfo object
Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDataSource.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDataSource.java 2009-03-18 18:39:01 UTC (rev 577)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDataSource.java 2009-03-18 19:33:17 UTC (rev 578)
@@ -102,7 +102,7 @@
if (this.getBootstrapFile() != null && this.getBootstrapFile().trim().length() != 0) {
try {
- if (this.getBootstrapFile().equals(this.driver.getDefaultConnectionURL())) {
+ if (this.getBootstrapFile().equals(EmbeddedDriver.getDefaultConnectionURL())) {
props.put("vdb.definition", getDatabaseName() +".vdb"); //$NON-NLS-1$ //$NON-NLS-2$
}
props.put(EmbeddedDataSource.DQP_BOOTSTRAP_FILE, URLHelper.buildURL(this.getBootstrapFile().trim()));
@@ -119,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());
+ setBootstrapFile(EmbeddedDriver.getDefaultConnectionURL());
}
String reason = reasonWhyInvalidConfigFile(this.bootstrapFile);
Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java 2009-03-18 18:39:01 UTC (rev 577)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java 2009-03-18 19:33:17 UTC (rev 578)
@@ -45,6 +45,7 @@
import com.metamatrix.common.protocol.MMURLConnection;
import com.metamatrix.common.protocol.MetaMatrixURLStreamHandlerFactory;
import com.metamatrix.common.protocol.URLHelper;
+import com.metamatrix.common.util.ApplicationInfo;
import com.metamatrix.jdbc.util.MMJDBCURL;
/**
@@ -69,9 +70,7 @@
*/
static final String URL_PATTERN = "jdbc:metamatrix:(\\w+)@(([^;]*)[;]?)((.*)*)"; //$NON-NLS-1$
static final String BASE_PATTERN = "jdbc:metamatrix:((\\w+)[;]?)(;([^@])+)*"; //$NON-NLS-1$
- public static final int MAJOR_VERSION = 5;
- public static final int MINOR_VERSION = 5;
- public static final String DRIVER_NAME = "MetaMatrix Query JDBC Driver"; //$NON-NLS-1$
+ public static final String DRIVER_NAME = "Teiid Embedded JDBC Driver"; //$NON-NLS-1$
static final String DQP_IDENTITY = "dqp.identity"; //$NON-NLS-1$
static final String MM_IO_TMPDIR = "mm.io.tmpdir"; //$NON-NLS-1$
@@ -301,7 +300,7 @@
* @return major version number of the driver.
*/
public int getMajorVersion() {
- return MAJOR_VERSION;
+ return ApplicationInfo.getInstance().getMajorReleaseVersion();
}
/**
@@ -309,7 +308,7 @@
* @return major version number of the driver.
*/
public int getMinorVersion() {
- return MINOR_VERSION;
+ return ApplicationInfo.getInstance().getMinorReleaseVersion();
}
/**
Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDriver.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDriver.java 2009-03-18 18:39:01 UTC (rev 577)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDriver.java 2009-03-18 19:33:17 UTC (rev 578)
@@ -39,6 +39,7 @@
import com.metamatrix.common.comm.exception.CommunicationException;
import com.metamatrix.common.comm.exception.ConnectionException;
import com.metamatrix.common.comm.platform.socket.client.SocketServerConnectionFactory;
+import com.metamatrix.common.util.ApplicationInfo;
import com.metamatrix.common.util.PropertiesUtils;
import com.metamatrix.core.MetaMatrixCoreException;
import com.metamatrix.jdbc.api.ConnectionProperties;
@@ -59,9 +60,7 @@
static final String JDBC = BaseDataSource.JDBC;
static final String URL_PREFIX = JDBC + BaseDataSource.METAMATRIX_PROTOCOL;
- static final int MAJOR_VERSION = 5;
- static final int MINOR_VERSION = 5;
- static final String DRIVER_NAME = "MetaMatrix JDBC Driver"; //$NON-NLS-1$
+ static final String DRIVER_NAME = "Teiid JDBC Driver"; //$NON-NLS-1$
/**
* Suports JDBC URLS of format
* - jdbc:metamatrix:BQT at mm://localhost:####;version=1
@@ -128,11 +127,10 @@
} catch (MetaMatrixCoreException e) {
DriverManager.println(e.getMessage());
throw MMSQLException.create(e, e.getMessage());
- //throw new MMSQLException(e.getMessage(), e);
}
// logging
- String logMsg = JDBCPlugin.Util.getString("MMDriver.Connection_sucess"); //$NON-NLS-1$
+ String logMsg = JDBCPlugin.Util.getString("JDBCDriver.Connection_sucess"); //$NON-NLS-1$
logger.info(logMsg);
return myConnection;
@@ -208,7 +206,7 @@
* @return major version number of the driver.
*/
public int getMajorVersion() {
- return MAJOR_VERSION;
+ return ApplicationInfo.getInstance().getMajorReleaseVersion();
}
/**
@@ -216,7 +214,7 @@
* @return major version number of the driver.
*/
public int getMinorVersion() {
- return MINOR_VERSION;
+ return ApplicationInfo.getInstance().getMinorReleaseVersion();
}
/**
More information about the teiid-commits
mailing list