teiid SVN: r519 - trunk/common-core/src/main/java/com/metamatrix/common/util.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2009-02-27 10:59:22 -0500 (Fri, 27 Feb 2009)
New Revision: 519
Modified:
trunk/common-core/src/main/java/com/metamatrix/common/util/TimestampWithTimezone.java
Log:
fixing the build
Modified: trunk/common-core/src/main/java/com/metamatrix/common/util/TimestampWithTimezone.java
===================================================================
--- trunk/common-core/src/main/java/com/metamatrix/common/util/TimestampWithTimezone.java 2009-02-27 15:44:08 UTC (rev 518)
+++ trunk/common-core/src/main/java/com/metamatrix/common/util/TimestampWithTimezone.java 2009-02-27 15:59:22 UTC (rev 519)
@@ -186,4 +186,8 @@
}
}
+ public static void resetCalendar(TimeZone tz) {
+ TimeZone.setDefault(tz);
+ }
+
}
\ No newline at end of file
15 years, 9 months
teiid SVN: r518 - trunk/server/src/main/java/com/metamatrix/server.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2009-02-27 10:44:08 -0500 (Fri, 27 Feb 2009)
New Revision: 518
Modified:
trunk/server/src/main/java/com/metamatrix/server/ServiceManager.java
Log:
TEIID-387
Modified: trunk/server/src/main/java/com/metamatrix/server/ServiceManager.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/server/ServiceManager.java 2009-02-26 23:42:51 UTC (rev 517)
+++ trunk/server/src/main/java/com/metamatrix/server/ServiceManager.java 2009-02-27 15:44:08 UTC (rev 518)
@@ -1204,7 +1204,7 @@
}
public void doShutdownServer() {
- System.out.println("All the servers in Cluster is being shutdown"); //$NON-NLS-1$
+ System.out.println("All the servers in Cluster are being shutdown"); //$NON-NLS-1$
this.hostManager.killAllServersInCluster();
}
15 years, 9 months
teiid SVN: r517 - in trunk: client-jdbc/src/main/java/com/metamatrix/jdbc and 4 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2009-02-26 18:42:51 -0500 (Thu, 26 Feb 2009)
New Revision: 517
Removed:
trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/DriverManagerLogger.java
trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/JDBCLogger.java
Modified:
trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/AbstractMetadataProvider.java
trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/BaseDataSource.java
trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/DeferredMetadataProvider.java
trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/FilteredResultsMetadata.java
trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMCallableStatement.java
trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMConnection.java
trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDataSource.java
trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDatabaseMetaData.java
trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDriver.java
trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMPreparedStatement.java
trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMResultSet.java
trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMStatement.java
trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMXAConnection.java
trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMXAResource.java
trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/ResultsMetadataWithProvider.java
trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/StaticMetadataProvider.java
trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/util/MMJDBCURL.java
trunk/client-jdbc/src/test/java/com/metamatrix/jdbc/TestMMDataSource.java
trunk/client-jdbc/src/test/java/com/metamatrix/jdbc/TestMMDriver.java
trunk/client-jdbc/src/test/java/com/metamatrix/jdbc/TestMMResultSet.java
trunk/client-jdbc/src/test/java/com/metamatrix/jdbc/util/TestMMJDBCURL.java
trunk/client/src/main/java/com/metamatrix/common/api/MMURL.java
trunk/embedded/src/test/java/com/metamatrix/jdbc/TestEmbeddedDriver.java
Log:
TEIID-385: replaced with java logging. RequestAware logging is no longer available.
Modified: trunk/client/src/main/java/com/metamatrix/common/api/MMURL.java
===================================================================
--- trunk/client/src/main/java/com/metamatrix/common/api/MMURL.java 2009-02-26 22:08:21 UTC (rev 516)
+++ trunk/client/src/main/java/com/metamatrix/common/api/MMURL.java 2009-02-26 23:42:51 UTC (rev 517)
@@ -45,20 +45,8 @@
public static final String VDB_VERSION = "VirtualDatabaseVersion"; //$NON-NLS-1$
// constant for vdb version part of serverURL
public static final String VERSION = "version"; //$NON-NLS-1$
- // string constant that the url contains
- public static final String LOG_FILE = "logFile"; //$NON-NLS-1$
- // string constant that the url contains
- public static final String LOG_LEVEL = "logLevel"; //$NON-NLS-1$
-
- // logging level that would log messages
- public static final int LOG_NONE = 0;
- // logging level that would log error messages
- public static final int LOG_ERROR = 1;
- // logging level that would log all info level messages
- public static final int LOG_INFO = 2;
- // logging level that would traces method calls
- public static final int LOG_TRACE = 3;
- public static final String CREDENTIALS = "credentials"; //$NON-NLS-1$
+
+ public static final String CREDENTIALS = "credentials"; //$NON-NLS-1$
}
public static interface CONNECTION {
Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/AbstractMetadataProvider.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/AbstractMetadataProvider.java 2009-02-26 22:08:21 UTC (rev 516)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/AbstractMetadataProvider.java 2009-02-26 23:42:51 UTC (rev 517)
@@ -24,13 +24,9 @@
import java.sql.SQLException;
-import com.metamatrix.core.log.Logger;
-
/**
*/
public abstract class AbstractMetadataProvider implements ResultsMetadataProvider {
- Logger logger;
-
public String getStringValue(int columnIndex, Integer metadataPropertyKey) throws SQLException {
return (String) getValue(columnIndex, metadataPropertyKey);
}
@@ -42,20 +38,4 @@
public boolean getBooleanValue(int columnIndex, Integer metadataPropertyKey) throws SQLException {
return ((Boolean) getValue(columnIndex, metadataPropertyKey)).booleanValue();
}
-
- /**
- * JDBC Logger
- * @param logger
- */
- void setLogger(Logger logger) {
- this.logger = logger;
- }
-
- /**
- * JDBC Logger
- * @return logger
- */
- public Logger getLogger() {
- return this.logger;
- }
}
Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/BaseDataSource.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/BaseDataSource.java 2009-02-26 22:08:21 UTC (rev 516)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/BaseDataSource.java 2009-02-26 23:42:51 UTC (rev 517)
@@ -113,19 +113,6 @@
public static final String USER_NAME = MMURL.CONNECTION.USER_NAME;
// constant for password part of url
public static final String PASSWORD = MMURL.CONNECTION.PASSWORD;
- // string constant that the url contains
- public static final String LOG_FILE = MMURL.JDBC.LOG_FILE;
- // string constant that the url contains
- public static final String LOG_LEVEL = MMURL.JDBC.LOG_LEVEL;
- // logging level that would log messages
- public static final int LOG_NONE = MMURL.JDBC.LOG_NONE;
- // logging level that would log exception stack traces
- public static final int LOG_ERROR = MMURL.JDBC.LOG_ERROR;
- // logging level that would log messages
- public static final int LOG_INFO = MMURL.JDBC.LOG_INFO;
- // logging level that would traces method calls
- public static final int LOG_TRACE = MMURL.JDBC.LOG_TRACE;
-
protected static final int DEFAULT_TIMEOUT = 0;
protected static final int DEFAULT_LOG_LEVEL = 0;
@@ -194,25 +181,6 @@
*/
private String applicationName;
- /**
- * The path and file name to which JDBC Log Statements will be written.
- * This property is <i>optional</i>; if none is specified, then no Log Statements will be written.
- */
- private String logFile;
-
- /**
- * The level of Log Statements. This property is only used if the <code>logFile</code> property
- * is specified, and must be either
- * <ul>
- * <li>"<code>0</code>" - no JDBC log messages will be written to the file</li>
- * <li>"<code>1</code>" - all JDBC log messages will be written to the file</li>
- * <li>"<code>2</code>" - all JDBC log messages as well as stack traces of any exceptions thrown from
- * this driver will be written to the file</li>
- * </ul>
- * This property is <i>optional</i> and defaults to "<code>0</code>".
- */
- private int logLevel;
-
/** Support partial results mode or not.*/
private String partialResultsMode;
@@ -322,7 +290,6 @@
*/
public BaseDataSource() {
this.loginTimeout = DEFAULT_TIMEOUT;
- this.logLevel = DEFAULT_LOG_LEVEL;
}
// --------------------------------------------------------------------------------------------
@@ -359,14 +326,6 @@
props.put(MMURL.CONNECTION.CLIENT_TOKEN_PROP, token);
}
- if ( this.getLogFile() != null && this.getLogFile().trim().length() != 0 ) {
- props.setProperty(BaseDataSource.LOG_FILE,this.getLogFile().trim());
- }
-
- if ( this.getLogLevel() != 0 ) {
- props.setProperty(BaseDataSource.LOG_LEVEL,Integer.toString(this.getLogLevel()));
- }
-
if (this.getPartialResultsMode() != null && this.getPartialResultsMode().trim().length() != 0) {
props.setProperty(ExecutionProperties.PROP_PARTIAL_RESULTS_MODE, this.getPartialResultsMode());
}
@@ -429,16 +388,6 @@
throw new SQLException(reason);
}
- reason = reasonWhyInvalidLogFile(this.logFile);
- if ( reason != null ) {
- throw new SQLException(reason);
- }
-
- reason = reasonWhyInvalidLogLevel(this.logLevel);
- if ( reason != null ) {
- throw new SQLException(reason);
- }
-
final String pwd = password != null ? password : getPassword();
reason = reasonWhyInvalidPassword(pwd);
if ( reason != null ) {
@@ -666,29 +615,6 @@
}
/**
- * Returns the path and file name to which JDBC Log Statements will be written.
- * @return the name of the log file for this data source; may be null
- */
- public String getLogFile() {
- return logFile;
- }
-
- /**
- * Returns the level of logging. This property is only used if the <code>logFile</code> property
- * is specified, and must be either
- * <ul>
- * <li>"<code>0</code>" - no JDBC log messages will be written to the file</li>
- * <li>"<code>1</code>" - all JDBC log messages will be written to the file</li>
- * <li>"<code>2</code>" - all JDBC log messages as well as stack traces of any exceptions thrown from
- * this driver will be written to the file<li>
- * </ul>
- * @return The logging level for this data source
- */
- public int getLogLevel() {
- return logLevel;
- }
-
- /**
* Sets the name of the application. Supplying this property may allow an administrator of a
* MetaMatrix Server to better identify individual connections and usage patterns.
* This property is <i>optional</i>.
@@ -764,29 +690,6 @@
this.description = description;
}
- /**
- * Sets the path and file name to which JDBC Log Statements will be written.
- * @param logFile The log file for this data source
- */
- public void setLogFile(final String logFile) {
- this.logFile = logFile;
- }
-
- /**
- * Sets the level of logging. This property is only used if the <code>logFile</code> property
- * is specified, and must be either
- * <ul>
- * <li>"<code>0</code>" - no JDBC log messages will be written to the file</li>
- * <li>"<code>1</code>" - all JDBC log messages will be written to the file</li>
- * <li>"<code>2</code>" - all JDBC log messages as well as stack traces of any exceptions thrown from
- * this driver will be written to the file<li>
- * </ul>
- * @param logLevel The logging level for this data source
- */
- public void setLogLevel(final int logLevel) {
- this.logLevel = logLevel;
- }
-
public void setPartialResultsMode(String partialResultsMode) {
this.partialResultsMode = partialResultsMode;
}
@@ -1012,31 +915,6 @@
}
/**
- * Return the reason why the supplied log file may be invalid, or null
- * if it is considered valid.
- * @param logFile a possible value for the property
- * @return the reason why the property is invalid, or null if it is considered valid
- * @see #setLogFile(String)
- */
- public static String reasonWhyInvalidLogFile( final String logFile ) {
- return null;
- }
-
- /**
- * Return the reason why the supplied log level may be invalid, or null * if it is considered valid.
- * @param logLevel a possible value for the property
- * @return the reason why the property is invalid, or null if it is considered valid
- * @see #setLogLevel(int)
- */
- public static String reasonWhyInvalidLogLevel( final int logLevel ) {
- if ( logLevel < BaseDataSource.LOG_NONE || logLevel > BaseDataSource.LOG_TRACE ) {
- Object[] params = new Object[] {new Integer(BaseDataSource.LOG_NONE), new Integer(BaseDataSource.LOG_ERROR), new Integer(BaseDataSource.LOG_INFO), new Integer(BaseDataSource.LOG_TRACE)};
- return getResourceMessage("MMDataSource.Log_level_invalid", params); //$NON-NLS-1$
- }
- return null;
- }
-
- /**
* The reason why partialResultsMode is invalid.
* @param partialMode boolean flag
* @return String reason
Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/DeferredMetadataProvider.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/DeferredMetadataProvider.java 2009-02-26 22:08:21 UTC (rev 516)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/DeferredMetadataProvider.java 2009-02-26 23:42:51 UTC (rev 517)
@@ -28,7 +28,6 @@
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.MetaMatrixProcessingException;
-import com.metamatrix.core.log.Logger;
import com.metamatrix.core.util.StringUtil;
import com.metamatrix.dqp.client.MetadataResult;
import com.metamatrix.dqp.metadata.ResultsMetadataConstants;
@@ -46,7 +45,7 @@
DeferredMetadataProvider() {
}
- public static DeferredMetadataProvider createWithInitialData(String[] columnNames, String[] columnTypes, MMStatement statement, long requestID, Logger logger) {
+ public static DeferredMetadataProvider createWithInitialData(String[] columnNames, String[] columnTypes, MMStatement statement, long requestID) {
if(columnNames == null || columnTypes == null || columnNames.length != columnTypes.length) {
Object[] params = new Object[] {
StringUtil.toString(columnNames), StringUtil.toString(columnTypes)
@@ -56,7 +55,6 @@
DeferredMetadataProvider provider = null;
provider = new DeferredMetadataProvider();
- provider.setLogger(logger);
provider.setDeferredLookupAttributes(statement, requestID);
provider.loadPartialMetadata(columnNames, columnTypes);
return provider;
@@ -75,7 +73,7 @@
columnMetadata[i].put(ResultsMetadataConstants.DATA_TYPE, columnTypes[i]);
}
- this.staticProvider = StaticMetadataProvider.createWithData(columnMetadata, -1, getLogger());
+ this.staticProvider = StaticMetadataProvider.createWithData(columnMetadata, -1);
}
private void loadFullMetadata() throws SQLException {
@@ -87,7 +85,7 @@
} catch (MetaMatrixProcessingException e) {
throw MMSQLException.create(e);
}
- this.staticProvider = StaticMetadataProvider.createWithData(results.getColumnMetadata(), results.getParameterCount(), getLogger());
+ this.staticProvider = StaticMetadataProvider.createWithData(results.getColumnMetadata(), results.getParameterCount());
}
public int getColumnCount() throws SQLException {
Deleted: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/DriverManagerLogger.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/DriverManagerLogger.java 2009-02-26 22:08:21 UTC (rev 516)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/DriverManagerLogger.java 2009-02-26 23:42:51 UTC (rev 517)
@@ -1,69 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.jdbc;
-
-import java.io.PrintWriter;
-
-import com.metamatrix.core.log.Logger;
-
-
-/**
- * Default logger for the JDBC, this hooks to driver manager code
- *
- * Note: remember that all the messages logged in the JDBC layer are
- * logged with MessageLevel class's log levels, they need to be mapped
- * to the jdbc levels.
- */
-public class DriverManagerLogger implements Logger {
-
- int allowedSeverity = BaseDataSource.LOG_NONE;
- PrintWriter writer = null;
-
- public DriverManagerLogger(int loglevel, PrintWriter writer) {
- this.allowedSeverity = loglevel;
- this.writer = writer;
- }
-
- private boolean allow(int level) {
- return (JDBCLogger.convertToJDBCLogLevel(level) <= this.allowedSeverity);
- }
-
- /**
- * @see com.metamatrix.core.log.Logger#log(int, java.lang.String)
- */
- public void log(int severity, String message) {
- if (this.writer != null && allow(severity)) {
- this.writer.println(message);
- }
- }
-
- /**
- * @see com.metamatrix.core.log.Logger#log(int, java.lang.Throwable, java.lang.String)
- */
- public void log(int severity, Throwable t, String message) {
- if (this.writer != null && allow(severity)) {
- this.writer.println(message);
- t.printStackTrace(this.writer);
- }
- }
-}
Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/FilteredResultsMetadata.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/FilteredResultsMetadata.java 2009-02-26 22:08:21 UTC (rev 516)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/FilteredResultsMetadata.java 2009-02-26 23:42:51 UTC (rev 517)
@@ -24,7 +24,6 @@
import java.sql.SQLException;
-import com.metamatrix.core.log.Logger;
import com.metamatrix.jdbc.api.ResultSetMetaData;
/**
@@ -33,16 +32,14 @@
private ResultSetMetaData delegate;
private int actualColumnCount;
- Logger logger;
- static FilteredResultsMetadata newInstance (ResultSetMetaData rsmd, int actualColumnCount, Logger logger) {
- return new FilteredResultsMetadata(rsmd, actualColumnCount, logger);
+ static FilteredResultsMetadata newInstance (ResultSetMetaData rsmd, int actualColumnCount) {
+ return new FilteredResultsMetadata(rsmd, actualColumnCount);
}
- FilteredResultsMetadata(ResultSetMetaData rsmd, int actualColumnCount, Logger logger) {
+ FilteredResultsMetadata(ResultSetMetaData rsmd, int actualColumnCount) {
this.delegate = rsmd;
this.actualColumnCount = actualColumnCount;
- this.logger = logger;
}
public int getColumnCount() throws SQLException {
Deleted: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/JDBCLogger.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/JDBCLogger.java 2009-02-26 22:08:21 UTC (rev 516)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/JDBCLogger.java 2009-02-26 23:42:51 UTC (rev 517)
@@ -1,102 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.jdbc;
-
-import com.metamatrix.core.log.LogListener;
-import com.metamatrix.core.log.LogMessage;
-import com.metamatrix.core.log.Logger;
-import com.metamatrix.core.log.MessageLevel;
-
-
-/**
- * This is Logger used for the logging the Client side JDBC Specific log
- * messages.
- */
-class JDBCLogger implements Logger {
- static final String PLUGIN_ID = "JDBC"; //$NON-NLS-1$
-
- LogListener listener = null;
- int allowedSeverity = BaseDataSource.LOG_NONE;
- String connectonId;
-
- /**
- * ctor
- * @param severity
- * @param listener
- */
- public JDBCLogger(int severity, LogListener listener, String connId){
- this.allowedSeverity = severity;
- this.listener = listener;
- this.connectonId = connId;
- }
-
-
- /**
- * The problem is JDBC Logging levels & core MessageLevel levels and
- * IStatus logging levels all are different. Tried to minimize the code to
- * specify MessageLevel, however user configures to the JDBC level on URL, and
- * need to write in IStatus level to make use of Listeners. (what a mess)
- * @param level
- * @return true if allowed
- */
- private boolean allow(int level) {
- return (convertToJDBCLogLevel(level) <= this.allowedSeverity);
- }
-
- /**
- * Convert the message level to jdbc log level
- * @param messageLevel
- * @return jdbc level
- */
- static int convertToJDBCLogLevel(int messageLevel) {
- switch(messageLevel) {
- case MessageLevel.CRITICAL:
- case MessageLevel.ERROR:
- return BaseDataSource.LOG_ERROR;
- case MessageLevel.WARNING:
- case MessageLevel.INFO:
- return BaseDataSource.LOG_INFO;
- case MessageLevel.TRACE:
- return BaseDataSource.LOG_TRACE;
- default:
- return BaseDataSource.LOG_NONE;
- }
- }
-
- /**
- * @see com.metamatrix.core.log.Logger#log(int, java.lang.String)
- */
- public void log(int severity, String message) {
- log(severity, null, message);
- }
-
- /**
- * @see com.metamatrix.core.log.Logger#log(int, java.lang.Throwable, java.lang.String)
- */
- public void log(int severity, Throwable t, String message) {
- if (message != null && allow(severity)) {
- LogMessage msg = new LogMessage(PLUGIN_ID, severity, t, new Object[] {connectonId, message});
- listener.logMessage(msg);
- }
- }
-}
Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMCallableStatement.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMCallableStatement.java 2009-02-26 22:08:21 UTC (rev 516)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMCallableStatement.java 2009-02-26 23:42:51 UTC (rev 517)
@@ -43,7 +43,6 @@
import java.util.Map;
import com.metamatrix.common.util.TimestampWithTimezone;
-import com.metamatrix.core.log.MessageLevel;
import com.metamatrix.dqp.message.ResultsMessage;
/**
@@ -392,10 +391,7 @@
try {
return sendRequestMessageAndWait(commands, false, true, getParameterValues(), false, isBatchedCommand);
} catch ( Throwable ex ) {
- // logging
- String msg = JDBCPlugin.Util.getString("MMStatement.Error_executing_stmt", commands[0]); //$NON-NLS-1$
- getLogger().log(MessageLevel.ERROR, ex, msg);
- throw MMSQLException.create(ex, msg);
+ throw MMSQLException.create(ex, JDBCPlugin.Util.getString("MMStatement.Error_executing_stmt", commands[0])); //$NON-NLS-1$
}
}
Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMConnection.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMConnection.java 2009-02-26 22:08:21 UTC (rev 516)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMConnection.java 2009-02-26 23:42:51 UTC (rev 517)
@@ -22,14 +22,12 @@
package com.metamatrix.jdbc;
-import java.io.File;
import java.sql.Array;
import java.sql.Blob;
import java.sql.CallableStatement;
import java.sql.Clob;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
-import java.sql.DriverManager;
import java.sql.NClob;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
@@ -49,6 +47,8 @@
import java.util.List;
import java.util.Map;
import java.util.Properties;
+import java.util.logging.Level;
+import java.util.logging.Logger;
import javax.transaction.xa.Xid;
@@ -57,9 +57,6 @@
import com.metamatrix.common.comm.exception.CommunicationException;
import com.metamatrix.common.xa.MMXid;
import com.metamatrix.common.xa.XATransactionException;
-import com.metamatrix.core.log.FileLogWriter;
-import com.metamatrix.core.log.Logger;
-import com.metamatrix.core.log.MessageLevel;
import com.metamatrix.dqp.client.ClientSideDQP;
import com.metamatrix.jdbc.api.ExecutionProperties;
import com.metamatrix.platform.util.ProductInfoConstants;
@@ -79,19 +76,17 @@
*/
public abstract class MMConnection extends WrapperImpl implements com.metamatrix.jdbc.api.Connection {
-
+ private static Logger logger = Logger.getLogger("org.teiid.jdbc"); //$NON-NLS-1$
+
// Unique request ID generator
private long requestIDGenerator;
// url used to create the connection
private String url;
+
// properties object containing the connection properties.
protected Properties propInfo;
- private int logLevel = BaseDataSource.LOG_NONE;
- private FileLogWriter logWriter;
- private Logger logger;
-
// status of connection object
private boolean closed = false;
// determines if a statement executed should be immediately committed.
@@ -168,25 +163,9 @@
} else {
info.put(ExecutionProperties.ALLOW_DBL_QUOTED_VARIABLE, Boolean.FALSE.toString());
}
-
- // Get the connection properties from properties object info.
- String logFile = info.getProperty(BaseDataSource.LOG_FILE);
- logLevel = readLoggingLevel(info, logLevel);
-
- if(logFile != null && logLevel > BaseDataSource.LOG_NONE){
- logWriter = new FileLogWriter(new File(logFile));
- logger = new JDBCLogger(logLevel, logWriter, serverConn.getLogonResult().getSessionID().toString());
- }
- else {
- logger = new DriverManagerLogger(logLevel, DriverManager.getLogWriter());
- }
- // logging
- String logMsg = JDBCPlugin.Util.getString("MMConnection.Session_success"); //$NON-NLS-1$
- logger.log(MessageLevel.INFO, logMsg);
- if (logLevel >= BaseDataSource.LOG_ERROR) {
- logConnectionProperties(url, info);
- }
+ logger.info(JDBCPlugin.Util.getString("MMConnection.Session_success")); //$NON-NLS-1$
+ logConnectionProperties(url, info);
// properties object used in obtaining connection
this.propInfo = info;
@@ -218,7 +197,7 @@
modifiedUrl.append(";").append(connUrl.substring(endIndex)); //$NON-NLS-1$
}
}
- logger.log(MessageLevel.INFO, "Connection Url="+modifiedUrl); //$NON-NLS-1$
+ logger.info("Connection Url="+modifiedUrl); //$NON-NLS-1$
}
// Now clone the properties object and remove password and trusted token
@@ -228,40 +207,18 @@
String key = (String)enumeration.nextElement();
Object anObj = info.get(key);
// Log each property except for password and token.
- if (!MMURL.JDBC.CREDENTIALS.equalsIgnoreCase(key) && !MMURL.CONNECTION.PASSWORD.equalsIgnoreCase(key) && !MMURL.CONNECTION.CLIENT_TOKEN_PROP.equalsIgnoreCase(key)) { //$NON-NLS-1$
- logger.log(MessageLevel.INFO, key+"="+anObj); //$NON-NLS-1$
+ if (!MMURL.JDBC.CREDENTIALS.equalsIgnoreCase(key) && !MMURL.CONNECTION.PASSWORD.equalsIgnoreCase(key) && !MMURL.CONNECTION.CLIENT_TOKEN_PROP.equalsIgnoreCase(key)) {
+ logger.info(key+"="+anObj); //$NON-NLS-1$
}
}
}
}
-
- public static int readLoggingLevel(Properties info, int defaultValue) {
- String loggingLevel = info.getProperty(BaseDataSource.LOG_LEVEL);
- if(loggingLevel != null){
- // get the logging level, aready verified this is an integer
- return Integer.parseInt(loggingLevel);
- }
- return defaultValue;
- }
-
- public static boolean isLoggingOn(Properties info) {
- int logLevel = readLoggingLevel(info, BaseDataSource.LOG_NONE);
- return logLevel > BaseDataSource.LOG_NONE;
- }
String getUrl() {
return this.url;
}
-
+
/**
- * retun the jdbc logger
- * @return
- */
- public Logger getLogger() {
- return logger;
- }
-
- /**
* Connection identifier of this connection
* @return identifier
* @throws SQLException
@@ -319,22 +276,11 @@
throw (SQLException)firstException;
}
} catch (SQLException se) {
- String logMsg = JDBCPlugin.Util.getString("MMConnection.Err_connection_close", se.getMessage()); //$NON-NLS-1$
- logger.log(MessageLevel.ERROR, se, logMsg);
- throw MMSQLException.create(se, logMsg);
- //throw new MMSQLException(logMsg, se);
+ throw MMSQLException.create(se, JDBCPlugin.Util.getString("MMConnection.Err_connection_close", se.getMessage())); //$NON-NLS-1$
} finally {
- //logging
- String logMsg = JDBCPlugin.Util.getString("MMConnection.Connection_close_success"); //$NON-NLS-1$
- logger.log(MessageLevel.INFO, logMsg);
+ logger.info(JDBCPlugin.Util.getString("MMConnection.Connection_close_success")); //$NON-NLS-1$
// set the status of the connection to closed
- closed = true;
-
- // close the stream after writing to it
- if(logWriter != null) {
- logWriter.shutdown();
- logWriter = null;
- }
+ closed = true;
}
}
@@ -399,7 +345,7 @@
} catch (XATransactionException e) {
throw MMSQLException.create(e);
}
- logger.log(MessageLevel.INFO, JDBCPlugin.Util.getString("MMConnection.Commit_success")); //$NON-NLS-1$
+ logger.info(JDBCPlugin.Util.getString("MMConnection.Commit_success")); //$NON-NLS-1$
}
private void beginLocalTxn() throws SQLException {
@@ -764,9 +710,7 @@
} catch (XATransactionException e) {
throw MMSQLException.create(e);
}
- // logging
- String logMsg = JDBCPlugin.Util.getString("MMConnection.Rollback_success"); //$NON-NLS-1$
- logger.log(MessageLevel.INFO, logMsg);
+ logger.info(JDBCPlugin.Util.getString("MMConnection.Rollback_success")); //$NON-NLS-1$
} finally {
if (startTxn) {
beginLocalTxn();
@@ -826,10 +770,7 @@
}
// During transaction do not allow to change this flag
if (!autoCommitFlag || this.transactionXid != null) {
- String logMsg = JDBCPlugin.Util.getString("MMStatement.Invalid_During_Transaction", "setReadOnly(" + readOnly + ")");//$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
- MMSQLException e = new MMSQLException(logMsg);
- logger.log(MessageLevel.ERROR, e, logMsg);
- throw e;
+ throw new MMSQLException(JDBCPlugin.Util.getString("MMStatement.Invalid_During_Transaction", "setReadOnly(" + readOnly + ")"));//$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
}
this.readOnly = readOnly;
}
@@ -842,11 +783,7 @@
void checkConnection() throws SQLException{
//Check to see the connection is closed and proceed if it is not
if (closed) {
- //logging
- String msg = JDBCPlugin.Util.getString("MMConnection.Cant_use_closed_connection"); //$NON-NLS-1$
- MMSQLException e = new MMSQLException(msg);
- logger.log(MessageLevel.ERROR, e, msg);
- throw e;
+ throw new MMSQLException(JDBCPlugin.Util.getString("MMConnection.Cant_use_closed_connection")); //$NON-NLS-1$
}
}
@@ -930,7 +867,7 @@
try {
statement = createStatement();
statement.setQueryTimeout(timeout);
- statement.execute("select 1");
+ statement.execute("select 1"); //$NON-NLS-1$
return true;
} catch (SQLException e) {
return false;
@@ -949,12 +886,12 @@
//close all open statements
this.closeStatements();
} catch (SQLException e) {
- this.getLogger().log(MessageLevel.WARNING, e, JDBCPlugin.Util.getString("MMXAConnection.rolling_back_error")); //$NON-NLS-1$
+ logger.log(Level.WARNING, JDBCPlugin.Util.getString("MMXAConnection.rolling_back_error"), e); //$NON-NLS-1$
}
try {
//rollback if still in a transaction
if (!this.getAutoCommit()) {
- this.getLogger().log(MessageLevel.WARNING, JDBCPlugin.Util.getString("MMXAConnection.rolling_back")); //$NON-NLS-1$
+ logger.warning(JDBCPlugin.Util.getString("MMXAConnection.rolling_back")); //$NON-NLS-1$
if (this.getTransactionXid() == null) {
this.rollback(false);
@@ -963,7 +900,7 @@
}
}
} catch (SQLException e) {
- this.getLogger().log(MessageLevel.WARNING, e, JDBCPlugin.Util.getString("MMXAConnection.rolling_back_error")); //$NON-NLS-1$
+ logger.log(Level.WARNING, JDBCPlugin.Util.getString("MMXAConnection.rolling_back_error"), e); //$NON-NLS-1$
}
}
Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDataSource.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDataSource.java 2009-02-26 22:08:21 UTC (rev 516)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDataSource.java 2009-02-26 23:42:51 UTC (rev 517)
@@ -22,16 +22,11 @@
package com.metamatrix.jdbc;
-import java.io.FileWriter;
-import java.io.PrintWriter;
import java.sql.Connection;
import java.util.Properties;
import com.metamatrix.common.api.MMURL;
import com.metamatrix.core.MetaMatrixCoreException;
-import com.metamatrix.core.log.Logger;
-import com.metamatrix.core.log.MessageLevel;
-import com.metamatrix.core.log.NullLogger;
import com.metamatrix.jdbc.util.MMJDBCURL;
/**
@@ -101,8 +96,6 @@
private String discoveryStrategy;
- private transient Logger logger;
-
/**
* Constructor for MMDataSource.
*/
@@ -223,7 +216,6 @@
final MMDriver driver = new MMDriver();
return driver.createMMConnection(buildURL(), props);
} catch (MetaMatrixCoreException e) {
- getLogger().log(MessageLevel.CRITICAL, e, e.getMessage());
throw MMSQLException.create(e, e.getMessage());
}
}
@@ -469,30 +461,6 @@
return JDBCPlugin.Util.getString("MMDataSource.alternateServer_is_invalid", new String[] { "" + reasonCount, reason }); //$NON-NLS-1$ //$NON-NLS-2$
}
-
- /**
- * JDBC Logger; we create a logger once we create a connection, but if we
- * fail to make connection we need a default logger based on the set paramters
- * wish we have one place to do this.
- * @return
- */
- public Logger getLogger() {
- if (this.logger == null) {
- try {
- if (getLogFile() != null) {
- this.logger = new DriverManagerLogger(getLogLevel(), new PrintWriter(new FileWriter(getLogFile())));
- }
- else {
- this.logger = new DriverManagerLogger(getLogLevel(), getLogWriter());
- }
- } catch (Exception e) {
- this.logger = new NullLogger();
- }
- }
- return this.logger;
- }
-
-
/**
* @return Returns the transparentFailover.
*/
Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDatabaseMetaData.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDatabaseMetaData.java 2009-02-26 22:08:21 UTC (rev 516)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDatabaseMetaData.java 2009-02-26 23:42:51 UTC (rev 517)
@@ -37,14 +37,13 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.logging.Logger;
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.query.QueryMetadataException;
import com.metamatrix.common.types.DataTypeManager;
import com.metamatrix.common.types.MMJDBCSQLTypeInfo;
import com.metamatrix.core.MetaMatrixRuntimeException;
-import com.metamatrix.core.log.Logger;
-import com.metamatrix.core.log.MessageLevel;
import com.metamatrix.dqp.message.ResultsMessage;
import com.metamatrix.dqp.metadata.ResultsMetadataConstants;
import com.metamatrix.dqp.metadata.ResultsMetadataDefaults;
@@ -61,7 +60,7 @@
*/
public class MMDatabaseMetaData extends WrapperImpl implements com.metamatrix.jdbc.api.DatabaseMetaData {
-
+ private static Logger logger = Logger.getLogger("org.teiid.jdbc"); //$NON-NLS-1$
/** CONSTANTS */
private static final String PERCENT = "%"; //$NON-NLS-1$
@@ -360,14 +359,6 @@
}
/**
- * JDBC Logger
- * @return logger
- */
- public Logger getLogger() {
- return this.driverConnection.getLogger();
- }
-
- /**
* <p>Checks whether the current user has the required security rights to call
* all the procedures returned by the method getProcedures.</p>
* @return true if the precedures are selectable else return false
@@ -487,7 +478,7 @@
// logging
String logMsg = JDBCPlugin.Util.getString("MMDatabaseMetadata.Best_row_sucess", table); //$NON-NLS-1$
- getLogger().log(MessageLevel.INFO, logMsg);
+ logger.info(logMsg);
// construct results object from column values and their metadata
return createResultSet(records, metadataList);
@@ -515,14 +506,14 @@
// logging
String logMsg = JDBCPlugin.Util.getString("MMDatabaseMetadata.Catalog_success"); //$NON-NLS-1$
- getLogger().log(MessageLevel.INFO, logMsg);
+ logger.info(logMsg);
// construct results object from column values and their metadata
return createResultSet(records, metadataList);
}
private ResultSet createResultSet(List records, Map[] columnMetadata) throws SQLException {
- ResultSetMetaData rsmd = ResultsMetadataWithProvider.newInstance(StaticMetadataProvider.createWithData(columnMetadata, 0, this.getLogger()), getLogger());
+ ResultSetMetaData rsmd = ResultsMetadataWithProvider.newInstance(StaticMetadataProvider.createWithData(columnMetadata, 0));
return createResultSet(records, rsmd);
}
@@ -546,7 +537,7 @@
for (int i = 0; i < columnNames.length; i++) {
metadata[i] = getColumnMetadata(null, columnNames[i], dataTypes[i], ResultsMetadataConstants.NULL_TYPES.UNKNOWN);
}
- return new MMResultSet(resultsMsg, stmt, ResultsMetadataWithProvider.newInstance(StaticMetadataProvider.createWithData(metadata, 0, getLogger()), getLogger()), 0);
+ return new MMResultSet(resultsMsg, stmt, ResultsMetadataWithProvider.newInstance(StaticMetadataProvider.createWithData(metadata, 0)), 0);
}
private ResultsMessage createDummyResultsMessage(String[] columnNames, String[] dataTypes, List records) {
@@ -699,17 +690,12 @@
} catch(Exception e) {
// logging
String logMsg = JDBCPlugin.Util.getString("MMDatabaseMetadata.getCols_error", columnNamePattern, tableNamePattern, e.getMessage()); //$NON-NLS-1$
- getLogger().log(MessageLevel.ERROR, e, logMsg);
throw MMSQLException.create(e, logMsg);
}
- // close the resultset and driver connection
-// results.close();
-// prepareQuery.close();
-
// logging
String logMsg = JDBCPlugin.Util.getString("MMDatabaseMetadata.getCols_success", columnNamePattern, tableNamePattern); //$NON-NLS-1$
- getLogger().log(MessageLevel.INFO, logMsg);
+ logger.info(logMsg);
// construct results object from column values and their metadata
return createResultSet(records, rmetadata);
@@ -820,7 +806,6 @@
} catch(Exception e) {
// logging
String logMsg = JDBCPlugin.Util.getString("MMDatabaseMetadata.getCrossRef_error", primaryTable, foreignTable, e.getMessage()); //$NON-NLS-1$
- getLogger().log(MessageLevel.ERROR, e, logMsg);
throw MMSQLException.create(e, logMsg);
}
@@ -828,7 +813,7 @@
// logging
String logMsg = JDBCPlugin.Util.getString("MMDatabaseMetadata.getCrossRef_success", primaryTable, foreignTable); //$NON-NLS-1$
- getLogger().log(MessageLevel.INFO, logMsg);
+ logger.info(logMsg);
return resultSet;
}
@@ -1007,15 +992,12 @@
} catch(Exception e) {
// logging
String logMsg = JDBCPlugin.Util.getString("MMDatabaseMetadata.getExpKey_error", table, e.getMessage()); //$NON-NLS-1$
- getLogger().log(MessageLevel.ERROR, e, logMsg);
throw MMSQLException.create(e, logMsg);
}
ResultSet resultSet = getReferenceKeys(results);
- // logging
- String logMsg = JDBCPlugin.Util.getString("MMDatabaseMetadata.getExpKey_success", table); //$NON-NLS-1$
- getLogger().log(MessageLevel.INFO, logMsg);
+ logger.info(JDBCPlugin.Util.getString("MMDatabaseMetadata.getExpKey_success", table));//$NON-NLS-1$
return resultSet;
}
@@ -1083,17 +1065,13 @@
// make a query against runtimemetadata and get results
results = (MMResultSet) prepareQuery.executeQuery();
} catch(Exception e) {
- // logging
String logMsg = JDBCPlugin.Util.getString("MMDatabaseMetadata.getImpKey_error", table, e.getMessage()); //$NON-NLS-1$
- getLogger().log(MessageLevel.ERROR, e, logMsg);
throw MMSQLException.create(e, logMsg);
}
ResultSet resultSet = getReferenceKeys(results);
- // logging
- String logMsg = JDBCPlugin.Util.getString("MMDatabaseMetadata.getImpKey_success", table); //$NON-NLS-1$
- getLogger().log(MessageLevel.INFO, logMsg);
+ logger.info(JDBCPlugin.Util.getString("MMDatabaseMetadata.getImpKey_success", table)); //$NON-NLS-1$
return resultSet;
}
@@ -1162,20 +1140,11 @@
rmetadata = results.getMetaData();
} catch (Exception e) {
- // logging
- String logMsg = JDBCPlugin.Util.getString("MMDatabaseMetadata.getIndex_error", table, e.getMessage()); //$NON-NLS-1$
- getLogger().log(MessageLevel.ERROR, e, logMsg);
- throw MMSQLException.create(e, logMsg);
+ throw MMSQLException.create(e, JDBCPlugin.Util.getString("MMDatabaseMetadata.getIndex_error", table, e.getMessage())); //$NON-NLS-1$
}
- // close the results and driver connection
-// results.close();
-// prepareQuery.close();
+ logger.info(JDBCPlugin.Util.getString("MMDatabaseMetadata.getIndex_success", table)); //$NON-NLS-1$
- // logging
- String logMsg = JDBCPlugin.Util.getString("MMDatabaseMetadata.getIndex_success", table); //$NON-NLS-1$
- getLogger().log(MessageLevel.INFO, logMsg);
-
// construct results object from column values and their metadata
return createResultSet(records, rmetadata);
}
@@ -1467,20 +1436,11 @@
rmetadata = results.getMetaData();
} catch (Exception e) {
- // logging
- String logMsg = JDBCPlugin.Util.getString("MMDatabaseMetadata.getPrimaryKey_error", table, e.getMessage()); //$NON-NLS-1$
- getLogger().log(MessageLevel.ERROR, e, logMsg);
- throw MMSQLException.create(e, logMsg);
+ throw MMSQLException.create(e, JDBCPlugin.Util.getString("MMDatabaseMetadata.getPrimaryKey_error", table, e.getMessage())); //$NON-NLS-1$
}
- // close the results and driver connection
- //results.close();
- //prepareQuery.close();
+ logger.info(JDBCPlugin.Util.getString("MMDatabaseMetadata.getPrimaryKey_success")); //$NON-NLS-1$
- // loging
- String logMsg = JDBCPlugin.Util.getString("MMDatabaseMetadata.getPrimaryKey_success"); //$NON-NLS-1$
- getLogger().log(MessageLevel.INFO, logMsg);
-
// construct results object from column values and their metadata
return createResultSet(records, rmetadata);
}
@@ -1570,20 +1530,11 @@
rmetadata = results.getMetaData();
} catch (Exception e) {
- // logging
- String logMsg = JDBCPlugin.Util.getString("MMDatabaseMetadata.getProcCol_error", columnNamePattern, e.getMessage()); //$NON-NLS-1$
- getLogger().log(MessageLevel.ERROR, e, logMsg);
- throw MMSQLException.create(e, logMsg);
+ throw MMSQLException.create(e, JDBCPlugin.Util.getString("MMDatabaseMetadata.getProcCol_error", columnNamePattern, e.getMessage())); //$NON-NLS-1$
}
- // close the results and driver connection
- //results.close();
- //prepareQuery.close();
+ logger.info(JDBCPlugin.Util.getString("MMDatabaseMetadata.getProcCol_success", columnNamePattern, procedureNamePattern)); //$NON-NLS-1$
- // logging
- String logMsg = JDBCPlugin.Util.getString("MMDatabaseMetadata.getProcCol_success", columnNamePattern, procedureNamePattern); //$NON-NLS-1$
- getLogger().log(MessageLevel.INFO, logMsg);
-
// construct results object from column values and their metadata
return createResultSet(records, rmetadata);
}
@@ -1686,20 +1637,11 @@
rmetadata = results.getMetaData();
} catch (Exception e) {
- // logging
- String logMsg = JDBCPlugin.Util.getString("MMDatabaseMetadata.getProc_error", procedureNamePattern, e.getMessage()); //$NON-NLS-1$
- getLogger().log(MessageLevel.ERROR, e, logMsg);
- throw MMSQLException.create(e, logMsg);
+ throw MMSQLException.create(e, JDBCPlugin.Util.getString("MMDatabaseMetadata.getProc_error", procedureNamePattern, e.getMessage())); //$NON-NLS-1$
}
- // close the results
- //results.close();
- //prepareQuery.close();
+ logger.info(JDBCPlugin.Util.getString("MMDatabaseMetadata.getProc_success", procedureNamePattern)); //$NON-NLS-1$
- // logging
- String logMsg = JDBCPlugin.Util.getString("MMDatabaseMetadata.getProc_success", procedureNamePattern); //$NON-NLS-1$
- getLogger().log(MessageLevel.INFO, logMsg);
-
// construct results object from column values and their metadata
return createResultSet(records, rmetadata);
}
@@ -1776,20 +1718,11 @@
rmetadata = results.getMetaData();
} catch(Exception e) {
- // logging
- String logMsg = JDBCPlugin.Util.getString("MMDatabaseMetadata.getschema_error", e.getMessage()); //$NON-NLS-1$
- getLogger().log(MessageLevel.ERROR, e, logMsg);
- throw MMSQLException.create(e, logMsg);
+ throw MMSQLException.create(e, JDBCPlugin.Util.getString("MMDatabaseMetadata.getschema_error", e.getMessage())); //$NON-NLS-1$
}
- // close the results (need to close case results exceed cursor size)
-// results.close();
-// prepareQuery.close();
+ logger.info(JDBCPlugin.Util.getString("MMDatabaseMetadata.getschema_success")); //$NON-NLS-1$
- // logging
- String logMsg = JDBCPlugin.Util.getString("MMDatabaseMetadata.getschema_success"); //$NON-NLS-1$
- getLogger().log(MessageLevel.INFO, logMsg);
-
// construct results object from column values and their metadata
return createResultSet(records, rmetadata);
}
@@ -2070,10 +2003,7 @@
} catch (SQLException e) {
throw e;
} catch (Exception e) {
- // logging
- String logMsg = JDBCPlugin.Util.getString("MMDatabaseMetadata.getTable_error", tableNamePattern, e.getMessage()); //$NON-NLS-1$
- getLogger().log(MessageLevel.ERROR, e, logMsg);
- throw MMSQLException.create(e, logMsg);
+ throw MMSQLException.create(e, JDBCPlugin.Util.getString("MMDatabaseMetadata.getTable_error", tableNamePattern, e.getMessage())); //$NON-NLS-1$
}
// close the results (need to close case results exceed cursor size)
@@ -2083,9 +2013,7 @@
// manually send out a close request is very necessary for PreparedStatement.
//prepareQuery.close();
- // logging
- String logMsg = JDBCPlugin.Util.getString("MMDatabaseMetadata.getTable_success", tableNamePattern); //$NON-NLS-1$
- getLogger().log(MessageLevel.INFO, logMsg);
+ logger.info(JDBCPlugin.Util.getString("MMDatabaseMetadata.getTable_success", tableNamePattern)); //$NON-NLS-1$
// construct results object from column values and their metadata
return createResultSet(records, rmetadata);
@@ -2152,9 +2080,7 @@
metadataList[0] = getColumnMetadata(null, JDBCColumnNames.TABLE_TYPES.TABLE_TYPE,
MMJDBCSQLTypeInfo.STRING, ResultsMetadataConstants.NULL_TYPES.NOT_NULL);
- // logging
- String logMsg = JDBCPlugin.Util.getString("MMDatabaseMetadata.getTableType_success"); //$NON-NLS-1$
- getLogger().log(MessageLevel.INFO, logMsg);
+ logger.info(JDBCPlugin.Util.getString("MMDatabaseMetadata.getTableType_success")); //$NON-NLS-1$
// construct results object from column values and their metadata
return createResultSet(records, metadataList);
@@ -2219,11 +2145,9 @@
metadataList[16] = getColumnMetadata("System.DataTypes", JDBCColumnNames.TYPE_INFO.SQL_DATETIME_SUB, MMJDBCSQLTypeInfo.INTEGER, ResultsMetadataConstants.NULL_TYPES.NULLABLE, ResultsMetadataConstants.SEARCH_TYPES.SEARCHABLE, Boolean.TRUE, Boolean.TRUE, Boolean.FALSE);//$NON-NLS-1$
metadataList[17] = getColumnMetadata("System.DataTypes", JDBCColumnNames.TYPE_INFO.NUM_PREC_RADIX, MMJDBCSQLTypeInfo.INTEGER, ResultsMetadataConstants.NULL_TYPES.NULLABLE, ResultsMetadataConstants.SEARCH_TYPES.SEARCHABLE, Boolean.FALSE, Boolean.FALSE, Boolean.FALSE);//$NON-NLS-1$
- ResultSetMetaData rmetadata = ResultsMetadataWithProvider.newInstance(StaticMetadataProvider.createWithData(metadataList, 0, getLogger()), getLogger());
+ ResultSetMetaData rmetadata = ResultsMetadataWithProvider.newInstance(StaticMetadataProvider.createWithData(metadataList, 0));
- // logging
- String logMsg = JDBCPlugin.Util.getString("MMDatabaseMetadata.getTypes_success"); //$NON-NLS-1$
- getLogger().log(MessageLevel.INFO, logMsg);
+ logger.info(JDBCPlugin.Util.getString("MMDatabaseMetadata.getTypes_success")); //$NON-NLS-1$
// construct results object from column values and their metadata
return createResultSet(records, rmetadata);
@@ -2308,9 +2232,7 @@
// Method not supported, retuning empty ResultSet
ResultSet resultSet = getBestRowIdentifier(catalog, schema, table, 0, true);
- // logging
- String logMsg = JDBCPlugin.Util.getString("MMDatabaseMetadata.getVersionCols_success"); //$NON-NLS-1$
- getLogger().log(MessageLevel.INFO, logMsg);
+ logger.info(JDBCPlugin.Util.getString("MMDatabaseMetadata.getVersionCols_success")); //$NON-NLS-1$
return resultSet;
}
@@ -3289,9 +3211,7 @@
// close the resultset and driver connection
//results.close();
- // logging
- String logMsg = JDBCPlugin.Util.getString("MMDatabaseMetadata.getRefKey_success"); //$NON-NLS-1$
- getLogger().log(MessageLevel.INFO, logMsg);
+ logger.info(JDBCPlugin.Util.getString("MMDatabaseMetadata.getRefKey_success")); //$NON-NLS-1$
// construct results object from column values and their metadata
return createResultSet(records, rmetadata);
@@ -3385,10 +3305,7 @@
return results;
} catch (Exception e) {
- // logging
- String logMsg = JDBCPlugin.Util.getString("MMDatabaseMetadata.getModels_error", modelNamePattern, e.getMessage()); //$NON-NLS-1$
- getLogger().log(MessageLevel.ERROR, e, logMsg);
- throw MMSQLException.create(e, logMsg);
+ throw MMSQLException.create(e, JDBCPlugin.Util.getString("MMDatabaseMetadata.getModels_error", modelNamePattern, e.getMessage())); //$NON-NLS-1$
}
}
Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDriver.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDriver.java 2009-02-26 22:08:21 UTC (rev 516)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDriver.java 2009-02-26 23:42:51 UTC (rev 517)
@@ -22,9 +22,6 @@
package com.metamatrix.jdbc;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.DriverPropertyInfo;
@@ -33,6 +30,7 @@
import java.util.LinkedList;
import java.util.List;
import java.util.Properties;
+import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -43,7 +41,6 @@
import com.metamatrix.common.comm.platform.socket.client.SocketServerConnectionFactory;
import com.metamatrix.common.util.PropertiesUtils;
import com.metamatrix.core.MetaMatrixCoreException;
-import com.metamatrix.core.log.MessageLevel;
import com.metamatrix.jdbc.api.ConnectionProperties;
import com.metamatrix.jdbc.util.MMJDBCURL;
@@ -58,7 +55,8 @@
*/
public final class MMDriver extends BaseDriver {
-
+ private static Logger logger = Logger.getLogger("org.teiid.jdbc"); //$NON-NLS-1$
+
static final String JDBC = BaseDataSource.JDBC;
static final String URL_PREFIX = JDBC + BaseDataSource.METAMATRIX_PROTOCOL;
static final int MAJOR_VERSION = 5;
@@ -135,7 +133,7 @@
// logging
String logMsg = JDBCPlugin.Util.getString("MMDriver.Connection_sucess"); //$NON-NLS-1$
- myConnection.getLogger().log(MessageLevel.INFO, logMsg);
+ logger.info(logMsg);
return myConnection;
}
@@ -185,42 +183,8 @@
info.setProperty(BaseDataSource.VDB_VERSION, jdbcURL.getVDBVersion());
}
- if(optionalParams.containsKey(BaseDataSource.LOG_FILE)) {
- String value = optionalParams.getProperty(BaseDataSource.LOG_FILE);
- if(value != null) {
- try {
- File f = new File(value);
- boolean exists = f.exists();
- FileWriter fw = new FileWriter(f, true);
- fw.close();
- if (!exists) {
- f.delete();
- }
- } catch(IOException ioe) {
- String msg = JDBCPlugin.Util.getString("MMDriver.Invalid_log_name", value); //$NON-NLS-1$
- throw MMSQLException.create(ioe, msg);
- //throw new MMSQLException(msg, ioe);
- }
- }
- }
- if(optionalParams.containsKey(BaseDataSource.LOG_LEVEL)) {
- try {
- int loglevel = Integer.parseInt(optionalParams.getProperty(BaseDataSource.LOG_LEVEL));
- if(loglevel < BaseDataSource.LOG_NONE || loglevel > BaseDataSource.LOG_TRACE) {
- Object[] params = new Object[] {new Integer(BaseDataSource.LOG_NONE), new Integer(BaseDataSource.LOG_ERROR), new Integer(BaseDataSource.LOG_INFO), new Integer(BaseDataSource.LOG_TRACE)};
- String msg = JDBCPlugin.Util.getString("MMDriver.Log_level_invalid", params); //$NON-NLS-1$
- throw new MMSQLException(msg);
- }
- } catch(NumberFormatException nfe) {
- Object[] params = new Object[] {new Integer(BaseDataSource.LOG_NONE), new Integer(BaseDataSource.LOG_ERROR), new Integer(BaseDataSource.LOG_INFO), new Integer(BaseDataSource.LOG_TRACE)};
- String msg = JDBCPlugin.Util.getString("MMDriver.Log_level_invalid", params); //$NON-NLS-1$
- throw MMSQLException.create(nfe, msg);
- //throw new MMSQLException(msg, nfe);
- }
- }
} catch(IllegalArgumentException iae) {
- String msg = JDBCPlugin.Util.getString("MMDriver.urlFormat"); //$NON-NLS-1$
- throw new MMSQLException(msg);
+ throw new MMSQLException(JDBCPlugin.Util.getString("MMDriver.urlFormat")); //$NON-NLS-1$
}
}
Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMPreparedStatement.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMPreparedStatement.java 2009-02-26 22:08:21 UTC (rev 516)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMPreparedStatement.java 2009-02-26 23:42:51 UTC (rev 517)
@@ -48,6 +48,7 @@
import java.util.Map;
import java.util.TimeZone;
import java.util.TreeMap;
+import java.util.logging.Logger;
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.MetaMatrixException;
@@ -57,7 +58,6 @@
import com.metamatrix.common.types.MMJDBCSQLTypeInfo;
import com.metamatrix.common.util.SqlUtil;
import com.metamatrix.common.util.TimestampWithTimezone;
-import com.metamatrix.core.log.MessageLevel;
import com.metamatrix.core.util.ArgCheck;
import com.metamatrix.dqp.client.MetadataResult;
import com.metamatrix.dqp.message.ResultsMessage;
@@ -75,7 +75,8 @@
*/
public class MMPreparedStatement extends MMStatement implements PreparedStatement {
-
+ private static Logger logger = Logger.getLogger("org.teiid.jdbc"); //$NON-NLS-1$
+
// sql, which this prepared statement is operating on
protected String prepareSql;
@@ -241,9 +242,7 @@
throw ex;
}
- // logging for getting result set.
- String logMsg = JDBCPlugin.Util.getString("MMStatement.Success_query", prepareSql); //$NON-NLS-1$
- getLogger().log(MessageLevel.INFO, logMsg);
+ logger.info(JDBCPlugin.Util.getString("MMStatement.Success_query", prepareSql)); //$NON-NLS-1$
}
private void processUpdateMessage(ResultsMessage resultsMsg) throws SQLException {
@@ -280,9 +279,7 @@
//Check to see the statement is closed and throw an exception
checkStatement();
if (getMMConnection().isReadOnly()) {
- String logMsg = JDBCPlugin.Util.getString("MMStatement.Operation_Not_Supported", prepareSql);//$NON-NLS-1$
- getLogger().log(MessageLevel.ERROR, logMsg);
- throw new MMSQLException(logMsg);
+ throw new MMSQLException(JDBCPlugin.Util.getString("MMStatement.Operation_Not_Supported", prepareSql)); //$NON-NLS-1$
}
// See NOTE1
@@ -315,11 +312,9 @@
}else{
rowsAffected = resultSet.getInt(1);
}
- String logMsg = JDBCPlugin.Util.getString("MMStatement.Success_update", prepareSql); //$NON-NLS-1$
- getLogger().log(MessageLevel.INFO, logMsg);
+ logger.info(JDBCPlugin.Util.getString("MMStatement.Success_update", prepareSql)); //$NON-NLS-1$
} catch (SQLException se) {
- String msg = JDBCPlugin.Util.getString("MMStatement.Err_getting_update_row"); //$NON-NLS-1$
- setException(MMSQLException.create(se, msg));
+ setException(MMSQLException.create(se, JDBCPlugin.Util.getString("MMStatement.Err_getting_update_row"))); //$NON-NLS-1$
} finally {
resultSet.close();
resultSet = null;
@@ -329,10 +324,7 @@
ex = getException();
if(ex != null) {
- //logging
- String logMsg = JDBCPlugin.Util.getString("MMStatement.Err_update", prepareSql, ex.getMessage()); //$NON-NLS-1$
- getLogger().log(MessageLevel.ERROR, ex, logMsg);
- throw MMSQLException.create(ex, ex.getMessage());
+ throw MMSQLException.create(ex, JDBCPlugin.Util.getString("MMStatement.Err_update", prepareSql, ex.getMessage())); //$NON-NLS-1$
}
}
@@ -366,8 +358,8 @@
} catch (MetaMatrixProcessingException e) {
throw MMSQLException.create(e);
}
- StaticMetadataProvider provider = StaticMetadataProvider.createWithData(results.getColumnMetadata(), results.getParameterCount(), getLogger());
- metadata = ResultsMetadataWithProvider.newInstance(provider, getLogger());
+ StaticMetadataProvider provider = StaticMetadataProvider.createWithData(results.getColumnMetadata(), results.getParameterCount());
+ metadata = ResultsMetadataWithProvider.newInstance(provider);
}
}
@@ -768,10 +760,7 @@
try {
return sendRequestMessageAndWait(commands, true, false, isPreparedBatchUpdate? getParameterValuesList(): getParameterValues(), false, isPreparedBatchUpdate);
} catch ( Throwable ex ) {
- // logging
- String msg = JDBCPlugin.Util.getString("MMStatement.Error_executing_stmt", commands[0]); //$NON-NLS-1$
- getLogger().log(MessageLevel.ERROR, ex, msg);
- throw MMSQLException.create(ex, msg);
+ throw MMSQLException.create(ex, JDBCPlugin.Util.getString("MMStatement.Error_executing_stmt", commands[0])); //$NON-NLS-1$
}
}
Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMResultSet.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMResultSet.java 2009-02-26 22:08:21 UTC (rev 516)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMResultSet.java 2009-02-26 23:42:51 UTC (rev 517)
@@ -46,6 +46,7 @@
import java.util.Map;
import java.util.TimeZone;
import java.util.concurrent.ExecutionException;
+import java.util.logging.Logger;
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.MetaMatrixProcessingException;
@@ -54,8 +55,6 @@
import com.metamatrix.common.types.Streamable;
import com.metamatrix.common.types.XMLType;
import com.metamatrix.common.util.TimestampWithTimezone;
-import com.metamatrix.core.log.Logger;
-import com.metamatrix.core.log.MessageLevel;
import com.metamatrix.dqp.client.ResultsFuture;
import com.metamatrix.dqp.client.impl.StreamingLobChunckProducer;
import com.metamatrix.dqp.message.ResultsMessage;
@@ -71,7 +70,8 @@
*/
public class MMResultSet extends WrapperImpl implements com.metamatrix.jdbc.api.ResultSet, BatchFetcher {
-
+ private static Logger logger = Logger.getLogger("org.teiid.jdbc"); //$NON-NLS-1$
+
private static final int BEFORE_FIRST_ROW = 0;
// the object which was last read from Results
@@ -126,12 +126,10 @@
this.serverTimeZone = statement.getServerTimeZone();
if (metadata == null) {
- ResultsMetadataProvider provider = DeferredMetadataProvider
- .createWithInitialData(resultsMsg.getColumnNames(),
+ ResultsMetadataProvider provider = DeferredMetadataProvider.createWithInitialData(resultsMsg.getColumnNames(),
resultsMsg.getDataTypes(), statement,
- statement.getCurrentRequestID(), getLogger());
- rmetadata = ResultsMetadataWithProvider.newInstance(provider,
- getLogger());
+ statement.getCurrentRequestID());
+ rmetadata = ResultsMetadataWithProvider.newInstance(provider);
} else {
rmetadata = metadata;
}
@@ -140,7 +138,7 @@
this.resultColumns = columnCount - parameters;
if (this.parameters > 0) {
- rmetadata = FilteredResultsMetadata.newInstance(rmetadata, resultColumns, getLogger());
+ rmetadata = FilteredResultsMetadata.newInstance(rmetadata, resultColumns);
}
}
@@ -337,7 +335,7 @@
}
public Batch requestBatch(int beginRow, int endRow) throws SQLException{
- getLogger().log(MessageLevel.DETAIL, "CursorResultsImpl.requestBatch] thread name: " + Thread.currentThread().getName() + " requestID: " + requestID + " beginRow: " + beginRow + " endinRow: " + endRow ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ logger.fine("CursorResultsImpl.requestBatch] thread name: " + Thread.currentThread().getName() + " requestID: " + requestID + " beginRow: " + beginRow + " endinRow: " + endRow ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
checkClosed();
try {
ResultsFuture<ResultsMessage> results = statement.getDQP().processCursorRequest(requestID, beginRow, endRow);
@@ -1089,15 +1087,6 @@
}
/**
- * JDBC Logger
- *
- * @return logger
- */
- public Logger getLogger() {
- return this.statement.getLogger();
- }
-
- /**
* <p>
* This method returns the meta data of the result set, such as the number,
* types and properties of this resultSets columns.
Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMStatement.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMStatement.java 2009-02-26 22:08:21 UTC (rev 516)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMStatement.java 2009-02-26 23:42:51 UTC (rev 517)
@@ -45,6 +45,8 @@
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
+import java.util.logging.Level;
+import java.util.logging.Logger;
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.MetaMatrixException;
@@ -52,8 +54,6 @@
import com.metamatrix.common.comm.exception.CommunicationException;
import com.metamatrix.common.util.PropertiesUtils;
import com.metamatrix.common.util.SqlUtil;
-import com.metamatrix.core.log.Logger;
-import com.metamatrix.core.log.MessageLevel;
import com.metamatrix.dqp.client.ClientSideDQP;
import com.metamatrix.dqp.message.ParameterInfo;
import com.metamatrix.dqp.message.RequestMessage;
@@ -75,6 +75,7 @@
*/
public class MMStatement extends WrapperImpl implements Statement {
+ private static Logger logger = Logger.getLogger("org.teiid.jdbc"); //$NON-NLS-1$
// State constants
protected static final int TIMED_OUT = 4;
@@ -159,9 +160,6 @@
//Map<out/inout/return param index --> index in results>
protected Map outParamIndexMap = new HashMap();
-
- // JDBC Logger
- Logger logger = null;
/**
* Factory Constructor
@@ -194,18 +192,8 @@
// silently failover to default
}
}
-
- this.logger = new RequestIdAwareLogger(this.driverConnection.getLogger());
}
- /**
- * JDBC Logger
- * @return logger
- */
- public Logger getLogger() {
- return logger;
- }
-
protected ClientSideDQP getDQP() {
return this.driverConnection.getDQP();
}
@@ -326,9 +314,7 @@
// Remove link from connection to statement
this.driverConnection.closeStatement(this);
- //logging
- String logMsg = JDBCPlugin.Util.getString("MMStatement.Close_stmt_success"); //$NON-NLS-1$
- getLogger().log(MessageLevel.INFO, logMsg);
+ logger.info(JDBCPlugin.Util.getString("MMStatement.Close_stmt_success")); //$NON-NLS-1$
driverConnection = null;
}
@@ -340,12 +326,7 @@
protected void checkStatement() throws SQLException {
//Check to see the connection is closed and proceed if it is not
if ( isClosed ) {
- //logging
- String logMsg = JDBCPlugin.Util.getString("MMStatement.Stmt_closed"); //$NON-NLS-1$
- if (driverConnection != null) {
- getLogger().log(MessageLevel.INFO, logMsg);
- }
- throw new MMSQLException(logMsg);
+ throw new MMSQLException(JDBCPlugin.Util.getString("MMStatement.Stmt_closed")); //$NON-NLS-1$
}
}
@@ -359,7 +340,7 @@
return;
}
serverException = MMSQLException.create(exception);
- getLogger().log(MessageLevel.ERROR, exception, serverException.getMessage());
+ logger.log(Level.SEVERE, serverException.getMessage(), exception);
}
protected MMSQLException getException() {
@@ -420,10 +401,9 @@
rowsAffected = resultSet.getInt(1);
}
String logMsg = JDBCPlugin.Util.getString("MMStatement.Success_update", commands[0]); //$NON-NLS-1$
- getLogger().log(MessageLevel.INFO, logMsg);
+ logger.info(logMsg);
} catch (SQLException se) {
- String msg = JDBCPlugin.Util.getString("MMStatement.Err_getting_update_row"); //$NON-NLS-1$
- setException(MMSQLException.create(se, msg));
+ setException(MMSQLException.create(se, JDBCPlugin.Util.getString("MMStatement.Err_getting_update_row"))); //$NON-NLS-1$
}
}
}
@@ -510,9 +490,7 @@
public int executeUpdate(String sql) throws SQLException {
if (driverConnection.isReadOnly()) {
- String logMsg = JDBCPlugin.Util.getString("MMStatement.Operation_Not_Supported", sql);//$NON-NLS-1$
- getLogger().log(MessageLevel.ERROR, logMsg);
- throw new MMSQLException(logMsg);
+ throw new MMSQLException(JDBCPlugin.Util.getString("MMStatement.Operation_Not_Supported", sql)); //$NON-NLS-1$
}
String[] commands = new String[] {sql};
executeSql(commands, false);
@@ -548,9 +526,7 @@
throw this.serverException;
}
- // logging for getting query result
- String logMsg = JDBCPlugin.Util.getString("MMStatement.Success_query", Arrays.asList(commands)); //$NON-NLS-1$
- getLogger().log(MessageLevel.INFO, logMsg);
+ logger.info(JDBCPlugin.Util.getString("MMStatement.Success_query", Arrays.asList(commands))); //$NON-NLS-1$
}
/**
@@ -867,7 +843,7 @@
// logging
String msg = JDBCPlugin.Util.getString("MMStatement.Error_executing_stmt", isBatchedCommand ? "" : commands[0]); //$NON-NLS-1$ //$NON-NLS-2$
if(driverConnection != null) {
- getLogger().log(MessageLevel.ERROR, ex, msg);
+ logger.log(Level.SEVERE, msg, ex);
}
throw MMSQLException.create(ex);
}
@@ -925,8 +901,7 @@
* Ends the command and sets the status to TIMED_OUT.
*/
protected void timeoutOccurred() {
- String logMsg = JDBCPlugin.Util.getString("MMStatement.Timeout_ocurred_in_Statement."); //$NON-NLS-1$
- getLogger().log(MessageLevel.WARNING, logMsg);
+ logger.warning(JDBCPlugin.Util.getString("MMStatement.Timeout_ocurred_in_Statement.")); //$NON-NLS-1$
try {
cancel();
commandStatus = TIMED_OUT;
@@ -936,8 +911,7 @@
this.resultSet.close();
}
} catch (SQLException se) {
- logMsg = JDBCPlugin.Util.getString("MMStatement.Error_timing_out."); //$NON-NLS-1$
- getLogger().log(MessageLevel.ERROR, se, logMsg);
+ logger.log(Level.SEVERE, JDBCPlugin.Util.getString("MMStatement.Error_timing_out."), se); //$NON-NLS-1$
}
}
@@ -1157,10 +1131,7 @@
try {
return SqlUtil.isUpdateSql(sql);
} catch(IllegalArgumentException e) {
- // Bad sql string
- String logMsg = JDBCPlugin.Util.getString("MMStatement.Invalid_query_type", sql); //$NON-NLS-1$
- getLogger().log(MessageLevel.ERROR, logMsg);
- throw new MMSQLException(logMsg);
+ throw new MMSQLException(JDBCPlugin.Util.getString("MMStatement.Invalid_query_type", sql)); //$NON-NLS-1$
}
}
@@ -1191,26 +1162,6 @@
this.defaultCalendar = cal;
}
- /**
- * A simple wrapper to grab the request id from the
- * statement.
- */
- class RequestIdAwareLogger implements Logger {
- Logger delegate = null;
- RequestIdAwareLogger(Logger sourcelogger){
- this.delegate = sourcelogger;
- }
- public void log(int severity, String message) {
- this.delegate.log(severity, convert(message));
- }
- public void log(int severity, Throwable t, String message) {
- this.delegate.log(severity, t, convert(message));
- }
- String convert(String msg){
- return "<Req="+currentRequestID+"> "+msg;//$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
public boolean isPoolable() throws SQLException {
checkStatement();
return false;
Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMXAConnection.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMXAConnection.java 2009-02-26 22:08:21 UTC (rev 516)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMXAConnection.java 2009-02-26 23:42:51 UTC (rev 517)
@@ -37,8 +37,6 @@
import javax.sql.XAConnection;
import javax.transaction.xa.XAResource;
-import com.metamatrix.core.log.Logger;
-
/**
* Implementation of XAConnection.
*/
@@ -116,14 +114,7 @@
return connection;
}
-
- public Logger getLogger() {
- if (connection == null) {
- return null;
- }
- return connection.getLogger();
- }
-
+
public synchronized void addConnectionEventListener(ConnectionEventListener listener){
if(listeners == null){
listeners = new HashSet();
Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMXAResource.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMXAResource.java 2009-02-26 22:08:21 UTC (rev 516)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMXAResource.java 2009-02-26 23:42:51 UTC (rev 517)
@@ -23,6 +23,8 @@
package com.metamatrix.jdbc;
import java.sql.SQLException;
+import java.util.logging.Level;
+import java.util.logging.Logger;
import javax.transaction.xa.XAException;
import javax.transaction.xa.XAResource;
@@ -31,13 +33,13 @@
import com.metamatrix.common.comm.exception.CommunicationException;
import com.metamatrix.common.xa.MMXid;
import com.metamatrix.common.xa.XATransactionException;
-import com.metamatrix.core.log.Logger;
-import com.metamatrix.core.log.MessageLevel;
/**
* Implementation of XAResource.
*/
public class MMXAResource implements XAResource{
+ private static Logger logger = Logger.getLogger("org.teiid.jdbc"); //$NON-NLS-1$
+
private MMXAConnection mmConnection;
private int timeOut;
@@ -48,11 +50,7 @@
public MMXAResource(MMXAConnection mmConnection){
this.mmConnection = mmConnection;
}
-
- public Logger getLogger() {
- return this.mmConnection.getLogger();
- }
-
+
/**
* @see javax.transaction.xa.XAResource#commit(javax.transaction.xa.Xid, boolean)
*/
@@ -66,9 +64,9 @@
}
}
- private XAException handleError(Exception e,
- String logMsg) {
- getLogger().log(MessageLevel.ERROR, e, logMsg);
+ private XAException handleError(Exception e,String logMsg) {
+ logger.log(Level.SEVERE, logMsg, e);
+
if(e instanceof MMSQLException){
Throwable ex = ((MMSQLException)e).getCause();
if(ex instanceof XAException){
Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/ResultsMetadataWithProvider.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/ResultsMetadataWithProvider.java 2009-02-26 22:08:21 UTC (rev 516)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/ResultsMetadataWithProvider.java 2009-02-26 23:42:51 UTC (rev 517)
@@ -25,7 +25,6 @@
import java.sql.SQLException;
import com.metamatrix.common.types.MMJDBCSQLTypeInfo;
-import com.metamatrix.core.log.Logger;
import com.metamatrix.dqp.metadata.ResultsMetadataConstants;
/**
@@ -33,20 +32,18 @@
public class ResultsMetadataWithProvider extends WrapperImpl implements com.metamatrix.jdbc.api.ResultSetMetaData {
private ResultsMetadataProvider provider;
- Logger logger;
/**
* Factory Constructor
* @param statement
* @param valueID
*/
- public static ResultsMetadataWithProvider newInstance(ResultsMetadataProvider provider, Logger logger) {
- return new ResultsMetadataWithProvider(provider, logger);
+ public static ResultsMetadataWithProvider newInstance(ResultsMetadataProvider provider) {
+ return new ResultsMetadataWithProvider(provider);
}
- public ResultsMetadataWithProvider(ResultsMetadataProvider provider, Logger logger) {
+ public ResultsMetadataWithProvider(ResultsMetadataProvider provider) {
setMetadataProvider(provider);
- this.logger = logger;
}
void setMetadataProvider(ResultsMetadataProvider provider) {
Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/StaticMetadataProvider.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/StaticMetadataProvider.java 2009-02-26 22:08:21 UTC (rev 516)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/StaticMetadataProvider.java 2009-02-26 23:42:51 UTC (rev 517)
@@ -25,7 +25,6 @@
import java.sql.SQLException;
import java.util.Map;
-import com.metamatrix.core.log.Logger;
/**
*/
@@ -38,11 +37,10 @@
StaticMetadataProvider() {
}
- public static StaticMetadataProvider createWithData(Map[] columnMetadata, int paramCount, Logger logger) {
+ public static StaticMetadataProvider createWithData(Map[] columnMetadata, int paramCount) {
StaticMetadataProvider provider = null;
provider = new StaticMetadataProvider();
- provider.setLogger(logger);
provider.setData(columnMetadata);
provider.setParameterCount(paramCount);
return provider;
Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/util/MMJDBCURL.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/util/MMJDBCURL.java 2009-02-26 22:08:21 UTC (rev 516)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/util/MMJDBCURL.java 2009-02-26 23:42:51 UTC (rev 517)
@@ -49,8 +49,6 @@
BaseDataSource.VDB_VERSION,
BaseDataSource.USER_NAME,
BaseDataSource.PASSWORD,
- BaseDataSource.LOG_FILE,
- BaseDataSource.LOG_LEVEL,
ExecutionProperties.PROP_TXN_AUTO_WRAP,
ExecutionProperties.PROP_PARTIAL_RESULTS_MODE,
ExecutionProperties.RESULT_SET_CACHE_MODE,
@@ -228,15 +226,7 @@
}
return properties.getProperty(BaseDataSource.VERSION);
}
-
- public String getLogFile() {
- return properties.getProperty(BaseDataSource.LOG_FILE);
- }
-
- public String getLogLevel() {
- return properties.getProperty(BaseDataSource.LOG_LEVEL);
- }
-
+
public String getTransactionAutowrapMode() {
return properties.getProperty(ExecutionProperties.PROP_TXN_AUTO_WRAP);
}
Modified: trunk/client-jdbc/src/test/java/com/metamatrix/jdbc/TestMMDataSource.java
===================================================================
--- trunk/client-jdbc/src/test/java/com/metamatrix/jdbc/TestMMDataSource.java 2009-02-26 22:08:21 UTC (rev 516)
+++ trunk/client-jdbc/src/test/java/com/metamatrix/jdbc/TestMMDataSource.java 2009-02-26 23:42:51 UTC (rev 517)
@@ -69,8 +69,6 @@
dataSource.setDatabaseVersion(STD_DATABASE_VERSION);
dataSource.setDatabaseName(STD_DATABASE_NAME);
dataSource.setPortNumber(STD_PORT_NUMBER);
- dataSource.setLogFile(STD_LOG_FILE);
- dataSource.setLogLevel(STD_LOG_LEVEL);
dataSource.setDataSourceName(STD_DATA_SOURCE_NAME);
dataSource.setTransactionAutoWrap(STD_TXN_AUTO_WRAP);
dataSource.setPartialResultsMode(STD_PARTIAL_MODE);
@@ -91,8 +89,6 @@
return MMDataSource.reasonWhyInvalidDataSourceName(value);
} else if ( propertyName.equals("Description") ) { //$NON-NLS-1$
return MMDataSource.reasonWhyInvalidDescription(value);
- } else if ( propertyName.equals("LogFile") ) { //$NON-NLS-1$
- return MMDataSource.reasonWhyInvalidLogFile(value);
} else if ( propertyName.equals("ServerName") ) { //$NON-NLS-1$
return MMDataSource.reasonWhyInvalidServerName(value);
} else if ( propertyName.equals("TransactionAutoWrap") ) { //$NON-NLS-1$
@@ -112,9 +108,7 @@
}
protected String getReasonWhyInvalid( final String propertyName, final int value ) {
- if ( propertyName.equals("LogLevel") ) { //$NON-NLS-1$
- return MMDataSource.reasonWhyInvalidLogLevel(value);
- } else if ( propertyName.equals("PortNumber") ) { //$NON-NLS-1$
+ if ( propertyName.equals("PortNumber") ) { //$NON-NLS-1$
return MMDataSource.reasonWhyInvalidPortNumber(value);
}
fail("Unknown property name \"" + propertyName + "\""); //$NON-NLS-1$ //$NON-NLS-2$
@@ -144,7 +138,6 @@
public void helpTestBuildingURL( final String vdbName, final String vdbVersion,
final String serverName, final int portNumber,
final String alternateServers,
- final String logfile, final int loglevel,
final String txnAutoWrap, final String partialMode,
final int fetchSize, final boolean showPlan,
final boolean secure, final String expectedURL) {
@@ -154,8 +147,6 @@
ds.setDatabaseVersion(vdbVersion);
ds.setDatabaseName(vdbName);
ds.setPortNumber(portNumber);
- ds.setLogFile(logfile);
- ds.setLogLevel(loglevel);
ds.setFetchSize(fetchSize);
ds.setTransactionAutoWrap(txnAutoWrap);
ds.setPartialResultsMode(partialMode);
@@ -172,7 +163,6 @@
public Connection helpTestConnection( final String vdbName, final String vdbVersion,
final String serverName, final int portNumber, final String alternateServers,
final String user, final String password,
- final String logfile, final int loglevel,
final String dataSourceName,
final String txnAutoWrap, final String partialMode,
final String configFile )
@@ -186,8 +176,6 @@
ds.setPortNumber(portNumber);
ds.setUser(user);
ds.setPassword(password);
- ds.setLogFile(logfile);
- ds.setLogLevel(loglevel);
ds.setDataSourceName(dataSourceName);
ds.setTransactionAutoWrap(txnAutoWrap);
ds.setPartialResultsMode(partialMode);
@@ -252,16 +240,6 @@
assertEquals(result,STD_PORT_NUMBER);
}
- public void testGetLogFile() {
- final String result = dataSource.getLogFile();
- assertEquals(result,STD_LOG_FILE);
- }
-
- public void testGetLogLevel() {
- final int result = dataSource.getLogLevel();
- assertEquals(result,STD_LOG_LEVEL);
- }
-
public void testGetDataSourceName() {
final String result = dataSource.getDataSourceName();
assertEquals(result,STD_DATA_SOURCE_NAME);
@@ -375,43 +353,6 @@
helpTestReasonWhyInvalid("Description", null, VALID); //$NON-NLS-1$
}
-
- public void testReasonWhyInvalidLogFile1() {
- helpTestReasonWhyInvalid("LogFile", "Valid Log File", VALID); //$NON-NLS-1$ //$NON-NLS-2$
- }
- public void testReasonWhyInvalidLogFile2() {
- helpTestReasonWhyInvalid("LogFile", "", VALID); //$NON-NLS-1$ //$NON-NLS-2$
- }
- public void testReasonWhyInvalidLogFile3() {
- helpTestReasonWhyInvalid("LogFile", null, VALID); //$NON-NLS-1$
- }
-
-
- public void testReasonWhyInvalidLogLevel1() {
- helpTestReasonWhyInvalid("LogLevel", 0, VALID); //$NON-NLS-1$
- }
- public void testReasonWhyInvalidLogLevel2() {
- helpTestReasonWhyInvalid("LogLevel", 1, VALID); //$NON-NLS-1$
- }
- public void testReasonWhyInvalidLogLevel3() {
- helpTestReasonWhyInvalid("LogLevel", 2, VALID); //$NON-NLS-1$
- }
- public void testReasonWhyInvalidLogLevel4() {
- helpTestReasonWhyInvalid("LogLevel", 3, VALID); //$NON-NLS-1$
- }
- public void testReasonWhyInvalidLogLevel5() {
- helpTestReasonWhyInvalid("LogLevel", 4, INVALID); //$NON-NLS-1$
- }
- public void testReasonWhyInvalidLogLevel6() {
- helpTestReasonWhyInvalid("LogLevel", -1, INVALID); //$NON-NLS-1$
- }
- public void testReasonWhyInvalidLogLevel7() {
- helpTestReasonWhyInvalid("LogLevel", 300, INVALID); //$NON-NLS-1$
- }
- public void testReasonWhyInvalidLogLevel8() {
- helpTestReasonWhyInvalid("LogLevel", -300, INVALID); //$NON-NLS-1$
- }
-
public void testReasonWhyInvalidPortNumber1() {
helpTestReasonWhyInvalid("PortNumber", 1, VALID); //$NON-NLS-1$
}
@@ -559,13 +500,11 @@
final String vdbName = "vdbName"; //$NON-NLS-1$
final String vdbVersion = "1.2.3"; //$NON-NLS-1$
final int portNumber = 7001;
- final String logfile = null;
- final int loglevel = 1;
final String transactionAutoWrap = null;
final String partialMode = "true"; //$NON-NLS-1$
final boolean secure = false;
- helpTestBuildingURL(vdbName,vdbVersion,serverName,portNumber,null,logfile,loglevel,transactionAutoWrap, partialMode, 500, false, secure,
- "jdbc:metamatrix:vdbName@mm://hostname:7001;fetchSize=500;logLevel=1;serverURL=mm://hostname:7001;VirtualDatabaseVersion=1.2.3;partialResultsMode=true;VirtualDatabaseName=vdbName"); //$NON-NLS-1$
+ helpTestBuildingURL(vdbName,vdbVersion,serverName,portNumber,null,transactionAutoWrap, partialMode, 500, false, secure,
+ "jdbc:metamatrix:vdbName@mm://hostname:7001;fetchSize=500;serverURL=mm://hostname:7001;VirtualDatabaseVersion=1.2.3;partialResultsMode=true;VirtualDatabaseName=vdbName"); //$NON-NLS-1$
}
public void testBuildingURL2() {
@@ -573,13 +512,11 @@
final String vdbName = "vdbName"; //$NON-NLS-1$
final String vdbVersion = ""; //$NON-NLS-1$
final int portNumber = 7001;
- final String logfile = "myLogFile"; //$NON-NLS-1$
- final int loglevel = 1;
final String transactionAutoWrap = MMDataSource.TXN_AUTO_WRAP_PESSIMISTIC;
final String partialMode = "false"; //$NON-NLS-1$
final boolean secure = false;
- helpTestBuildingURL(vdbName,vdbVersion,serverName,portNumber,null,logfile,loglevel,transactionAutoWrap, partialMode, -1, false, secure,
- "jdbc:metamatrix:vdbName@mm://hostname:7001;logLevel=1;serverURL=mm://hostname:7001;logFile=myLogFile;txnAutoWrap=PESSIMISTIC;partialResultsMode=false;VirtualDatabaseName=vdbName"); //$NON-NLS-1$
+ helpTestBuildingURL(vdbName,vdbVersion,serverName,portNumber,null,transactionAutoWrap, partialMode, -1, false, secure,
+ "jdbc:metamatrix:vdbName@mm://hostname:7001;serverURL=mm://hostname:7001;txnAutoWrap=PESSIMISTIC;partialResultsMode=false;VirtualDatabaseName=vdbName"); //$NON-NLS-1$
}
public void testBuildURL3() {
@@ -587,13 +524,11 @@
final String vdbName = "vdbName"; //$NON-NLS-1$
final String vdbVersion = ""; //$NON-NLS-1$
final int portNumber = 7001;
- final String logfile = "myLogFile"; //$NON-NLS-1$
- final int loglevel = 1;
final String transactionAutoWrap = MMDataSource.TXN_AUTO_WRAP_PESSIMISTIC;
final String partialMode = "false"; //$NON-NLS-1$
final boolean secure = false;
- helpTestBuildingURL(vdbName,vdbVersion,serverName,portNumber,null,logfile,loglevel,transactionAutoWrap, partialMode, -1, true, secure,
- "jdbc:metamatrix:vdbName@mm://hostname:7001;logLevel=1;serverURL=mm://hostname:7001;logFile=myLogFile;txnAutoWrap=PESSIMISTIC;partialResultsMode=false;VirtualDatabaseName=vdbName;sqlOptions=SHOWPLAN"); //$NON-NLS-1$
+ helpTestBuildingURL(vdbName,vdbVersion,serverName,portNumber,null,transactionAutoWrap, partialMode, -1, true, secure,
+ "jdbc:metamatrix:vdbName@mm://hostname:7001;serverURL=mm://hostname:7001;txnAutoWrap=PESSIMISTIC;partialResultsMode=false;VirtualDatabaseName=vdbName;sqlOptions=SHOWPLAN"); //$NON-NLS-1$
}
// Test secure protocol
@@ -602,13 +537,11 @@
final String vdbName = "vdbName"; //$NON-NLS-1$
final String vdbVersion = ""; //$NON-NLS-1$
final int portNumber = 7001;
- final String logfile = "myLogFile"; //$NON-NLS-1$
- final int loglevel = 1;
final String transactionAutoWrap = MMDataSource.TXN_AUTO_WRAP_PESSIMISTIC;
final String partialMode = "false"; //$NON-NLS-1$
final boolean secure = true;
- helpTestBuildingURL(vdbName,vdbVersion,serverName,portNumber,null,logfile,loglevel,transactionAutoWrap, partialMode, -1, true, secure,
- "jdbc:metamatrix:vdbName@mms://hostname:7001;logLevel=1;serverURL=mms://hostname:7001;logFile=myLogFile;txnAutoWrap=PESSIMISTIC;partialResultsMode=false;VirtualDatabaseName=vdbName;sqlOptions=SHOWPLAN"); //$NON-NLS-1$
+ helpTestBuildingURL(vdbName,vdbVersion,serverName,portNumber,null,transactionAutoWrap, partialMode, -1, true, secure,
+ "jdbc:metamatrix:vdbName@mms://hostname:7001;serverURL=mms://hostname:7001;txnAutoWrap=PESSIMISTIC;partialResultsMode=false;VirtualDatabaseName=vdbName;sqlOptions=SHOWPLAN"); //$NON-NLS-1$
}
/*
@@ -622,13 +555,11 @@
final String vdbVersion = ""; //$NON-NLS-1$
final int portNumber = 7001;
final String alternateServers = "hostName:7002,hostName2:7001,hostName2:7002"; //$NON-NLS-1$
- final String logfile = "myLogFile"; //$NON-NLS-1$
- final int loglevel = 1;
final String transactionAutoWrap = MMDataSource.TXN_AUTO_WRAP_PESSIMISTIC;
final String partialMode = "false"; //$NON-NLS-1$
final boolean secure = false;
- helpTestBuildingURL(vdbName,vdbVersion,serverName,portNumber,alternateServers,logfile,loglevel,transactionAutoWrap, partialMode, -1, true, secure,
- "jdbc:metamatrix:vdbName@mm://hostName:7001,hostName:7002,hostName2:7001,hostName2:7002;logLevel=1;serverURL=mm://hostName:7001,hostName:7002,hostName2:7001,hostName2:7002;logFile=myLogFile;txnAutoWrap=PESSIMISTIC;partialResultsMode=false;VirtualDatabaseName=vdbName;sqlOptions=SHOWPLAN"); //$NON-NLS-1$
+ helpTestBuildingURL(vdbName,vdbVersion,serverName,portNumber,alternateServers,transactionAutoWrap, partialMode, -1, true, secure,
+ "jdbc:metamatrix:vdbName@mm://hostName:7001,hostName:7002,hostName2:7001,hostName2:7002;serverURL=mm://hostName:7001,hostName:7002,hostName2:7001,hostName2:7002;txnAutoWrap=PESSIMISTIC;partialResultsMode=false;VirtualDatabaseName=vdbName;sqlOptions=SHOWPLAN"); //$NON-NLS-1$
}
/*
@@ -642,13 +573,11 @@
final String vdbVersion = ""; //$NON-NLS-1$
final int portNumber = 7001;
final String alternateServers = "hostName:7002,hostName2:7001,hostName2:7002"; //$NON-NLS-1$
- final String logfile = "myLogFile"; //$NON-NLS-1$
- final int loglevel = 1;
final String transactionAutoWrap = MMDataSource.TXN_AUTO_WRAP_PESSIMISTIC;
final String partialMode = "false"; //$NON-NLS-1$
final boolean secure = true;
- helpTestBuildingURL(vdbName,vdbVersion,serverName,portNumber,alternateServers,logfile,loglevel,transactionAutoWrap, partialMode, -1, true, secure,
- "jdbc:metamatrix:vdbName@mms://hostName:7001,hostName:7002,hostName2:7001,hostName2:7002;logLevel=1;serverURL=mms://hostName:7001,hostName:7002,hostName2:7001,hostName2:7002;logFile=myLogFile;txnAutoWrap=PESSIMISTIC;partialResultsMode=false;VirtualDatabaseName=vdbName;sqlOptions=SHOWPLAN"); //$NON-NLS-1$
+ helpTestBuildingURL(vdbName,vdbVersion,serverName,portNumber,alternateServers,transactionAutoWrap, partialMode, -1, true, secure,
+ "jdbc:metamatrix:vdbName@mms://hostName:7001,hostName:7002,hostName2:7001,hostName2:7002;serverURL=mms://hostName:7001,hostName:7002,hostName2:7001,hostName2:7002;txnAutoWrap=PESSIMISTIC;partialResultsMode=false;VirtualDatabaseName=vdbName;sqlOptions=SHOWPLAN"); //$NON-NLS-1$
}
/*
@@ -663,20 +592,18 @@
final String vdbVersion = ""; //$NON-NLS-1$
final int portNumber = 7001;
final String alternateServers = "hostName:7002,hostName2,hostName2:7002"; //$NON-NLS-1$
- final String logfile = "myLogFile"; //$NON-NLS-1$
- final int loglevel = 1;
final String transactionAutoWrap = MMDataSource.TXN_AUTO_WRAP_PESSIMISTIC;
final String partialMode = "false"; //$NON-NLS-1$
final boolean secure = false;
- helpTestBuildingURL(vdbName,vdbVersion,serverName,portNumber,alternateServers,logfile,loglevel,transactionAutoWrap, partialMode, -1, true, secure,
- "jdbc:metamatrix:vdbName@mm://hostName:7001,hostName:7002,hostName2:7001,hostName2:7002;logLevel=1;serverURL=mm://hostName:7001,hostName:7002,hostName2:7001,hostName2:7002;logFile=myLogFile;txnAutoWrap=PESSIMISTIC;partialResultsMode=false;VirtualDatabaseName=vdbName;sqlOptions=SHOWPLAN"); //$NON-NLS-1$
+ helpTestBuildingURL(vdbName,vdbVersion,serverName,portNumber,alternateServers,transactionAutoWrap, partialMode, -1, true, secure,
+ "jdbc:metamatrix:vdbName@mm://hostName:7001,hostName:7002,hostName2:7001,hostName2:7002;serverURL=mm://hostName:7001,hostName:7002,hostName2:7001,hostName2:7002;txnAutoWrap=PESSIMISTIC;partialResultsMode=false;VirtualDatabaseName=vdbName;sqlOptions=SHOWPLAN"); //$NON-NLS-1$
}
public void testBuildURL_AdditionalProperties() {
final MMDataSource ds = new MMDataSource();
- ds.setAdditionalProperties("foo=bar;a=b");
- ds.setServerName("hostName");
- ds.setDatabaseName("vdbName");
+ ds.setAdditionalProperties("foo=bar;a=b"); //$NON-NLS-1$
+ ds.setServerName("hostName"); //$NON-NLS-1$
+ ds.setDatabaseName("vdbName"); //$NON-NLS-1$
ds.setPortNumber(1);
assertEquals("jdbc:metamatrix:vdbName@mm://hostname:1;fetchSize=2000;serverURL=mm://hostname:1;a=b;VirtualDatabaseName=vdbName;foo=bar", ds.buildURL()); //$NON-NLS-1$
}
@@ -686,13 +613,11 @@
final String vdbName = "vdbName"; //$NON-NLS-1$
final String vdbVersion = ""; //$NON-NLS-1$
final int portNumber = -1; // this is what is invalid
- final String logfile = "myLogFile"; //$NON-NLS-1$
- final int loglevel = 1;
final String dataSourceName = null;
final String transactionAutoWrap = null;
final String configFile = UnitTestUtil.getTestDataPath() + "/config.txt"; //$NON-NLS-1$
try {
- helpTestConnection(vdbName,vdbVersion,serverName,portNumber, null, null, null, logfile,loglevel,dataSourceName,transactionAutoWrap,
+ helpTestConnection(vdbName,vdbVersion,serverName,portNumber, null, null, null, dataSourceName,transactionAutoWrap,
"false", configFile); // TRUE TO OVERRIDE USERNAME & PASSWORD //$NON-NLS-1$
fail("Unexpectedly able to connect"); //$NON-NLS-1$
} catch ( SQLException e) {
@@ -711,29 +636,15 @@
final String vdbVersion = ""; //$NON-NLS-1$
final int portNumber = 31000;
final String alternateServers = "hostName:-1"; // this is what is invalid //$NON-NLS-1$
- final String logfile = "myLogFile"; //$NON-NLS-1$
- final int loglevel = 1;
final String dataSourceName = null;
final String transactionAutoWrap = null;
final String configFile = UnitTestUtil.getTestDataPath() + "/config.txt"; //$NON-NLS-1$
try {
helpTestConnection(vdbName, vdbVersion, serverName, portNumber,
- alternateServers, null, null, logfile, loglevel,
- dataSourceName, transactionAutoWrap, "false", configFile); // TRUE TO OVERRIDE USERNAME & PASSWORD
+ alternateServers, null, null, dataSourceName, transactionAutoWrap, "false", configFile); //$NON-NLS-1$ // TRUE TO OVERRIDE USERNAME & PASSWORD
fail("Unexpectedly able to connect"); //$NON-NLS-1$
} catch ( SQLException e) {
// this is expected!
}
}
-
- public void testSerialization() throws Exception {
- MMDataSource dataSource = new MMDataSource();
-
- assertNotNull(dataSource.getLogger());
-
- dataSource = UnitTestUtil.helpSerialize(dataSource);
-
- assertNotNull(dataSource.getLogger());
- }
-
}
\ No newline at end of file
Modified: trunk/client-jdbc/src/test/java/com/metamatrix/jdbc/TestMMDriver.java
===================================================================
--- trunk/client-jdbc/src/test/java/com/metamatrix/jdbc/TestMMDriver.java 2009-02-26 22:08:21 UTC (rev 516)
+++ trunk/client-jdbc/src/test/java/com/metamatrix/jdbc/TestMMDriver.java 2009-02-26 23:42:51 UTC (rev 517)
@@ -113,15 +113,14 @@
public void testParseURL3() throws SQLException{
Properties p = new Properties();
- MMDriver.getInstance().parseURL("jdbc:metamatrix:BQT@mm://slwxp157:1234,slntmm01:43401,sluxmm09:43302;version=4;txnAutoWrap=ON;partialResultsMode=YES;logFile=jdbcLogFile.log", p); //$NON-NLS-1$
+ MMDriver.getInstance().parseURL("jdbc:metamatrix:BQT@mm://slwxp157:1234,slntmm01:43401,sluxmm09:43302;version=4;txnAutoWrap=ON;partialResultsMode=YES", p); //$NON-NLS-1$
assertTrue(p.getProperty(BaseDataSource.VDB_NAME).equals("BQT")); //$NON-NLS-1$
assertTrue(p.getProperty(BaseDataSource.VDB_VERSION).equals("4")); //$NON-NLS-1$
assertTrue(p.getProperty(ExecutionProperties.PROP_TXN_AUTO_WRAP).equals("ON")); //$NON-NLS-1$
assertTrue(p.getProperty(ExecutionProperties.PROP_PARTIAL_RESULTS_MODE).equals("YES")); //$NON-NLS-1$
- assertTrue(p.getProperty(BaseDataSource.LOG_FILE).equals("jdbcLogFile.log")); //$NON-NLS-1$
assertTrue(p.getProperty(MMURL.CONNECTION.SERVER_URL).equals("mm://slwxp157:1234,slntmm01:43401,sluxmm09:43302")); //$NON-NLS-1$
assertTrue(p.getProperty(BaseDataSource.VERSION).equals("4")); //$NON-NLS-1$
- assertEquals(7, p.size());
+ assertEquals(6, p.size());
}
public void testGetPropertyInfo1() throws Exception {
Modified: trunk/client-jdbc/src/test/java/com/metamatrix/jdbc/TestMMResultSet.java
===================================================================
--- trunk/client-jdbc/src/test/java/com/metamatrix/jdbc/TestMMResultSet.java 2009-02-26 22:08:21 UTC (rev 516)
+++ trunk/client-jdbc/src/test/java/com/metamatrix/jdbc/TestMMResultSet.java 2009-02-26 23:42:51 UTC (rev 517)
@@ -700,7 +700,6 @@
static MMStatement createMockStatement() throws SQLException {
MMStatement statement = mock(MMStatement.class);
- stub(statement.getLogger()).toReturn(mock(Logger.class));
stub(statement.getDQP()).toReturn(mock(ClientSideDQP.class));
stub(statement.getResultSetType()).toReturn(
ResultSet.TYPE_SCROLL_INSENSITIVE);
Modified: trunk/client-jdbc/src/test/java/com/metamatrix/jdbc/util/TestMMJDBCURL.java
===================================================================
--- trunk/client-jdbc/src/test/java/com/metamatrix/jdbc/util/TestMMJDBCURL.java 2009-02-26 22:08:21 UTC (rev 516)
+++ trunk/client-jdbc/src/test/java/com/metamatrix/jdbc/util/TestMMJDBCURL.java 2009-02-26 23:42:51 UTC (rev 517)
@@ -78,13 +78,12 @@
public void testCaseConversion() {
// Different case ------------------------------------HERE -v ----------------and HERE -v
- String URL = "jdbc:metamatrix:bqt@mm://localhost:12345;VERSION=1;user=xyz;password=***;loglevel=1;configFile=testdata/bqt/dqp_stmt_e2e.xmi"; //$NON-NLS-1$
+ String URL = "jdbc:metamatrix:bqt@mm://localhost:12345;VERSION=1;user=xyz;password=***;configFile=testdata/bqt/dqp_stmt_e2e.xmi"; //$NON-NLS-1$
Properties expectedProperties = new Properties();
expectedProperties.setProperty("version", "1"); //$NON-NLS-1$ //$NON-NLS-2$
expectedProperties.setProperty("user", "xyz"); //$NON-NLS-1$ //$NON-NLS-2$
expectedProperties.setProperty("password", "***"); //$NON-NLS-1$ //$NON-NLS-2$
- expectedProperties.setProperty("logLevel", "1"); //$NON-NLS-1$ //$NON-NLS-2$
expectedProperties.setProperty("configFile", "testdata/bqt/dqp_stmt_e2e.xmi"); //$NON-NLS-1$ //$NON-NLS-2$
MMJDBCURL url = new MMJDBCURL(URL);
assertEquals("bqt", url.getVDBName()); //$NON-NLS-1$
Modified: trunk/embedded/src/test/java/com/metamatrix/jdbc/TestEmbeddedDriver.java
===================================================================
--- trunk/embedded/src/test/java/com/metamatrix/jdbc/TestEmbeddedDriver.java 2009-02-26 22:08:21 UTC (rev 516)
+++ trunk/embedded/src/test/java/com/metamatrix/jdbc/TestEmbeddedDriver.java 2009-02-26 23:42:51 UTC (rev 517)
@@ -107,15 +107,13 @@
public void testParseURL3() throws SQLException{
Properties p = new Properties();
- driver.parseURL("jdbc:metamatrix:BQT@/metamatrix/dqp/dqp.properties;version=4;txnAutoWrap=ON;partialResultsMode=YES;logFile=D:\\metamatrix\\work\\DQP\\log\\jdbcLogFile.log", p); //$NON-NLS-1$
+ driver.parseURL("jdbc:metamatrix:BQT@/metamatrix/dqp/dqp.properties;version=4;txnAutoWrap=ON;partialResultsMode=YES;", p); //$NON-NLS-1$
assertTrue(p.getProperty(BaseDataSource.VDB_NAME).equals("BQT")); //$NON-NLS-1$
- assertTrue(p.get(EmbeddedDataSource.DQP_BOOTSTRAP_FILE).toString().equals("mmfile:/metamatrix/dqp/dqp.properties")); //$NON-NLS-1$
assertTrue(p.getProperty(BaseDataSource.VDB_VERSION).equals("4")); //$NON-NLS-1$
assertTrue(p.getProperty(BaseDataSource.VERSION).equals("4")); //$NON-NLS-1$
assertTrue(p.getProperty(ExecutionProperties.PROP_TXN_AUTO_WRAP).equals("ON")); //$NON-NLS-1$
assertTrue(p.getProperty(ExecutionProperties.PROP_PARTIAL_RESULTS_MODE).equals("YES")); //$NON-NLS-1$
- assertTrue(p.getProperty(BaseDataSource.LOG_FILE).equals("D:\\metamatrix\\work\\DQP\\log\\jdbcLogFile.log")); //$NON-NLS-1$
- assertEquals(7, p.size());
+ assertEquals(6, p.size());
}
public void testParseURL4() throws SQLException{
15 years, 9 months
teiid SVN: r516 - trunk/documentation/reference/src/main/docbook/en-US/content.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-02-26 17:08:21 -0500 (Thu, 26 Feb 2009)
New Revision: 516
Modified:
trunk/documentation/reference/src/main/docbook/en-US/content/procedures.xml
trunk/documentation/reference/src/main/docbook/en-US/content/sql_support.xml
Log:
TEIID-355 deprecating the use of select into to target a table.
Modified: trunk/documentation/reference/src/main/docbook/en-US/content/procedures.xml
===================================================================
--- trunk/documentation/reference/src/main/docbook/en-US/content/procedures.xml 2009-02-26 21:30:22 UTC (rev 515)
+++ trunk/documentation/reference/src/main/docbook/en-US/content/procedures.xml 2009-02-26 22:08:21 UTC (rev 516)
@@ -45,7 +45,7 @@
</para>
</listitem>
<listitem>
- <para>The "INTO" clause will project the dynamic SQL into the specified temp table. At runtime with the "INTO" clause specified, the dynamic command will actually execute a statement that behaves like a SELECT INTO. If the dynamic SQL command creates a temporary table with the "INTO" clause, then the "AS" clause is required to define the table’s metadata.
+ <para>The "INTO" clause will project the dynamic SQL into the specified temp table. With the "INTO" clause specified, the dynamic command will actually execute a statement that behaves like an INSERT with a QUERY EXPRESSION. If the dynamic SQL command creates a temporary table with the "INTO" clause, then the "AS" clause is required to define the table’s metadata.
</para>
</listitem>
<listitem>
Modified: trunk/documentation/reference/src/main/docbook/en-US/content/sql_support.xml
===================================================================
--- trunk/documentation/reference/src/main/docbook/en-US/content/sql_support.xml 2009-02-26 21:30:22 UTC (rev 515)
+++ trunk/documentation/reference/src/main/docbook/en-US/content/sql_support.xml 2009-02-26 22:08:21 UTC (rev 516)
@@ -824,6 +824,9 @@
</sect2>
<sect2 id="into_clause">
<title>INTO Clause</title>
+ <warning>
+ <para>Usage of the INTO Clause for inserting into a table has been been deprecated. An <link linkend="insert_command">INSERT</link> with a query command should be used instead.</para>
+ </warning>
<para>
When the into clause is specified with a SELECT, the results of the query are inserted into the specified table. This is often used to insert records into a temporary table. The INTO clause immediately precedes the FROM clause.
</para>
15 years, 9 months
teiid SVN: r515 - in trunk: connector-sdk/src/main/java/com/metamatrix/core/commandshell and 14 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-02-26 16:30:22 -0500 (Thu, 26 Feb 2009)
New Revision: 515
Modified:
trunk/common-core/src/main/java/com/metamatrix/common/util/ByteArrayHelper.java
trunk/connector-sdk/src/main/java/com/metamatrix/core/commandshell/CommandShell.java
trunk/connector-sdk/src/test/java/com/metamatrix/core/commandshell/TestCommand.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/soap/SOAPConnectorStateImpl.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/soap/SOAPExecutor.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/XMLSourceConnector.java
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestCriteriaDesc.java
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestStringBackedValueReference.java
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestXMLCapabilities.java
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestXMLExtractor.java
trunk/connectors/sandbox/connector-oracle-spatial/src/main/java/com/metamatrix/connector/jdbc/oracle/spatial/NnDistanceFunctionModifier.java
trunk/console/src/main/java/com/metamatrix/console/models/SummaryManager.java
trunk/console/src/main/java/com/metamatrix/console/ui/views/deploy/util/PropertyConstants.java
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/language/GroupImpl.java
trunk/engine/src/main/java/com/metamatrix/dqp/internal/transaction/TransactionProvider.java
trunk/engine/src/main/java/com/metamatrix/dqp/message/AtomicResultsMessage.java
trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/GenerateCanonical.java
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/RelationalNodeUtil.java
trunk/engine/src/main/java/com/metamatrix/query/rewriter/QueryRewriter.java
trunk/engine/src/main/java/com/metamatrix/query/rewriter/VariableSubstitutionVisitor.java
trunk/engine/src/test/java/com/metamatrix/dqp/internal/process/multisource/TestMultiSourcePlanToProcessConverter.java
Log:
removing unused imports
Modified: trunk/common-core/src/main/java/com/metamatrix/common/util/ByteArrayHelper.java
===================================================================
--- trunk/common-core/src/main/java/com/metamatrix/common/util/ByteArrayHelper.java 2009-02-26 21:26:52 UTC (rev 514)
+++ trunk/common-core/src/main/java/com/metamatrix/common/util/ByteArrayHelper.java 2009-02-26 21:30:22 UTC (rev 515)
@@ -28,7 +28,6 @@
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
-import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Iterator;
Modified: trunk/connector-sdk/src/main/java/com/metamatrix/core/commandshell/CommandShell.java
===================================================================
--- trunk/connector-sdk/src/main/java/com/metamatrix/core/commandshell/CommandShell.java 2009-02-26 21:26:52 UTC (rev 514)
+++ trunk/connector-sdk/src/main/java/com/metamatrix/core/commandshell/CommandShell.java 2009-02-26 21:30:22 UTC (rev 515)
@@ -29,9 +29,7 @@
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Collection;
import java.util.Comparator;
-import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.util.Stack;
@@ -40,8 +38,6 @@
import com.metamatrix.core.CorePlugin;
import com.metamatrix.core.MetaMatrixRuntimeException;
import com.metamatrix.core.log.FileLogWriter;
-import com.metamatrix.core.log.LogListener;
-import com.metamatrix.core.log.SystemLogWriter;
import com.metamatrix.core.util.FileUtil;
import com.metamatrix.core.util.MetaMatrixExceptionUtil;
import com.metamatrix.core.util.StringUtil;
Modified: trunk/connector-sdk/src/test/java/com/metamatrix/core/commandshell/TestCommand.java
===================================================================
--- trunk/connector-sdk/src/test/java/com/metamatrix/core/commandshell/TestCommand.java 2009-02-26 21:26:52 UTC (rev 514)
+++ trunk/connector-sdk/src/test/java/com/metamatrix/core/commandshell/TestCommand.java 2009-02-26 21:30:22 UTC (rev 515)
@@ -24,6 +24,8 @@
import java.util.TimeZone;
import junit.framework.TestCase;
+
+import com.metamatrix.common.util.TimestampWithTimezone;
import com.metamatrix.core.util.UnitTestUtil;
public class TestCommand extends TestCase {
@@ -33,11 +35,11 @@
}
public void setUp() {
- TimeZone.setDefault(TimeZone.getTimeZone("GMT-06:00")); //$NON-NLS-1$
+ TimestampWithTimezone.resetCalendar(TimeZone.getTimeZone("GMT-06:00")); //$NON-NLS-1$
}
public void tearDown() {
- TimeZone.setDefault(null);
+ TimestampWithTimezone.resetCalendar(null);
}
public void test() throws Exception {
Modified: trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/soap/SOAPConnectorStateImpl.java
===================================================================
--- trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/soap/SOAPConnectorStateImpl.java 2009-02-26 21:26:52 UTC (rev 514)
+++ trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/soap/SOAPConnectorStateImpl.java 2009-02-26 21:30:22 UTC (rev 515)
@@ -24,8 +24,8 @@
package com.metamatrix.connector.xml.soap;
-import java.text.MessageFormat;
-import java.util.Properties;
+import java.text.MessageFormat;
+import java.util.Properties;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.HttpsURLConnection;
@@ -34,10 +34,9 @@
import org.teiid.connector.api.ConnectorException;
import org.teiid.connector.api.ConnectorLogger;
-import com.metamatrix.connector.xml.SOAPConnectorState;
-import com.metamatrix.connector.xml.base.Messages;
+import com.metamatrix.connector.xml.SOAPConnectorState;
+import com.metamatrix.connector.xml.base.Messages;
import com.metamatrix.connector.xml.http.HTTPConnectorState;
-import com.metamatrix.connector.xmlsource.soap.SecurityToken;
/**
* Contains the data needed to create the SOAP Envelope around an XML Document.
Modified: trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/soap/SOAPExecutor.java
===================================================================
--- trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/soap/SOAPExecutor.java 2009-02-26 21:26:52 UTC (rev 514)
+++ trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/soap/SOAPExecutor.java 2009-02-26 21:30:22 UTC (rev 515)
@@ -45,7 +45,6 @@
import org.apache.axis.client.Service;
import org.apache.axis.configuration.SimpleProvider;
import org.apache.axis.handlers.SimpleSessionHandler;
-import org.apache.axis.message.MessageElement;
import org.apache.axis.message.SOAPBodyElement;
import org.apache.axis.message.SOAPEnvelope;
import org.apache.axis.soap.SOAPConstants;
Modified: trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/XMLSourceConnector.java
===================================================================
--- trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/XMLSourceConnector.java 2009-02-26 21:26:52 UTC (rev 514)
+++ trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/XMLSourceConnector.java 2009-02-26 21:30:22 UTC (rev 515)
@@ -23,7 +23,6 @@
package com.metamatrix.connector.xmlsource;
import org.teiid.connector.api.Connection;
-import org.teiid.connector.api.Connector;
import org.teiid.connector.api.ConnectorCapabilities;
import org.teiid.connector.api.ConnectorEnvironment;
import org.teiid.connector.api.ConnectorException;
@@ -32,8 +31,7 @@
import org.teiid.connector.basic.BasicConnector;
/**
- * XML Source connector, will give provide a XML document as source to
- * Metamatrix engine.
+ * XML Source connector
*/
@ConnectionPooling
public class XMLSourceConnector extends BasicConnector {
Modified: trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestCriteriaDesc.java
===================================================================
--- trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestCriteriaDesc.java 2009-02-26 21:26:52 UTC (rev 514)
+++ trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestCriteriaDesc.java 2009-02-26 21:30:22 UTC (rev 515)
@@ -27,25 +27,21 @@
import java.util.Iterator;
import java.util.List;
+import junit.framework.TestCase;
+
import org.teiid.connector.api.ConnectorException;
import org.teiid.connector.language.IBaseInCriteria;
import org.teiid.connector.language.ICompareCriteria;
import org.teiid.connector.language.ICriteria;
import org.teiid.connector.language.IElement;
import org.teiid.connector.language.IExpression;
-import org.teiid.connector.language.IFrom;
-import org.teiid.connector.language.IGroup;
import org.teiid.connector.language.IQuery;
-import org.teiid.connector.language.ISelect;
import org.teiid.connector.language.ISelectSymbol;
import org.teiid.connector.language.LanguageUtil;
import org.teiid.connector.metadata.runtime.Element;
-import org.teiid.connector.metadata.runtime.Group;
import org.teiid.connector.metadata.runtime.RuntimeMetadata;
-import junit.framework.TestCase;
-
/**
* created by JChoate on Jun 27, 2005
*
Modified: trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestStringBackedValueReference.java
===================================================================
--- trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestStringBackedValueReference.java 2009-02-26 21:26:52 UTC (rev 514)
+++ trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestStringBackedValueReference.java 2009-02-26 21:30:22 UTC (rev 515)
@@ -22,8 +22,6 @@
package com.metamatrix.connector.xml.base;
-import org.teiid.connector.api.ConnectorException;
-
import junit.framework.TestCase;
Modified: trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestXMLCapabilities.java
===================================================================
--- trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestXMLCapabilities.java 2009-02-26 21:26:52 UTC (rev 514)
+++ trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestXMLCapabilities.java 2009-02-26 21:30:22 UTC (rev 515)
@@ -22,10 +22,6 @@
package com.metamatrix.connector.xml.base;
-import java.util.List;
-
-import org.teiid.connector.api.ConnectorCapabilities;
-
import junit.framework.TestCase;
@@ -83,7 +79,7 @@
* Class under test for List getSupportedFunctions()
*/
public void testGetSupportedFunctions() {
- List funcs = m_caps.getSupportedFunctions();
+ assertNotNull(m_caps.getSupportedFunctions());
}
public void testSupportsSelectDistinct() {
Modified: trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestXMLExtractor.java
===================================================================
--- trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestXMLExtractor.java 2009-02-26 21:26:52 UTC (rev 514)
+++ trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestXMLExtractor.java 2009-02-26 21:30:22 UTC (rev 515)
@@ -29,7 +29,6 @@
import org.jdom.Document;
import org.teiid.connector.api.ConnectorException;
-import org.teiid.connector.api.ConnectorLogger;
import com.metamatrix.cdk.api.SysLogger;
Modified: trunk/connectors/sandbox/connector-oracle-spatial/src/main/java/com/metamatrix/connector/jdbc/oracle/spatial/NnDistanceFunctionModifier.java
===================================================================
--- trunk/connectors/sandbox/connector-oracle-spatial/src/main/java/com/metamatrix/connector/jdbc/oracle/spatial/NnDistanceFunctionModifier.java 2009-02-26 21:26:52 UTC (rev 514)
+++ trunk/connectors/sandbox/connector-oracle-spatial/src/main/java/com/metamatrix/connector/jdbc/oracle/spatial/NnDistanceFunctionModifier.java 2009-02-26 21:30:22 UTC (rev 515)
@@ -22,8 +22,6 @@
package com.metamatrix.connector.jdbc.oracle.spatial;
-import java.util.List;
-
import org.teiid.connector.language.IExpression;
import org.teiid.connector.language.IFunction;
Modified: trunk/console/src/main/java/com/metamatrix/console/models/SummaryManager.java
===================================================================
--- trunk/console/src/main/java/com/metamatrix/console/models/SummaryManager.java 2009-02-26 21:26:52 UTC (rev 514)
+++ trunk/console/src/main/java/com/metamatrix/console/models/SummaryManager.java 2009-02-26 21:30:22 UTC (rev 515)
@@ -33,10 +33,8 @@
import java.util.Iterator;
import com.metamatrix.api.exception.security.AuthorizationException;
-import com.metamatrix.common.config.api.Configuration;
import com.metamatrix.common.config.api.Host;
import com.metamatrix.common.config.api.HostID;
-import com.metamatrix.common.config.api.HostType;
import com.metamatrix.common.config.api.ReleaseInfo;
import com.metamatrix.common.log.LogManager;
import com.metamatrix.common.util.MetaMatrixProductNames;
Modified: trunk/console/src/main/java/com/metamatrix/console/ui/views/deploy/util/PropertyConstants.java
===================================================================
--- trunk/console/src/main/java/com/metamatrix/console/ui/views/deploy/util/PropertyConstants.java 2009-02-26 21:26:52 UTC (rev 514)
+++ trunk/console/src/main/java/com/metamatrix/console/ui/views/deploy/util/PropertyConstants.java 2009-02-26 21:30:22 UTC (rev 515)
@@ -23,7 +23,6 @@
//#############################################################################
package com.metamatrix.console.ui.views.deploy.util;
-import com.metamatrix.common.config.api.HostType;
/**
* @version 1.0
Modified: trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/language/GroupImpl.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/language/GroupImpl.java 2009-02-26 21:26:52 UTC (rev 514)
+++ trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/language/GroupImpl.java 2009-02-26 21:30:22 UTC (rev 515)
@@ -27,7 +27,6 @@
import org.teiid.connector.visitor.framework.LanguageObjectVisitor;
import com.metamatrix.core.util.HashCodeUtil;
-import com.metamatrix.metadata.runtime.api.MetadataID;
public class GroupImpl extends BaseLanguageObject implements IGroup {
Modified: trunk/engine/src/main/java/com/metamatrix/dqp/internal/transaction/TransactionProvider.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/dqp/internal/transaction/TransactionProvider.java 2009-02-26 21:26:52 UTC (rev 514)
+++ trunk/engine/src/main/java/com/metamatrix/dqp/internal/transaction/TransactionProvider.java 2009-02-26 21:30:22 UTC (rev 515)
@@ -31,8 +31,6 @@
import javax.transaction.xa.XAException;
import javax.transaction.xa.XAResource;
-import org.teiid.connector.xa.api.XAConnection;
-
import com.metamatrix.common.xa.MMXid;
import com.metamatrix.common.xa.XATransactionException;
Modified: trunk/engine/src/main/java/com/metamatrix/dqp/message/AtomicResultsMessage.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/dqp/message/AtomicResultsMessage.java 2009-02-26 21:26:52 UTC (rev 514)
+++ trunk/engine/src/main/java/com/metamatrix/dqp/message/AtomicResultsMessage.java 2009-02-26 21:30:22 UTC (rev 515)
@@ -28,8 +28,6 @@
import java.io.ObjectOutput;
import java.util.List;
-import org.teiid.connector.api.ConnectorException;
-
import com.metamatrix.common.batch.BatchSerializer;
import com.metamatrix.core.util.ExternalizeUtil;
Modified: trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/GenerateCanonical.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/GenerateCanonical.java 2009-02-26 21:26:52 UTC (rev 514)
+++ trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/GenerateCanonical.java 2009-02-26 21:30:22 UTC (rev 515)
@@ -30,7 +30,6 @@
import com.metamatrix.api.exception.query.QueryPlannerException;
import com.metamatrix.query.execution.QueryExecPlugin;
import com.metamatrix.query.metadata.QueryMetadataInterface;
-import com.metamatrix.query.metadata.SupportConstants;
import com.metamatrix.query.optimizer.relational.plantree.JoinStrategyType;
import com.metamatrix.query.optimizer.relational.plantree.NodeConstants;
import com.metamatrix.query.optimizer.relational.plantree.NodeFactory;
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/relational/RelationalNodeUtil.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/relational/RelationalNodeUtil.java 2009-02-26 21:26:52 UTC (rev 514)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/relational/RelationalNodeUtil.java 2009-02-26 21:30:22 UTC (rev 515)
@@ -22,8 +22,6 @@
package com.metamatrix.query.processor.relational;
-import java.util.Collections;
-
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.query.CriteriaEvaluationException;
import com.metamatrix.common.buffer.BlockedException;
@@ -37,7 +35,6 @@
import com.metamatrix.query.sql.lang.SetQuery;
import com.metamatrix.query.sql.lang.Update;
import com.metamatrix.query.sql.symbol.Constant;
-import com.metamatrix.query.sql.visitor.ElementCollectorVisitor;
import com.metamatrix.query.sql.visitor.EvaluateExpressionVisitor;
Modified: trunk/engine/src/main/java/com/metamatrix/query/rewriter/QueryRewriter.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/rewriter/QueryRewriter.java 2009-02-26 21:26:52 UTC (rev 514)
+++ trunk/engine/src/main/java/com/metamatrix/query/rewriter/QueryRewriter.java 2009-02-26 21:30:22 UTC (rev 515)
@@ -50,7 +50,6 @@
import com.metamatrix.api.exception.query.FunctionExecutionException;
import com.metamatrix.api.exception.query.InvalidFunctionException;
import com.metamatrix.api.exception.query.QueryMetadataException;
-import com.metamatrix.api.exception.query.QueryProcessingException;
import com.metamatrix.api.exception.query.QueryResolverException;
import com.metamatrix.api.exception.query.QueryValidatorException;
import com.metamatrix.common.buffer.BlockedException;
Modified: trunk/engine/src/main/java/com/metamatrix/query/rewriter/VariableSubstitutionVisitor.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/rewriter/VariableSubstitutionVisitor.java 2009-02-26 21:26:52 UTC (rev 514)
+++ trunk/engine/src/main/java/com/metamatrix/query/rewriter/VariableSubstitutionVisitor.java 2009-02-26 21:30:22 UTC (rev 515)
@@ -49,8 +49,6 @@
import com.metamatrix.query.sql.symbol.Constant;
import com.metamatrix.query.sql.symbol.ElementSymbol;
import com.metamatrix.query.sql.symbol.Expression;
-import com.metamatrix.query.sql.symbol.GroupSymbol;
-import com.metamatrix.query.sql.symbol.Reference;
import com.metamatrix.query.sql.visitor.ExpressionMappingVisitor;
import com.metamatrix.query.sql.visitor.ReferenceCollectorVisitor;
import com.metamatrix.query.sql.visitor.VariableCollectorVisitor;
Modified: trunk/engine/src/test/java/com/metamatrix/dqp/internal/process/multisource/TestMultiSourcePlanToProcessConverter.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/dqp/internal/process/multisource/TestMultiSourcePlanToProcessConverter.java 2009-02-26 21:26:52 UTC (rev 514)
+++ trunk/engine/src/test/java/com/metamatrix/dqp/internal/process/multisource/TestMultiSourcePlanToProcessConverter.java 2009-02-26 21:30:22 UTC (rev 515)
@@ -54,7 +54,6 @@
import com.metamatrix.query.sql.visitor.ElementCollectorVisitor;
import com.metamatrix.query.unittest.FakeMetadataFacade;
import com.metamatrix.query.unittest.FakeMetadataFactory;
-import com.metamatrix.query.unittest.FakeMetadataObject;
import com.metamatrix.query.util.CommandContext;
15 years, 9 months
teiid SVN: r513 - in trunk: engine/src/test/java/com/metamatrix/query/processor/relational and 11 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-02-26 16:26:48 -0500 (Thu, 26 Feb 2009)
New Revision: 513
Removed:
trunk/server/src/main/java/com/metamatrix/platform/config/service/ConfigurationServiceConstants.java
Modified:
trunk/engine/src/test/java/com/metamatrix/query/optimizer/relational/rules/TestRuleChooseDependent.java
trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestSelectNode.java
trunk/engine/src/test/java/com/metamatrix/query/rewriter/TestQueryRewriter.java
trunk/metadata/src/test/java/com/metamatrix/dqp/service/metadata/TestIndexMetadataService.java
trunk/server/src/main/java/com/metamatrix/platform/config/spi/xml/XMLCurrentConfigurationReader.java
trunk/server/src/main/java/com/metamatrix/platform/service/api/CacheAdmin.java
trunk/server/src/main/java/com/metamatrix/server/query/service/QueryService.java
trunk/server/src/test/java/com/metamatrix/admin/server/TestServerConfigAdminImpl.java
trunk/server/src/test/java/com/metamatrix/common/extensionmodule/TestExtensionModuleManager.java
trunk/server/src/test/java/com/metamatrix/platform/config/spi/xml/HelperTestConfiguration.java
trunk/server/src/test/java/com/metamatrix/platform/config/spi/xml/TestCurrentConfiguration.java
trunk/soap/src/main/java/com/metamatrix/soap/servlet/MMGetVDBResourceServlet.java
trunk/test-integration/src/test/java/com/metamatrix/cdk/api/TestTranslationUtility.java
Log:
removing unused imports
Modified: trunk/engine/src/test/java/com/metamatrix/query/optimizer/relational/rules/TestRuleChooseDependent.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/optimizer/relational/rules/TestRuleChooseDependent.java 2009-02-26 21:14:35 UTC (rev 512)
+++ trunk/engine/src/test/java/com/metamatrix/query/optimizer/relational/rules/TestRuleChooseDependent.java 2009-02-26 21:26:48 UTC (rev 513)
@@ -40,7 +40,6 @@
import com.metamatrix.query.optimizer.relational.RuleStack;
import com.metamatrix.query.optimizer.relational.plantree.JoinStrategyType;
import com.metamatrix.query.optimizer.relational.plantree.NodeConstants;
-import com.metamatrix.query.optimizer.relational.plantree.NodeEditor;
import com.metamatrix.query.optimizer.relational.plantree.NodeFactory;
import com.metamatrix.query.optimizer.relational.plantree.PlanNode;
import com.metamatrix.query.rewriter.QueryRewriter;
Modified: trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestSelectNode.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestSelectNode.java 2009-02-26 21:14:35 UTC (rev 512)
+++ trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestSelectNode.java 2009-02-26 21:26:48 UTC (rev 513)
@@ -31,7 +31,6 @@
import junit.framework.TestCase;
import com.metamatrix.api.exception.MetaMatrixComponentException;
-import com.metamatrix.api.exception.MetaMatrixException;
import com.metamatrix.api.exception.MetaMatrixProcessingException;
import com.metamatrix.common.buffer.BlockedException;
import com.metamatrix.common.buffer.BufferManager;
Modified: trunk/engine/src/test/java/com/metamatrix/query/rewriter/TestQueryRewriter.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/rewriter/TestQueryRewriter.java 2009-02-26 21:14:35 UTC (rev 512)
+++ trunk/engine/src/test/java/com/metamatrix/query/rewriter/TestQueryRewriter.java 2009-02-26 21:26:48 UTC (rev 513)
@@ -41,6 +41,7 @@
import com.metamatrix.api.exception.query.QueryResolverException;
import com.metamatrix.api.exception.query.QueryValidatorException;
import com.metamatrix.common.types.DataTypeManager;
+import com.metamatrix.common.util.TimestampWithTimezone;
import com.metamatrix.core.MetaMatrixRuntimeException;
import com.metamatrix.dqp.message.ParameterInfo;
import com.metamatrix.query.metadata.QueryMetadataInterface;
@@ -2094,11 +2095,11 @@
}
public void testRewriteFromUnixTime() throws Exception {
- TimeZone.setDefault(TimeZone.getTimeZone("GMT-06:00")); //$NON-NLS-1$
+ TimestampWithTimezone.resetCalendar(TimeZone.getTimeZone("GMT-06:00"));
try {
helpTestRewriteCriteria("from_unixtime(pm1.g1.e2) = '1992-12-01 07:00:00'", "timestampadd(SQL_TSI_SECOND, pm1.g1.e2, {ts'1969-12-31 18:00:00.0'}) = {ts'1992-12-01 07:00:00.0'}"); //$NON-NLS-1$ //$NON-NLS-2$
} finally {
- TimeZone.setDefault(null);
+ TimestampWithTimezone.resetCalendar(null);
}
}
Modified: trunk/metadata/src/test/java/com/metamatrix/dqp/service/metadata/TestIndexMetadataService.java
===================================================================
--- trunk/metadata/src/test/java/com/metamatrix/dqp/service/metadata/TestIndexMetadataService.java 2009-02-26 21:14:35 UTC (rev 512)
+++ trunk/metadata/src/test/java/com/metamatrix/dqp/service/metadata/TestIndexMetadataService.java 2009-02-26 21:26:48 UTC (rev 513)
@@ -37,7 +37,6 @@
import com.metamatrix.dqp.service.DQPServiceNames;
import com.metamatrix.dqp.service.VDBService;
import com.metamatrix.query.metadata.QueryMetadataInterface;
-import com.metamatrix.query.metadata.SupportConstants;
public class TestIndexMetadataService extends TestCase {
private QueryMetadataInterface metadata;
Deleted: trunk/server/src/main/java/com/metamatrix/platform/config/service/ConfigurationServiceConstants.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/platform/config/service/ConfigurationServiceConstants.java 2009-02-26 21:14:35 UTC (rev 512)
+++ trunk/server/src/main/java/com/metamatrix/platform/config/service/ConfigurationServiceConstants.java 2009-02-26 21:26:48 UTC (rev 513)
@@ -1,29 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.platform.config.service;
-
-import com.metamatrix.common.config.ResourceNames;
-
-public interface ConfigurationServiceConstants {
- public static final String NAME = "ConfigurationService";
-}
Modified: trunk/server/src/main/java/com/metamatrix/platform/config/spi/xml/XMLCurrentConfigurationReader.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/platform/config/spi/xml/XMLCurrentConfigurationReader.java 2009-02-26 21:14:35 UTC (rev 512)
+++ trunk/server/src/main/java/com/metamatrix/platform/config/spi/xml/XMLCurrentConfigurationReader.java 2009-02-26 21:26:48 UTC (rev 513)
@@ -22,14 +22,11 @@
package com.metamatrix.platform.config.spi.xml;
-import java.util.Collection;
import java.util.Properties;
import com.metamatrix.common.config.StartupStateException;
import com.metamatrix.common.config.api.Configuration;
import com.metamatrix.common.config.api.ConfigurationModelContainer;
-import com.metamatrix.common.config.api.Host;
-import com.metamatrix.common.config.api.HostID;
import com.metamatrix.common.config.api.exceptions.ConfigurationConnectionException;
import com.metamatrix.common.config.api.exceptions.ConfigurationException;
import com.metamatrix.common.config.reader.CurrentConfigurationReader;
Modified: trunk/server/src/main/java/com/metamatrix/platform/service/api/CacheAdmin.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/platform/service/api/CacheAdmin.java 2009-02-26 21:14:35 UTC (rev 512)
+++ trunk/server/src/main/java/com/metamatrix/platform/service/api/CacheAdmin.java 2009-02-26 21:26:48 UTC (rev 513)
@@ -22,7 +22,6 @@
package com.metamatrix.platform.service.api;
-import java.rmi.Remote;
import java.util.Map;
import java.util.Properties;
Modified: trunk/server/src/main/java/com/metamatrix/server/query/service/QueryService.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/server/query/service/QueryService.java 2009-02-26 21:14:35 UTC (rev 512)
+++ trunk/server/src/main/java/com/metamatrix/server/query/service/QueryService.java 2009-02-26 21:26:48 UTC (rev 513)
@@ -35,7 +35,6 @@
import com.metamatrix.api.exception.ComponentNotFoundException;
import com.metamatrix.api.exception.MetaMatrixComponentException;
-import com.metamatrix.api.exception.MetaMatrixProcessingException;
import com.metamatrix.api.exception.server.InvalidRequestIDException;
import com.metamatrix.common.application.DQPConfigSource;
import com.metamatrix.common.comm.ClientServiceRegistry;
Modified: trunk/server/src/test/java/com/metamatrix/admin/server/TestServerConfigAdminImpl.java
===================================================================
--- trunk/server/src/test/java/com/metamatrix/admin/server/TestServerConfigAdminImpl.java 2009-02-26 21:14:35 UTC (rev 512)
+++ trunk/server/src/test/java/com/metamatrix/admin/server/TestServerConfigAdminImpl.java 2009-02-26 21:26:48 UTC (rev 513)
@@ -21,29 +21,25 @@
*/
package com.metamatrix.admin.server;
-import java.io.File;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Properties;
+import java.io.File;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Properties;
+
+import junit.framework.TestCase;
+
+import com.metamatrix.admin.api.exception.AdminException;
+import com.metamatrix.admin.api.objects.Host;
+import com.metamatrix.core.util.ObjectConverterUtil;
+import com.metamatrix.core.util.UnitTestUtil;
+import com.metamatrix.metadata.runtime.api.Model;
+import com.metamatrix.metadata.runtime.api.VirtualDatabase;
+import com.metamatrix.metadata.runtime.api.VirtualDatabaseID;
+import com.metamatrix.platform.registry.ClusteredRegistryState;
+import com.metamatrix.platform.registry.FakeRegistryUtil;
-import junit.framework.TestCase;
-import org.jboss.cache.Cache;
-import org.jboss.cache.CacheFactory;
-import org.jboss.cache.DefaultCacheFactory;
-
-import com.metamatrix.admin.api.exception.AdminException;
-import com.metamatrix.admin.api.objects.Host;
-import com.metamatrix.core.util.ObjectConverterUtil;
-import com.metamatrix.core.util.UnitTestUtil;
-import com.metamatrix.metadata.runtime.api.Model;
-import com.metamatrix.metadata.runtime.api.VirtualDatabase;
-import com.metamatrix.metadata.runtime.api.VirtualDatabaseID;
-import com.metamatrix.platform.registry.ClusteredRegistryState;
-import com.metamatrix.platform.registry.FakeRegistryUtil;
-
-
/**
* Unit tests of ServerMonitoringAdminImpl
* @since 4.3
Modified: trunk/server/src/test/java/com/metamatrix/common/extensionmodule/TestExtensionModuleManager.java
===================================================================
--- trunk/server/src/test/java/com/metamatrix/common/extensionmodule/TestExtensionModuleManager.java 2009-02-26 21:14:35 UTC (rev 512)
+++ trunk/server/src/test/java/com/metamatrix/common/extensionmodule/TestExtensionModuleManager.java 2009-02-26 21:26:48 UTC (rev 513)
@@ -47,7 +47,6 @@
import com.metamatrix.common.extensionmodule.exception.InvalidExtensionModuleTypeException;
import com.metamatrix.common.messaging.MessageBusConstants;
import com.metamatrix.common.util.PropertiesUtils;
-import com.metamatrix.core.CoreConstants;
public class TestExtensionModuleManager extends TestCase {
Modified: trunk/server/src/test/java/com/metamatrix/platform/config/spi/xml/HelperTestConfiguration.java
===================================================================
--- trunk/server/src/test/java/com/metamatrix/platform/config/spi/xml/HelperTestConfiguration.java 2009-02-26 21:14:35 UTC (rev 512)
+++ trunk/server/src/test/java/com/metamatrix/platform/config/spi/xml/HelperTestConfiguration.java 2009-02-26 21:26:48 UTC (rev 513)
@@ -34,7 +34,6 @@
import com.metamatrix.common.config.api.ConnectorBinding;
import com.metamatrix.common.config.api.DeployedComponent;
import com.metamatrix.common.config.api.Host;
-import com.metamatrix.common.config.api.HostType;
import com.metamatrix.common.config.api.SharedResource;
import com.metamatrix.common.config.api.exceptions.ConfigurationException;
import com.metamatrix.core.util.ArgCheck;
Modified: trunk/server/src/test/java/com/metamatrix/platform/config/spi/xml/TestCurrentConfiguration.java
===================================================================
--- trunk/server/src/test/java/com/metamatrix/platform/config/spi/xml/TestCurrentConfiguration.java 2009-02-26 21:14:35 UTC (rev 512)
+++ trunk/server/src/test/java/com/metamatrix/platform/config/spi/xml/TestCurrentConfiguration.java 2009-02-26 21:26:48 UTC (rev 513)
@@ -28,7 +28,6 @@
import com.metamatrix.common.config.api.Configuration;
import com.metamatrix.common.config.api.ConfigurationModelContainer;
import com.metamatrix.common.config.api.Host;
-import com.metamatrix.common.util.VMNaming;
import com.metamatrix.platform.config.BaseTest;
import com.metamatrix.platform.config.CurrentConfigHelper;
Modified: trunk/soap/src/main/java/com/metamatrix/soap/servlet/MMGetVDBResourceServlet.java
===================================================================
--- trunk/soap/src/main/java/com/metamatrix/soap/servlet/MMGetVDBResourceServlet.java 2009-02-26 21:14:35 UTC (rev 512)
+++ trunk/soap/src/main/java/com/metamatrix/soap/servlet/MMGetVDBResourceServlet.java 2009-02-26 21:26:48 UTC (rev 513)
@@ -22,40 +22,39 @@
package com.metamatrix.soap.servlet;
-import java.io.File;
-import java.io.IOException;
-import java.io.Reader;
-import java.io.StringWriter;
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-import java.sql.CallableStatement;
-import java.sql.Clob;
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import java.io.File;
+import java.io.IOException;
+import java.io.Reader;
+import java.io.StringWriter;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.sql.CallableStatement;
+import java.sql.Clob;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
import com.metamatrix.common.api.MMURL;
-import com.metamatrix.common.api.MMURL.CONNECTION;
-import com.metamatrix.common.util.WSDLServletUtil;
-import com.metamatrix.core.CoreConstants;
-import com.metamatrix.core.log.FileLogWriter;
-import com.metamatrix.core.log.LogListener;
-import com.metamatrix.core.log.MessageLevel;
-import com.metamatrix.core.util.StringUtil;
-import com.metamatrix.soap.SOAPPlugin;
-import com.metamatrix.soap.util.ErrorMessageKeys;
-import com.metamatrix.soap.util.SOAPConstants;
+import com.metamatrix.common.util.WSDLServletUtil;
+import com.metamatrix.core.CoreConstants;
+import com.metamatrix.core.log.FileLogWriter;
+import com.metamatrix.core.log.LogListener;
+import com.metamatrix.core.log.MessageLevel;
+import com.metamatrix.core.util.StringUtil;
+import com.metamatrix.soap.SOAPPlugin;
+import com.metamatrix.soap.util.ErrorMessageKeys;
+import com.metamatrix.soap.util.SOAPConstants;
import com.metamatrix.soap.util.WebServiceUtil;
Modified: trunk/test-integration/src/test/java/com/metamatrix/cdk/api/TestTranslationUtility.java
===================================================================
--- trunk/test-integration/src/test/java/com/metamatrix/cdk/api/TestTranslationUtility.java 2009-02-26 21:14:35 UTC (rev 512)
+++ trunk/test-integration/src/test/java/com/metamatrix/cdk/api/TestTranslationUtility.java 2009-02-26 21:26:48 UTC (rev 513)
@@ -22,14 +22,13 @@
package com.metamatrix.cdk.api;
+import junit.framework.TestCase;
+
import org.teiid.connector.language.ICommand;
import org.teiid.connector.language.IGroup;
import org.teiid.connector.language.IQuery;
import org.teiid.connector.metadata.runtime.MetadataObject;
-import org.teiid.connector.metadata.runtime.RuntimeMetadata;
-import junit.framework.TestCase;
-
import com.metamatrix.core.util.UnitTestUtil;
public class TestTranslationUtility extends TestCase {
15 years, 9 months
teiid SVN: r512 - trunk/server/src/main/java/com/metamatrix/server.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2009-02-26 16:14:35 -0500 (Thu, 26 Feb 2009)
New Revision: 512
Modified:
trunk/server/src/main/java/com/metamatrix/server/ServerGuiceModule.java
Log:
TEIID-361
Modified: trunk/server/src/main/java/com/metamatrix/server/ServerGuiceModule.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/server/ServerGuiceModule.java 2009-02-26 20:52:47 UTC (rev 511)
+++ trunk/server/src/main/java/com/metamatrix/server/ServerGuiceModule.java 2009-02-26 21:14:35 UTC (rev 512)
@@ -83,7 +83,7 @@
bindConstant().annotatedWith(Names.named(Configuration.VMID)).to(vmID);
bind(Host.class).annotatedWith(Names.named(Configuration.HOST)).toInstance(host);
bindConstant().annotatedWith(Names.named(Configuration.CLUSTERNAME)).to(systemName);
- bindConstant().annotatedWith(Names.named(Configuration.LOGFILE)).to(StringUtil.replaceAll(host.getFullName(), ".", "_")+".log"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ bindConstant().annotatedWith(Names.named(Configuration.LOGFILE)).to(StringUtil.replaceAll(host.getFullName(), ".", "_")+this.vmName+".log"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
bindConstant().annotatedWith(Names.named(Configuration.LOGDIR)).to(host.getLogDirectory());
Names.bindProperties(binder(), CurrentConfiguration.getInstance().getProperties());
15 years, 9 months
teiid SVN: r511 - in trunk: common-core/src/main/java/com/metamatrix/common/protocol/jar and 7 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2009-02-26 15:52:47 -0500 (Thu, 26 Feb 2009)
New Revision: 511
Modified:
trunk/cache-jbosscache/src/main/java/com/metamatrix/cache/jboss/JBossCacheFactory.java
trunk/common-core/src/main/java/com/metamatrix/common/protocol/jar/JarURLConnection.java
trunk/common-internal/src/main/java/com/metamatrix/common/config/CurrentConfiguration.java
trunk/common-internal/src/main/java/com/metamatrix/common/util/VMNaming.java
trunk/common-internal/src/main/java/com/metamatrix/common/vdb/api/VDBArchive.java
trunk/embedded/src/main/resources/jboss-cache-configuration.xml
trunk/embedded/src/test/resources/jboss-cache-configuration.xml
trunk/engine/src/main/java/com/metamatrix/dqp/internal/process/RequestWorkItem.java
trunk/server/src/main/java/com/metamatrix/server/ChannelProvider.java
trunk/server/src/main/java/com/metamatrix/server/HostControllerGuiceModule.java
trunk/server/src/main/java/com/metamatrix/server/JGroupsProvider.java
trunk/server/src/main/java/com/metamatrix/server/ServerGuiceModule.java
Log:
Replacing federate name with teiid
Modified: trunk/cache-jbosscache/src/main/java/com/metamatrix/cache/jboss/JBossCacheFactory.java
===================================================================
--- trunk/cache-jbosscache/src/main/java/com/metamatrix/cache/jboss/JBossCacheFactory.java 2009-02-26 20:34:03 UTC (rev 510)
+++ trunk/cache-jbosscache/src/main/java/com/metamatrix/cache/jboss/JBossCacheFactory.java 2009-02-26 20:52:47 UTC (rev 511)
@@ -61,7 +61,7 @@
try {
CacheJmxWrapperMBean wrapper = new CacheJmxWrapper(cacheStore);
MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
- this.jmxName = new ObjectName("Federate:service=JBossCache,name=cache"); //$NON-NLS-1$
+ this.jmxName = new ObjectName("Teiid:service=JBossCache,name=cache"); //$NON-NLS-1$
mbs.registerMBean(wrapper, this.jmxName);
wrapper.create();
wrapper.start();
@@ -78,7 +78,7 @@
*/
public Cache get(Type type, CacheConfiguration config) {
if (!destroyed) {
- Node cacheRoot = this.cacheStore.getRoot().addChild(Fqn.fromString("Federate")); //$NON-NLS-1$
+ Node cacheRoot = this.cacheStore.getRoot().addChild(Fqn.fromString("Teiid")); //$NON-NLS-1$
Node node = cacheRoot.addChild(Fqn.fromString(type.location()));
Modified: trunk/common-core/src/main/java/com/metamatrix/common/protocol/jar/JarURLConnection.java
===================================================================
--- trunk/common-core/src/main/java/com/metamatrix/common/protocol/jar/JarURLConnection.java 2009-02-26 20:34:03 UTC (rev 510)
+++ trunk/common-core/src/main/java/com/metamatrix/common/protocol/jar/JarURLConnection.java 2009-02-26 20:52:47 UTC (rev 511)
@@ -45,10 +45,10 @@
/**
* Jar protocol connection class. The class extends the JDK provided JarURLConnection factory.
- * However Jar protocol can not understand the federate specific protocols like mmfile, mmrofile etc.
+ * However Jar protocol can not understand the teiid specific protocols like mmfile, mmrofile etc.
* The issue is if you can register application specific protocols during start-up
* using system properties the bulit in JAR protocol understands those protocols.
- * However in the Federate model this need to work by just dropping in in any
+ * However in the Teiid model this need to work by just dropping in in any
* container. This handler will be called for any class loaders registered
* with {@link MetaMatrixURLStreamHandlerFactory}, so that they understand the application specific protocols.
*/
Modified: trunk/common-internal/src/main/java/com/metamatrix/common/config/CurrentConfiguration.java
===================================================================
--- trunk/common-internal/src/main/java/com/metamatrix/common/config/CurrentConfiguration.java 2009-02-26 20:34:03 UTC (rev 510)
+++ trunk/common-internal/src/main/java/com/metamatrix/common/config/CurrentConfiguration.java 2009-02-26 20:52:47 UTC (rev 511)
@@ -92,7 +92,7 @@
public String getClusterName() throws ConfigurationException {
Properties props = getResourceProperties(ResourceNames.JGROUPS);
- return props.getProperty(CLUSTER_NAME, "Federate-Cluster"); //$NON-NLS-1$
+ return props.getProperty(CLUSTER_NAME, "Teiid-Cluster"); //$NON-NLS-1$
}
/**
Modified: trunk/common-internal/src/main/java/com/metamatrix/common/util/VMNaming.java
===================================================================
--- trunk/common-internal/src/main/java/com/metamatrix/common/util/VMNaming.java 2009-02-26 20:34:03 UTC (rev 510)
+++ trunk/common-internal/src/main/java/com/metamatrix/common/util/VMNaming.java 2009-02-26 20:52:47 UTC (rev 511)
@@ -123,7 +123,7 @@
try {
nvalue = InetAddress.getLocalHost().getHostName();
} catch (UnknownHostException e) {
- nvalue = "federate-system"; //$NON-NLS-1$
+ nvalue = "teiid-system"; //$NON-NLS-1$
}
}
return nvalue;
Modified: trunk/common-internal/src/main/java/com/metamatrix/common/vdb/api/VDBArchive.java
===================================================================
--- trunk/common-internal/src/main/java/com/metamatrix/common/vdb/api/VDBArchive.java 2009-02-26 20:34:03 UTC (rev 510)
+++ trunk/common-internal/src/main/java/com/metamatrix/common/vdb/api/VDBArchive.java 2009-02-26 20:52:47 UTC (rev 511)
@@ -239,7 +239,7 @@
private void open() {
if (!open) {
- this.tempDirectory = new TempDirectory(FileUtils.TEMP_DIRECTORY+File.separator+"federate", System.currentTimeMillis(), RANDOM.nextLong()); //$NON-NLS-1$
+ this.tempDirectory = new TempDirectory(FileUtils.TEMP_DIRECTORY+File.separator+"teiid", System.currentTimeMillis(), RANDOM.nextLong()); //$NON-NLS-1$
this.tempDirectory.create();
open = true;
}
Modified: trunk/embedded/src/main/resources/jboss-cache-configuration.xml
===================================================================
--- trunk/embedded/src/main/resources/jboss-cache-configuration.xml 2009-02-26 20:34:03 UTC (rev 510)
+++ trunk/embedded/src/main/resources/jboss-cache-configuration.xml 2009-02-26 20:52:47 UTC (rev 511)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<server>
- <mbean code="org.jboss.cache.pojo.jmx.CacheJmxWrapper" name="jboss.cache:service=FederateCache">
+ <mbean code="org.jboss.cache.pojo.jmx.CacheJmxWrapper" name="jboss.cache:service=TeiidCache">
<attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.GenericTransactionManagerLookup</attribute>
<attribute name="IsolationLevel">READ_COMMITTED</attribute>
<attribute name="LockParentForChildInsertRemove">true</attribute>
Modified: trunk/embedded/src/test/resources/jboss-cache-configuration.xml
===================================================================
--- trunk/embedded/src/test/resources/jboss-cache-configuration.xml 2009-02-26 20:34:03 UTC (rev 510)
+++ trunk/embedded/src/test/resources/jboss-cache-configuration.xml 2009-02-26 20:52:47 UTC (rev 511)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<server>
- <mbean code="org.jboss.cache.pojo.jmx.CacheJmxWrapper" name="jboss.cache:service=FederateCache">
+ <mbean code="org.jboss.cache.pojo.jmx.CacheJmxWrapper" name="jboss.cache:service=TeiidCache">
<attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.GenericTransactionManagerLookup</attribute>
<attribute name="IsolationLevel">READ_COMMITTED</attribute>
<attribute name="LockParentForChildInsertRemove">true</attribute>
@@ -39,7 +39,7 @@
<cacheloader>
<class>org.jboss.cache.loader.FileCacheLoader</class>
- <properties>location=./target/scratch/federate</properties>
+ <properties>location=./target/scratch/teiid</properties>
<!--fetch the persistent state of a cache when joining a cluster-->
<fetchPersistentState>true</fetchPersistentState>
Modified: trunk/engine/src/main/java/com/metamatrix/dqp/internal/process/RequestWorkItem.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/dqp/internal/process/RequestWorkItem.java 2009-02-26 20:34:03 UTC (rev 510)
+++ trunk/engine/src/main/java/com/metamatrix/dqp/internal/process/RequestWorkItem.java 2009-02-26 20:52:47 UTC (rev 511)
@@ -271,7 +271,7 @@
if (this.transactionState == TransactionState.ACTIVE) {
boolean end = true;
/*
- * FEDERATE-111 if we are done producing batches, then proactively close transactional
+ * TEIID-14 if we are done producing batches, then proactively close transactional
* executions even ones that were intentionally kept alive. this may
* break the read of a lob from a transactional source under a transaction
* if the source does not support holding the clob open after commit
Modified: trunk/server/src/main/java/com/metamatrix/server/ChannelProvider.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/server/ChannelProvider.java 2009-02-26 20:34:03 UTC (rev 510)
+++ trunk/server/src/main/java/com/metamatrix/server/ChannelProvider.java 2009-02-26 20:52:47 UTC (rev 511)
@@ -45,7 +45,7 @@
Channel c = this.channelMap.get(id);
if (c == null) {
try {
- c = this.mux.createMuxChannel(id.toString(), "Federate"); //$NON-NLS-1$
+ c = this.mux.createMuxChannel(id.toString(), "teiid"); //$NON-NLS-1$
this.channelMap.put(id, c);
} catch (Exception e) {
throw new MetaMatrixRuntimeException("Failed to create a Channel"); //$NON-NLS-1$
Modified: trunk/server/src/main/java/com/metamatrix/server/HostControllerGuiceModule.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/server/HostControllerGuiceModule.java 2009-02-26 20:34:03 UTC (rev 510)
+++ trunk/server/src/main/java/com/metamatrix/server/HostControllerGuiceModule.java 2009-02-26 20:52:47 UTC (rev 511)
@@ -72,7 +72,7 @@
try {
systemName = CurrentConfiguration.getInstance().getClusterName();
} catch (ConfigurationException err) {
- systemName = "Federate-Cluster"; //$NON-NLS-1$
+ systemName = "Teiid-Cluster"; //$NON-NLS-1$
}
Modified: trunk/server/src/main/java/com/metamatrix/server/JGroupsProvider.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/server/JGroupsProvider.java 2009-02-26 20:34:03 UTC (rev 510)
+++ trunk/server/src/main/java/com/metamatrix/server/JGroupsProvider.java 2009-02-26 20:52:47 UTC (rev 511)
@@ -104,7 +104,7 @@
// register the channel with the JMX server
try {
MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
- ObjectName on = new ObjectName("Federate:service=JChannel,name=JGroups"); //$NON-NLS-1$
+ ObjectName on = new ObjectName("Teiid:service=JChannel,name=JGroups"); //$NON-NLS-1$
mbs.registerMBean(new org.jgroups.jmx.JChannel(channel), on);
} catch (MalformedObjectNameException e) {
LogManager.logWarning(LogCommonConstants.CTX_CONFIG, "Failed to register JChannel to JMX"); //$NON-NLS-1$
Modified: trunk/server/src/main/java/com/metamatrix/server/ServerGuiceModule.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/server/ServerGuiceModule.java 2009-02-26 20:34:03 UTC (rev 510)
+++ trunk/server/src/main/java/com/metamatrix/server/ServerGuiceModule.java 2009-02-26 20:52:47 UTC (rev 511)
@@ -75,7 +75,7 @@
try {
systemName = CurrentConfiguration.getInstance().getClusterName();
} catch (ConfigurationException err) {
- systemName = "Federate-Cluster"; //$NON-NLS-1$
+ systemName = "Teiid-Cluster"; //$NON-NLS-1$
}
bindConstant().annotatedWith(Names.named(Configuration.HOSTNAME)).to(host.getFullName());
15 years, 9 months